/* KLAR — tokeni templata, scopovani na .sec-klar-hero. */

/* ============================================================
   DESIGN TOKENS — Template 6 "KLAR"
   Niche variant: E — Orthodontics / Aligners
   >>> NEUE Variante, nicht im Original-Style-Guide. Regeln und
       Begruendung stehen im BUILDER-LOG unter §4b. <<<

   Register: young audience, a D2C brand rather than a practice.
   Direct, confident, monthly price rather than a lump sum.
   Shape language: rotated pill stickers + progress bars.
   Change ONLY this file to re-skin the whole template.
   ============================================================ */

.sec-klar-hero {
  /* ---------- Color ---------- */
  --c-bg:          #F7F6FC;   /* near-white with a violet cast */
  --c-bg-alt:      #EFEDF9;
  --c-white:       #FFFFFF;
  --c-surface:     #E4E1F6;

  --c-primary:     #4A46C8;   /* indigo — 6.6:1 on --c-bg, safe for text */
  --c-primary-dk:  #332F9E;
  --c-primary-lt:  #8C89E0;
  --c-primary-08:  rgba(74, 70, 200, 0.08);
  --c-primary-16:  rgba(74, 70, 200, 0.16);

  --c-accent:      #FF9E7D;   /* warm peach — fills, stickers, icons */
  --c-accent-dk:   #A44D24;   /* AA-safe peach for TEXT on light (5.3:1) */
  --c-accent-soft: #FFE7DC;

  --c-mint:        #7FD8B8;   /* success / progress only, never behind text */
  --c-mint-soft:   #E2F6EF;

  --c-text:        #1C1B2E;
  --c-text-muted:  #5A5872;   /* 6.4:1 on --c-bg */
  --c-on-dark:     #EEEDFA;
  --c-on-dark-mu:  rgba(238, 237, 250, 0.74);

  --c-line:        rgba(28, 27, 46, 0.11);
  --c-line-strong: rgba(28, 27, 46, 0.22);
  --c-line-dark:   rgba(238, 237, 250, 0.2);

  --c-whatsapp:    #128C7E;
  --c-whatsapp-dk: #0E6F63;
  --c-star:        #E8A33B;

  /* ---------- Elevation — bright brand, so shadows stay soft ---------- */
  --sh-xs: 0 1px 2px rgba(40, 36, 90, 0.05);
  --sh-sm: 0 4px 14px -5px rgba(40, 36, 90, 0.12);
  --sh-md: 0 12px 30px -10px rgba(40, 36, 90, 0.20);
  --sh-lg: 0 24px 52px -16px rgba(40, 36, 90, 0.26);
  --sh-xl: 0 40px 82px -24px rgba(40, 36, 90, 0.32);

  /* ---------- Radius ---------- */
  --r-xs:  10px;
  --r-sm:  14px;
  --r-md:  20px;
  --r-lg:  28px;
  --r-xl:  36px;
  --r-2xl: 48px;
  --r-pill: 999px;
  --r-circle: 50%;

  /* ---------- Spacing — 8px base ---------- */
  --sp-1:   4px;
  --sp-2:   8px;
  --sp-3:  16px;
  --sp-4:  24px;
  --sp-5:  32px;
  --sp-6:  48px;
  --sp-7:  64px;
  --sp-8:  96px;
  --sp-9: 128px;

  --section-y: clamp(64px, 8.5vw, 120px);
  --gutter:    clamp(20px, 5vw, 48px);
  --maxw:      1220px;

  /* ---------- Typography ---------- */
  --ff-display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --ff-body:    "Work Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --fs-xs:   0.8125rem;
  --fs-sm:   0.9375rem;
  --fs-base: 1rem;
  --fs-md:   1.0625rem;
  --fs-lg:   clamp(1.125rem, 0.4vw + 1.05rem, 1.25rem);
  --fs-h4:   clamp(1.1875rem, 0.6vw + 1.05rem, 1.4375rem);
  --fs-h3:   clamp(1.4375rem, 1vw + 1.18rem, 1.875rem);
  --fs-h2:   clamp(2.0625rem, 2.5vw + 1.4rem, 3.25rem);
  --fs-h1:   clamp(2.5rem, 4.2vw + 1.3rem, 4.5rem);

  --lh-tight: 1.06;
  --lh-snug:  1.2;
  --lh-body:  1.64;

  --ls-tight: -0.03em;
  --ls-label:  0.12em;

  /* ---------- Motion ---------- */
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-pop:  cubic-bezier(0.34, 1.5, 0.64, 1);
  --t-fast: 150ms;
  --t-base: 270ms;
  --t-slow: 620ms;

  /* ---------- Layout ---------- */
  --header-h: 76px;
  --z-header: 100;
  --z-mobilebar: 90;
  --z-menu: 95;
  --z-lightbox: 200;
}

@media (max-width: 760px) { .sec-klar-hero { --header-h: 64px; } }

/* KLAR — reset i zajedničke primitive (base.css). */

/* ============================================================
   BASE — Template 6 "KLAR"
   Signature: rotated pill stickers (.u-sticker) and segmented
   progress bars (.u-prog) as the recurring device.
   ============================================================ */

.sec-klar-hero *, .sec-klar-hero *::before, .sec-klar-hero *::after { box-sizing: border-box; }

.sec-klar-hero {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

.sec-klar-hero {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--ff-body);
  font-size: var(--fs-md);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}

.sec-klar-hero img, .sec-klar-hero svg, .sec-klar-hero video { display: block; max-width: 100%; }
.sec-klar-hero img, .sec-klar-hero video { height: auto; }

.sec-klar-hero h1, .sec-klar-hero h2, .sec-klar-hero h3, .sec-klar-hero h4 {
  font-family: var(--ff-display);
  font-weight: 800;
  color: var(--c-primary-dk);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-snug);
  margin: 0;
  text-wrap: balance;
}
.sec-klar-hero h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
.sec-klar-hero h2 { font-size: var(--fs-h2); line-height: 1.08; }
.sec-klar-hero h3 { font-size: var(--fs-h3); }
.sec-klar-hero h4 { font-size: var(--fs-h4); }

.sec-klar-hero p { margin: 0; text-wrap: pretty; }
.sec-klar-hero ul, .sec-klar-hero ol { margin: 0; padding: 0; list-style: none; }

.sec-klar-hero a { color: inherit; text-decoration: none; transition: color var(--t-fast) var(--ease); }
.sec-klar-hero button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

.sec-klar-hero :focus-visible { outline: 3px solid var(--c-primary); outline-offset: 3px; border-radius: var(--r-xs); }
.sec-klar-hero :focus:not(:focus-visible) { outline: none; }
.sec-klar-hero ::selection { background: var(--c-accent); color: var(--c-text); }

/* ---------- Layout primitives ---------- */

.sec-klar-hero .u-container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.sec-klar-hero .u-section { position: relative; padding-block: var(--section-y); }

.sec-klar-hero .u-sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

.sec-klar-hero .u-skip-link {
  position: absolute; top: 8px; left: 8px; z-index: 999;
  transform: translateY(-180%);
  background: var(--c-primary-dk); color: var(--c-white);
  padding: 12px 22px; border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 700;
}
.sec-klar-hero .u-skip-link:focus { transform: translateY(0); }

/* ---------- Sticker (signature device) ---------- */

/* A pill label that sits at a slight angle, like something stuck on.
   Set --rot to change the tilt, --st-bg / --st-fg to recolour. */
.sec-klar-hero .u-sticker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: var(--st-bg, var(--c-accent));
  color: var(--st-fg, var(--c-text));
  font-family: var(--ff-display);
  font-size: var(--fs-xs); font-weight: 800;
  letter-spacing: 0.02em;
  rotate: var(--rot, -3deg);
  box-shadow: var(--sh-sm);
  white-space: nowrap;
}
.sec-klar-hero .u-sticker--flat { rotate: 0deg; box-shadow: none; }

.sec-klar-hero .u-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ff-display);
  font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--c-primary);
}
.sec-klar-hero .u-label::before {
  content: "";
  width: 22px; height: 3px; border-radius: 3px;
  background: var(--c-accent);
}

.sec-klar-hero .u-head > * + * { margin-top: var(--sp-3); }
.sec-klar-hero .u-head--center { text-align: center; margin-inline: auto; }
.sec-klar-hero .u-head--center .u-label { justify-content: center; }
.sec-klar-hero .u-head p { color: var(--c-text-muted); font-size: var(--fs-lg); }

/* Highlighted word — a filled pill behind one word */
.sec-klar-hero .u-hl {
  display: inline-block;
  padding: 0 0.24em;
  border-radius: var(--r-sm);
  background: var(--hl, var(--c-accent));
  color: var(--c-text);
  rotate: -1.2deg;
}

/* ---------- Segmented progress bar (signature device) ---------- */

.sec-klar-hero .u-prog {
  display: flex; gap: 5px;
  --steps-done: 1;
}
.sec-klar-hero .u-prog i {
  flex: 1;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--c-line);
}
.sec-klar-hero .u-prog i.is-done { background: var(--c-mint); }

/* ---------- Buttons ---------- */

.sec-klar-hero .u-btn {
  --btn-bg: var(--c-primary);
  --btn-fg: var(--c-white);
  --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px;
  padding: 15px 30px;
  border: 2px solid var(--btn-bd);
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--ff-display);
  font-size: var(--fs-md); font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
  transition: transform var(--t-base) var(--ease-pop),
              box-shadow var(--t-base) var(--ease-out),
              background-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}
.sec-klar-hero .u-btn svg { flex: none; }
.sec-klar-hero .u-btn:hover { transform: translateY(-3px); }
.sec-klar-hero .u-btn:active { transform: translateY(0) scale(0.99); transition-duration: 60ms; }

.sec-klar-hero .u-btn--solid { box-shadow: var(--sh-md); }
.sec-klar-hero .u-btn--solid:hover { --btn-bg: var(--c-primary-dk); box-shadow: var(--sh-lg); }

.sec-klar-hero .u-btn--accent { --btn-bg: var(--c-accent); --btn-fg: var(--c-text); box-shadow: var(--sh-sm); }
.sec-klar-hero .u-btn--accent:hover { --btn-bg: #F98D68; box-shadow: var(--sh-md); }

.sec-klar-hero .u-btn--line { --btn-bg: transparent; --btn-fg: var(--c-primary-dk); --btn-bd: var(--c-line-strong); }
.sec-klar-hero .u-btn--line:hover { --btn-bd: var(--c-primary); --btn-bg: var(--c-white); }

.sec-klar-hero .u-btn--white { --btn-bg: var(--c-white); --btn-fg: var(--c-primary-dk); box-shadow: var(--sh-md); }
.sec-klar-hero .u-btn--white:hover { --btn-bg: var(--c-bg-alt); }

.sec-klar-hero .u-btn--ghost { --btn-bg: transparent; --btn-fg: var(--c-on-dark); --btn-bd: var(--c-line-dark); }
.sec-klar-hero .u-btn--ghost:hover { --btn-bg: rgba(238, 237, 250, 0.12); --btn-bd: rgba(238, 237, 250, 0.5); }

.sec-klar-hero .u-btn--wa { --btn-bg: var(--c-whatsapp); --btn-fg: #fff; box-shadow: var(--sh-md); }
.sec-klar-hero .u-btn--wa:hover { --btn-bg: var(--c-whatsapp-dk); box-shadow: var(--sh-lg); }

.sec-klar-hero .u-btn--lg { min-height: 62px; padding: 19px 36px; font-size: var(--fs-lg); }
.sec-klar-hero .u-btn--block { width: 100%; }

/* ---------- Scroll reveal ---------- */

/* Hidden start state gated on .has-js (set by app.js) so a script
   failure can never leave a blank hole where content should be. */
.sec-klar-hero.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.sec-klar-hero.has-js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .sec-klar-hero { scroll-behavior: auto; }
  .sec-klar-hero *, .sec-klar-hero *::before, .sec-klar-hero *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .sec-klar-hero.has-js [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .sec-klar-hero .site-head, .sec-klar-hero .mobile-bar, .sec-klar-hero .cta, .sec-klar-hero .band, .sec-klar-hero .ig { display: none !important; }
  .sec-klar-hero { background: #fff; }
}

/* ============================================================
   MEDIA SLOTS — every image slot also takes a <video>

   Each slot rule is written as `:is(img,video)`, so swapping the
   tag is the whole job — sizing, crop and radius stay identical:

     <img   src="_shared/img/hero.svg" width="900" height="1120" alt="…">
     <video src="_shared/video/hero.mp4" poster="_shared/img/hero.svg"
            width="900" height="1120" data-inline muted loop playsinline
            aria-label="…"></video>

   `data-inline` hands the element to app.js, which plays it only
   while it is on screen, pauses it when the tab is hidden, adds a
   pause control (WCAG 2.2.2) and skips autoplay entirely under
   prefers-reduced-motion — the poster stays in that case.

   Keep width/height (or let the slot's aspect-ratio do it) so the
   layout does not shift while the file loads.
   ============================================================ */

/* Baseline for slots that never sized their <img> explicitly. */
.sec-klar-hero video { width: 100%; height: auto; }

/* Parent of an inline video: only promoted when it is static, so a
   slot that already positions itself is left alone. */
.sec-klar-hero .has-inline-video { position: relative; }

.sec-klar-hero .u-mediactl {
  position: absolute;
  right: 10px; bottom: 10px;
  z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--sh-sm);
  color: var(--c-text);
  font-family: var(--ff-display);
  font-size: var(--fs-xs); font-weight: 600;
  cursor: pointer;
  transition: background-color var(--t-base) var(--ease);
}
.sec-klar-hero .u-mediactl:hover { background: #fff; }
.sec-klar-hero .u-mediactl__ic { position: relative; width: 12px; height: 12px; flex: none; }
.sec-klar-hero .u-mediactl__ic::before, 
.sec-klar-hero .u-mediactl__ic::after {
  content: "";
  position: absolute; top: 0;
  width: 4px; height: 12px;
  border-radius: 1px;
  background: currentColor;
}
.sec-klar-hero .u-mediactl__ic::before { left: 0; }
.sec-klar-hero .u-mediactl__ic::after { right: 0; }

/* paused -> the icon becomes a play triangle */
.sec-klar-hero .u-mediactl[aria-pressed="true"] .u-mediactl__ic::before {
  left: 1px;
  width: 0; height: 0;
  border-radius: 0;
  background: none;
  border-left: 11px solid currentColor;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.sec-klar-hero .u-mediactl[aria-pressed="true"] .u-mediactl__ic::after { opacity: 0; }

/* Small slots (avatars, thumbnails) do not get room for a label. */
.sec-klar-hero .u-mediactl--compact { padding: 0; width: 44px; justify-content: center; }
.sec-klar-hero .u-mediactl--compact .u-mediactl__tx { display: none; }

/* Sekcija hero. */

/* ============================================================
   SECTION: HERO — copy left, full-bleed background image
   ============================================================ */

.sec-klar-hero .hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: calc(var(--header-h) + clamp(28px, 5vw, 72px)) clamp(56px, 7vw, 104px);
  min-height: clamp(560px, 82svh, 900px);
  display: grid;
  align-items: center;
}

/* ---------- Background image ----------
   The photo covers the whole section; the scrim on top of it keeps
   the left half quiet enough for text. Both live behind the content
   via z-index, which `isolation: isolate` on .hero keeps contained. */

.sec-klar-hero .hero__bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.sec-klar-hero .hero__bg :is(img,video) {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 72% center;
}
.sec-klar-hero .hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  /* opaque until past the copy column, so text contrast is exactly
     the same as it was on the plain canvas — then it opens up */
  background: linear-gradient(96deg,
    #F7F6FC 0%,
    #F7F6FC 46%,
    rgba(247, 246, 252, 0.86) 58%,
    rgba(247, 246, 252, 0.28) 80%,
    rgba(247, 246, 252, 0) 100%);
}

.sec-klar-hero .hero__glow {
  position: absolute;
  top: -22%; right: -10%;
  width: min(900px, 110vw); aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(255, 158, 125, 0.3), transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.sec-klar-hero .hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.sec-klar-hero .hero__copy { max-width: 40rem; }

/* ---------- Copy ---------- */

.sec-klar-hero .hero__copy > * + * { margin-top: var(--sp-4); }
.sec-klar-hero .hero h1 { max-width: 14ch; }
.sec-klar-hero .hero__lead { max-width: 46ch; font-size: var(--fs-lg); color: var(--c-text-muted); }
.sec-klar-hero .hero__cta { display: flex; flex-wrap: wrap; gap: 12px; padding-top: var(--sp-1); }

.sec-klar-hero .hero__price { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.sec-klar-hero .hero__price-tx { font-size: var(--fs-sm); color: var(--c-text-muted); }

/* ---------- Breakpoints ---------- */

@media (max-width: 980px) {
  .sec-klar-hero .hero h1 { max-width: 18ch; }
}

/* Narrow screens: the copy sits ON the image, so the scrim turns
   vertical and covers the full width instead of fading sideways. */
@media (max-width: 760px) {
  .sec-klar-hero .hero { min-height: clamp(520px, 74svh, 760px); }
  .sec-klar-hero .hero__bg :is(img,video) { object-position: center; }
  .sec-klar-hero .hero__bg::after {
    background: linear-gradient(180deg,
      rgba(247, 246, 252, 0.96) 0%,
      rgba(247, 246, 252, 0.9) 55%,
      rgba(247, 246, 252, 0.78) 100%);
  }
}

@media (max-width: 560px) {
  .sec-klar-hero .hero__cta { flex-direction: column; align-items: stretch; }
  .sec-klar-hero .hero__cta .u-btn { width: 100%; }
}