/* ==========================================================================
   MARIWASA — Surfaces
   Premium architectural design system
   Brand gold · warm neutral · deep charcoal · DM Serif Display / Inter
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Palette */
  --brand: #CC9027;
  --brand-deep: #855E19;
  --brand-tint: rgba(204, 144, 39, 0.10);
  --bg: #F8F7F4;
  --dark: #1D1D1F;
  --dark-deep: #131315;
  --stone: #E7E4DE;
  --stone-deep: #D9D5CD;
  --slate: #3D434A;
  --accent: #B8955A;

  /* Derived ink.
     Alpha floors are set by WCAG AA: dark ink needs >= 0.64 to clear 4.5:1 on
     the lightest background (#FFF) through to stone, and white needs >= 0.46
     on charcoal. Hierarchy below that floor comes from size, weight and
     letter-spacing — never from lower contrast. */
  --ink: var(--dark);
  --ink-soft: rgba(29, 29, 31, 0.72);
  --ink-faint: rgba(29, 29, 31, 0.64);
  --hairline: rgba(29, 29, 31, 0.10);
  --hairline-strong: rgba(29, 29, 31, 0.18);

  /* On dark */
  --on-dark: rgba(255, 255, 255, 0.92);
  --on-dark-soft: rgba(255, 255, 255, 0.66);
  --on-dark-faint: rgba(255, 255, 255, 0.52);
  --hairline-dark: rgba(255, 255, 255, 0.14);

  /* Brand gold as *text*: only 2.58:1 on the page ground, so text always uses
     the deep gold (5.43:1 there, 4.58:1 on stone) and dark sections step up to
     a lighter one (7.85:1 on charcoal). Fills and borders keep the full gold,
     which carries dark ink at 6.08:1. */
  --brand-text: var(--brand-deep);
  --brand-light: #E5B455;

  /* Type */
  --font-display: "DM Serif Display", "Times New Roman", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --size-hero: clamp(2.75rem, 6.4vw, 6rem);
  --size-h2: clamp(2.1rem, 4.2vw, 3.75rem);
  --size-h3: clamp(1.375rem, 2.1vw, 1.875rem);
  --size-h4: clamp(1.125rem, 1.4vw, 1.375rem);
  --size-lead: clamp(1.0625rem, 1.35vw, 1.3125rem);

  /* Space & rhythm */
  --space-section: clamp(5rem, 9vw, 9.5rem);
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --container: min(100% - (2 * var(--gutter)), 1440px);
  --container-narrow: min(100% - (2 * var(--gutter)), 1080px);

  /* Form */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Elevation — soft, premium, never harsh */
  --shadow-sm: 0 1px 2px rgba(29, 29, 31, 0.04), 0 4px 12px rgba(29, 29, 31, 0.05);
  --shadow-md: 0 2px 6px rgba(29, 29, 31, 0.05), 0 14px 34px rgba(29, 29, 31, 0.08);
  --shadow-lg: 0 8px 24px rgba(29, 29, 31, 0.07), 0 36px 72px rgba(29, 29, 31, 0.13);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 0.7s;
  --dur-slow: 1.1s;

  --nav-h: 76px;
}

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

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body.menu-open { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--brand); color: var(--dark); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.018em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  /* --brand-text, not --brand: the full gold is 2.58:1 on the page ground,
     under the 3:1 a focus ring needs. This token is already per-background. */
  outline: 2px solid var(--brand-text);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  translate: -50% -150%;
  z-index: 200;
  background: var(--dark);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: translate 0.3s var(--ease);
}
.skip-link:focus { translate: -50% 0; }

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

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.container { width: var(--container); margin-inline: auto; }
.container--narrow { width: var(--container-narrow); margin-inline: auto; }

.section { padding-block: var(--space-section); position: relative; }
.section--tight { padding-block: clamp(3.5rem, 6vw, 6rem); }
.section--stone { background: var(--stone); }
.section--dark {
  background: var(--dark);
  color: var(--on-dark);
  --ink: var(--on-dark);
  --ink-soft: var(--on-dark-soft);
  --ink-faint: var(--on-dark-faint);
  --hairline: var(--hairline-dark);
  --hairline-strong: rgba(255, 255, 255, 0.24);
}
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--dark { --brand-text: var(--brand-light); }

/* Section header — eyebrow / title / intro / action */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(1.5rem, 3vw, 3rem);
  margin-bottom: clamp(2.5rem, 4.5vw, 4.5rem);
}
.section-head__copy { max-width: 46ch; }
.section-head--center {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}
.section-head--center .section-head__copy { margin-inline: auto; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-text);
  margin: 0 0 1.25rem;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  flex: none;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.9s var(--ease) 0.1s;
}
.is-inview .eyebrow::before,
.eyebrow.is-inview::before { transform: scaleX(1); }
.section--dark .eyebrow { color: var(--accent); }
.eyebrow--muted { color: var(--ink-faint); }

.section-title { font-size: var(--size-h2); }
.section-intro {
  font-size: var(--size-lead);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 52ch;
  margin-top: 1.25rem;
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   4. Buttons & links
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--hairline-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.65rem;
  min-height: 48px;
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.008em;
  cursor: pointer;
  position: relative;
  /*
   * Hover is a tonal step and nothing else: no lift, no glow, no travel. The
   * timing is short and flat — a button should answer the pointer, not perform
   * for it — and :active darkens one step further so a press still registers.
   */
  transition: color 0.18s ease-out, border-color 0.18s ease-out,
              background-color 0.18s ease-out;
}

.btn--primary {
  --btn-bg: var(--brand);
  --btn-fg: var(--dark);          /* 6.08:1 — white would be 2.77:1 on gold */
  --btn-bd: var(--brand);
}
.btn--primary:hover {
  --btn-bg: #b87f20;              /* one step down the same gold; 5.0:1 with dark ink */
  --btn-bd: #b87f20;
}
.btn--primary:active {
  --btn-bg: var(--brand-deep);
  --btn-fg: #fff;                 /* 5.81:1 on the deep gold */
  --btn-bd: var(--brand-deep);
}

.btn--dark { --btn-bg: var(--dark); --btn-fg: #fff; --btn-bd: var(--dark); }
.btn--dark:hover { --btn-bg: #313135; --btn-bd: #313135; }
.btn--dark:active { --btn-bg: #000; --btn-bd: #000; }

.btn--ghost { --btn-fg: var(--ink); }
.btn--ghost:hover { --btn-bd: var(--ink); background: rgba(29, 29, 31, 0.04); }
.btn--ghost:active { background: rgba(29, 29, 31, 0.08); }

.btn--glass {
  --btn-fg: #fff;
  --btn-bd: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
}
.btn--glass:hover {
  background: rgba(255, 255, 255, 0.18);
  --btn-bd: rgba(255, 255, 255, 0.52);
}
.btn--glass:active { background: rgba(255, 255, 255, 0.26); }

.btn--light { --btn-bg: #fff; --btn-fg: var(--dark); --btn-bd: #fff; }
.btn--light:hover { --btn-bg: #efede8; --btn-bd: #efede8; }
.btn--light:active { --btn-bg: var(--stone); --btn-bd: var(--stone); }

.btn--sm { padding: 0.6rem 1.2rem; min-height: 40px; font-size: 0.875rem; }

/* Text link with sliding rule + arrow */
.link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  padding-block: 0.35rem;
  position: relative;
}
.link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease-out;
}
.link:hover::after { transform: scaleX(1); transform-origin: left; }
.link .arrow { transition: transform 0.2s ease-out; }
.link:hover .arrow { transform: translateX(2px); }
.link--brand { color: var(--brand-text); }

.arrow { width: 1em; height: 1em; flex: none; }

/* --------------------------------------------------------------------------
   5. Media surfaces
   -------------------------------------------------------------------------- */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--stone);
  aspect-ratio: var(--ratio, 4 / 3);
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease), filter 1.4s var(--ease);
}
.media--zoom img { will-change: transform; }
a:hover .media--zoom img,
.card:hover .media--zoom img,
.media--zoom:hover img { transform: scale(1.055); }

.media__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(19, 19, 21, 0.72) 0%, rgba(19, 19, 21, 0.18) 45%, transparent 72%);
  pointer-events: none;
}

/* Glass overlay chip — used sparingly, per brief */
.glass {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.glass--light {
  background: rgba(248, 247, 244, 0.78);
  border-color: rgba(29, 29, 31, 0.07);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline-strong);
  color: var(--ink-soft);
}
.tag--brand { color: var(--brand-text); border-color: rgba(204, 144, 39, 0.38); background: var(--brand-tint); }

/* Spec pair — "Size 60×120 cm" style metadata */
.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
  margin: 0;
  font-size: 0.8125rem;
}
.specs div { display: flex; flex-direction: column; gap: 0.15rem; }
.specs dt {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.specs dd { margin: 0; font-weight: 500; color: var(--ink); }

/* --------------------------------------------------------------------------
   6. Navigation — a floating bar
   Dark, rounded and inset from the page edges, identical on every page, so it
   reads over the hero photographs and the warm page ground alike. Links are
   quiet; the current page sits in a soft filled chip; the call to action is a
   white pill. The header element itself is only a transparent positioner.
   -------------------------------------------------------------------------- */
.site-nav {
  --bar-bg: rgba(14, 14, 16, 0.86);
  --bar-line: rgba(255, 255, 255, 0.08);
  --bar-ink: rgba(255, 255, 255, 0.62);   /* 7.6:1 on the bar */
  --bar-ink-strong: #fff;
  --bar-chip: rgba(255, 255, 255, 0.075);

  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-h);
  padding-top: 10px;
  pointer-events: none;                  /* only the bar itself takes clicks */
}

.nav-bar {
  pointer-events: auto;
  width: min(100% - 2 * var(--gutter), 1280px);
  height: calc(var(--nav-h) - 12px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.6vw, 1.5rem);
  padding: 0 8px 0 clamp(1rem, 2vw, 1.6rem);
  background: var(--bar-bg);
  border: 1px solid var(--bar-line);
  border-radius: 22px;
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 32px -14px rgba(0, 0, 0, 0.5);
  transition: background-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

/* Once past the hero, a touch more solid: it now sits over busy content. */
.site-nav.is-scrolled .nav-bar {
  --bar-bg: rgba(12, 12, 14, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 40px -16px rgba(0, 0, 0, 0.55);
}

/* ---- Logo — the wordmark and its founding line inside a hairline frame,
   as on the printed mark. An uploaded Site Logo replaces it. ---- */
.logo-link { flex: none; display: inline-flex; }

.logo {
  display: inline-grid;
  justify-items: center;
  gap: 0.28em;
  padding: 0.5em 0.85em;
  border: 1px solid currentColor;
  color: var(--brand-text);
  line-height: 1;
  white-space: nowrap;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.logo__word {
  font-family: "Cinzel", "Trajan Pro", var(--font-display);
  font-weight: 500;
  font-size: 1.0625rem;
  letter-spacing: 0.26em;
  text-indent: 0.26em;            /* the trailing letter-space, balanced */
}
.logo__estd {
  font-family: "Cinzel", var(--font-display);
  font-weight: 500;
  font-size: 0.5rem;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  opacity: 0.85;
}
.logo--footer { padding: 0.6em 1em; }
.logo--footer .logo__word { font-size: 1.25rem; }
.logo--footer .logo__estd { font-size: 0.5625rem; }
.logo--image { border: 0; padding: 0; max-height: 60px; width: auto; }

/* On the dark bar and the dark footer the gold can run at full strength. */
.site-nav .logo,
.site-footer .logo { color: var(--brand); }
.site-nav .logo-link:hover .logo,
.site-footer .logo-link:hover .logo { color: var(--brand-light); }

.nav-divider {
  flex: none;
  width: 1px;
  height: 28px;
  background: var(--bar-line);
}

/* ---- Links ---- */
.nav-primary { margin-right: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: block;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1;
  white-space: nowrap;
  color: var(--bar-ink);
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.nav-links a:hover { color: var(--bar-ink-strong); background: rgba(255, 255, 255, 0.04); }

/* The current page: WordPress marks it on the <li>, and with aria-current. */
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a,
.nav-links .current-menu-ancestor > a,
.nav-links .current_page_parent > a,
.nav-links a[aria-current="page"] {
  color: var(--bar-ink-strong);
  font-weight: 600;
  background: var(--bar-chip);
}

/* ---- Submenus ---- */
.nav-links li { position: relative; }

/* The caret, and room for it inside the link's padding. */
.nav-links .menu-item-has-children > a { padding-right: 1.9rem; }
.nav-links .menu-item-has-children > a::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-75%) rotate(45deg);
  opacity: 0.7;
  transition: transform 0.3s var(--ease);
}
.nav-links .menu-item-has-children:hover > a::after,
.nav-links .menu-item-has-children:focus-within > a::after { transform: translateY(-25%) rotate(225deg); }

.nav-links .sub-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 1;
  min-width: 220px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: rgba(14, 14, 16, 0.96);
  border: 1px solid var(--bar-line);
  border-radius: 16px;
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease), visibility 0.28s;
}
/* The gap between bar and panel would drop the hover — bridge it. */
.nav-links .menu-item-has-children::after {
  content: "";
  position: absolute;
  inset: 100% 0 auto;
  height: 12px;
}
.nav-links .menu-item-has-children:hover > .sub-menu,
.nav-links .menu-item-has-children:focus-within > .sub-menu,
.nav-links .menu-item-has-children.is-open > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.nav-links .sub-menu a {
  padding: 0.62rem 0.85rem;
  font-size: 0.9rem;
  border-radius: 10px;
}

.nav-links a:focus-visible,
.nav-cta:focus-visible,
.nav-burger:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ---- Call to action: a white pill ---- */
.nav-actions { display: flex; align-items: center; gap: 0.5rem; flex: none; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  height: 46px;
  padding: 0 1.35rem 0 1.5rem;
  border-radius: 999px;
  background: #fff;
  color: #111113;                         /* 18.6:1 */
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.18s ease-out;
}
.nav-cta .arrow { width: 14px; height: 14px; transition: transform 0.2s ease-out; }
.nav-cta:hover { background: #ecebe8; }
.nav-cta:hover .arrow { transform: translateX(2px); }

/* ---- Burger ---- */
.nav-burger {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 0;
  cursor: pointer;
  border-radius: 12px;
}
.nav-burger span {
  display: block;
  width: 18px; height: 1.5px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.45s var(--ease), opacity 0.3s var(--ease);
}
body.menu-open .nav-burger span:first-child { transform: translateY(3.25px) rotate(45deg); }
body.menu-open .nav-burger span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ---- Mobile menu: a dark panel that drops from the bar ---- */
.mobile-menu {
  position: fixed;
  top: calc(var(--nav-h) + 6px);
  left: 50%;
  z-index: 99;
  width: min(100% - 2 * var(--gutter), 1280px);
  max-height: calc(100svh - var(--nav-h) - 24px);
  translate: -50% 0;
  background: rgba(14, 14, 16, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.6);
  padding: 0.75rem 0.75rem 1rem;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0.4s;
}
body.menu-open .mobile-menu { opacity: 1; visibility: visible; transform: none; }
.mobile-menu ul { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.mobile-menu a:not(.nav-cta) {
  display: block;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  font-size: 1.0625rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
}
.mobile-menu a:not(.nav-cta):hover { color: #fff; background: rgba(255, 255, 255, 0.04); }
.mobile-menu .current-menu-item > a,
.mobile-menu .current_page_item > a,
.mobile-menu a[aria-current="page"] { color: #fff; font-weight: 600; background: rgba(255, 255, 255, 0.075); }
.mobile-menu .sub-menu {
  list-style: none;
  margin: 0 0 0.35rem;
  padding: 0 0 0 0.85rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}
.mobile-menu .sub-menu a:not(.nav-cta) { font-size: 0.9375rem; padding-block: 0.7rem; color: rgba(255, 255, 255, 0.6); }

.nav-cta--block { display: flex; width: 100%; justify-content: center; height: 50px; }

/*
 * Seven links, the framed logo (162px) and the button need a ~1100px bar, and
 * the bar is the viewport less two gutters — so about 1195px of viewport.
 * Measured at 1385px: 181px of clearance between the links and the button.
 * Below 1240px the links fold into the burger; the button stays until phones.
 */
@media (max-width: 1240px) {
  .nav-primary, .nav-divider { display: none; }
  .nav-actions { margin-left: auto; }
  .nav-burger { display: flex; }
}
@media (max-width: 560px) {
  .nav-actions .nav-cta { display: none; }
  .nav-bar { border-radius: 18px; }
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: var(--dark);
}
.hero__media {
  position: absolute;
  inset: -8% 0 -8%;
  z-index: -2;
  will-change: transform;
}
/*
 * (0,2,1) on purpose, here and on .cta__media: inside an Elementor widget,
 * `.elementor img { height: auto; max-width: 100% }` (0,1,1) loads after this
 * file and would win a tie, leaving the photo at its natural height — short of
 * the bottom of the hero instead of covering it.
 */
.hero .hero__media img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(19, 19, 21, 0.82) 0%, rgba(19, 19, 21, 0.34) 42%, rgba(19, 19, 21, 0.12) 70%),
    linear-gradient(to right, rgba(19, 19, 21, 0.5) 0%, transparent 55%);
}
.hero__inner {
  width: var(--container);
  margin-inline: auto;
  padding-bottom: clamp(4.5rem, 9vw, 8rem);
  padding-top: calc(var(--nav-h) + 3rem);
}
.hero__eyebrow { color: rgba(255, 255, 255, 0.72); }
.hero__eyebrow::before { background: var(--brand); width: 30px; }
.hero__title {
  font-size: var(--size-hero);
  max-width: 17ch;
  color: #fff;
  margin-bottom: 1.5rem;
}
.hero__text {
  font-size: var(--size-lead);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  max-width: 48ch;
  margin-bottom: 2.5rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.hero__meta {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(4.5rem, 9vw, 8rem);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-end;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius);
}
.hero__meta b { font-size: 1.5rem; font-family: var(--font-display); font-weight: 400; color: #fff; letter-spacing: 0; text-transform: none; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  translate: -50% 0;
  width: 1px;
  height: 46px;
  background: rgba(255, 255, 255, 0.25);
  overflow: hidden;
}
.scroll-cue::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue {
  0% { transform: translateY(-100%); }
  55%, 100% { transform: translateY(100%); }
}

/* --------------------------------------------------------------------------
   8. Featured categories
   -------------------------------------------------------------------------- */
.cats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(0.75rem, 1.2vw, 1.25rem);
}
.cat {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.6s var(--ease), transform 0.6s var(--ease);
}
.cat:hover { box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.cat .media { --ratio: 3 / 4; border-radius: 0; }
.cat__label {
  position: absolute;
  inset: auto 1rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: background-color 0.5s var(--ease);
}
.cat__label .arrow { opacity: 0; transform: translateX(-6px); transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); }
.cat:hover .cat__label .arrow { opacity: 1; transform: none; }
.cat__count { font-size: 0.75rem; font-weight: 500; color: rgba(255, 255, 255, 0.7); }

/* --------------------------------------------------------------------------
   9. Featured collections — editorial alternating rows
   -------------------------------------------------------------------------- */
.collection {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4.5rem);
  margin-bottom: clamp(4rem, 8vw, 8rem);
}
.collection:last-child { margin-bottom: 0; }
.collection__media { grid-column: 1 / span 7; }
.collection__media .media { --ratio: 16 / 11; box-shadow: var(--shadow-md); }
.collection__body { grid-column: 8 / -1; }
.collection:nth-child(even) .collection__media { grid-column: 6 / -1; grid-row: 1; }
.collection:nth-child(even) .collection__body { grid-column: 1 / span 5; grid-row: 1; }

.collection__index {
  font-family: var(--font-display);
  font-size: 0.875rem;
  color: var(--brand-text);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.9rem;
}
.collection__title { font-size: var(--size-h3); margin-bottom: 0.9rem; }
.collection__desc { color: var(--ink-soft); margin-bottom: 1.75rem; max-width: 40ch; }
.collection .specs {
  padding-top: 1.4rem;
  border-top: 1px solid var(--hairline);
  margin-bottom: 1.75rem;
}

/* Floating accent card over the collection image */
.collection__float {
  position: absolute;
  left: -1.5rem;
  bottom: -1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  background: rgba(248, 247, 244, 0.82);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  will-change: transform;
}
.collection__float b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink);
}
.collection__media { position: relative; }

/* --------------------------------------------------------------------------
   10. Why Mariwasa
   -------------------------------------------------------------------------- */
.why {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
}
.why__item {
  background: var(--bg);
  padding: clamp(1.75rem, 3vw, 2.75rem);
  transition: background-color 0.55s var(--ease);
}
.section--stone .why__item { background: var(--stone); }
.section--stone .why { background: rgba(29, 29, 31, 0.09); border-color: rgba(29, 29, 31, 0.09); }
.why__item:hover { background: #fff; }
.why__num {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  color: var(--brand-text);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 2.25rem;
}
.why__title { font-size: var(--size-h4); margin-bottom: 0.6rem; }
.why__text { font-size: 0.9375rem; color: var(--ink-soft); margin: 0; }

/* --------------------------------------------------------------------------
   11. Product technology — interactive hover cards
   -------------------------------------------------------------------------- */
.tech {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.75rem, 1.4vw, 1.25rem);
}
.tech__card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  padding: clamp(1.5rem, 2.4vw, 2rem);
  border-radius: var(--radius);
  border: 1px solid var(--hairline-dark);
  background: rgba(255, 255, 255, 0.035);
  overflow: hidden;
  cursor: default;
  transition: background-color 0.6s var(--ease), border-color 0.6s var(--ease), transform 0.6s var(--ease);
}
.tech__card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease);
}
.tech__card:hover,
.tech__card:focus-within {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.26);
  transform: translateY(-6px);
}
.tech__card:hover::after,
.tech__card:focus-within::after { transform: scaleX(1); }

.tech__icon {
  width: 48px; height: 48px;
  margin-bottom: auto;
  color: var(--accent);
  transition: color 0.5s var(--ease), transform 0.7s var(--ease);
}
.tech__card:hover .tech__icon { color: var(--brand); transform: translateY(-4px); }
.tech__title { font-size: var(--size-h4); margin: 2rem 0 0; color: #fff; }
.tech__text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--on-dark-soft);
  margin: 0;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.7s var(--ease), opacity 0.5s var(--ease), margin-top 0.7s var(--ease);
}
.tech__card:hover .tech__text,
.tech__card:focus-within .tech__text {
  max-height: 10rem;
  opacity: 1;
  margin-top: 0.75rem;
}

/* --------------------------------------------------------------------------
   12. Design inspiration — masonry gallery
   -------------------------------------------------------------------------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: clamp(2rem, 3.5vw, 3rem);
}
.filters button {
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hairline-strong);
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.4s var(--ease);
}
.filters button:hover { border-color: var(--ink); color: var(--ink); }
.filters button.is-active {
  background: var(--dark);
  border-color: var(--dark);
  color: #fff;
}

.masonry { columns: 4; column-gap: clamp(0.75rem, 1.2vw, 1.25rem); }
.masonry__item {
  break-inside: avoid;
  margin-bottom: clamp(0.75rem, 1.2vw, 1.25rem);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.masonry__item.is-hidden { display: none; }

.shot {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.6s var(--ease);
}
.shot:hover { box-shadow: var(--shadow-lg); }
.shot .media { border-radius: 0; }
.shot__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.4rem;
  padding: 1.25rem;
  color: #fff;
  background: linear-gradient(to top, rgba(19, 19, 21, 0.8), rgba(19, 19, 21, 0.1) 60%, transparent);
  opacity: 0;
  transition: opacity 0.55s var(--ease);
}
.shot:hover .shot__overlay,
.shot:focus-visible .shot__overlay { opacity: 1; }
.shot__title { font-family: var(--font-display); font-size: 1.125rem; }
.shot__hint {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

/* Lightbox — reveals the products used in a shot */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: rgba(19, 19, 21, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__panel {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.85fr);
  width: min(100%, 1100px);
  max-height: 86svh;
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: scale(0.96) translateY(12px);
  transition: transform 0.6s var(--ease);
}
.lightbox.is-open .lightbox__panel { transform: none; }
.lightbox__figure { background: var(--stone); }
.lightbox__figure img { width: 100%; height: 100%; object-fit: cover; }
.lightbox__side { padding: clamp(1.5rem, 2.5vw, 2.25rem); overflow-y: auto; }
.lightbox__title { font-size: var(--size-h3); margin: 0.75rem 0 0.5rem; }
.lightbox__meta { color: var(--ink-soft); font-size: 0.9375rem; margin-bottom: 1.75rem; }
.lightbox__used {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.9rem;
}
.used-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.used-list li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.65rem;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  transition: border-color 0.4s var(--ease), background-color 0.4s var(--ease);
}
.used-list li:hover { border-color: var(--hairline-strong); background: #fff; }
.used-list img { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex: none; }
.used-list b { display: block; font-size: 0.9375rem; font-weight: 600; }
.used-list span { font-size: 0.8125rem; color: var(--ink-soft); }
.lightbox__close {
  position: absolute;
  top: 1.25rem; right: 1.25rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.4s var(--ease);
}
.lightbox__close:hover { background: rgba(255, 255, 255, 0.24); }

/* --------------------------------------------------------------------------
   13. Featured products
   -------------------------------------------------------------------------- */
.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
}
.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.6s var(--ease), transform 0.6s var(--ease), border-color 0.6s var(--ease);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
  border-color: transparent;
}
.card .media { border-radius: 0; --ratio: 4 / 3; }
.card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: clamp(1.25rem, 2vw, 1.75rem);
}
.card__title { font-size: var(--size-h4); margin-bottom: 0.45rem; }
.card__desc { font-size: 0.9375rem; color: var(--ink-soft); margin-bottom: 1.4rem; }
.card .specs {
  padding-top: 1.1rem;
  border-top: 1px solid var(--hairline);
  margin-top: auto;
  margin-bottom: 1.25rem;
}
.card__swatch {
  position: absolute;
  top: 1rem; left: 1rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
}

/* --------------------------------------------------------------------------
   14. Completed projects
   -------------------------------------------------------------------------- */
.projects {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
}
.project { position: relative; border-radius: var(--radius); overflow: hidden; display: block; }
.project--lead { grid-column: span 7; }
.project--tall { grid-column: span 5; }
.project--third { grid-column: span 4; }
.project--lead .media { --ratio: 16 / 11; }
.project--tall .media { --ratio: 16 / 11; }
.project--third .media { --ratio: 3 / 2; }
.project__body {
  position: absolute;
  inset: auto 0 0;
  padding: clamp(1.25rem, 2.2vw, 2rem);
  color: #fff;
  z-index: 1;
}
.project__cat {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 0.5rem;
  display: block;
}
.project__title { font-size: var(--size-h4); color: #fff; }
.project__loc { font-size: 0.875rem; color: rgba(255, 255, 255, 0.7); margin-top: 0.3rem; }

/* --------------------------------------------------------------------------
   15. Dealer locator
   -------------------------------------------------------------------------- */
.locator {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1rem, 2vw, 2rem);
  align-items: start;
}
.locator__panel {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 2vw, 1.75rem);
  box-shadow: var(--shadow-sm);
}
.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill);
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.search:focus-within { border-color: var(--brand-text); box-shadow: 0 0 0 4px var(--brand-tint); }
.search svg { width: 18px; height: 18px; color: var(--ink-faint); flex: none; }
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  padding: 0.85rem 0;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
}
.search input:focus { outline: none; }

.locator .filters { margin: 1rem 0 1.25rem; gap: 0.4rem; }
.locator .filters button { padding: 0.4rem 0.85rem; font-size: 0.75rem; }

.dealers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.dealer {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.35s var(--ease), background-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.dealer:hover, .dealer.is-active {
  border-color: var(--brand-text);
  background: var(--brand-tint);
  transform: translateX(3px);
}
.dealer b { font-size: 0.9375rem; font-weight: 600; }
.dealer span { font-size: 0.8125rem; color: var(--ink-soft); }
.dealer em {
  font-style: normal;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-text);
}
.dealers__empty { padding: 2rem 1rem; text-align: center; color: var(--ink-faint); font-size: 0.9375rem; }

.map {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--stone);
  border: 1px solid var(--hairline);
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm);
}
.map svg { width: 100%; height: 100%; }
.map__pin {
  position: absolute;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--slate);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.45s var(--ease), background-color 0.45s var(--ease);
}
.map__pin:hover, .map__pin.is-active { background: var(--brand); transform: scale(1.5); }
.map__pin.is-active::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid var(--brand);
  animation: ping 1.8s var(--ease) infinite;
}
@keyframes ping {
  0% { transform: scale(0.7); opacity: 0.9; }
  100% { transform: scale(2.1); opacity: 0; }
}
.map__note {
  position: absolute;
  left: 1rem; bottom: 1rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   16. Final CTA
   -------------------------------------------------------------------------- */
.cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}
.cta__media { position: absolute; inset: 0; z-index: -2; }
.cta .cta__media img { width: 100%; height: 100%; max-width: none; object-fit: cover; } /* (0,2,1): see .hero__media */
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(rgba(19, 19, 21, 0.86), rgba(19, 19, 21, 0.78));
}
/* Brand red would sit at ~3:1 on the dark scrim — use the gold accent here. */
.cta .eyebrow { color: var(--accent); justify-content: center; }
.cta__title { font-size: var(--size-h2); color: #fff; max-width: 18ch; margin-inline: auto; }
.cta__text { color: rgba(255, 255, 255, 0.72); font-size: var(--size-lead); max-width: 46ch; margin: 1.25rem auto 2.5rem; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; justify-content: center; }

/* --------------------------------------------------------------------------
   17. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--dark);
  color: var(--on-dark-soft);
  padding-block: clamp(3.5rem, 6vw, 5.5rem) 2rem;
  font-size: 0.875rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  padding-bottom: clamp(2.5rem, 4vw, 4rem);
  border-bottom: 1px solid var(--hairline-dark);
}
/* The base rule paints this with dark ink — invisible on charcoal. */
.footer-brand .logo-link { margin-bottom: 1.25rem; }
.footer-brand p { max-width: 34ch; }
.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-faint);
  margin-bottom: 1.1rem;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.footer-col a { transition: color 0.35s var(--ease); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  padding-top: 1.75rem;
  font-size: 0.8125rem;
  color: var(--on-dark-faint);
}

/* --------------------------------------------------------------------------
   17b. Back to top
   The nav bar's dark glass, with a gold ring that fills as the page is read.
   Hidden until the reader is a screen's height down.
   -------------------------------------------------------------------------- */
.to-top {
  --progress: 0;
  position: fixed;
  right: var(--gutter);
  bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: rgba(14, 14, 16, 0.86);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 12px 32px -14px rgba(0, 0, 0, 0.5);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0.4s, background-color 0.25s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: rgba(28, 28, 32, 0.94); }
.to-top:focus-visible { outline: 2px solid #c9a24b; outline-offset: 3px; }
body.menu-open .to-top { opacity: 0; visibility: hidden; }

.to-top__ring {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  transform: rotate(-90deg);
  pointer-events: none;
}
.to-top__ring circle {
  fill: none;
  stroke: #c9a24b;
  stroke-width: 1.5;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--progress));
}
.to-top .arrow {
  width: 16px;
  height: 16px;
  transform: rotate(-90deg);
  transition: transform 0.2s ease-out;
}
.to-top:hover .arrow { transform: rotate(-90deg) translateX(2px); }

/* --------------------------------------------------------------------------
   18. Motion primitives
   -------------------------------------------------------------------------- */
[data-reveal],
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
[data-reveal].is-inview,
[data-reveal-stagger].is-inview > * { opacity: 1; transform: none; }
[data-reveal-stagger].is-inview > *:nth-child(1) { transition-delay: 0.05s; }
[data-reveal-stagger].is-inview > *:nth-child(2) { transition-delay: 0.12s; }
[data-reveal-stagger].is-inview > *:nth-child(3) { transition-delay: 0.19s; }
[data-reveal-stagger].is-inview > *:nth-child(4) { transition-delay: 0.26s; }
[data-reveal-stagger].is-inview > *:nth-child(5) { transition-delay: 0.33s; }
[data-reveal-stagger].is-inview > *:nth-child(6) { transition-delay: 0.40s; }

/* Image mask reveal */
.media--mask::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--bg);
  transform-origin: bottom;
  transition: transform 1.2s var(--ease);
}
.media--mask.is-inview::before { transform: scaleY(0); }

.float { will-change: transform; }

/* --------------------------------------------------------------------------
   19. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .masonry { columns: 3; }
  .tech { grid-template-columns: repeat(2, 1fr); }
  .why { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  :root { --nav-h: 66px; }
  /* the navigation folds at 1240px, see section 6 */
  .products { grid-template-columns: repeat(2, 1fr); }
  .locator { grid-template-columns: 1fr; }
  .map { order: -1; aspect-ratio: 16 / 10; }
  .collection { grid-template-columns: 1fr; }
  .collection__media,
  .collection__body,
  .collection:nth-child(even) .collection__media,
  .collection:nth-child(even) .collection__body { grid-column: 1 / -1; grid-row: auto; }
  .collection__float { left: auto; right: 1rem; bottom: -1.25rem; }
  .project--lead, .project--tall, .project--third { grid-column: span 6; }
  .lightbox__panel { grid-template-columns: 1fr; max-height: 88svh; }
  .lightbox__figure { max-height: 40svh; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  /* Categories become a snapping rail */
  .cats {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.85rem;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .cats::-webkit-scrollbar { display: none; }
  .cat { flex: 0 0 clamp(220px, 62vw, 300px); scroll-snap-align: start; }
}

@media (max-width: 720px) {
  .masonry { columns: 2; }
  .section-head { grid-template-columns: 1fr; align-items: start; }
  .tech { grid-template-columns: 1fr; }
  .tech__card { min-height: 0; }
  /* Hover-to-reveal is unreachable on touch — always show */
  .tech__text { max-height: 10rem; opacity: 1; margin-top: 0.75rem; }
  .why { grid-template-columns: 1fr; }
  .products { grid-template-columns: 1fr; }
  .project--lead, .project--tall, .project--third { grid-column: 1 / -1; }
  .hero__meta { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .shot__overlay { opacity: 1; background: linear-gradient(to top, rgba(19, 19, 21, 0.78), transparent 62%); }
}

@media (max-width: 480px) {
  .masonry { columns: 1; }
  .hero__actions .btn { flex: 1 1 100%; }
}

/* Touch devices: no hover-only affordances */
@media (hover: none) {
  .tech__text { max-height: 10rem; opacity: 1; margin-top: 0.75rem; }
  .shot__overlay { opacity: 1; }
}

/* --------------------------------------------------------------------------
   20. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal], [data-reveal-stagger] > * { opacity: 1; transform: none; }
  .media--mask::before { display: none; }
  .scroll-cue::after { animation: none; }
}

/* Static capture mode (?static=1) — everything settled, for screenshots */
.static-mode [data-reveal],
.static-mode [data-reveal-stagger] > * { opacity: 1 !important; transform: none !important; }
.static-mode .media--mask::before { display: none; }
