/*! BOMEX GROUP — global components: chrome, cards, controls, overlays.
    Page-specific composition lives in css/pages.css. */

/* ========================================================== 1. PRELOADER */
/* Hidden unless JS is running, so a JS failure can never hide the site. */
.preloader { display: none; }
.js .preloader {
  display: grid;
  position: fixed;
  inset: 0;
  z-index: 1600;
  place-content: center;
  justify-items: center;
  gap: 1.75rem;
  background: var(--slate-500);
  background-image: radial-gradient(120% 70% at 50% -10%,
      rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 62%);
  border-radius: 0;
  transition: transform var(--dur-3) var(--ease-inout),
              border-radius var(--dur-3) var(--ease-inout);
}
.preloader.is-done {
  transform: translate3d(0, -101%, 0);
  border-bottom-left-radius: var(--r-lg);
  border-bottom-right-radius: var(--r-lg);
}
/* Safety net: if app.js never runs, the curtain still lifts and the page is
   usable. Ends on the same state as .is-done, so it is invisible when JS works. */
.js .preloader { animation: safety-preloader 1ms linear 6s forwards; }
@keyframes safety-preloader {
  to { transform: translate3d(0, -101%, 0); visibility: hidden; pointer-events: none; }
}
.preloader__logo {
  width: min(280px, 62vw);
  height: auto;
  /* revealed left -> right */
  clip-path: inset(0 100% 0 0);
  animation: pl-reveal 900ms var(--ease-out) 120ms forwards;
}
@keyframes pl-reveal { to { clip-path: inset(0 0 0 0); } }
.preloader__bar {
  width: min(280px, 62vw);
  height: 1px;
  background: rgba(255, 255, 255, .28);
  overflow: hidden;
}
.preloader__bar i {
  display: block; height: 100%; width: 0%;
  background: var(--gypsum-50);
  transition: width 240ms var(--ease-out);
}
.preloader__num { color: var(--gypsum-50); font-size: var(--fs-micro); opacity: .8; }
@media (prefers-reduced-motion: reduce) {
  .preloader__logo { clip-path: none; animation: none; }
}

/* ============================================================ 2. BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  min-height: 44px; padding: .625rem 1.5rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .01em;
  white-space: nowrap;
  transition: transform var(--dur-1) var(--ease-out),
              background-color var(--dur-1) var(--ease-out),
              border-color var(--dur-1) var(--ease-out),
              color var(--dur-1) var(--ease-out);
}
.btn:active { transform: scale(.97); }

.btn--solid { background: var(--gypsum-50); color: var(--graphite-900); }
.btn--solid:hover { background: var(--white); }

.btn--outline {
  border: 1px solid rgba(255, 255, 255, .62);
  color: var(--gypsum-50);
}
.btn--outline:hover { background: rgba(255, 255, 255, .14); border-color: var(--white); }

.btn--ink { background: var(--graphite-900); color: var(--gypsum-50); }
.btn--ink:hover { background: var(--graphite-800); }

.btn--oak { background: var(--oak-500); color: var(--white); }
.btn--oak:hover { background: var(--oak-400); }

.btn--sm { min-height: 38px; padding: .45rem 1.05rem; font-size: var(--fs-micro); }

/* magnetic pill — fine pointers only */
@media (hover: hover) and (pointer: fine) {
  .btn[data-magnetic] { will-change: transform; }
}

/* inline "Saznajte više" link with the reference's corner arrow */
.arrow-link {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: var(--fs-xs); font-weight: 600;
  padding-block: .25rem;
}
.arrow-link svg { width: 11px; height: 11px; transition: transform var(--dur-1) var(--ease-out); }
.arrow-link:hover svg { transform: translate3d(2px, -2px, 0); }
.arrow-link::after {
  content: ""; position: absolute; /* keeps the underline off the arrow */
}
.arrow-link > span { border-bottom: 1px solid currentColor; padding-bottom: 1px; }

/* ============================================================== 3. CHIPS */
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  min-height: 34px; padding: .3rem .85rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  color: var(--gypsum-50);
  font-size: var(--fs-micro); font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; white-space: nowrap;
  transition: background-color var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out);
}
a.chip:hover, button.chip:hover { background: rgba(255, 255, 255, .26); }
.chip:active { transform: scale(.96); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .chip { background: rgba(78, 89, 96, .86); }
}

.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip-row--scroll {
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
  padding-bottom: 2px;
}
.chip-row--scroll::-webkit-scrollbar { display: none; }
.chip-row--scroll > * { scroll-snap-align: start; flex: 0 0 auto; }

/* ========================================================= 4. SEGMENTED */
/* The track carries the contrast for the labels AND the count badges. At .26
   over slate-500 an 11px badge landed at 2.5:1; .55 puts every label and badge
   above 6:1 whatever surface the control sits on. */
.segmented {
  display: inline-flex; gap: 2px; padding: 3px;
  border-radius: var(--r-pill);
  background: rgba(20, 24, 27, .55);
  border: 1px solid var(--hairline);
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented button {
  position: relative; z-index: 1;
  min-height: 38px; padding: .4rem 1rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-micro); font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: rgba(242, 245, 246, .92);
  white-space: nowrap;
  transition: color var(--dur-1) var(--ease-out), background-color var(--dur-2) var(--ease-out);
}
.segmented button:hover { color: var(--white); }
/* the active state is a single thumb that slides between segments (§5.5); it is
   positioned by app.js. The background below is the no-JS fallback and is
   dropped as soon as the thumb exists. */
.segmented button[aria-selected="true"] {
  background: var(--gypsum-50); color: var(--graphite-900);
}
.segmented:has(.segmented__thumb) button[aria-selected="true"] { background: transparent; }
.segmented__thumb {
  position: absolute; top: 3px; left: 0; height: calc(100% - 6px);
  border-radius: var(--r-pill); background: var(--gypsum-50);
  transform: translateX(var(--x, 0)); width: var(--w, 0);
  transition: transform var(--dur-2) var(--ease-out), width var(--dur-2) var(--ease-out);
  pointer-events: none;
}
.segmented { position: relative; }
/* opacity on a badge multiplies with the label colour and pushed both below
   4.5:1 — the counts carry meaning, so they are set as colours, not ghosts */
.segmented button .n { font-family: var(--ff-mono); margin-left: .3rem; color: rgba(242, 245, 246, .82); }
.segmented button[aria-selected="true"] .n { color: rgba(27, 27, 27, .72); }

/* ============================================================== 5. CARDS */
/* §5.3 one card contract: 28 / 20 / 14px radii, a 1px light edge, an inner top
   highlight so the card reads as a lit surface, and one lift-on-hover. */
.card {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, .18);
  transition: transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.card--tight { border-radius: var(--r-md); }
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 60px rgba(20, 24, 27, .35), inset 0 1px 0 rgba(255, 255, 255, .26);
  }
  /* a card that spans a whole grid row is furniture, not a target */
  .board__feature:hover, .board__emboss:hover, .board__stat:hover { transform: none; }
}

/* pointer-tracked glare — fine pointers only, purely decorative */
@media (hover: hover) and (pointer: fine) {
  [data-glare] { position: relative; }
  [data-glare]::after {
    content: ""; position: absolute; inset: 0; z-index: 4;
    pointer-events: none; opacity: 0;
    border-radius: inherit;
    background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%),
        rgba(255, 255, 255, .16), transparent 62%);
    transition: opacity var(--dur-2) var(--ease-out);
  }
  [data-glare]:hover::after { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  [data-glare]::after { display: none; }
}

/* corner tick marks — architectural drawing cue */
.ticked::before, .ticked::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 1px solid rgba(255, 255, 255, .45); pointer-events: none; z-index: 2;
}
.ticked::before { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.ticked::after { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }

/* faint 8px blueprint grid */
.blueprint {
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 8px 8px;
}

/* photo inside a card */
.card__media { position: relative; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
/* §5.6 every photo frame carries a faint inner hairline so a light image never
   bleeds into a light surround */
.card__media::after, .gallery button::before, .archive button::before,
.cert__shot::after, .wordmark::before {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
}
.cert__shot::after { box-shadow: inset 0 0 0 1px rgba(27, 27, 27, .1); }
.wordmark::before { box-shadow: inset 0 0 0 1px rgba(27, 27, 27, .12); }
@media (prefers-reduced-motion: no-preference) {
  .card__media img { transition: transform var(--dur-3) var(--ease-out); }
  .card:hover .card__media img { transform: scale(1.04); }
}
/* second photo revealed on hover / long-press */
.card__media .swap {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity var(--dur-2) var(--ease-out);
}
.card:hover .card__media .swap, .card.is-swapped .card__media .swap { opacity: 1; }

.card__scrim { position: absolute; inset: 0; background: var(--scrim-bottom); pointer-events: none; }
.card__scrim--top { background: var(--scrim-top); }

.card__body { padding: clamp(1rem, .7rem + .9vw, 1.5rem); }

/* light content card */
.card--light { background: var(--gypsum-50); color: var(--graphite-900); }
.card--light .muted { color: var(--slate-700); }

/* stat card on warm stone */
.card--stone { background: var(--stone-300); color: var(--graphite-900); }

/* whole-card link overlay keeps one tab stop and a large target */
.card__link::after { content: ""; position: absolute; inset: 0; z-index: 3; }

/* overlapping avatars */
.avatars { display: flex; align-items: center; }
.avatars img {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--white);
}
.avatars img + img { margin-left: -12px; }

/* dimension line divider: |—— 800 m² ——| */
.dimline {
  display: flex; align-items: center; gap: .75rem;
  font-family: var(--ff-mono); font-size: var(--fs-micro);
  letter-spacing: .06em; text-transform: uppercase;
}
.dimline::before, .dimline::after {
  content: ""; flex: 1; height: 1px; background: currentColor; opacity: .38;
}
.dimline > span { position: relative; }
.dimline > span::before, .dimline > span::after {
  content: ""; position: absolute; top: 50%; width: 1px; height: 9px;
  background: currentColor; opacity: .38; transform: translateY(-50%);
}
.dimline > span::before { left: -.5rem; }
.dimline > span::after { right: -.5rem; }

/* =========================================================== 6. SITE NAV */
/* ONE bar for every page and both states. `.nav--hero` is transparent over the
   hero photo; `.nav--stuck` is the glass panel that slides down at the same
   scroll position the old floating pill used (0.8 x hero height). The bar is
   never removed from the page in between — a navless mid-page was the one thing
   the pill version got wrong — and because the transparent state only ever sits
   over the hero image, white 13.5px type is always on a scrimmed photo, never
   on slate-500 (colour contract, tokens.css §4). */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 950;
  pointer-events: none;                 /* the inner bar takes the hits */
}
.nav__inner {
  pointer-events: auto;
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  height: var(--nav-h);
  margin-inline: auto;
  max-width: none;
  padding-inline: calc(var(--card-inset) + clamp(1rem, .4rem + 1.6vw, 1.75rem));
  border: 1px solid transparent;
  border-radius: var(--r-md);
  transition: height var(--dur-2) var(--ease-out),
              max-width var(--dur-2) var(--ease-out),
              margin-top var(--dur-2) var(--ease-out),
              background-color var(--dur-2) var(--ease-out),
              border-color var(--dur-2) var(--ease-out);
}
.nav--stuck .nav__inner {
  height: var(--nav-h-stuck);
  max-width: 1440px;
  margin-top: 10px;
  padding-inline: 20px;
  background: rgba(78, 89, 96, .82);
  border-color: var(--glass-border);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow-pop);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav--stuck .nav__inner { background: rgba(78, 89, 96, .96); }
}
/* the glass panel slides down at the trigger — the animation the client kept */
@media (prefers-reduced-motion: no-preference) {
  .nav--stuck .nav__inner { animation: nav-drop var(--dur-2) var(--ease-out) both; }
}
@keyframes nav-drop { from { transform: translate3d(0, -14px, 0); opacity: .4; } }

.nav__logo { flex: 0 0 auto; display: block; }
.nav__logo img { height: 26px; width: auto; transition: height var(--dur-2) var(--ease-out); }
.nav--stuck .nav__logo img { height: 22px; }

/* Centred on the VIEWPORT, not on the space left over between logo and CTA:
   `.nav__inner` is symmetric in both states, so absolute-centring inside it
   lands on innerWidth/2. QA asserts +/-2px at 1024/1280/1440/1920. */
.nav__center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.nav__links { display: flex; align-items: center; gap: clamp(1rem, .3rem + 1.1vw, 1.75rem); }
.nav__item { position: relative; display: flex; align-items: center; gap: .2rem; }
/* `> li >` matters: a bare `.nav__links a` also matches every link inside the
   mega panels, where it would override their grid layout with inline-flex and
   draw the oak underline under each thumbnail row. */
.nav__links > li > a {
  position: relative;
  display: inline-flex; align-items: center;
  font-size: 13.5px; font-weight: 500; line-height: 1.2; letter-spacing: .02em;
  color: rgba(255, 255, 255, .85);
  padding-block: .4rem;
  transition: color var(--dur-1) var(--ease-out);
}
.nav__links > li > a:hover { color: var(--white); }
/* underline wipes in from the left on hover and on the active page */
.nav__links > li > a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--oak-400);
  transform: scaleX(0); transform-origin: left center;
  transition: transform var(--dur-2) var(--ease-out);
}
.nav__links > li > a:hover::after,
.nav__links > li > a:focus-visible::after,
.nav__links > li > a[aria-current="page"]::after { transform: scaleX(1); }
.nav__links > li > a[aria-current="page"] { color: var(--white); }

.nav__disclose {
  display: inline-grid; place-items: center;
  width: 18px; height: 18px; color: rgba(255, 255, 255, .7);
  transition: transform var(--dur-2) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.nav__disclose svg { width: 10px; height: 10px; }
.nav__disclose:hover { color: var(--white); }
.has-mega[data-open="true"] .nav__disclose { transform: rotate(180deg); color: var(--white); }

.nav__right { flex: 0 0 auto; display: flex; align-items: center; gap: .625rem; }
.nav__cta {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
  padding: 10px 20px; min-height: 40px; font-size: 13px; font-weight: 600;
}
.nav--stuck .nav__cta { min-height: 36px; padding: 8px 18px; }
.nav__cta:hover { color: var(--oak-500); transform: translateY(-1px); box-shadow: var(--shadow-card); }
/* .icon-btn sets display:grid and is declared later in this file, so these need
   the extra class to win the cascade rather than relying on source order */
.nav .nav__call, .nav .nav__menu { display: none; }
@media (max-width: 1023px) {
  .nav__center, .nav__cta, .nav .langtoggle { display: none; }
  .nav .nav__call, .nav .nav__menu { display: grid; }
  .nav__inner { height: 58px; padding-inline: var(--pad-x); }
  .nav--stuck .nav__inner { height: 54px; margin-top: 6px; padding-inline: 14px; }
  .nav__logo img { height: 24px; }
}

/* ---- language toggle: SR | EN (does not translate the site, §1.1) ---- */
.langtoggle {
  position: relative; display: inline-flex; padding: 3px;
  border-radius: var(--r-pill);
  background: rgba(27, 27, 27, .28);
  border: 1px solid var(--hairline);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.langtoggle__thumb {
  position: absolute; top: 3px; left: 3px;
  width: 34px; height: calc(100% - 6px);
  border-radius: var(--r-pill); background: var(--gypsum-50);
  transition: transform var(--dur-2) var(--ease-out);
}
.langtoggle[data-active="en"] .langtoggle__thumb { transform: translateX(34px); }
.langtoggle__opt {
  position: relative; z-index: 1;
  width: 34px; min-height: 28px;
  font-family: var(--ff-mono); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .04em;
  color: rgba(255, 255, 255, .8);
  transition: color var(--dur-2) var(--ease-out);
}
.langtoggle__opt[aria-checked="true"] { color: var(--graphite-900); }

/* ---- mega panels (§1.3) ---- */
.mega {
  position: absolute; top: calc(100% + 14px); left: 50%;
  transform: translate3d(-50%, -8px, 0) scale(.98);
  width: max-content; max-width: min(1000px, calc(100vw - 40px));
  padding: 24px; border-radius: var(--r-md);
  background: rgba(78, 89, 96, .9);
  box-shadow: var(--shadow-pop);
  opacity: 0; visibility: hidden;
  transition: opacity 280ms var(--ease-out), transform 280ms var(--ease-out), visibility 280ms;
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .mega { background: rgba(62, 71, 77, .99); }
}
.mega[hidden] { display: block !important; }   /* animate, don't snap */
.has-mega[data-open="true"] .mega {
  opacity: 1; visibility: visible; transform: translate3d(-50%, 0, 0) scale(1);
}
.mega__caret {
  position: absolute; top: -6px; left: 50%; width: 12px; height: 12px;
  margin-left: -6px; transform: rotate(45deg);
  background: inherit; border-left: 1px solid var(--glass-border);
  border-top: 1px solid var(--glass-border);
}
.mega__cols { display: grid; gap: 1.5rem; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
/* flex column + a growing counters block so the shorter column fills the panel
   instead of leaving dead glass under it */
.mega__col { min-width: 224px; display: flex; flex-direction: column; }
.mega__counters { flex: 1 1 auto; align-content: space-between; }
.mega h3 {
  font-family: var(--ff-text); font-size: var(--fs-micro); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: rgba(242, 245, 246, .72);
  padding-bottom: .55rem; margin-bottom: .55rem;
  border-bottom: 1px solid var(--hairline);
}
.mega ul { display: grid; gap: 2px; }
.mega__link {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center;
  gap: .75rem; padding: .5rem .55rem; border-radius: var(--r-xs);
  transition: background-color var(--dur-1) var(--ease-out);
}
.mega__link:hover, .mega__link:focus-visible { background: rgba(255, 255, 255, .14); }
.mega__link--plain { grid-template-columns: 1fr auto; }
.mega__thumb {
  width: 40px; height: 40px; border-radius: 12px; overflow: hidden;
  background: var(--slate-600); position: relative;
}
.mega__thumb img { width: 100%; height: 100%; object-fit: cover; }
.mega__stack { display: flex; width: 40px; }
.mega__stack img {
  width: 20px; height: 28px; border-radius: 6px; object-fit: cover;
  border: 1px solid rgba(255, 255, 255, .5);
}
.mega__stack img + img { margin-left: -10px; }
.mega__t { display: grid; gap: 1px; min-width: 0; }
.mega__t b { font-size: var(--fs-sm); font-weight: 600; color: var(--gypsum-50); }
.mega__t span {
  font-size: var(--fs-micro); color: rgba(242, 245, 246, .68);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mega__n { font-family: var(--ff-mono); font-size: 10px; color: rgba(242, 245, 246, .6); }
.mega__link svg { width: 11px; height: 11px; color: rgba(242, 245, 246, .7); }

.mega__feature {
  position: relative; display: grid; align-content: end; gap: .4rem;
  min-height: 210px; width: 248px;
  border-radius: var(--r-sm); overflow: hidden; padding: .875rem;
  color: var(--white);
}
.mega__feature img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.mega__feature > .card__scrim { z-index: 1; }
/* :not() so the two absolutely-positioned layers keep their own position */
.mega__feature > :not(img):not(.card__scrim) { position: relative; z-index: 2; }
.mega__feature b { font-size: var(--fs-sm); font-weight: 700; line-height: 1.2; }
.mega__feature .mono { font-size: 10px; color: rgba(255, 255, 255, .82); }
.mega__feature .mega__n {
  display: inline-flex; align-items: center; gap: .35rem;
  margin-top: .3rem; color: var(--white); font-size: var(--fs-micro);
}
.mega__counters { display: grid; gap: .5rem; }
.mega__counters li {
  display: flex; align-items: baseline; gap: .6rem;
  padding: .5rem .6rem; border-radius: var(--r-xs);
  background: rgba(255, 255, 255, .08);
}
.mega__counters b { font-family: var(--ff-display); font-weight: 200; font-size: 1.75rem; line-height: 1; }
.mega__counters span { font-size: var(--fs-micro); color: rgba(242, 245, 246, .78); }

/* ======================================================= 7. MOBILE CHROME */
.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 50%;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  color: var(--gypsum-50);
  transition: transform var(--dur-1) var(--ease-out), background-color var(--dur-1) var(--ease-out);
}
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 18px; height: 18px; }

/* full-screen sheet menu */
.sheetmenu {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; flex-direction: column;
  background: rgba(46, 53, 58, .96);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  transform: translate3d(0, 100%, 0);
  /* visibility, not just transform: a closed dialog that is only translated
     off-screen keeps its links and buttons in the tab order, which axe reports
     as aria-hidden-focus and which really does strand keyboard users on
     invisible controls. It is transitioned so the close animation still plays. */
  visibility: hidden;
  transition: transform var(--dur-2) var(--ease-inout), visibility var(--dur-2);
  overflow-y: auto; overscroll-behavior: contain;
  padding: 1rem var(--pad-x) calc(2rem + env(safe-area-inset-bottom, 0px));
}
.sheetmenu.is-open { transform: none; visibility: visible; }
.sheetmenu__head { display: flex; align-items: center; margin-bottom: 1.5rem; }
.sheetmenu__head img { height: 24px; width: auto; }
.sheetmenu__head .icon-btn { margin-left: auto; }
/* Top-level rows. Items that own a mega panel become a <details> accordion so
   the same structure works with the keyboard and without JS; the page link
   inside the <summary> still navigates on tap. */
.sheetnav__row > a, .sheetnav__group > summary > a {
  display: flex; align-items: baseline; gap: .75rem;
  font-family: var(--ff-display); font-size: 1.5rem; font-weight: 300;
  text-transform: uppercase; letter-spacing: -.01em;
  flex: 1; min-height: 44px; align-items: center;
}
.sheetnav__row, .sheetnav__group > summary {
  display: flex; align-items: center; gap: .5rem;
  padding: .55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  list-style: none; cursor: pointer;
}
.sheetnav__group > summary::-webkit-details-marker { display: none; }
.sheetnav .n { font-size: var(--fs-micro); opacity: .5; }
.sheetnav a[aria-current="page"] { color: var(--white); }
.sheetnav a[aria-current="page"] .n { opacity: .9; }
.sheetnav__group > summary .chev {
  display: grid; place-items: center; width: 44px; height: 44px;
  flex: 0 0 auto; color: rgba(242, 245, 246, .7);
  transition: transform var(--dur-2) var(--ease-out);
}
.sheetnav__group[open] > summary .chev { transform: rotate(180deg); }
.sheetnav__sub { display: grid; gap: 1px; padding: .5rem 0 .875rem; }
.sheetnav__sub a {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: 44px; padding: .4rem .75rem; border-radius: var(--r-xs);
  font-size: var(--fs-sm); font-weight: 500; color: rgba(242, 245, 246, .88);
}
.sheetnav__sub a:active { background: rgba(255, 255, 255, .14); }
.sheetnav__sub .is-all a { font-weight: 700; color: var(--white); }
@media (prefers-reduced-motion: no-preference) {
  .sheetnav > *, .sheetmenu__contact > * {
    opacity: 0; transform: translate3d(0, 14px, 0);
    transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
    transition-delay: var(--d, 0ms);
  }
  .sheetmenu.is-open .sheetnav > *, .sheetmenu.is-open .sheetmenu__contact > * {
    opacity: 1; transform: none;
  }
}
.sheetmenu__foot {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  padding-top: 1.25rem;
}
.sheetmenu__foot .btn { flex: 1; justify-content: center; }
.sheetmenu__contact { margin-top: auto; padding-top: 2rem; display: grid; gap: .875rem; }
.sheetmenu__contact a { font-size: var(--fs-sm); }
.sheetmenu__dept { display: grid; gap: .5rem; }
.sheetmenu__dept li { display: flex; justify-content: space-between; gap: 1rem; font-size: var(--fs-xs); }

/* bottom tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(27, 27, 27, .74);
  border-top: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
}
@media (min-width: 1024px) { .tabbar { display: none; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .tabbar { background: rgba(27, 27, 27, .95); }
}
.tabbar__item {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; min-height: 44px;
  color: rgba(242, 245, 246, .72);
  font-size: 10px; font-weight: 600; letter-spacing: .02em;
  transition: color var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out);
}
.tabbar__item svg { width: 21px; height: 21px; }
.tabbar__item:active { transform: scale(.94); }
.tabbar__item[aria-current="page"], .tabbar__item[aria-expanded="true"] { color: var(--white); }
.tabbar__pill {
  position: absolute; top: 4px; left: 50%; z-index: -1;
  width: 46px; height: 30px; margin-left: -23px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .16);
  opacity: 0; transform: scale(.8);
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
}
.tabbar__item[aria-current="page"] .tabbar__pill,
.tabbar__item[aria-expanded="true"] .tabbar__pill { opacity: 1; transform: none; }
/* §5.8 one indicator that travels between items; app.js adds .has-ind, so the
   five per-item pills stay as the no-JS fallback */
.tabbar.has-ind .tabbar__pill { display: none; }
.tabbar__ind {
  position: absolute; top: 4px; left: 0;
  width: 46px; height: 30px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .16);
  transform: translateX(var(--x, 0));
  transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-2) var(--ease-out);
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { .tabbar__ind { transition: none; } }

/* generic bottom sheet */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1300;
  max-height: 86svh; max-height: 86vh;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: rgba(46, 53, 58, .97);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  border-top: 1px solid var(--glass-border);
  transform: translate3d(0, 100%, 0);
  visibility: hidden;                       /* see .sheetmenu above */
  transition: transform var(--dur-2) var(--ease-inout), visibility var(--dur-2);
  overflow-y: auto; overscroll-behavior: contain;
  padding: .75rem var(--pad-x) calc(1.5rem + var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
}
.sheet.is-open { transform: none; visibility: visible; }
.sheet__handle {
  width: 40px; height: 4px; border-radius: 2px;
  background: rgba(255, 255, 255, .34);
  margin: 0 auto 1rem;
}
.scrim {
  position: fixed; inset: 0; z-index: 1150;
  background: rgba(16, 20, 23, .55);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur-2) var(--ease-out), visibility var(--dur-2);
}
.scrim.is-open { opacity: 1; visibility: visible; }

/* ============================================================ 8. MARQUEE */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; width: max-content; gap: 2.5rem; will-change: transform; }
.marquee__track > * { flex: 0 0 auto; }
@media (prefers-reduced-motion: no-preference) {
  .marquee__track { animation: marquee var(--speed, 46s) linear infinite; }
  .marquee--reverse .marquee__track { animation-direction: reverse; }
  .marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; }
}
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee__track { flex-wrap: wrap; width: auto; gap: .75rem 1.5rem; }
  .marquee__track [aria-hidden="true"] { display: none; }
}

/* ============================================================== 9. RAILS */
.rail {
  display: flex; gap: var(--gap);
  overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  padding-bottom: .5rem;
  /* §5.8 edge fade so a rail reads as scrollable rather than clipped */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 2.5%, #000 97.5%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 2.5%, #000 97.5%, transparent);
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { flex: 0 0 auto; scroll-snap-align: start; }
.rail.is-dragging { scroll-snap-type: none; cursor: grabbing; }
@media (hover: hover) and (pointer: fine) { .rail { cursor: grab; } }

.dots { display: flex; justify-content: center; gap: .4rem; margin-top: .875rem; }
.dots button {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(242, 245, 246, .4);
  transition: width var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out);
}
.dots button[aria-current="true"] { width: 18px; border-radius: 3px; background: var(--gypsum-50); }

/* ============================================================ 10. FABs */
/* Both FABs read the SAME --fab-bottom, so their bottom edges are on one line. */
.fab {
  position: fixed; z-index: 1100;
  bottom: var(--fab-bottom);
  width: var(--fab-size); height: var(--fab-size);
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--gypsum-50);
  box-shadow: var(--shadow-pop);
  transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-2) var(--ease-out);
}
.fab:active { transform: scale(.94); }
.fab svg { width: 22px; height: 22px; }

.fab--assistant { left: var(--fab-side); background: rgba(27, 27, 27, .8); }
.fab--assistant::before {
  content: ""; position: absolute; inset: -2px; border-radius: 50%; z-index: -1;
  background: conic-gradient(from 0deg, var(--slate-500), var(--oak-500),
      var(--gypsum-50), var(--slate-500));
}
@media (prefers-reduced-motion: no-preference) {
  .fab--assistant::before { animation: spin 9s linear infinite; }
}
@keyframes spin { to { transform: rotate(1turn); } }
.fab--assistant .dot {
  position: absolute; top: 6px; right: 6px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--oak-400); border: 2px solid var(--graphite-900);
}
@media (prefers-reduced-motion: no-preference) {
  .fab--assistant .dot { animation: pulse 2.2s var(--ease-inout) infinite; }
}
@keyframes pulse { 50% { transform: scale(1.35); opacity: .75; } }

.fab--top {
  right: var(--fab-side);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  opacity: 0; visibility: hidden; transform: scale(.85);
}
.fab--top.is-visible { opacity: 1; visibility: visible; transform: none; }
.fab--top svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; }
.fab--top svg.ring circle { stroke-width: 2; fill: none; }
.fab--top svg.ring .track { stroke: rgba(255, 255, 255, .22); }
.fab--top svg.ring .bar {
  stroke: var(--gypsum-50); stroke-linecap: round;
  transform: rotate(-90deg); transform-origin: 50% 50%;
}

.fab__tip {
  position: absolute; left: calc(100% + 10px); top: 50%;
  transform: translateY(-50%);
  padding: .3rem .7rem; border-radius: var(--r-pill);
  background: rgba(27, 27, 27, .86); color: var(--gypsum-50);
  font-size: var(--fs-micro); font-weight: 600; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-1) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .fab--assistant:hover .fab__tip { opacity: 1; }
}
@media (max-width: 1023px) { .fab__tip { display: none; } }

/* ========================================================= 11. LIGHTBOX */
.lightbox {
  position: fixed; inset: 0; z-index: 1400;
  display: grid; grid-template-rows: auto 1fr auto;
  background: rgba(16, 19, 21, .95);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur-2) var(--ease-out), visibility var(--dur-2);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__bar {
  display: flex; align-items: center; gap: 1rem;
  padding: .875rem var(--pad-x);
  color: var(--gypsum-50);
}
.lightbox__bar .count { margin-left: auto; font-size: var(--fs-micro); }
.lightbox__stage {
  position: relative; display: grid; place-items: center;
  padding: 0 clamp(.5rem, 3vw, 4rem);
  overflow: hidden; touch-action: pan-y pinch-zoom;
}
.lightbox__stage img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: var(--r-sm);
  transition: transform var(--dur-2) var(--ease-out);
}
.lightbox__stage img.is-zoomed { cursor: zoom-out; }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255, 255, 255, .12);
  border: 1px solid var(--glass-border); color: var(--gypsum-50);
}
.lightbox__nav--prev { left: max(.5rem, 1vw); }
.lightbox__nav--next { right: max(.5rem, 1vw); }
.lightbox__nav:hover { background: rgba(255, 255, 255, .24); }
@media (max-width: 767px) { .lightbox__nav { display: none; } }
.lightbox__foot { padding: .875rem var(--pad-x) calc(.875rem + env(safe-area-inset-bottom, 0px)); }
.lightbox__caption { font-size: var(--fs-xs); color: rgba(242, 245, 246, .84); text-align: center; }
.lightbox__thumbs { display: none; gap: .4rem; overflow-x: auto; margin-top: .75rem; scrollbar-width: none; }
.lightbox__thumbs::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .lightbox__thumbs { display: flex; } }
.lightbox__thumbs button {
  flex: 0 0 auto; width: 62px; height: 46px; border-radius: 6px; overflow: hidden;
  opacity: .5; transition: opacity var(--dur-1) var(--ease-out);
  border: 1px solid transparent;
}
.lightbox__thumbs button[aria-current="true"] { opacity: 1; border-color: var(--gypsum-50); }
.lightbox__thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* full-screen "stories" slideshow */
.stories { position: fixed; inset: 0; z-index: 1400; background: #0F1214;
  opacity: 0; visibility: hidden; transition: opacity var(--dur-2) var(--ease-out), visibility var(--dur-2); }
.stories.is-open { opacity: 1; visibility: visible; }
.stories img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.stories__bars { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 2; }
.stories__bars i { flex: 1; height: 2px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.stories__bars i b { display: block; height: 100%; width: 0; background: var(--white); }
.stories__close { position: absolute; top: 28px; right: 16px; z-index: 3; }

/* ============================================================ 12. FORMS */
.field { display: grid; gap: .4rem; }
.field > label { font-size: var(--fs-xs); font-weight: 600; }
.field .req { color: var(--oak-500); }

/* §5.5 floating labels. The label stays a real <label for> in source order, so
   nothing changes for a screen reader or for the no-CSS case; it is only lifted
   visually once the control has focus or content. :has() reads the state of a
   following sibling, which a plain sibling combinator cannot do. */
.field--float { position: relative; }
.field--float > label {
  position: absolute; left: .95rem; top: .85rem; z-index: 1;
  font-size: var(--fs-sm); font-weight: 500; color: var(--slate-700);
  pointer-events: none; transform-origin: left top; white-space: nowrap;
  transition: transform var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.field--float .input, .field--float .select, .field--float .textarea {
  padding-top: 1.5rem; padding-bottom: .4rem;
}
.field--float .textarea { padding-top: 1.65rem; min-height: 140px; }
.field--float:focus-within > label,
.field--float:has(.input:not(:placeholder-shown)) > label,
.field--float:has(.textarea:not(:placeholder-shown)) > label,
.field--float:has(.select) > label {
  transform: translateY(-.66rem) scale(.78);
  color: var(--oak-500);
}
/* Without :has() the label would sit on top of the text. Fall back to the
   stacked layout the form shipped with. */
@supports not selector(:has(*)) {
  .field--float > label { position: static; font-size: var(--fs-xs); font-weight: 600; }
  .field--float .input, .field--float .select, .field--float .textarea {
    padding-top: .75rem; padding-bottom: .75rem;
  }
}
.input, .select, .textarea {
  width: 100%;
  /* 16px minimum stops iOS Safari zooming the page on focus */
  font-size: 1rem;
  padding: .75rem .9rem;
  border-radius: var(--r-xs);
  border: 1px solid rgba(27, 27, 27, .2);
  background: var(--white);
  color: var(--graphite-900);
  transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out);
}
.textarea { min-height: 128px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--oak-500);
  box-shadow: 0 0 0 3px rgba(143, 116, 98, .22);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] {
  border-color: #B3261E; box-shadow: 0 0 0 3px rgba(179, 38, 30, .16);
}
.field__err { font-size: var(--fs-xs); color: #8C1D18; font-weight: 600; min-height: 1.2em; }
.checkbox { display: flex; gap: .625rem; align-items: flex-start; font-size: var(--fs-xs); }
.checkbox input { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px; accent-color: var(--oak-500); }

/* multi-select service chips */
.chipset { display: flex; flex-wrap: wrap; gap: .5rem; }
.chipset label {
  display: inline-flex; align-items: center; min-height: 40px;
  padding: .4rem 1rem; border-radius: var(--r-pill);
  border: 1px solid rgba(27, 27, 27, .24);
  font-size: var(--fs-xs); font-weight: 600; cursor: pointer;
  transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out),
              border-color var(--dur-1) var(--ease-out);
}
.chipset input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chipset label:has(input:checked) {
  background: var(--graphite-900); color: var(--gypsum-50); border-color: var(--graphite-900);
}
.chipset label:has(input:focus-visible) { outline: 2px solid var(--graphite-900); outline-offset: 2px; }
.honey { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* =========================================================== 13. TOASTS */
.toasts {
  position: fixed; left: 50%; z-index: 1500;
  bottom: calc(var(--fab-bottom) + var(--fab-size) + 12px);
  transform: translateX(-50%);
  display: grid; gap: .5rem; width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
}
.toast {
  padding: .75rem 1rem; border-radius: var(--r-sm);
  background: rgba(27, 27, 27, .92); color: var(--gypsum-50);
  font-size: var(--fs-xs); font-weight: 500;
  box-shadow: var(--shadow-pop);
  pointer-events: auto;
  animation: toast-in var(--dur-2) var(--ease-out) both;
}
.toast--ok { border-left: 3px solid #4C9A62; }
.toast--err { border-left: 3px solid #D2685F; }
@keyframes toast-in { from { opacity: 0; transform: translate3d(0, 12px, 0); } }

/* ========================================================= 14. ASSISTANT */
.assistant {
  position: fixed; z-index: 1350;
  left: var(--fab-side);
  bottom: calc(var(--fab-bottom) + var(--fab-size) + 12px);
  width: 380px; height: min(560px, calc(100svh - var(--fab-bottom) - var(--fab-size) - 40px));
  display: flex; flex-direction: column;
  border-radius: var(--r-lg); overflow: hidden;
  background: rgba(38, 44, 48, .97);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-pop);
  opacity: 0; visibility: hidden; transform: translate3d(0, 12px, 0) scale(.98);
  transform-origin: bottom left;
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out),
              visibility var(--dur-2);
}
.assistant.is-open { opacity: 1; visibility: visible; transform: none; }
@media (max-width: 767px) {
  .assistant {
    left: 0; right: 0; bottom: 0; width: auto;
    height: 92svh; height: 92vh;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    transform: translate3d(0, 100%, 0); transform-origin: bottom center;
  }
  .assistant.is-open { transform: none; }
}
.assistant__handle { display: none; }
@media (max-width: 767px) {
  .assistant__handle {
    display: block; width: 40px; height: 4px; border-radius: 2px;
    background: rgba(255, 255, 255, .34); margin: .55rem auto .25rem;
    flex: 0 0 auto; cursor: grab;
  }
}
.assistant__head {
  display: flex; align-items: center; gap: .625rem;
  padding: .875rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  flex: 0 0 auto;
}
.assistant__head img { width: 30px; height: 30px; border-radius: 8px; }
.assistant__title { font-size: var(--fs-sm); font-weight: 700; line-height: 1.2; }
.assistant__status { font-size: 10px; opacity: .72; letter-spacing: .02em; }
.assistant__head .icon-btn { width: 34px; height: 34px; }
.assistant__head .icon-btn svg { width: 15px; height: 15px; }
.assistant__head .spacer { margin-left: auto; }

.assistant__log {
  flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain;
  padding: 1rem; display: flex; flex-direction: column; gap: .75rem;
}
.msg { max-width: 86%; display: grid; gap: .25rem; }
.msg__bubble {
  padding: .625rem .875rem; border-radius: var(--r-md);
  font-size: var(--fs-sm); line-height: 1.5;
}
.msg--bot { align-self: flex-start; }
.msg--bot .msg__bubble {
  background: rgba(255, 255, 255, .12); color: var(--gypsum-50);
  border-bottom-left-radius: 6px;
}
.msg--user { align-self: flex-end; }
.msg--user .msg__bubble {
  background: var(--gypsum-50); color: var(--graphite-900);
  border-bottom-right-radius: 6px;
}
.msg__time { font-family: var(--ff-mono); font-size: 10px; opacity: .55; }
.msg--user .msg__time { text-align: right; }
.msg__bubble a { text-decoration: underline; }
.msg__bubble ul { display: grid; gap: .25rem; margin-top: .4rem; }
.msg__bubble li { padding-left: .9rem; position: relative; }
.msg__bubble li::before { content: "—"; position: absolute; left: 0; opacity: .6; }

.typing { display: inline-flex; gap: 4px; align-items: center; padding: .75rem .875rem; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; }
@media (prefers-reduced-motion: no-preference) {
  .typing i { animation: blink 1.2s var(--ease-inout) infinite; }
  .typing i:nth-child(2) { animation-delay: .16s; }
  .typing i:nth-child(3) { animation-delay: .32s; }
}
@keyframes blink { 40% { opacity: 1; transform: translateY(-3px); } }

.assistant__card {
  border-radius: var(--r-sm); overflow: hidden;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .16);
  padding: .75rem; display: grid; gap: .5rem;
}
.assistant__card h4 { font-size: var(--fs-xs); font-weight: 700; }
.assistant__card .row { display: flex; gap: .5rem; flex-wrap: wrap; }

.assistant__quick {
  flex: 0 0 auto; display: flex; gap: .4rem; flex-wrap: wrap;
  padding: .625rem 1rem; border-top: 1px solid rgba(255, 255, 255, .12);
}
.assistant__quick button {
  padding: .35rem .75rem; border-radius: var(--r-pill);
  border: 1px solid var(--glass-border); background: rgba(255, 255, 255, .08);
  font-size: var(--fs-micro); font-weight: 600; color: var(--gypsum-50);
  transition: background-color var(--dur-1) var(--ease-out);
}
.assistant__quick button:hover { background: rgba(255, 255, 255, .2); }

.assistant__form {
  flex: 0 0 auto; display: flex; gap: .5rem; align-items: flex-end;
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.assistant__form textarea {
  flex: 1; min-height: 42px; max-height: 110px; resize: none;
  font-size: 1rem; line-height: 1.4;
  padding: .625rem .75rem; border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .1); color: var(--gypsum-50);
}
.assistant__form textarea::placeholder { color: rgba(242, 245, 246, .5); }
.assistant__form textarea:focus { outline: none; border-color: rgba(255, 255, 255, .5); }
.assistant__send {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%;
  background: var(--gypsum-50); color: var(--graphite-900);
  display: grid; place-items: center;
}
.assistant__send:disabled { opacity: .45; cursor: not-allowed; }
.assistant__note { font-size: 10px; opacity: .6; padding: 0 1rem .5rem; text-align: center; }

/* ============================================================ 15. FOOTER */
.site-footer {
  background: var(--slate-500);
  border-top: 1px solid var(--hairline);
  /* No margin-top. The last section already ends with its own padding-block and
     the footer opens with padding-top; a --sec-y margin on top of both stacked
     into 241px of bare slate above the footer (the void the client circled on
     screenshot 2). Separation here is the tone change + the hairline, not air. */
  padding-top: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
  overflow: hidden;
}
/* §5.7 hairline grid: one rule per column boundary, drawn with a repeating
   gradient so the column count can change without touching the markup */
.site-footer__top {
  display: grid; gap: clamp(2rem, 1rem + 3vw, 3.5rem);
  grid-template-columns: 1fr;
  position: relative;
}
@media (min-width: 1100px) {
  .site-footer__top > * + * { padding-left: clamp(1rem, .5rem + 1.5vw, 2rem); }
  .site-footer__top > * + * {
    box-shadow: inset 1px 0 0 rgba(27, 27, 27, .14);
  }
}
@media (min-width: 700px) { .site-footer__top { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .site-footer__top { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.site-footer__brand img { height: 46px; width: auto; }
.site-footer__brand p { margin-top: 1rem; max-width: 34ch; font-size: var(--fs-sm); color: var(--graphite-900); }
.site-footer h3 {
  font-family: var(--ff-text); font-size: var(--fs-micro); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--graphite-900); margin-bottom: .875rem;
}
.site-footer li + li { margin-top: .5rem; }
.site-footer a { font-size: var(--fs-sm); color: var(--graphite-900); }
/* oak underline, wiped in from the left like the nav links */
.site-footer a:not(.btn) { position: relative; display: inline-block; }
.site-footer a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: var(--oak-500); transform: scaleX(0); transform-origin: left center;
  transition: transform var(--dur-2) var(--ease-out);
}
.site-footer a:not(.btn):hover::after,
.site-footer a:not(.btn):focus-visible::after { transform: scaleX(1); }
.site-footer address { font-style: normal; font-size: var(--fs-sm); color: var(--graphite-900); }
/* WCAG 2.2 target size: the stacked tel:/mailto: lines were 23px tall */
.site-footer address a { padding-block: 7px; }
.site-footer address br + a, .site-footer address a + br { line-height: 1.2; }
.site-footer details summary {
  cursor: pointer; font-size: var(--fs-xs); font-weight: 700; color: var(--graphite-900);
  margin-top: .875rem; list-style: none; display: flex; align-items: center; gap: .4rem;
}
.site-footer details summary::-webkit-details-marker { display: none; }
.site-footer details summary::after { content: "+"; font-family: var(--ff-mono); }
.site-footer details[open] summary::after { content: "–"; }
.site-footer details ul { margin-top: .625rem; }
.site-footer details li { display: grid; gap: 1px; font-size: var(--fs-xs); color: var(--graphite-900); }
.site-footer details li b { font-weight: 700; }

.site-footer__bar {
  margin-top: clamp(2rem, 1rem + 3vw, 3.5rem);
  padding-block: 1.125rem;
  border-top: 1px solid rgba(27, 27, 27, .18);
  display: flex; flex-wrap: wrap; gap: .5rem 1.25rem;
  font-size: var(--fs-xs); color: var(--graphite-900);
}
.site-footer__bar a { font-size: inherit; }
/* Debossed, not ghosted. A light watermark sat at 1.43:1 on the slate footer,
   which is a real WCAG failure even for decorative text; graphite at 72% gives
   3.4:1 (the large-text threshold is 3:1) and reads as stamped into the
   surface, which matches the "utisnuto u svaki detalj" mark on the board. */
.site-footer__watermark {
  font-family: var(--ff-display); font-weight: 200;
  font-size: clamp(3rem, 13vw, 13rem); line-height: .8;
  letter-spacing: -.02em; text-transform: uppercase;
  color: rgba(27, 27, 27, .72);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .14);
  white-space: nowrap; text-align: center;
  margin-bottom: -.12em; user-select: none;
}
@media (max-width: 1023px) {
  .site-footer__watermark { margin-bottom: 0; padding-bottom: .5rem; }
}

/* list used inside the mobile "Usluge" bottom sheet */
.mega-list { display: grid; gap: .1rem; }
.mega-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: .75rem .625rem; border-radius: var(--r-xs);
  font-size: var(--fs-sm); font-weight: 500; min-height: 44px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.mega-list a:active { background: rgba(255, 255, 255, .14); }
.mega-list .n { font-size: var(--fs-micro); opacity: .55; }

/* ========================================================= 16. NOSCRIPT */
.noscript-note {
  margin: 1rem auto; max-width: 1560px;
  padding: .875rem 1rem; border-radius: var(--r-sm);
  background: var(--gypsum-50); color: var(--graphite-900);
  font-size: var(--fs-sm); font-weight: 600;
}
.noscript-list { display: grid; gap: .3rem; margin-top: .75rem; }
.noscript-list a { text-decoration: underline; }

/* ========================================================== 17. HELPERS */
.counter { font-family: var(--ff-display); font-weight: 200; line-height: .9; }
.sect { padding-block: calc(var(--sec-y) * .5); }
.sect--tight { padding-block: calc(var(--sec-y) * .34); }
/* the first section after a hero already has the hero's own inset above it */
.sect:first-child { padding-top: calc(var(--sec-y) * .34); }
/* §5.2 / §5.4: two adjacent sections never share a background silently. The
   divider is a hairline inside the content column (not a full-bleed rule) and
   it draws itself in from the left when the section reveals. */
.sect + .sect > .wrap { position: relative; }
.sect + .sect > .wrap::before {
  content: ""; position: absolute; left: var(--pad-x); right: var(--pad-x);
  top: calc(var(--sec-y) * -.5); height: 1px;
  background: linear-gradient(90deg, var(--hairline), rgba(255, 255, 255, .04) 70%, transparent);
  transform-origin: left center;
}
@media (prefers-reduced-motion: no-preference) {
  .js .sect + .sect > .wrap::before { transform: scaleX(0); transition: transform 900ms var(--ease-out); }
  .js .sect.is-near + .sect > .wrap::before,
  .js .sect + .sect.is-near > .wrap::before { transform: scaleX(1); }
}
/* Was flex + align-items:flex-end. When the right-hand child was taller than
   the heading (a prose block next to a two-line H2) the heading dropped to the
   bottom of the row and left a head-height band of empty slate above it — the
   void the client circled on the Kvalitet section. Grid + align-items:start
   pins both columns to the same top line, so the band cannot open. */
.sect__head {
  display: grid; gap: 1rem 2.5rem;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  margin-bottom: clamp(1.5rem, 1rem + 2vw, 3rem);
}
/* Column sizing, round 2b: the heading track was `1fr`, so a 442px headline sat
   in a 787px track while the lead stayed pinned to the right edge at 44ch —
   386px of dead slate between two blocks of text, mid-composition. Sizing the
   heading track to its own content and letting the lead START after it (rather
   than END at the wrap edge) closes the hole; the leftover slack moves to the
   right as ordinary ragged-edge trailing space. Right-hand ACTIONS (links,
   buttons) still justify to the end — there the flush right edge is the point. */
@media (min-width: 900px) {
  .sect__head { grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
    column-gap: clamp(2.5rem, 4.5vw, 4.5rem); }
  /* .lead/.prose are excluded by selector rather than overridden afterwards:
     `:not(h2):not(:only-child)` scores (0,2,1) and silently beat a plain
     `.sect__head > .lead` at (0,2,0), which left the paragraph pinned right
     and the hole still open. Exclusion keeps the two rules disjoint. */
  .sect__head > :not(h2):not(.lead):not(.prose):not(:only-child) { justify-self: end; }
  .sect__head > .lead, .sect__head > .prose { max-width: 62ch; }
}
.sect__labels { display: flex; justify-content: space-between; width: 100%;
  color: rgba(242, 245, 246, .8); margin-bottom: 1rem; }

/* long lower sections stay cheap to render until they are near the viewport */
.cv-auto { content-visibility: auto; contain-intrinsic-size: auto 900px; }
