/* Radix — tokeni templata, scopovani na .sec-radix-services. */

/* ============================================================
   DESIGN TOKENS — Template 14 "Radix"
   Niche variant: M — periodontics / tooth preservation
   >>> NEW variant, not in the original style guide. Rules and
       reasoning live in the BUILDER-LOG, §4j. <<<

   Register: measured and understated. This is the one variant
   where NUMBERS are the argument — pocket depth in mm, bleeding
   in per cent, how many teeth were kept and over what period.

   Second dark-canvas template in the series after T4, and it has
   to differ in colour, accent, type AND structure:
     T4  navy #12303F + coral + Nunito + panel system
     T14 petrol #0E3A40 + lime + Space Grotesk + measuring scale
   ============================================================ */

.sec-radix-services {
  /* ---------- Color ---------- */
  --c-canvas:      #0E3A40;   /* the page itself is dark */
  --c-canvas-2:    #0A2E33;   /* alternating band */
  --c-surface:     #14484F;   /* cards on the canvas */
  --c-surface-2:   #1B565E;   /* hover / raised */
  --c-white:       #FFFFFF;

  --c-accent:      #8FAE45;   /* muted lime — 4.8:1 on the canvas */
  --c-accent-lt:   #B4CE72;   /* small text on --c-surface (5.8:1) */
  --c-accent-dk:   #4C6220;   /* AA-safe lime for TEXT on light (6.3:1) */
  --c-accent-08:   rgba(143, 174, 69, 0.08);
  --c-accent-20:   rgba(143, 174, 69, 0.20);

  --c-sand:        #E8D9BE;   /* warm sand — highlighted figures only */

  --c-on-canvas:    #EAF2F1;  /* 10.8:1 on the canvas */
  --c-on-canvas-mu: rgba(234, 242, 241, 0.74);   /* 6.6:1 */
  --c-on-canvas-lo: rgba(234, 242, 241, 0.5);    /* rules and dividers only */

  /* the few light surfaces (lightbox, mobile bar, hero panel edge) */
  --c-light:       #F3F6F5;
  --c-ink:         #10262A;
  --c-ink-mu:      #4A5C5F;

  --c-line:        rgba(234, 242, 241, 0.16);
  --c-line-strong: rgba(234, 242, 241, 0.3);
  --c-line-dark:   rgba(16, 38, 42, 0.14);

  --c-whatsapp:    #0E7C6F;   /* deeper than the brand green: white on it 5.1:1 */
  --c-whatsapp-dk: #0B6357;
  --c-star:        #D9B24A;

  /* ---------- Elevation — on a dark canvas shadows read as depth,
       so they are deep and soft rather than tight ---------- */
  --sh-xs: 0 1px 2px rgba(4, 18, 20, 0.4);
  --sh-sm: 0 6px 18px -8px rgba(4, 18, 20, 0.6);
  --sh-md: 0 18px 40px -18px rgba(4, 18, 20, 0.7);
  --sh-lg: 0 30px 64px -24px rgba(4, 18, 20, 0.75);
  --sh-xl: 0 48px 96px -32px rgba(4, 18, 20, 0.8);

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

  /* Gallery tiles: 12px, inside the 10–15px band the brief asks for. */
  --r-gallery: 12px;

  /* ---------- 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(68px, 8.5vw, 118px);
  --gutter:    clamp(20px, 5vw, 48px);
  --maxw:      1220px;

  /* ---------- Typography ---------- */
  --ff-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --ff-body:    "Barlow", "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.42vw + 1.05rem, 1.28rem);
  --fs-h4:   clamp(1.1875rem, 0.6vw + 1.05rem, 1.4375rem);
  --fs-h3:   clamp(1.4375rem, 1vw + 1.18rem, 1.875rem);
  --fs-h2:   clamp(2rem, 2.4vw + 1.4rem, 3.125rem);
  --fs-h1:   clamp(2.375rem, 3.4vw + 1.4rem, 4rem);

  /* measurements get their own scale: they are the argument */
  --fs-metric: clamp(1.75rem, 2vw + 1.15rem, 2.75rem);

  --lh-tight: 1.06;
  --lh-snug:  1.18;
  --lh-body:  1.62;

  --ls-tight: -0.025em;
  --ls-label:  0.16em;

  /* ---------- 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);
  --t-fast: 150ms;
  --t-base: 280ms;
  --t-slow: 660ms;

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

@media (max-width: 900px) { .sec-radix-services { --header-h: 62px; } }

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

/* ============================================================
   BASE — Template 14 "Radix"
   Dark canvas. The signature is a measuring scale: .u-scale
   draws tick marks (long at 0/5/10, short in between) and is
   used as a divider, as a progress indicator and as a section
   signature. Nothing else in this template is decorative.
   ============================================================ */

.sec-radix-services *, .sec-radix-services *::before, .sec-radix-services *::after { box-sizing: border-box; }

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

.sec-radix-services {
  margin: 0;
  background: var(--c-canvas);
  color: var(--c-on-canvas);
  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-radix-services img, .sec-radix-services svg, .sec-radix-services video { display: block; max-width: 100%; }
.sec-radix-services img { height: auto; }

.sec-radix-services h1, .sec-radix-services h2, .sec-radix-services h3, .sec-radix-services h4 {
  font-family: var(--ff-display);
  font-weight: 500;
  color: var(--c-on-canvas);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-snug);
  margin: 0;
  text-wrap: balance;
}
.sec-radix-services h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
.sec-radix-services h2 { font-size: var(--fs-h2); line-height: 1.1; }
.sec-radix-services h3 { font-size: var(--fs-h3); }
.sec-radix-services h4 { font-size: var(--fs-h4); }

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

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

.sec-radix-services :focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; border-radius: var(--r-xs); }
.sec-radix-services :focus:not(:focus-visible) { outline: none; }
.sec-radix-services ::selection { background: var(--c-accent-20); color: var(--c-on-canvas); }

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

.sec-radix-services .u-container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.sec-radix-services .u-section { position: relative; padding-block: var(--section-y); }
.sec-radix-services .u-section--alt { background: var(--c-canvas-2); }

.sec-radix-services .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-radix-services .u-skip-link {
  position: absolute; top: 8px; left: 8px; z-index: 999;
  transform: translateY(-200%);
  background: var(--c-accent); color: var(--c-ink);
  padding: 12px 22px; border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 700;
}
.sec-radix-services .u-skip-link:focus { transform: translateY(0); }

/* ============================================================
   LIGHT SCOPE
   The page is dark, so the exception is the other way round from
   every other template: .u-light marks the few blocks that sit
   on a pale surface (the hero panel, the lightbox) and corrects
   headings and paragraphs there in one place.
   ============================================================ */
.sec-radix-services .u-light { color: var(--c-ink); }
.sec-radix-services .u-light h1, .sec-radix-services .u-light h2, .sec-radix-services .u-light h3, .sec-radix-services .u-light h4 { color: var(--c-ink); }
.sec-radix-services .u-light p { color: var(--c-ink-mu); }
.sec-radix-services .u-light .u-label { color: var(--c-accent-dk); }

/* ---------- Eyebrow + section head ---------- */

.sec-radix-services .u-label {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--ff-display);
  font-size: var(--fs-xs); font-weight: 500;
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--c-accent);
}
.sec-radix-services .u-label::before {
  content: "";
  width: 24px; height: 1px;
  background: currentColor;
  flex: none;
}

.sec-radix-services .u-head > * + * { margin-top: var(--sp-3); }
.sec-radix-services .u-head--center { text-align: center; margin-inline: auto; }
.sec-radix-services .u-head--center .u-label { justify-content: center; }
.sec-radix-services .u-head h2 { max-width: 20ch; }
.sec-radix-services .u-head--center h2 { margin-inline: auto; }
.sec-radix-services .u-head p { color: var(--c-on-canvas-mu); font-size: var(--fs-lg); max-width: 62ch; }
.sec-radix-services .u-head--center p { margin-inline: auto; }

/* ---------- Measuring scale (signature device) ---------- */

/* A ruler: a long tick every fifth mark, a short one in between,
   drawn with two repeating gradients. --tick sets the spacing and
   --tick-c the colour, so the same rule works on the canvas, on a
   card and on the pale hero panel. */
.sec-radix-services .u-scale {
  height: 22px;
  background-image:
    repeating-linear-gradient(to right,
      var(--tick-c, var(--c-line-strong)) 0 1px,
      transparent 1px calc(var(--tick, 10px) * 5)),
    repeating-linear-gradient(to right,
      var(--tick-c, var(--c-line)) 0 1px,
      transparent 1px var(--tick, 10px));
  background-size: 100% 100%, 100% 55%;
  background-position: 0 0, 0 0;
  background-repeat: repeat-x;
}
.sec-radix-services .u-scale--sm { height: 14px; }

/* A filled portion of a scale — used for "12 of 14 teeth kept" and
   the like. Set --fill as a percentage. */
.sec-radix-services .u-meter {
  position: relative;
  height: 6px;
  border-radius: var(--r-pill);
  background: rgba(234, 242, 241, 0.16);
  overflow: hidden;
}
.sec-radix-services .u-meter i {
  position: absolute; inset: 0 auto 0 0;
  width: var(--fill, 50%);
  border-radius: inherit;
  background: var(--c-accent);
}

/* ---------- Pills ---------- */

.sec-radix-services .u-pill {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 38px;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  background: var(--pill-bg, transparent);
  color: var(--pill-fg, var(--c-on-canvas));
  border: 1px solid var(--pill-bd, var(--c-line));
  font-size: var(--fs-sm); font-weight: 500;
}
.sec-radix-services .u-pill--lime { --pill-bg: var(--c-accent-20); --pill-bd: transparent; --pill-fg: var(--c-accent-lt); }
.sec-radix-services .u-pill--solid { --pill-bg: var(--c-surface); --pill-bd: transparent; }
.sec-radix-services .u-pill--light { --pill-bg: rgba(16, 38, 42, 0.06); --pill-bd: transparent; --pill-fg: var(--c-ink); }
.sec-radix-services .u-pill svg { width: 17px; height: 17px; flex: none; }

/* ---------- Stars ---------- */

.sec-radix-services .u-stars { display: inline-flex; gap: 2px; }
.sec-radix-services .u-stars svg { width: 17px; height: 17px; color: var(--c-star); }
.sec-radix-services .u-stars--lg svg { width: 21px; height: 21px; }
.sec-radix-services .u-stars .is-off { color: var(--c-line); }

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

.sec-radix-services .u-btn {
  --btn-bg: var(--c-accent);
  --btn-fg: var(--c-ink);
  --btn-bd: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px;
  padding: 15px 30px;
  border: 1px 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: 500;
  line-height: 1.1;
  text-align: center;
  cursor: pointer;
  transition: transform var(--t-base) var(--ease-out),
              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-radix-services .u-btn svg { flex: none; width: 20px; height: 20px; }
.sec-radix-services .u-btn:hover { transform: translateY(-2px); }
.sec-radix-services .u-btn:active { transform: translateY(0); transition-duration: 70ms; }

.sec-radix-services .u-btn--solid { box-shadow: var(--sh-sm); }
.sec-radix-services .u-btn--solid:hover { --btn-bg: #9EBE50; box-shadow: var(--sh-md); }

.sec-radix-services .u-btn--line { --btn-bg: transparent; --btn-fg: var(--c-on-canvas); --btn-bd: var(--c-line-strong); }
.sec-radix-services .u-btn--line:hover { --btn-bd: var(--c-accent); --btn-bg: rgba(143, 174, 69, 0.12); }

/* on a pale panel the outline button needs dark ink, not light */
.sec-radix-services .u-btn--line-ink { --btn-bg: transparent; --btn-fg: var(--c-ink); --btn-bd: var(--c-line-dark); }
.sec-radix-services .u-btn--line-ink:hover { --btn-bd: var(--c-accent-dk); --btn-bg: rgba(16, 38, 42, 0.04); }

.sec-radix-services .u-btn--dark { --btn-bg: var(--c-ink); --btn-fg: var(--c-on-canvas); }
.sec-radix-services .u-btn--dark:hover { --btn-bg: #071A1D; }

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

.sec-radix-services .u-btn--lg { min-height: 62px; padding: 19px 34px; font-size: var(--fs-lg); }
.sec-radix-services .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-radix-services.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 640ms var(--ease-out), transform 640ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.sec-radix-services.has-js [data-reveal].is-in { opacity: 1; transform: none; }

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

@media print {
  .sec-radix-services .site-head, .sec-radix-services .mobile-bar, .sec-radix-services .cta, .sec-radix-services .grow { display: none !important; }
  .sec-radix-services { background: #fff; color: #000; }
}

/* ============================================================
   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:

     image tag:  src="_shared/img/hero-bg.svg" width="2400" height="1500" alt="..."
     video tag:  src="_shared/video/hero.mp4" poster="_shared/img/hero-bg.svg"
                 width="2400" height="1500" data-inline muted loop playsinline
                 aria-label="..."

   `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.
   ============================================================ */

.sec-radix-services video { width: 100%; height: auto; }

.sec-radix-services .has-inline-video { position: relative; }

.sec-radix-services .u-mediactl {
  position: absolute;
  right: 14px; bottom: 14px;
  z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: rgba(16, 38, 42, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--sh-sm);
  color: var(--c-on-canvas);
  font-family: var(--ff-display);
  font-size: var(--fs-xs); font-weight: 500;
  cursor: pointer;
  transition: background-color var(--t-base) var(--ease);
}
.sec-radix-services .u-mediactl:hover { background: rgba(16, 38, 42, 0.94); }
.sec-radix-services .u-mediactl__ic { position: relative; width: 12px; height: 12px; flex: none; }
.sec-radix-services .u-mediactl__ic::before, 
.sec-radix-services .u-mediactl__ic::after {
  content: "";
  position: absolute; top: 0;
  width: 4px; height: 12px;
  border-radius: 1px;
  background: currentColor;
}
.sec-radix-services .u-mediactl__ic::before { left: 0; }
.sec-radix-services .u-mediactl__ic::after { right: 0; }

.sec-radix-services .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-radix-services .u-mediactl[aria-pressed="true"] .u-mediactl__ic::after { opacity: 0; }

.sec-radix-services .u-mediactl--compact { padding: 0; width: 44px; justify-content: center; }
.sec-radix-services .u-mediactl--compact .u-mediactl__tx { display: none; }

/* Sekcija services. */

/* ============================================================
   SECTION: SERVICES — four phases on a time scale
   A horizontal stepper on wide screens, a vertical one on narrow
   screens. The connecting line is drawn on the list, not on each
   item, so the last step never trails a stub of line.
   ============================================================ */

.sec-radix-services .svc { scroll-margin-top: calc(var(--header-h) + 20px); }
.sec-radix-services .svc__head h2 { max-width: 22ch; }

.sec-radix-services .phases {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  margin-top: clamp(40px, 5vw, 68px);
}
/* the time line the phases sit on */
.sec-radix-services .phases::before {
  content: "";
  position: absolute;
  top: 11px; left: 0; right: 0;
  height: 1px;
  background: var(--c-line);
}

.sec-radix-services .phase {
  position: relative;
  padding-top: var(--sp-6);
}
/* the tick where this phase meets the line */
.sec-radix-services .phase::before {
  content: "";
  position: absolute;
  top: 4px; left: 0;
  width: 2px; height: 15px;
  background: var(--c-accent);
}

.sec-radix-services .phase__when {
  position: absolute;
  top: 0; left: 14px;
  font-family: var(--ff-display);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--c-accent-lt);
  white-space: nowrap;
}

.sec-radix-services .phase__ic {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  margin-bottom: var(--sp-3);
  border-radius: var(--r-md);
  background: var(--c-surface);
  color: var(--c-accent);
}
.sec-radix-services .phase__ic svg { width: 26px; height: 26px; }

.sec-radix-services .phase h3 { font-size: var(--fs-h4); }
.sec-radix-services .phase__tx {
  margin-top: 10px;
  font-size: var(--fs-sm);
  color: var(--c-on-canvas-mu);
}

.sec-radix-services .phase__meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: var(--sp-4);
}
.sec-radix-services .phase__meta li {
  padding: 6px 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--c-line);
  font-size: var(--fs-xs);
  color: var(--c-on-canvas);
  font-variant-numeric: tabular-nums;
}
/* the maintenance phase is the one that decides the outcome */
.sec-radix-services .phase--last .phase__ic { background: var(--c-accent); color: var(--c-ink); }
.sec-radix-services .phase--last::before { height: 22px; top: 0; }

/* ---------- Foot ---------- */

.sec-radix-services .svc__foot { margin-top: clamp(36px, 4vw, 60px); }
.sec-radix-services .svc__rule {
  --tick: 10px;
  --tick-c: rgba(234, 242, 241, 0.18);
  margin-bottom: var(--sp-4);
}
.sec-radix-services .svc__note {
  max-width: 78ch;
  font-size: var(--fs-sm);
  color: var(--c-on-canvas-mu);
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .sec-radix-services .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5) var(--sp-4); }
  .sec-radix-services .phases::before { display: none; }
  .sec-radix-services .phase { padding-top: var(--sp-5); border-top: 1px solid var(--c-line); }
  .sec-radix-services .phase::before { top: -1px; height: 3px; width: 28px; }
  .sec-radix-services .phase--last::before { top: -1px; height: 3px; }
  .sec-radix-services .phase__when { top: var(--sp-3); left: 0; position: static; display: block; margin-bottom: var(--sp-3); }
}
@media (max-width: 600px) {
  .sec-radix-services .phases { grid-template-columns: 1fr; }
}