/* Prijavni obrazac — prema dizajnu "Noctua prezentacija v3" (tamna tema, mobile-first). */

:root {
  --bg: #0B100E;
  --text: #EEF3EF;
  --muted: #A6B2AC;
  --dim: #7D8A84;
  --faint: #6E7B75;
  --placeholder: #4A5651;
  --mint: #2EE6A6;
  --mint-soft: #7FF2C8;
  --lime: #9BEA4C;
  --on-mint: #06120D;
  --card: rgba(255, 255, 255, .03);
  --card-line: #1E2925;
  --line: #26302C;
  --ring: #3A4641;
  --chip: #24302B;
  --danger: #FF8A7A;

  --font: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(.3, .7, .2, 1);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
::-webkit-scrollbar { display: none; }

html { -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--mint); }
a:hover { color: var(--mint-soft); }
svg { display: block; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* zajednički tipografski elementi */
.eyebrow {
  color: var(--mint);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.label {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: color .2s ease;
}
.muted { color: var(--faint); }

h1, h2 { margin: 0; font-weight: 600; color: var(--text); }

/* ---------------------------------------------------------------- pozadina */

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}

/* Obrezivanje je na sloju svjetla, ne na stranici — inače gornja traka koraka ne bi ostala prikvačena. */
.glow { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: float 16s ease-in-out infinite;
  transition: top 1.2s var(--ease), right 1.2s var(--ease), left 1.2s var(--ease), opacity 1.2s var(--ease);
}
.blob-a { width: 440px; height: 440px; background: var(--mint); }
.blob-b { width: 380px; height: 380px; background: var(--lime); animation-delay: -8s; }

/* Svjetlo se seli iz koraka u korak (uvod i hvala su najsvjetliji). */
.page[data-step="0"] .blob-a { top: -140px; right: -160px; opacity: .28; }
.page[data-step="0"] .blob-b { top: 260px; left: -200px; opacity: .12; }
.page[data-step="1"] .blob-a { top: -260px; right: -220px; opacity: .16; }
.page[data-step="1"] .blob-b { top: -200px; left: -260px; opacity: .06; }
.page[data-step="2"] .blob-a { top: -240px; right: -120px; opacity: .16; }
.page[data-step="2"] .blob-b { top: -220px; left: -300px; opacity: .06; }
.page[data-step="3"] .blob-a { top: -260px; right: -260px; opacity: .16; }
.page[data-step="3"] .blob-b { top: -180px; left: -200px; opacity: .06; }
.page[data-step="4"] .blob-a { top: -40px; right: -120px; opacity: .28; }
.page[data-step="4"] .blob-b { top: 140px; left: -220px; opacity: .12; }

.dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 70%);
  mask-image: linear-gradient(to bottom, #000, transparent 70%);
}

.shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  max-width: 440px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 max(22px, env(safe-area-inset-right)) 0 max(22px, env(safe-area-inset-left));
}

.screen { flex: 1; display: flex; flex-direction: column; }

/* ---------------------------------------------------------------- uvod */

.intro { padding: max(26px, env(safe-area-inset-top)) 0 150px; }

.logo {
  align-self: center;
  color: var(--text);
  animation: rise .6s ease both;
}
.logo:hover { color: var(--text); }
.logo svg { width: 60px; height: auto; }
.logo-beak { fill: currentColor; stroke: currentColor; }

.intro-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: auto;
  padding-top: 60px;
  animation: rise .7s ease both;
}
.intro h1 {
  font-size: clamp(38px, 11.5vw, 46px);
  line-height: .98;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.intro-copy p {
  max-width: 340px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
  text-wrap: pretty;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 32px;
  animation: rise .7s .12s ease both;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 14px;
  border: 1px solid var(--card-line);
  border-radius: 18px;
  background: var(--card);
}
.stat-value { font-size: 26px; font-weight: 600; letter-spacing: -.03em; }
.stat-value small { color: var(--faint); font-size: 15px; font-weight: 600; }
.stat-label {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- traka koraka */

.step-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 -22px;
  padding: max(14px, env(safe-area-inset-top)) 22px 0;
  background: rgba(11, 16, 14, .72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.step-bar-row { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; }

.back {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--chip);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background-color .2s ease, transform .12s ease;
}
.back:hover { background: #131B18; }
.back:active { transform: scale(.92); }
.back:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spacer { width: 44px; }

.count { color: var(--dim); font-family: var(--mono); font-size: 12px; letter-spacing: .08em; }
.count b { color: var(--text); font-weight: 400; }

.progress { height: 2px; margin: 0 -22px; background: #1A2420; }
.progress span {
  display: block;
  width: 33.333%;
  height: 100%;
  background: var(--mint);
  box-shadow: 0 0 12px var(--mint);
  transition: width .5s var(--ease);
}

/* ---------------------------------------------------------------- koraci */

.steps { display: flex; flex-direction: column; }

.step {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 36px 0 160px;
  outline: none;
  animation: rise .5s ease both;
}
.step[data-step="3"] { gap: 32px; }

.step-head { display: flex; flex-direction: column; gap: 12px; }
.step-head h2 { font-size: 36px; line-height: 1.02; letter-spacing: -.04em; }
.step-head p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }

.fields { display: flex; flex-direction: column; gap: 28px; }
.row-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }

.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field:focus-within .label { color: var(--mint); }

/* Podcrtano polje: pri fokusu zelena linija naraste slijeva nadesno. */
.line { position: relative; display: block; }
.line::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(46, 230, 166, .55);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .45s var(--ease);
}
.line:focus-within::after { transform: scaleX(1); }

.in {
  width: 100%;
  padding: 4px 0 12px;
  border: 0;
  border-bottom: 1.5px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -.02em;
  outline: none;
  appearance: none;
  transition: border-color .2s ease;
}
.in::placeholder { color: var(--placeholder); }
.in:-webkit-autofill,
.in:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  transition: background-color 9999s ease-out;
}

.has-error .in { border-bottom-color: var(--danger); }
.has-error .label { color: var(--danger); }
.has-error .line::after { background: var(--danger); box-shadow: 0 0 10px rgba(255, 138, 122, .45); }

.field-error { margin: 2px 0 0; color: var(--danger); font-size: 13.5px; line-height: 1.45; }
.field-error:empty { display: none; }

.group { display: flex; flex-direction: column; gap: 12px; }

/* uloge */
.roles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.role { position: relative; cursor: pointer; }
.role input,
.month input,
.half input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }
.role-ui {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 64px;
  padding: 0 16px;
  border: 1px solid var(--card-line);
  border-radius: 18px;
  background: var(--card);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  transition: background-color .25s ease, border-color .25s ease, transform .12s ease;
  user-select: none;
}
.radio {
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--ring);
  border-radius: 50%;
  transition: border-color .25s ease;
}
.radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  transform: scale(0);
  transition: transform .3s cubic-bezier(.3, .7, .2, 1.4);
}
.role:active .role-ui { transform: scale(.97); }
.role input:checked + .role-ui { border-color: var(--mint); background: rgba(46, 230, 166, .10); }
.role input:checked + .role-ui .radio { border-color: var(--mint); }
.role input:checked + .role-ui .radio::after { transform: scale(1); }
.role input:focus-visible + .role-ui { outline: 2px solid var(--mint); outline-offset: 2px; }

/* mjeseci */
.months {
  display: flex;
  gap: 8px;
  margin: 0 -22px;
  padding: 4px 22px 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 22px;
  scrollbar-width: none;
}
.month { position: relative; flex: none; scroll-snap-align: start; cursor: pointer; }
.month-ui {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 108px;
  height: 132px;
  padding: 14px;
  border: 1px solid var(--card-line);
  border-radius: 22px;
  background: var(--card);
  color: var(--text);
  text-align: left;
  transition: background-color .25s ease, border-color .25s ease, color .25s ease, box-shadow .25s ease, transform .12s ease;
  user-select: none;
}
.month-year { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; opacity: .6; }
.month-name { display: flex; flex-direction: column; gap: 2px; }
.month-num { font-size: 34px; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.month-label { font-size: 14px; font-weight: 500; }
.month:active .month-ui { transform: scale(.96); }
.month input:checked + .month-ui {
  border-color: var(--mint);
  background: var(--mint);
  color: var(--on-mint);
  box-shadow: 0 12px 30px -12px rgba(46, 230, 166, .6);
}
.month input:focus-visible + .month-ui { outline: 2px solid var(--mint); outline-offset: 2px; }

/* dio mjeseca */
.halves { animation: rise .4s ease both; margin-top: 20px; }
.segment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--card-line);
  border-radius: 22px;
  background: #111916;
}
.half { position: relative; cursor: pointer; }
.half-ui {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  height: 68px;
  padding: 0 16px;
  border-radius: 18px;
  background: transparent;
  color: var(--text);
  transition: background-color .25s ease, color .25s ease, transform .12s ease, opacity .25s ease;
  user-select: none;
}
.half-title { font-size: 15px; font-weight: 600; }
.half-range { font-family: var(--mono); font-size: 12px; opacity: .65; }
.half:active .half-ui { transform: scale(.97); }
.half input:checked + .half-ui { background: var(--mint); color: var(--on-mint); }
.half input:focus-visible + .half-ui { outline: 2px solid var(--mint); outline-offset: 2px; }
.half input:disabled + .half-ui { opacity: .35; }
.half:has(input:disabled) { cursor: default; }
.half:has(input:disabled):active .half-ui { transform: none; }

/* privola */
.consent-wrap { display: flex; flex-direction: column; gap: 10px; }
.consent { display: flex; align-items: flex-start; gap: 14px; color: var(--muted); font-size: 14px; line-height: 1.5; cursor: pointer; }
.consent input {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 1.5px solid var(--ring);
  border-radius: 8px;
  background: transparent center / 14px no-repeat;
  appearance: none;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, transform .2s cubic-bezier(.3, .7, .2, 1.4);
}
.consent input:checked {
  border-color: var(--mint);
  background-color: var(--mint);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2306120D' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  transform: scale(1.05);
}
.consent input:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.has-error .consent input { border-color: var(--danger); }

.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.privacy {
  margin-left: 38px;
  padding: 14px 16px;
  border: 1px solid var(--card-line);
  border-radius: 16px;
  background: var(--card);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
  animation: rise .3s ease both;
}
.privacy p { margin: 0; }
.privacy a { display: inline-block; margin-top: 8px; text-decoration: none; }
.consent-wrap .field-error { margin-left: 38px; }

.alert {
  padding: 12px 14px;
  border: 1px solid rgba(255, 138, 122, .35);
  border-radius: 16px;
  background: rgba(255, 138, 122, .08);
  color: var(--danger);
  font-size: 14.5px;
  line-height: 1.45;
}

/* ---------------------------------------------------------------- hvala */

.done {
  justify-content: center;
  gap: 32px;
  padding: max(56px, env(safe-area-inset-top)) 0 160px;
  outline: none;
}

.done-mark { position: relative; width: 84px; height: 84px; }
.done-ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--mint);
  border-radius: 50%;
  animation: ring 2.4s ease-out infinite;
}
.done-check {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  color: var(--on-mint);
  box-shadow: 0 0 60px -6px rgba(46, 230, 166, .7);
  animation: pop .6s cubic-bezier(.3, .7, .2, 1.2) both;
}
.done-check svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }

.done-copy { display: flex; flex-direction: column; gap: 12px; animation: rise .5s .15s ease both; }
.done-copy h2 { font-size: 42px; line-height: 1; letter-spacing: -.045em; overflow-wrap: anywhere; }
.done-copy p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.5; text-wrap: pretty; }
.done-copy b { color: var(--text); font-weight: 400; overflow-wrap: anywhere; }

.ticket {
  overflow: hidden;
  border: 1px solid var(--card-line);
  border-radius: 24px;
  background: var(--card);
  animation: rise .5s .25s ease both;
}
.ticket-main { display: flex; flex-direction: column; gap: 6px; padding: 20px; }
.ticket-date { font-size: 24px; font-weight: 600; letter-spacing: -.03em; }
.ticket-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: 1px dashed #2A3631; }
.ticket-split > div { display: flex; flex-direction: column; gap: 6px; padding: 16px 20px; min-width: 0; }
.ticket-split > div + div { border-left: 1px solid var(--card-line); }
.ticket-split > div > span:last-child { font-size: 15px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- CTA */

.cta-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 28px 22px calc(18px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 55%, rgba(11, 16, 14, 0));
}
.cta-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 396px; margin: 0 auto; }

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 64px;
  padding: 0 8px 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--mint);
  color: var(--on-mint);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  cursor: pointer;
  box-shadow: 0 18px 40px -14px rgba(46, 230, 166, .65);
  transition: background-color .3s ease, color .3s ease, box-shadow .3s ease, transform .12s ease;
}
.cta:active { transform: scale(.98); }
.cta:focus-visible { outline: 2px solid var(--mint); outline-offset: 4px; }

.cta-arrow {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--on-mint);
  color: var(--mint);
  transition: background-color .3s ease, color .3s ease, transform .3s var(--ease);
}
.cta-arrow .arrow { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.cta:not([aria-disabled="true"]):hover .arrow { transform: translateX(3px); }

/* "Dalje" — sekundarni izgled, strelica prema dolje (sljedeće polje). "Nastavi" ostaje glavni mint gumb. */
.cta.is-next-field { background: #13211C; color: var(--text); box-shadow: inset 0 0 0 1px rgba(46, 230, 166, .45); }
.cta.is-next-field .cta-arrow { background: var(--mint); color: var(--on-mint); }
.cta.is-next-field .arrow { transform: rotate(90deg); }
.cta.is-next-field:hover .arrow { transform: rotate(90deg) translateX(3px); }

.cta[aria-disabled="true"] { background: #151D1A; color: #56625D; box-shadow: none; cursor: default; }
.cta[aria-disabled="true"]:active { transform: none; }
.cta[aria-disabled="true"] .cta-arrow { background: #1E2824; color: #56625D; }

.spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(46, 230, 166, .3);
  border-top-color: var(--mint);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.cta.is-loading { cursor: progress; }
.cta.is-loading .spinner { display: block; }
.cta.is-loading .arrow { display: none; }

.cta-note {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Dok se tipka na mobitelu: ispod polja ima mjesta za pomicanje, a gumb stoji iznad tipkovnice, malo zbijeniji. */
.page.typing .step { padding-bottom: 65vh; }
.page.kb .cta-bar {
  padding: 18px 22px 10px;
  background: linear-gradient(to top, var(--bg) 72%, rgba(11, 16, 14, 0));
  transition: transform .18s ease-out;
}
.page.kb .cta { height: 54px; padding-left: 22px; font-size: 16px; }
.page.kb .cta-arrow { width: 40px; height: 40px; }
.page.kb .cta-note { display: none; }

/* ---------------------------------------------------------------- širi ekrani */

@media (min-width: 700px) {
  .intro { padding-top: 44px; }
  .logo svg { width: 68px; }
}

/* ---------------------------------------------------------------- keyframes */

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-30px, 40px) scale(1.12); } }
@keyframes ring { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(2.2); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

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