/* =====================================================================
   brm.hr — landing
   Static HTML/CSS/vanilla JS. Light appearance only.
   Design tokens su preslikani iz Figme (carsome.io / brm.hr landing WIP).
   ===================================================================== */

:root {
  /* --- Boje (Figma varijable) --- */
  --color-950: #0c0a09;
  --color-900: #1c1917;   /* primarni tekst */
  --color-600: #57534d;   /* sekundarni tekst */
  --color-500: #78716c;   /* placeholder / focus obrub polja */
  --color-400: #a6a09b;   /* muted / hover obrub polja */
  --color-300: #d6d3d1;   /* 1px obrub kartica (resting) */
  --surface:   #ffffff;   /* kartice */
  --backdrop:  #e7e5e4;   /* pozadina stranice */
  --stone-50:  #fafaf9;   /* tekst na accentu */

  --accent:       #ff381a; /* brand accent */
  /* Hover accent — dvije nijanse ovisno o podlozi dugmeta: */
  --accent-hover:         #c70907; /* na SVIJETLOJ podlozi (CTA, nav strelice) */
  --accent-hover-on-dark: #ff5937; /* na TAMNOJ podlozi (Pretraži u search baru) */

  /* Placeholder boja za Asset okvire (png/mp4 dolaze naknadno) */
  --asset-placeholder: #F6339A;

  /* --- Tipografija --- */
  --font: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* --- Layout --- */
  --content-max: 1260px;  /* content ne smije biti širi od ovoga */
  --gutter: 24px;
  --radius-card: 18px;
  --radius-pill: 999px;
  --sec-gap: clamp(52px, 7vw, 89px); /* razmak između sekcija (Figma: 89px @ desktop) */

  /* --- Motion (emil / animations.dev) --- */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dur-fast: 160ms;
  --dur-mid: 240ms;
  --dur-hover: 300ms; /* hover kartica (scale + shadow) */
  --reveal-dur: 620ms;
  --stagger: 70ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--backdrop);
  color-scheme: only light;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--color-900);
  background: var(--backdrop);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p { margin: 0; }

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

a { color: inherit; text-decoration: none; }

.accent { color: var(--accent); }

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

/* ---------------------------------------------------------------------
   Layout helpers
   --------------------------------------------------------------------- */
.container {
  width: 100%;
  /* content doseže punih 1260px (Figma); gutteri su izvan toga */
  max-width: calc(var(--content-max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Vertikalni ritam: 89px između sekcija (kao Figma), bez dvostrukog paddinga */
.section { padding-block: 0; }
.section + .section { margin-top: var(--sec-gap); }
.hero {
  position: relative;
  padding-top: var(--sec-gap);            /* vrh stranice */
  padding-bottom: clamp(22px, 3vw, 42px); /* interni razmak ispod CTA (subheading frame) */
  overflow-x: clip; /* prstenovi smiju izaći iz containera, ne iz viewporta */
  /* Redoslijed: logo (gotov ~1.3s) → naslov → slika. Kratka pauza između. */
  --hero-text-at: 1.1s;
  --hero-image-at: 1.7s;
}

.section__title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800; /* ExtraBold */
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: clamp(28px, 3.4vw, 44px);
}

.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(24px, 3vw, 40px);
}
/* Unutar section head-a razmak nosi sam head (flex), ne naslov */
.section__head .section__title { margin-bottom: 0; }

/* ---------------------------------------------------------------------
   Asset placeholder (#F6339A) — spreman za drop-in <img>/<video>
   --------------------------------------------------------------------- */
.asset {
  position: relative;
  overflow: hidden;
  background: var(--asset-placeholder);
  border-radius: var(--radius-card);
  isolation: isolate;
}
.asset__label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  pointer-events: none;
}
/* Čim se doda medij, placeholder boja i label nestaju */
.asset:has(img),
.asset:has(video) { background: transparent; }
.asset:has(img) .asset__label,
.asset:has(video) .asset__label { display: none; }
.asset img,
.asset video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Dekorativni klip — bez native player chromea (Safari/Chrome overlay) */
.asset video {
  pointer-events: none;
}
.asset video::-webkit-media-controls,
.asset video::-webkit-media-controls-enclosure,
.asset video::-webkit-media-controls-panel,
.asset video::-webkit-media-controls-play-button,
.asset video::-webkit-media-controls-start-playback-button,
.asset video::-webkit-media-controls-overlay-play-button,
.asset video::-webkit-media-controls-overlay-enclosure {
  display: none !important;
  -webkit-appearance: none;
  opacity: 0;
  pointer-events: none;
}

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  color: var(--stone-50);
  background: var(--btn-bg);
  border: none;
  border-radius: var(--radius-pill);
  padding: 13px 21px;
  cursor: pointer;
  transition: background-color var(--dur-mid) ease,
              transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-mid) ease;
}
.btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, white);
  outline-offset: 3px;
}
.btn:active { transform: scale(0.97); }

/* Floating primarni CTA (veći padding + meka sjena — kao u Figmi) */
.btn--float {
  padding: 18px 26px;
  box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--accent) 55%, transparent);
}

/* Hover -> accent-hover (samo na pravim pointer uređajima; ne na disabled) */
@media (hover: hover) and (pointer: fine) {
  .btn--primary:not(:disabled):hover { --btn-bg: var(--accent-hover); }
  .btn--float:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px -10px color-mix(in srgb, var(--accent) 60%, transparent);
  }
  .btn--float:active { transform: scale(0.97); }
}

/* ---------------------------------------------------------------------
   HERO
   --------------------------------------------------------------------- */
.hero__heading { position: relative; text-align: center; }
.hero__brand { position: relative; z-index: 1; margin: 0; line-height: 0; } /* h1 nosi logo, ne tekst */
.hero__logo {
  /* max 460×200 (2× footer); proporcionalno se smanjuje do pune širine sadržaja */
  display: block;
  width: min(360px, 100%);
  height: auto;
  margin-inline: auto;
  overflow: visible;
}

/* Pozadina heroa: svijetli odsjaj + prstenovi (isti jezik kao znak) */
.hero__backdrop {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 18%;
  width: min(920px, 170%);
  aspect-ratio: 1;
  transform: translate(-50%, -38%);
  pointer-events: none;
}
.hero__aura {
  position: absolute;
  inset: 8%;
  background:
    radial-gradient(closest-side at 50% 44%, rgba(255, 255, 255, 0.92), transparent 68%),
    radial-gradient(closest-side at 34% 58%, color-mix(in srgb, var(--color-900) 7%, transparent), transparent 70%),
    radial-gradient(closest-side at 70% 62%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 66%);
}
.hero__rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: color-mix(in srgb, var(--color-900) 16%, transparent);
  opacity: 0;
}
.hero__rings circle {
  stroke: currentColor;
  stroke-width: 1.4;
}
.hero__arc {
  stroke: var(--accent);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0.85;
}
.hero__tagline { position: relative; z-index: 1; }

/* Znak: prvo obris, zatim ispuna */
.hero__logo-mark path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.hero__logo-fill { opacity: 0; }
.hero__tagline {
  font-size: clamp(38px, 5.4vw, 68px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
}
/* Riječi same ulaze — roditelj ostaje vidljiv da stagger ne tone u opacity roditelja */
.hero__tagline[data-reveal] { opacity: 1; transform: none; }
.hero__line { display: block; }
.hero__word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.45em);
}
.hero__tagline.is-visible .hero__word {
  animation: hero-word 560ms var(--ease-out) forwards;
  animation-delay: calc(var(--hero-text-at) + var(--w) * 50ms);
}
@keyframes hero-word {
  to { opacity: 1; transform: translateY(0); }
}

/* Scena: odsjaj iza, kartice u perspektivi */
.hero__stage {
  position: relative;
  z-index: 1;
  margin-top: clamp(28px, 3.4vw, 42px);
  perspective: 1400px;
}
.hero__wash {
  position: absolute;
  z-index: 0;
  inset: 8% 6% 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 640ms var(--ease-out);
}
.hero__stage:has(.is-visible) .hero__wash {
  opacity: 1;
  transition-delay: var(--hero-image-at);
}
.hero__wash img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: blur(42px) saturate(1.35);
  opacity: 0.55;
}
.hero__tilt {
  position: relative;
  z-index: 1;
  transform-style: preserve-3d;
}
.hero__plane { transform-style: preserve-3d; will-change: transform; }

.hero__media {
  aspect-ratio: 2 / 1; /* točan omjer hero asseta (2520×1260) — bez cover-cropa */
}
.hero__media[data-reveal-clip] {
  transition-delay: var(--hero-image-at);
  transition-duration: 1700ms;
}

/* Lebdenje tek kad je scena u viewportu (JS dodaje .is-live) */
@media (prefers-reduced-motion: no-preference) {
  .hero__rings {
    animation: hero-rings-in 400ms var(--ease-out) 20ms forwards;
  }
  .hero__arc {
    animation: logo-draw 8000ms var(--ease-out) 20ms forwards;
  }
  .hero__aura {
    animation: hero-aura 9s ease-in-out 1s infinite;
  }
  .hero__logo-mark path {
    animation: logo-draw 800ms var(--ease-out) forwards;
    animation-delay: calc(40ms + var(--i) * 140ms);
  }
  .hero__logo-fill {
    animation: logo-fill 420ms var(--ease-out) 780ms forwards;
  }
  .hero__logo-mark {
    animation: logo-ink-fade 280ms var(--ease-out) 1040ms forwards;
  }
}
@keyframes hero-rings-in { to { opacity: 1; } }
@keyframes hero-aura {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}
@keyframes logo-draw { to { stroke-dashoffset: 0; } }
@keyframes logo-fill { to { opacity: 1; } }
@keyframes logo-ink-fade { to { opacity: 0; } }

@media (prefers-reduced-motion: no-preference) {
  .hero__stage.is-live .hero__tilt {
    animation: hero-float 8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  }
  .hero__stage.is-live .hero__wash img {
    animation: hero-wash 8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  }
}
@keyframes hero-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-0.4deg); }
  50% { transform: translate3d(0, -12px, 0) rotate(0.4deg); }
}
@keyframes hero-wash {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, 14px, 0) scale(0.96); }
}

/* CTA blok (naslov + dugme) — dijeljen između heroa i najave iznad footera */
.cta-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 2vw, 21px);
}
.cta-block--hero { position: relative; z-index: 1; margin-top: clamp(30px, 3.4vw, 42px); } /* razmak od hero medija */
/* Hero copy (h3 + opis) — centriran, stil po uzoru na Esencije copy */
.cta-block__copy {
  max-width: 620px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cta-block__title {
  font-size: clamp(30px, 3.6vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  text-align: center;
  max-width: 620px;        /* duži naslov se lijepo prelama, ne ide punom širinom */
  text-wrap: balance;
}

/* ---------------------------------------------------------------------
   Cards / Features
   --------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--color-300); /* 1px obrub — samo resting (hover ga nadjačava) */
}

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

.feature__copy {
  width: 100%;
  max-width: 420px;      /* Figma: wrapper naslova+opisa je 420px */
  margin-inline: auto;
  padding: 55px 24px 0;  /* gornji padding 55px (Figma / Fibonacci) */
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feature__copy--center { max-width: 640px; } /* AI pretraga copy je širi (610) */

/* Male kartice (Ostale značajke): naslovi flush-left, puna širina kartice */
.feature--sm .feature__copy {
  max-width: none;
  margin-inline: 0;
  padding: 55px 34px 0;  /* gornji padding 55px (Figma / Fibonacci) */
  text-align: left;
  align-items: flex-start;
}

/* Naslovi svih kartica dijele iste tipografske parametre (Figma: 34/42 SemiBold) */
.feature__title {
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.235; /* 42/34 */
  color: var(--color-900);
}
/* Opisi svih kartica dijele iste parametre (Figma: 18/24, color-900) */
.feature__desc {
  font-size: 18px;
  font-weight: 400;
  color: var(--color-900);
  letter-spacing: -0.03em;
  line-height: 1.333; /* 24/18 */
}

.feature__asset {
  margin-top: clamp(24px, 2.6vw, 34px);
  aspect-ratio: 613 / 377;
  /* NE stvaramo ugniježđeni clip-sloj: kartica (will-change) klipa donje kutove.
     Vlastiti overflow/radius/isolation na assetu davali su 1px inner obrub kad
     se roditelj skalira (granica unutarnjeg sloja se anti-aliasa). */
  border-radius: 0;
  overflow: visible;
  isolation: auto;
}
.feature__asset--sm { aspect-ratio: 3 / 2; margin-top: clamp(24px, 2.6vw, 34px); }

/* Esencije grid: dvije kartice */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 2.2vw, 34px);
  margin-bottom: clamp(20px, 2.2vw, 34px);
}

.feature--wide {
  align-items: stretch;
  padding-bottom: clamp(40px, 4vw, 64px);
}

/* Hover na karticama (decentno) */
@media (hover: hover) and (pointer: fine) {
  /* .card.feature (0,3,0) nadjačava [data-reveal].is-visible (0,2,0) — inače
     reveal gasi hover transform. Transform ide brzo (hover), opacity sporo (reveal). */
  .card.feature {
    transition: opacity var(--reveal-dur) var(--ease-out),
                transform var(--dur-hover) var(--ease-out),
                box-shadow var(--dur-hover) ease;
    /* Pre-promocija u vlastiti kompozitni sloj (kao Apple .card.will-change):
       zaobljeni overflow-clip se rasterizira stabilno pa nema fringe-a na
       kutovima tijekom transform:scale (izraženo na 1x/72dpi ekranima). */
    will-change: transform;
  }
  .card.feature:hover {
    transform: scale(1.01);
    box-shadow: 0 22px 48px -24px rgba(12, 10, 9, 0.5);
  }
}

/* ---------------------------------------------------------------------
   AI pretraga — CSS komponenta s typewriter inputom
   --------------------------------------------------------------------- */
.ai-search__wrap {
  margin-top: clamp(28px, 3vw, 42px);
  padding-inline: 24px;
  display: flex;
  justify-content: center;
}
.ai-search {
  position: relative;
  width: 100%;
  max-width: 610px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--color-950);
  border-radius: var(--radius-pill);
  padding: 8px 8px 8px 21px;
  pointer-events: none; /* prikaz, bez interakcije (nema inputa ni akcije pretraži) */
}
.ai-search__field {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  height: 24px;
}
/* Vidljivi "typed" tekst + caret; pravi input je nevidljiv ali fokusabilan */
.ai-search__typed {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-search__caret {
  width: 2px;
  height: 18px;
  margin-left: 1px;
  background: var(--accent);
  border-radius: 1px;
  animation: caret-blink 1.05s steps(1) infinite;
}
.ai-search__typed:empty + .ai-search__caret { margin-left: 0; }
@keyframes caret-blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

.ai-search__submit { flex: none; cursor: default; }

/* Material Symbols — 'search' ikona (weight 600, grade normal) */
.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 600, "GRAD" 0, "opsz" 24;
}
.ai-search__icon { font-size: 20px; }

/* ---------------------------------------------------------------------
   Email signup (Uskoro lansiramo) — pravi input s validacijom
   --------------------------------------------------------------------- */
.email-signup {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
}
.email-signup__field {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding: 8px 8px 8px 24px;
  box-shadow: 0 0 0 1px var(--color-300); /* decentan rub (kao tileovi) */
  transition: box-shadow var(--dur-mid) ease;
}
@media (hover: hover) and (pointer: fine) {
  .email-signup__field:hover { box-shadow: 0 0 0 1px var(--color-400); }
}
.email-signup__field:focus-within {
  box-shadow: 0 0 0 1px var(--color-500),
              0 22px 48px -24px rgba(12, 10, 9, 0.5); /* raspršena sjena kao kartice on hover */
}
.email-signup__input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 17px;
  font-weight: 500;
  color: var(--color-900);       /* uneseni tekst */
  caret-color: var(--accent);    /* cursor / caret */
  padding: 13px 0;
}
.email-signup__input::placeholder {
  color: var(--color-500);       /* label "Email adresa" — nestane po unosu */
  opacity: 1;
}
.email-signup__submit {
  flex: none;
  min-height: 46px; /* izjednačeno s "Pretraži" u AI search baru (koji ima 20px ikonu) */
}

/* Inactive (disabled) stanje CTA-a "Obavijesti me" */
.email-signup__submit:disabled {
  --btn-bg: var(--color-300);
  color: var(--color-600);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Validacijski tekst ispod polja */
.email-signup__error {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--accent-hover); /* tamniji brand red — AA kontrast na backdropu */
  text-align: center;
}
.email-signup.is-invalid .email-signup__field {
  box-shadow: 0 0 0 1px var(--accent);
}

/* ---------------------------------------------------------------------
   Social (ispod email forme) — opis + 3 okrugle akcije
   --------------------------------------------------------------------- */
.social {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.social__actions {
  display: flex;
  gap: 8px; /* horizontalni razmak između akcija */
}
.social__btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);   /* ploha */
  color: var(--color-900);      /* ikona */
  transition: background-color var(--dur-mid) ease, box-shadow var(--dur-mid) ease, transform var(--dur-fast) var(--ease-out);
}
.social__btn svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}
.social__btn:active { transform: scale(0.94); }
.social__btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, white);
  outline-offset: 2px;
}
@media (hover: hover) and (pointer: fine) {
  .social__btn:hover {
    background: var(--color-900);  /* inverzija: tamna ploha */
    color: var(--surface);         /* ikona postaje svijetla (currentColor) */
    box-shadow: 0 12px 26px -8px rgba(12, 10, 9, 0.5); /* raspršena sjena (vidljiva na 44px) */
  }
}

/* ---------------------------------------------------------------------
   Carousel — Ostale značajke
   --------------------------------------------------------------------- */
.carousel__nav { display: flex; gap: 10px; }
.nav-btn {
  --btn-bg: var(--accent);
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--stone-50);
  cursor: pointer;
  transition: background-color var(--dur-mid) ease, transform var(--dur-fast) var(--ease-out);
}
.nav-btn:active { transform: scale(0.94); }
.nav-btn:disabled { opacity: 0.4; cursor: default; }
.nav-btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, white);
  outline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) {
  .nav-btn:not(:disabled):hover { --btn-bg: var(--accent-hover); }
}

.carousel {
  overflow-x: auto;
  overflow-y: hidden;            /* bez neželjenog vertikalnog scrolla */
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-padding-left: max(var(--gutter), (100vw - var(--content-max)) / 2);
  /* prostor za hover lift + box-shadow; poništeno marginama da ne mijenja razmake */
  padding-top: 12px;
  padding-bottom: 44px;
  margin-top: -12px;
  margin-bottom: -44px;
}
.carousel::-webkit-scrollbar { display: none; }

.carousel__track {
  display: flex;
  gap: clamp(20px, 2.2vw, 34px);
  /* kartice "bleedaju" prema desnom rubu (carousel osjećaj) */
  max-width: none;
  width: max-content;
  /* simetrični inset: prva kartica poravnata s lijevim, zadnja s desnim ekstremom sadržaja */
  padding-left: max(var(--gutter), (100vw - var(--content-max)) / 2);
  padding-right: max(var(--gutter), (100vw - var(--content-max)) / 2);
}
.feature--sm {
  scroll-snap-align: start;
  flex: 0 0 min(360px, 80vw); /* 360px na desktopu (kao Figma), skalira na uskim ekranima */
}

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
.footer {
  margin-top: var(--sec-gap);              /* 89px iznad footera (Figma) */
  padding-bottom: clamp(40px, 5vw, 64px);
  text-align: center;
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0; /* logo SVG već nosi optički clearspace (kao Figma) */
}
.footer__logo {
  width: 230px;   /* identično Figmi na svim razlučivostima */
  height: 100px;
  max-width: none;
}
.footer__tagline {
  font-size: clamp(18px, 1.9vw, 21px);
  font-weight: 600; /* SemiBold */
  color: var(--color-600);
  letter-spacing: -0.03em;
  line-height: 1.62; /* 34/21 */
}

/* ---------------------------------------------------------------------
   Koraci (Za poslovne korisnike) — kartice na landingu, plain lista na registraciji
   --------------------------------------------------------------------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.2vw, 34px);
}
.step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.card.step { padding: clamp(28px, 3vw, 42px) clamp(24px, 2.6vw, 34px); }
.step__num {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--stone-50);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}
.step__title {
  font-size: clamp(21px, 2vw, 26px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.235;
}
.cta-block--steps { margin-top: clamp(30px, 3.4vw, 42px); text-align: center; }

/* Plain varijanta: vertikalni popis s brojem lijevo (bez kartica) */
.steps--plain {
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: clamp(28px, 3vw, 42px);
}
.steps--plain .step {
  flex-direction: row;
  gap: 18px;
}
.steps--plain .step__num { margin-bottom: 0; }
.steps--plain .step__title { margin-bottom: 4px; }

/* ---------------------------------------------------------------------
   Registracija — header, layout, obrazac
   --------------------------------------------------------------------- */
.page-header { padding-top: clamp(16px, 2vw, 28px); }
.page-header__home {
  display: inline-block;
  border-radius: 12px;
}
.page-header__home:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, white);
  outline-offset: 3px;
}
.page-header__logo { width: 120px; height: 120px; margin-left:-11px}

.reg { margin-top: clamp(12px, 2vw, 28px); }
.reg__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 89px);
  align-items: start;
}
.reg__intro .section__title { margin-bottom: 21px; text-wrap: balance; }
.reg__card { padding: clamp(28px, 3.4vw, 44px); }

.reg-form { display: flex; flex-direction: column; gap: 21px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 21px;
}
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field__label {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-900);
}
.field__opt { font-weight: 400; color: var(--color-600); }
.field__req { color: var(--accent); font-weight: 600; }
.field__note { font-size: 15px; color: var(--color-600); }

/* Polje — isti pill, obrub, hover i focus kao .email-signup__field */
.field__control {
  width: 100%;
  font-family: inherit;
  font-size: 17px;
  font-weight: 500;
  color: var(--color-900);
  caret-color: var(--accent);
  background: var(--surface);
  border: none;
  border-radius: var(--radius-pill);
  padding: 15px 24px;
  outline: none;
  box-shadow: 0 0 0 1px var(--color-300);
  transition: box-shadow var(--dur-mid) ease;
}
.field__control::placeholder { color: var(--color-500); opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .field__control:hover { box-shadow: 0 0 0 1px var(--color-400); }
}
.field__control:focus {
  box-shadow: 0 0 0 1px var(--color-500),
              0 22px 48px -24px rgba(12, 10, 9, 0.5);
}
.field__control--area {
  border-radius: var(--radius-card);
  resize: vertical;
  min-height: 120px;
  line-height: 1.4;
}
.field__control--select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 52px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%2357534d' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 22px center;
}
.field__control--select:invalid,
.field__control--select:has(option[value=""]:checked) { color: var(--color-500); }

/* Validacija — isti stil kao .email-signup__error, poravnato lijevo */
.field__error {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--accent-hover);
}
.field.is-invalid .field__control { box-shadow: 0 0 0 1px var(--accent); }

/* Checkbox privole */
.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--color-600);
  cursor: pointer;
}
.check__input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.check__input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, white);
  outline-offset: 2px;
}
.field.is-invalid .check__input { outline: 1px solid var(--accent); outline-offset: 1px; }
.link {
  color: var(--color-900);
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (hover: hover) and (pointer: fine) {
  .link:hover { color: var(--accent-hover); }
}

.reg-form__submit { align-self: stretch; justify-content: center; margin-top: 8px; }

/* Potvrda nakon slanja */
.reg__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding-block: clamp(28px, 5vw, 64px);
  outline: none;
}
.reg__success[hidden] { display: none; }
.reg__success .btn { margin-top: 12px; }

/* ---------------------------------------------------------------------
   Scroll reveal (stagger) — vidljivo tek kad uđe u viewport
   --------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--reveal-dur) var(--ease-out),
              transform var(--reveal-dur) var(--ease-out);
  transition-delay: calc(var(--i, 0) * var(--stagger));
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Hero media: clip-path reveal odozdo */
[data-reveal-clip] {
  clip-path: inset(0 0 100% 0);
  transition: opacity var(--reveal-dur) var(--ease-out),
              transform var(--reveal-dur) var(--ease-out),
              clip-path 780ms var(--ease-out);
  /* shorthand iznad resetira delay -> vrati stagger (inače hero asset ne kasni) */
  transition-delay: calc(var(--i, 0) * var(--stagger));
}
[data-reveal-clip].is-visible { clip-path: inset(0 0 0 0); }

/* JS off -> sve vidljivo (progressive enhancement) */
.no-js [data-reveal] { opacity: 1; transform: none; clip-path: none; }
.no-js .hero__word { opacity: 1; transform: none; animation: none; }
.no-js .hero__wash { opacity: 1; }
.no-js .hero__rings { opacity: 1; }
.no-js .hero__arc { stroke-dashoffset: 0; }
.no-js .hero__logo-mark { display: none; }
.no-js .hero__logo-fill { opacity: 1; }

/* ---------------------------------------------------------------------
   Reduced motion — čuvamo opacity/boje, mičemo pomake
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { transform: none; clip-path: none; }
  .hero__word { opacity: 1; transform: none; animation: none; }
  .hero__wash { opacity: 1; }
  .hero__media[data-reveal-clip],
  .hero__stage:has(.is-visible) .hero__wash { transition-delay: 0s; }
  .hero__rings { opacity: 1; animation: none; }
  .hero__arc { stroke-dashoffset: 0; animation: none; }
  .hero__logo-mark { display: none; }
  .hero__logo-fill { opacity: 1; animation: none; }
  .ai-search__caret { animation: none; }
}

/* ---------------------------------------------------------------------
   Responsive — iPad / Mobile
   --------------------------------------------------------------------- */

/* iPad / manji desktop */
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .feature__copy { padding: 32px 28px 0; }

  .steps { grid-template-columns: 1fr; }
  .reg__grid { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 640px) {
  :root { --gutter: 16px; }

  .hero { padding-top: 24px; }                 /* manji ulazni razmak na vrhu */
  .hero__logo { width: min(260px, 70%); }      /* manji intro logo */
  .hero__media { aspect-ratio: 1 / 1; } /* kvadratni mobilni hero asset (1226×1226) */

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

  .section__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .feature__copy { padding: 28px 22px 0; }
  .feature--sm .feature__copy { padding: 28px 24px 0; }

  .ai-search {
    padding: 8px 8px 8px 18px;
  }

  .page-header { padding-top: 12px; }
  .field-row { grid-template-columns: 1fr; }
}

/* Mobile: "Pretraži" se svodi na ikonu — kružna ploha, ikona centrirana po obje osi */
@media (max-width: 640px) {
  .ai-search__label { display: none; }
  .ai-search__submit {
    width: 44px;
    height: 44px;
    padding: 0;
    gap: 0;
    border-radius: 50%;
    justify-content: center; /* align-items: center nasljeđuje iz .btn -> centrirano X i Y */
  }
}
