@charset "UTF-8";

/* ===========================================================================
   Time4English — registracijos anketa
   Vienas rankomis rašytas stiliaus failas. Jokių karkasų, jokio kompiliavimo.

   Kryptis: „uždanga ir programėlė". Tamsi pušies žalumos juosta (scena) su
   lambrekeno kraštu virš šviesaus popieriaus lapo (anketa). Firminė žalia
   #6bd66b naudojama tik trims dalykams: fokusui, pateikimo mygtukui ir
   sėkmės momentui.
   =========================================================================== */

/* --- Šriftai --------------------------------------------------------------
   Talpinami lokaliai. latin-ext būtinas: be jo ą č ę ė į š ų ū ž virsta
   kvadratėliais būtent ten, kur tai svarbiausia — varduose ir pavardėse. */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/fraunces-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/figtree-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/figtree-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Žetonai -------------------------------------------------------------- */

:root {
  --stage: #0f3b2a;
  --stage-deep: #092219;
  --stage-soft: #1c5540;

  --paper: #fbf7ef;
  --paper-sunk: #f3ece0;
  --paper-edge: #e2d9c8;

  --ink: #14211b;
  --muted: #66756d;
  --muted-light: #9db3a8;

  --brand: #6bd66b;
  --brand-deep: #3f9c48;

  --spot: #f2b441;
  --alarm: #a83b26;

  --font-display: 'Fraunces', ui-serif, Georgia, serif;
  --font-sans: 'Figtree', ui-sans-serif, system-ui, -apple-system, sans-serif;

  --r-well: 14px;
  --r-sheet: 28px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* --- Atstata -------------------------------------------------------------- */

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

* {
  margin: 0;
}

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

body {
  min-height: 100dvh;
  background: var(--stage-deep);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--brand);
  color: var(--ink);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- Programėlės kortelė --------------------------------------------------
   Mobiliajame — per visą ekraną, nes kiekvienas pikselis skaičiuojasi.
   Nuo 640px — centruota kortelė ant tamsesnio fono. */

.playbill {
  max-width: 580px;
  margin: 0 auto;
  background: var(--paper);
  overflow: hidden;
}

@media (min-width: 640px) {
  .playbill {
    margin: 40px auto;
    border-radius: var(--r-sheet);
    box-shadow: 0 24px 60px -12px rgb(0 0 0 / 0.45);
  }
}

/* --- Scena (uždangos juosta) ---------------------------------------------- */

.stage {
  background: var(--stage);
  padding: calc(34px + env(safe-area-inset-top)) 24px 30px;
  color: var(--paper);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--spot);
}

/* Prožektoriaus taškas — vienintelė vieta, kur naudojama gintarinė spalva
   be sėkmės lango. */
.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--spot);
  box-shadow: 0 0 0 4px rgb(242 180 65 / 0.22);
  flex-shrink: 0;
}

.stage h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 7.5vw, 2.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.stage p {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 1rem;
  line-height: 1.55;
  color: rgb(251 247 239 / 0.72);
}

/* --- Parašas: lambrekenas -------------------------------------------------
   Vienintelis dekoratyvus elementas. Kartojasi sėkmės lange — ten uždanga
   nusileidžia. Viena SVG eilutė, nulis papildomų užklausų. */

.valance {
  display: block;
  width: 100%;
  height: 22px;
  color: var(--stage);
}

/* Sėkmės lange ta pati forma apversta: uždanga nusileidžia ant anketos. */
.valance--up {
  color: var(--paper);
  transform: scaleY(-1);
}

/* --- Anketos lapas -------------------------------------------------------- */

.sheet {
  background: var(--paper);
  padding: 26px 24px calc(34px + env(safe-area-inset-bottom));
}

.act {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.act::after {
  content: '';
  flex: 1;
  height: 1.5px;
  background: var(--paper-edge);
}

.act + .act,
.fields + .act {
  margin-top: 28px;
}

.fields {
  display: grid;
  gap: 12px;
}

/* --- Laukas --------------------------------------------------------------- */

.field {
  position: relative;
}

.field input {
  width: 100%;
  min-height: 62px;
  padding: 26px 16px 9px;
  /* ≥16px — mažesnis šriftas priverčia iOS priartinti ekraną fokusuojant */
  font-size: 1.0625rem;
  background: var(--paper-sunk);
  border: 1.5px solid var(--paper-edge);
  border-radius: var(--r-well);
  appearance: none;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease),
    box-shadow 160ms var(--ease);
}

.field input:hover:not(:focus) {
  border-color: var(--muted-light);
}

.field input:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand-deep);
  box-shadow: 0 0 0 3px rgb(107 214 107 / 0.45);
}

.field label {
  position: absolute;
  left: 17px;
  top: 20px;
  font-size: 1.0625rem;
  color: var(--muted);
  pointer-events: none;
  transform-origin: left top;
  transition: transform 160ms var(--ease), color 160ms var(--ease);
}

/* placeholder=" " leidžia etiketei pakilti be jokio JavaScript */
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  transform: translateY(-13px) scale(0.78);
}

.field input:focus + label {
  color: var(--brand-deep);
}

.field input[aria-invalid='true'] {
  border-color: var(--alarm);
  background: #fdf4f1;
}

.field input[aria-invalid='true']:focus {
  box-shadow: 0 0 0 3px rgb(168 59 38 / 0.28);
}

.error {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin-top: 7px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--alarm);
}

.error:empty {
  display: none;
}

.error::before {
  content: '↑';
  font-weight: 700;
  line-height: 1.4;
}

/* Serverio klaidos juosta (kelias be JavaScript) */
.notice {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  padding: 14px 16px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--alarm);
  background: #fdf4f1;
  border: 1.5px solid rgb(168 59 38 / 0.3);
  border-radius: var(--r-well);
}

/* --- Sutikimas ------------------------------------------------------------ */

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 22px;
  padding: 14px;
  background: var(--paper-sunk);
  border: 1.5px solid transparent;
  border-radius: var(--r-well);
  transition: border-color 160ms var(--ease);
}

.consent:has(input[aria-invalid='true']) {
  border-color: var(--alarm);
}

.consent input {
  width: 24px;
  height: 24px;
  margin: 2px 0 0;
  accent-color: var(--brand-deep);
  cursor: pointer;
}

.consent label {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}

.consent a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1.5px;
}

.consent .error {
  grid-column: 1 / -1;
  margin-top: 2px;
}

/* --- Pateikimas -----------------------------------------------------------
   Firminė žalia per šviesi baltam tekstui (kontrastas nesiekia 4.5:1), todėl
   tamsus tekstas ant žalios. Išeina ir prieinamiau, ir savičiau. */

.submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 62px;
  margin-top: 22px;
  padding: 0 24px;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--brand);
  border: none;
  border-radius: var(--r-well);
  box-shadow: 0 2px 0 var(--brand-deep);
  cursor: pointer;
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease),
    background-color 160ms var(--ease);
}

.submit:hover:not(:disabled) {
  background: #7ee07e;
}

.submit:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 0 0 var(--brand-deep);
}

.submit:disabled {
  cursor: progress;
  color: rgb(20 33 27 / 0.55);
  background: var(--muted-light);
  box-shadow: none;
}

.submit svg {
  transition: transform 200ms var(--ease);
}

.submit:hover:not(:disabled) svg {
  transform: translateX(4px);
}

/* Sukimosi indikatorius pateikimo metu */
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgb(20 33 27 / 0.25);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- Poraštė -------------------------------------------------------------- */

.foot {
  padding: 22px 24px calc(28px + env(safe-area-inset-bottom));
  font-size: 0.8125rem;
  line-height: 1.6;
  text-align: center;
  color: rgb(251 247 239 / 0.5);
}

.foot a {
  color: rgb(251 247 239 / 0.78);
  text-underline-offset: 2px;
}

/* --- Sėkmės langas: uždanga nusileidžia ----------------------------------- */

.modal {
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  padding: 0;
  margin: auto auto 0;
  background: transparent;
  border: none;
}

@media (min-width: 640px) {
  .modal {
    width: min(460px, calc(100vw - 32px));
    margin: auto;
  }
}

.modal::backdrop {
  background: rgb(9 34 25 / 0.8);
  backdrop-filter: blur(3px);
}

.modal__panel {
  background: var(--paper);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  padding: 4px 26px calc(30px + env(safe-area-inset-bottom));
  text-align: center;
}

@media (min-width: 640px) {
  .modal__panel {
    border-radius: var(--r-sheet);
    padding-bottom: 34px;
  }
}

.modal h2 {
  margin-top: 18px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.modal p {
  margin-top: 10px;
  color: var(--muted);
  text-wrap: pretty;
}

.modal__actions {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.modal__actions .submit {
  margin-top: 0;
}

.btn-ghost {
  min-height: 52px;
  padding: 0 20px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--paper-edge);
  border-radius: var(--r-well);
  cursor: pointer;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}

.btn-ghost:hover {
  background: var(--paper-sunk);
  border-color: var(--muted-light);
}

.check {
  margin: 0 auto;
  color: var(--brand-deep);
}

.check circle,
.check path {
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  animation: draw 520ms var(--ease) forwards;
}

.check circle {
  --len: 170;
}

.check path {
  --len: 40;
  animation-delay: 280ms;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

.modal[open] .modal__panel {
  animation: curtain 420ms var(--ease);
}

@keyframes curtain {
  from {
    transform: translateY(38px);
    opacity: 0;
  }
}

/* --- Įėjimo seka ----------------------------------------------------------
   Vienas orkestruotas momentas įkrovus puslapį. Jokios foninės animacijos. */

.rise {
  animation: rise 560ms var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 55ms + 100ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* --- Turinio puslapiai (privatumas, ačiū) --------------------------------- */

.prose {
  padding: 26px 24px calc(34px + env(safe-area-inset-bottom));
}

.prose h2 {
  margin: 28px 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--muted);
  margin-bottom: 10px;
}

.prose ul {
  padding-left: 20px;
}

.prose a {
  color: var(--ink);
  text-underline-offset: 2px;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--brand);
  padding-bottom: 2px;
}

/* --- Sumažintas judesys --------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .check circle,
  .check path {
    stroke-dashoffset: 0;
  }

  .spinner {
    animation: spin 700ms linear infinite !important;
  }
}
