/*
 * Public-facing styles.
 */

body.public-shell {
	padding-top: 118px;
	background:
		radial-gradient(circle at 3% 0%, rgba(255, 203, 129, 0.35), transparent 40%),
		radial-gradient(circle at 95% 12%, rgba(118, 225, 213, 0.32), transparent 44%),
		linear-gradient(180deg, #f8f5ef 0%, #f4f0e8 100%);
}

.page-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	display: grid;
	gap: 12px;
	padding: 20px 0 16px;
	overflow: visible;
	background: rgba(247, 243, 234, 0.9);
	backdrop-filter: blur(10px);
	border-bottom: none;
}

.header-shell {
	width: min(1600px, calc(100% - 40px));
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 18px;
}

.page-header-right {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 12px;
}

.brand-logo {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	overflow: visible;
}

.page-header-group {
	display: flex;
	align-items: center;
	gap: 12px;
}

.page-header-note {
	color: #b91c1c;
	font-size: 0.9rem;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.page-header-tab {
	background: rgba(255, 255, 255, 0.92);
	border-color: rgba(15, 118, 110, 0.18);
	color: #2f3f4e;
	box-shadow: 0 6px 14px rgba(13, 58, 91, 0.08);
}

.page-header-tab:hover {
	background: #ffffff;
	border-color: rgba(15, 118, 110, 0.24);
	box-shadow: 0 12px 24px rgba(13, 58, 91, 0.12);
}

.site-nav {
	display: flex;
	gap: 10px;
	align-items: center;
}

.brand-mark {
	width: 63px;
	height: 63px;
	display: inline-block;
	border-radius: 14px;
	background: none;
	box-shadow: none;
	padding: 0;
	transform: scale(4);
	transform-origin: left center;
}

.brand-text {
	display: grid;
	line-height: 1.1;
	transform: scale(1.5);
	transform-origin: left center;
}

.brand-text strong {
	font-family: var(--font-display);
	font-size: 1.6rem;
	letter-spacing: -0.01em;
}

.brand-text small {
	font-size: 1.125rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-muted);
}

.site-nav {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	justify-content: flex-end;
}

/* Language Dropdown */
.lang-dropdown {
	position: relative;
	display: inline-block;
}

.lang-dropbtn {
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	height: 38px; /* Match small button height */
}

.lang-dropdown-content {
	display: none;
	position: absolute;
	right: 0;
	top: 100%;
	margin-top: 8px;
	background-color: var(--surface);
	min-width: 160px;
	box-shadow: var(--shadow-strong);
	border-radius: var(--radius-sm);
	z-index: 1001;
	border: 1px solid var(--border);
	overflow: hidden;
}

.lang-dropdown-content a {
	color: var(--text);
	padding: 12px 16px;
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 500;
	transition: background 0.2s;
}

.lang-dropdown-content a:hover {
	background-color: var(--bg-soft);
}

.lang-dropdown.active .lang-dropdown-content {
	display: block;
}

.lang-flag {
	display: flex;
	align-items: center;
	width: 22px;
	height: 15px;
	overflow: hidden;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(0,0,0,0.05);
}

.lang-flag svg {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.site-nav a {
	min-width: 0;
}

.page-header-note {
	margin: 0 12px 0 8px;
	color: #475569;
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1.6;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.page-header-note strong {
	color: #0f766e;
}

.page-under-header {
	position: fixed;
	top: 99px; /* Height of .page-header */
	left: 0;
	right: 0;
	z-index: 999;
	width: 100%;
	height: 1cm;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(10px);
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	padding: 0;
}

.page-under-header-note {
	margin: 0;
	color: #ff4d4d;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.7;
	letter-spacing: 0.01em;
	animation: pulse-red 2s infinite ease-in-out;
}

@keyframes pulse-red {
	0% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.7; transform: scale(0.98); }
	100% { opacity: 1; transform: scale(1); }
}

.public-main {
	width: min(1600px, calc(100% - 40px));
	margin: calc(99px + 1cm + 28px) auto 56px;
	display: grid;
	gap: 26px;
}

.landing-hero {
	display: grid;
	grid-template-columns: 1fr 1.1fr;
	gap: 18px;
	align-items: center;
}

.hero-copy {
	padding: 30px;
	border-radius: var(--radius-lg);
	background: linear-gradient(150deg, #ffffff 0%, #fff9ee 100%);
	border: 1px solid rgba(15, 118, 110, 0.18);
	box-shadow: var(--shadow-strong);
}

.hero-copy h1 {
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(2.2rem, 4.4vw, 4rem);
	line-height: 0.95;
	letter-spacing: -0.04em;
}

.hero-copy p {
	margin: 18px 0;
	line-height: 1.75;
	font-size: 1rem;
	color: var(--text-muted);
	max-width: 56ch;
}

.eyebrow {
	display: inline-flex;
	padding: 7px 11px;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent-strong);
	font-size: 0.73rem;
	font-weight: 800;
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 15px;
}

.hero-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 20px;
}

.hero-points {
	margin: 22px 0 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 8px;
}

.hero-points li {
	position: relative;
	padding-left: 20px;
	font-size: 0.95rem;
	color: #355162;
}

.hero-points li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 8px;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--primary);
	box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
}

.hero-visual {
	display: block;
	width: 100%;
}

.hero-image-frame {
	position: relative;
	overflow: hidden;
	border-radius: 24px;
}

.hero-image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 24px;
	box-shadow: 0 25px 80px rgba(6, 25, 38, 0.32);
	border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-zoom {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 56px;
	height: 56px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.18);
	backdrop-filter: blur(10px);
	color: #ffffff;
	cursor: pointer;
	display: grid;
	place-items: center;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
	transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.hero-zoom:hover,
.hero-zoom:focus {
	transform: translate(-50%, -50%) scale(1.05);
	background: rgba(255, 255, 255, 0.25);
	box-shadow: 0 20px 44px rgba(0, 0, 0, 0.24);
}

.hero-zoom-icon {
	display: block;
	width: 20px;
	height: 20px;
	background: no-repeat center/contain url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23ffffff' d='M15.5 14h-.79l-.28-.27a6.471 6.471 0 0 0 1.48-5.34C15.27 5.59 12.42 3 9 3S2.73 5.59 2.09 8.39a6.5 6.5 0 0 0 11.3 5.09l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6.5 0C6.01 14 4 11.99 4 9.5S6.01 5 8.5 5 13 7.01 13 9.5 10.99 14 8.5 14z'/%3E%3C/svg%3E");
}

.hero-image-frame:fullscreen .hero-zoom,
.hero-image-frame:-webkit-full-screen .hero-zoom {
	display: none;
}

.hero-card {
	width: min(500px, 100%);
	border-radius: 30px;
	padding: 24px;
	background: linear-gradient(170deg, #0f2433 0%, #17384c 100%);
	border: 1px solid rgba(255, 255, 255, 0.18);
	box-shadow: 0 35px 90px rgba(17, 40, 59, 0.33);
	color: #e5f6ff;
}

.hero-card-title {
	font-size: 0.75rem;
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: 0.09em;
	color: rgba(235, 248, 255, 0.75);
	margin-bottom: 14px;
}

.screen-player {
	display: grid;
	gap: 14px;
	padding: 16px;
	border-radius: 20px;
	background: linear-gradient(140deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
	border: 1px solid rgba(255, 255, 255, 0.22);
}

.player-header,
.player-footer {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
}

.player-label {
	font-size: 0.95rem;
	font-weight: 700;
	color: #ffffff;
}

.player-badge {
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.7rem;
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	background: rgba(249, 115, 22, 0.32);
	color: #ffedd5;
}

.player-screen {
	min-height: 180px;
	display: grid;
	place-items: center;
	padding: 16px;
	border-radius: 18px;
	background: linear-gradient(160deg, rgba(15, 118, 110, 0.2), rgba(13, 42, 67, 0.85));
	text-align: center;
	font-size: 0.95rem;
	line-height: 1.6;
}

.player-footer {
	font-size: 0.82rem;
	color: rgba(226, 247, 255, 0.78);
}

.feature-section,
.process-section,
.news-grid,
.playlist-grid {
	padding: 26px;
	border-radius: var(--radius-lg);
	background: rgba(255, 255, 255, 0.88);
	border: 1px solid rgba(201, 213, 225, 0.8);
	box-shadow: var(--shadow-soft);
}

.section-head {
	margin-bottom: 18px;
}

.section-head h2 {
	margin: 0;
	font-family: var(--font-display);
	font-size: clamp(1.55rem, 2.8vw, 2rem);
	letter-spacing: -0.02em;
}

.section-head p {
	margin: 8px 0 0;
	color: var(--text-muted);
	line-height: 1.65;
}

.feature-grid,
.process-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
}

.feature-card,
.process-step,
.news-card {
	padding: 16px;
	border-radius: 16px;
	background: linear-gradient(170deg, #ffffff, #fffbf3);
	border: 1px solid rgba(213, 222, 231, 0.95);
}

.feature-icon {
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	margin-bottom: 10px;
	border-radius: 11px;
	background: var(--primary-soft);
	color: var(--primary-strong);
	font-size: 1rem;
}

.feature-card h3,
.process-step h3,
.news-card h3 {
	margin: 0;
	font-size: 1rem;
	font-family: var(--font-display);
	letter-spacing: -0.01em;
}

.feature-card p,
.process-step p,
.news-card p {
	margin: 10px 0 0;
	line-height: 1.66;
	font-size: 0.92rem;
	color: var(--text-muted);
}

.process-step .step-index {
	display: inline-flex;
	padding: 3px 8px;
	border-radius: 999px;
	background: #f1f5f9;
	font-family: var(--font-mono);
	font-size: 0.71rem;
	margin-bottom: 10px;
	color: #334155;
}

.news-grid {
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	gap: 16px;
}

.news-card.highlight {
	background: linear-gradient(130deg, #f0f9ff 0%, #fefce8 100%);
	border-color: #bae6fd;
}

.site-footer {
	padding: 18px 22px;
	border-radius: var(--radius-md);
	background: #243847;
	color: #e2edf6;
	font-size: 0.87rem;
	line-height: 1.65;
}

.site-footer p {
	margin: 0;
}

.playlist-public-url {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	word-break: break-all;
}

.credentials-list {
	display: grid;
	gap: 10px;
}

.credentials-item {
	padding: 12px;
	border-radius: 14px;
	border: 1px solid var(--border);
	background: #ffffff;
	display: grid;
	gap: 8px;
}

.credentials-meta {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	font-size: 0.84rem;
	color: var(--text-muted);
}

.credential-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	font-size: 0.89rem;
}

.credential-grid span {
	display: block;
	font-weight: 700;
	margin-bottom: 2px;
	font-size: 0.8rem;
	color: #334155;
}

@media (max-width: 1100px) {
	.feature-grid,
	.process-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.news-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 860px) {
	body.public-shell {
		padding-top: 124px;
	}

	.header-shell {
		flex-direction: column;
		align-items: stretch;
	}

	.site-nav {
		justify-content: flex-start;
		overflow-x: auto;
		padding-bottom: 2px;
	}

	.landing-hero {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.public-main {
		width: calc(100% - 20px);
		margin-top: 20px;
	}

	.hero-copy,
	.feature-section,
	.process-section,
	.news-grid,
	.playlist-grid {
		padding: 18px;
		border-radius: 20px;
	}

	.hero-copy h1 {
		font-size: clamp(1.9rem, 10vw, 2.7rem);
	}

	.feature-grid,
	.process-grid,
	.credential-grid {
		grid-template-columns: 1fr;
	}

	.site-footer {
		padding: 16px;
	}
}
/* Make public auth pages use a consistent card layout and viewport fit */
body.public-shell.public-auth {
	min-height: 100vh;
	overflow: hidden;
}

body.public-shell.public-auth .page-under-header {
	display: none;
}

body.public-shell.public-auth .public-main {
	margin: 0 auto;
	height: calc(100vh - 99px);
	display: grid;
	align-items: center;
	justify-items: center;
	width: min(var(--content-width), calc(100% - 32px));
	overflow: hidden;
}

body.public-shell.public-auth .auth-page {
	padding: 0;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	height: 100%;
}

body.public-shell.public-auth .auth-card {
	width: min(900px, 100%);
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	padding: 24px;
	margin: auto;
}

body.public-shell.public-auth .auth-card.auth-card-narrow,
body.public-shell.public-auth .auth-card.auth-card-login {
	width: min(520px, 100%);
}

body.public-shell.public-auth .auth-card .results-section {
	overflow-y: auto;
	margin-top: 18px;
	flex: 1;
	min-height: 0;
}

body.public-shell.public-auth .auth-card > *:not(.results-section) {
	flex-shrink: 0;
}

body.public-shell.public-auth .auth-card .results-section {
	overflow-y: auto;
	margin-top: 18px;
	padding-right: 8px;
}

@media (max-width: 860px) {
	body.public-shell.public-auth {
		min-height: 100vh;
	}

	body.public-shell.public-auth .public-main {
		min-height: calc(100vh - 124px);
		max-height: calc(100vh - 124px);
	}
}

@media (max-width: 680px) {
	body.public-shell.public-auth .public-main {
		width: calc(100% - 16px);
		margin: 0 auto;
		min-height: calc(100vh - 136px);
		max-height: calc(100vh - 136px);
	}

	body.public-shell.public-auth .auth-page {
		padding: 18px 14px 28px;
	}

	body.public-shell.public-auth .auth-card {
		min-height: 460px;
	}
}