/* =================================================================
   Registracijos sistema — viešoji dalis
   Kryptis: televizijos studija. Tamsi scena tituliniame, šviesios
   formos, kiekviena laida su savo „šviesa".
   ================================================================= */

:root {
	--stage:      #0C1018;
	--stage-2:    #131A28;
	--paper:      #F4F5F7;
	--card:       #FFFFFF;
	--ink:        #14181F;
	--muted:      #6A7280;
	--line:       #E1E4E9;
	--line-soft:  #EDEFF2;

	--kas:        #E8921F;   /* dekoratyvinė (juostos, žymės) */
	--kas-text:   #A86410;   /* tekstui ant balto — kontrastas 4.7:1 */
	--kas-deep:   #8F520B;
	--tn:         #2563A8;
	--tn-text:    #1F5590;
	--tn-yes:     #3BA868;
	--tn-no:      #D64545;

	--ok:         #1F7A4D;
	--warn:       #B06A12;
	--err:        #C2342F;

	--r-sm: 8px;
	--r:    12px;
	--r-lg: 18px;

	--shadow:    0 1px 2px rgba(16,22,34,.05), 0 4px 14px rgba(16,22,34,.05);
	--shadow-lg: 0 18px 50px rgba(8,12,20,.14);
}

*, *::before, *::after { box-sizing: border-box; }

/* SVARBU: display:flex/grid nustelbtų numatytąjį [hidden] elgesį. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
	font-family: Archivo, Inter, system-ui, sans-serif;
	letter-spacing: -0.02em;
	margin: 0;
}

a { color: inherit; }

img { max-width: 100%; }

.wrap { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 20px; }

/* =================================================================
   TITULINIS — šviesi studija: baltas fonas, spalvų atšvaitai
   ================================================================= */

.stage {
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	position: relative;
	overflow: hidden;
	background: var(--paper);
}

/* Studijos šviesos, krentančios ant baltos sienos */
.stage::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(42% 36% at 22% 44%, rgba(232,146,31,.2), transparent 70%),
		radial-gradient(42% 36% at 78% 44%, rgba(37,99,168,.18), transparent 70%),
		radial-gradient(92% 46% at 50% -6%, rgba(255,255,255,.96), transparent 74%);
	pointer-events: none;
}

.stage > * { position: relative; z-index: 1; }

.stage-head {
	padding: 54px 20px 8px;
	text-align: center;
}

.brand {
	display: inline-block;
	margin: 0 0 34px;
	line-height: 0;
	border-radius: 6px;
	transition: transform .25s;
}
.brand:hover { transform: translateY(-2px); }
.brand img { width: 150px; height: auto; display: block; }

.stage-eyebrow {
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .24em;
	text-transform: uppercase;
	color: var(--muted);
	margin: 0 0 14px;
}

.stage-title {
	font-size: clamp(1.95rem, 4.6vw, 2.95rem);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.038em;
	max-width: 22ch;
	margin: 0 auto;
	color: var(--ink);
	text-wrap: balance;
}

.stage-intro {
	margin: 16px auto 0;
	max-width: 44ch;
	color: #5A626E;
	font-size: 1.04rem;
}

/* --- Laidų kortelės --- */

.podiums {
	flex: 0 0 auto;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	align-content: center;
	width: 100%;
	max-width: 880px;
	margin: 0 auto;
	padding: 40px 20px 36px;
}

.podium {
	--light: var(--kas);
	--light-soft: rgba(232,146,31,.13);
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 34px 32px 30px;
	border-radius: var(--r-lg);
	background: var(--card);
	border: 1px solid var(--line);
	text-decoration: none;
	color: var(--ink);
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(16,22,34,.04), 0 10px 30px rgba(16,22,34,.06);
	transition: transform .3s cubic-bezier(.2,.7,.3,1), box-shadow .3s, border-color .3s;
}

.podium--tn {
	--light: var(--tn);
	--light-soft: rgba(37,99,168,.12);
}

/* Spalvos juosta viršuje */
.podium::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 5px;
	background: var(--light);
}

/* Švelnus spalvos atšvaitas kortelės apačioje */
.podium::after {
	content: "";
	position: absolute;
	left: -20%;
	bottom: -70%;
	width: 140%;
	height: 110%;
	background: radial-gradient(50% 50% at 50% 50%, var(--light-soft), transparent 70%);
	opacity: .85;
	transition: opacity .3s, transform .3s;
	pointer-events: none;
}

.podium:hover,
.podium:focus-visible {
	transform: translateY(-6px);
	border-color: var(--light);
	box-shadow: 0 2px 4px rgba(16,22,34,.05), 0 24px 54px rgba(16,22,34,.13);
	outline: none;
}
.podium:hover::after,
.podium:focus-visible::after { opacity: 1; transform: translateY(-14px); }

.podium:focus-visible { box-shadow: 0 0 0 3px var(--light), 0 24px 54px rgba(16,22,34,.13); }

/* Būsenos žymė — eterio stiliaus */
.podium-status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	align-self: flex-start;
	padding: 6px 12px 6px 10px;
	border-radius: 999px;
	background: #F2F4F7;
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #5A626E;
}

.podium-status i {
	width: 7px; height: 7px;
	border-radius: 50%;
	background: var(--tn-yes);
	display: block;
	box-shadow: 0 0 0 3px rgba(59,168,104,.2);
}

.podium--off .podium-status i {
	background: #9AA1AB;
	box-shadow: 0 0 0 3px rgba(154,161,171,.2);
}

.podium-name {
	margin: 24px 0 0;
	font-size: clamp(1.7rem, 3.6vw, 2.3rem);
	font-weight: 800;
	line-height: 1.06;
	letter-spacing: -0.04em;
}

.podium-tag {
	margin: 11px 0 0;
	color: #5A626E;
	font-size: .98rem;
	line-height: 1.45;
	max-width: 26ch;
}

.podium-go {
	margin-top: auto;
	padding-top: 34px;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-weight: 700;
	font-size: .97rem;
	color: var(--kas-text);
}

.podium--tn .podium-go { color: var(--tn-text); }

.go-arrow { transition: transform .25s; }
.podium:hover .go-arrow { transform: translateX(5px); }

.podium--off {
	opacity: .72;
	pointer-events: none;
	box-shadow: none;
}
.podium--off::before { background: #C9CDD4; }
.podium--off::after { display: none; }

.podium-closed {
	margin-top: auto;
	padding-top: 34px;
	font-size: .93rem;
	font-weight: 600;
	color: var(--muted);
}

.stage-foot {
	margin-top: auto;
	padding: 28px 20px 36px;
	text-align: center;
	font-size: .88rem;
	color: var(--muted);
}
.stage-foot a { color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); }
.stage-foot a:hover { border-color: var(--ink); }

/* =================================================================
   FORMŲ PUSLAPIAI
   ================================================================= */

.topbar {
	background: var(--card);
	color: var(--ink);
	padding: 14px 0;
	position: relative;
	border-bottom: 1px solid var(--line);
}
.topbar::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: -1px;
	height: 3px;
	background: var(--accent, var(--kas));
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.topbar-left { display: flex; align-items: center; gap: 18px; min-width: 0; }

.topbar-logo { line-height: 0; flex: 0 0 auto; }
.topbar-logo img { width: 92px; height: auto; display: block; }

.topbar-back {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: .88rem;
	font-weight: 600;
	color: var(--muted);
	text-decoration: none;
	white-space: nowrap;
}
.topbar-back:hover { color: var(--ink); }

.topbar-show {
	font-family: Archivo, sans-serif;
	font-weight: 700;
	font-size: .95rem;
	letter-spacing: -0.015em;
	color: var(--accent-deep, var(--kas-deep));
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

main { padding: 36px 0 70px; }

.page-head { margin: 0 0 26px; }

.page-title {
	font-size: clamp(1.45rem, 3.6vw, 2rem);
	font-weight: 800;
	line-height: 1.18;
	letter-spacing: -0.03em;
	padding-bottom: 16px;
	border-bottom: 2px solid var(--ink);
}

.page-intro { margin: 18px 0 0; color: #3C434E; font-size: 1.01rem; }
.page-intro p { margin: 0 0 10px; }

/* --- Sekcijos --- */

.section {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--r);
	padding: 22px 24px 24px;
	margin: 0 0 16px;
	box-shadow: var(--shadow);
}

.section-head { display: flex; align-items: center; gap: 12px; margin: 0 0 6px; }

.step {
	flex: 0 0 27px;
	width: 27px; height: 27px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 50%;
	background: var(--ink);
	color: #fff;
	font-family: Archivo, sans-serif;
	font-size: .8rem;
	font-weight: 700;
	line-height: 1;
}

.section-title { font-size: 1.1rem; font-weight: 700; }

.help { margin: 9px 0 18px; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.help strong { color: var(--accent-deep, var(--ink)); }

/* --- Laukai --- */

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.grid--players { grid-template-columns: 1.1fr 1.1fr .6fr 1.5fr; gap: 12px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field--half { max-width: 420px; }

.field > label {
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--muted);
}

.req { color: var(--accent, var(--kas)); }

input[type=text], input[type=email], input[type=tel], input[type=number],
select, textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	background: #fff;
	font: inherit;
	font-size: .97rem;
	color: var(--ink);
	transition: border-color .15s, box-shadow .15s;
}

textarea { resize: vertical; min-height: 86px; }

select {
	appearance: none;
	-webkit-appearance: none;
	background-image:
		linear-gradient(45deg, transparent 50%, var(--muted) 50%),
		linear-gradient(135deg, var(--muted) 50%, transparent 50%);
	background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	padding-right: 38px;
}

input:focus, select:focus, textarea:focus {
	outline: none;
	border-color: var(--accent, var(--kas));
	box-shadow: 0 0 0 3px var(--accent-soft, rgba(240,168,48,.18));
}

[aria-invalid="true"] { border-color: var(--err) !important; background: #FEF7F7; }

/* --- Datų kortelės --- */

.sessions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.session {
	border: 1px solid var(--line);
	border-radius: var(--r);
	padding: 15px;
	background: #FAFBFC;
	min-width: 0;
}

.session-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin: 0 0 12px;
	padding: 0 2px 10px;
	border-bottom: 1px solid var(--line);
}

.session-name {
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--accent-deep, var(--kas-deep));
}

.session-range { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.days { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }

.day {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 11px 12px 10px;
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	background: #fff;
	cursor: pointer;
	transition: border-color .16s, background .16s, transform .16s;
}

.day:hover { border-color: var(--ink); transform: translateY(-1px); }

.day input {
	position: absolute;
	opacity: 0;
	width: 1px; height: 1px;
	pointer-events: none;
}

.day-date {
	font-family: Archivo, sans-serif;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.15;
	font-variant-numeric: tabular-nums;
}

.day-wd {
	font-size: .66rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--muted);
}

.day-meter {
	margin-top: 8px;
	height: 3px;
	border-radius: 2px;
	background: #E8EBEF;
	overflow: hidden;
}
.day-meter i { display: block; height: 100%; background: var(--ok); border-radius: 2px; }
.day-meter i.is-tight { background: var(--warn); }
.day-meter i.is-full  { background: var(--err); }

.day-left {
	margin-top: 5px;
	font-size: .7rem;
	font-weight: 600;
	color: var(--ok);
	font-variant-numeric: tabular-nums;
}
.day-left.is-full { color: var(--err); }

.day-warn { margin-top: 3px; font-size: .67rem; font-weight: 600; color: var(--err); line-height: 1.35; }

.day.is-on {
	border-color: var(--ink);
	background: var(--ink);
	transform: translateY(-1px);
}
.day.is-on .day-date { color: #fff; }
.day.is-on .day-wd   { color: rgba(255,255,255,.62); }
.day.is-on .day-left { color: #8FD6A9; }
.day.is-on .day-left.is-full { color: #FFB3B3; }
.day.is-on .day-warn { color: #FFB3B3; }
.day.is-on .day-meter { background: rgba(255,255,255,.2); }

.day.is-full { background: #F7F8F9; }
.day.is-full.is-on { background: var(--ink); }

/* Užrakinta sekcija (kol nepasirinkta kategorija) */
.locked-note {
	padding: 16px 18px;
	border: 1px dashed #C9CDD4;
	border-radius: var(--r);
	background: #FAFBFC;
	color: var(--muted);
	font-size: .9rem;
	margin: 0;
}
.section.is-locked .locked-body { display: none; }
.section:not(.is-locked) .locked-note { display: none; }
.section.is-locked .step { background: #C2C7CF; }

.cat-line { margin: 0 0 14px; font-size: .88rem; color: var(--muted); }
.cat-line strong { color: var(--accent-deep, var(--kas-deep)); }

.session-empty { margin: 0; padding: 4px 2px; font-size: .82rem; color: var(--muted); font-style: italic; }

/* --- Žaidėjų eilutės --- */

.player {
	position: relative;
	display: flex;
	align-items: flex-end;
	gap: 12px;
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	padding: 14px 14px 14px 48px;
	margin: 0 0 10px;
	background: #FAFBFC;
}
.player:nth-child(even) { background: #fff; }

.player-num {
	position: absolute;
	left: 14px;
	bottom: 15px;
	width: 23px; height: 23px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 50%;
	border: 1px solid var(--line);
	background: #fff;
	font-family: Archivo, sans-serif;
	font-size: .72rem;
	font-weight: 700;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.player .grid { flex: 1 1 auto; min-width: 0; }

.player-remove {
	flex: 0 0 auto;
	border: 0;
	background: none;
	padding: 0 0 12px;
	color: var(--muted);
	font: inherit;
	font-size: .78rem;
	text-decoration: underline;
	cursor: pointer;
}
.player-remove:hover { color: var(--err); }
.player:first-child .player-remove { visibility: hidden; }

.add-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 14px 0 0; }

.btn-add {
	border: 1px dashed #C5C9D0;
	background: #fff;
	color: var(--ink);
	padding: 11px 18px;
	border-radius: var(--r-sm);
	font: inherit;
	font-size: .92rem;
	font-weight: 600;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}
.btn-add::before { content: "+"; margin-right: 7px; font-weight: 700; }
.btn-add:hover:not(:disabled) { border-style: solid; border-color: var(--ink); background: #FAFBFC; }
.btn-add:disabled { opacity: .45; cursor: not-allowed; }

.counter { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }

/* --- Varnelė --- */

.check {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 14px 16px;
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	background: #FAFBFC;
	cursor: pointer;
	font-weight: 600;
	transition: border-color .15s;
}
.check:hover { border-color: var(--ink); }
.check input { width: 19px; height: 19px; flex: 0 0 auto; margin: 0; accent-color: var(--accent, var(--kas)); }

.partner { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }

/* --- Siuntimas --- */

.submit-row { margin: 22px 0 0; }

.btn-submit {
	background: var(--ink);
	color: #fff;
	border: 0;
	border-radius: var(--r-sm);
	padding: 15px 34px;
	font: inherit;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: background .18s, transform .18s;
}
.btn-submit:hover { background: var(--accent-deep, var(--kas-deep)); transform: translateY(-1px); }
.btn-submit:active { transform: none; }

/* --- Pranešimai --- */

.notice {
	border-radius: var(--r);
	padding: 16px 18px;
	margin: 0 0 20px;
	border: 1px solid;
	font-size: .95rem;
}
.notice strong { display: block; margin: 0 0 4px; }
.notice ul { margin: 8px 0 0; padding-left: 20px; }
.notice li { margin: 2px 0; }
.notice--ok { border-color: var(--ok); background: #F1F9F4; }
.notice--err { border-color: var(--err); background: #FDF4F4; }

/* --- Sėkmės ekranas --- */

.done {
	max-width: 560px;
	margin: 60px auto;
	text-align: center;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--r-lg);
	padding: 48px 34px;
	box-shadow: var(--shadow);
}

.done-mark {
	width: 62px; height: 62px;
	margin: 0 auto 22px;
	border-radius: 50%;
	background: #EAF7F0;
	display: flex; align-items: center; justify-content: center;
}
.done-mark svg { width: 30px; height: 30px; stroke: var(--ok); }

.done h1 { font-size: 1.5rem; font-weight: 800; margin: 0 0 12px; }
.done p { margin: 0 0 8px; color: #4A515C; }

.done-back {
	display: inline-block;
	margin-top: 22px;
	padding: 11px 22px;
	border: 1px solid var(--line);
	border-radius: var(--r-sm);
	font-weight: 600;
	font-size: .92rem;
	text-decoration: none;
	color: var(--ink);
}
.done-back:hover { border-color: var(--ink); }

/* Šiukšlių gaudyklė */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* =================================================================
   Adaptyvumas
   ================================================================= */

@media (max-width: 860px) {
	.grid--players { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
	.podiums { grid-template-columns: 1fr; gap: 16px; padding: 32px 20px 30px; }
	.podium { padding: 26px 24px 24px; }
	.podium-name { font-size: 1.7rem; margin-top: 20px; }
	.podium-go, .podium-closed { padding-top: 26px; }
	.stage-head { padding-top: 40px; }
	.brand { margin-bottom: 26px; }
	.brand img { width: 128px; }
	.topbar-logo img { width: 78px; }
	.topbar-left { gap: 13px; }
	.topbar-show { font-size: .85rem; }
	.grid, .sessions { grid-template-columns: 1fr; }
	.field--half { max-width: 100%; }
	.section { padding: 18px 16px 20px; }
	.player { flex-wrap: wrap; align-items: stretch; padding: 14px; }
	.player-num { position: static; margin: 0 0 10px; }
	.player-remove { padding: 8px 0 0; text-align: left; }
	.btn-submit { width: 100%; }
	.done { margin: 30px auto; padding: 38px 24px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
