/* ============================================================
   AL RAHIMYA DEVELOPERS — design system
   Emerald ink + gold. Editorial luxury, haptic depth.
   ============================================================ */

:root {
  --ink:        #060d0a;
  --ink-2:      #0a1511;
  --ink-3:      #0e1d17;
  --emerald:    #123a2d;
  --emerald-hi: #1e5c46;
  --gold:       #c6a04e;
  --gold-hi:    #e6c97e;
  --gold-pale:  #f0dfb6;
  --cream:      #ede0c8;
  --muted:      rgba(237, 224, 200, 0.56);
  --faint:      rgba(237, 224, 200, 0.34);
  --line:       rgba(198, 160, 78, 0.16);
  --line-soft:  rgba(237, 224, 200, 0.08);
  --shell:      rgba(237, 224, 200, 0.03);
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --serif:      "Cormorant Garamond", Georgia, serif;
  --sans:       "Montserrat", system-ui, sans-serif;
  --gutter:     clamp(1.25rem, 4.5vw, 4rem);
  --section:    clamp(6rem, 12vw, 11rem);
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }

::selection { background: rgba(198, 160, 78, 0.28); color: var(--gold-pale); }

/* ---------- atmosphere: glow orbs + film grain ---------- */
.atmos {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(52rem 36rem at 82% -8%,  rgba(30, 92, 70, 0.20), transparent 62%),
    radial-gradient(44rem 30rem at -12% 34%, rgba(18, 58, 45, 0.24), transparent 60%),
    radial-gradient(38rem 30rem at 55% 118%, rgba(198, 160, 78, 0.05), transparent 65%),
    var(--ink);
}

.grain {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none;
  width: 200%; height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05;
  animation: grain 9s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-2%, 3%); }
  40% { transform: translate(3%, -2%); }
  60% { transform: translate(-3%, -3%); }
  80% { transform: translate(2%, 2%); }
}
@media (prefers-reduced-motion: reduce) { .grain { animation: none; } }

/* ---------- typography helpers ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--gold);
}
.kicker::before {
  content: ""; width: 2.4rem; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.display {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--gold-pale);
  text-wrap: balance;
}
.display em {
  font-style: italic; font-weight: 400;
  background: linear-gradient(100deg, var(--gold-hi) 20%, var(--gold) 80%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.d-xl { font-size: clamp(3rem, 8.5vw, 7.25rem); }
.d-lg { font-size: clamp(2.4rem, 5.5vw, 4.6rem); }
.d-md { font-size: clamp(1.9rem, 3.6vw, 3rem); }
.d-sm { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }

.lede { font-size: clamp(1.02rem, 1.4vw, 1.2rem); color: var(--muted); max-width: 34em; }
.copy { color: var(--muted); max-width: 38em; }
.copy strong { color: var(--cream); font-weight: 400; }

/* ---------- layout primitives ---------- */
.wrap { width: min(100% - 2 * var(--gutter), 82rem); margin-inline: auto; }
.section { padding-block: var(--section); position: relative; }
.section-head { display: grid; gap: 1.4rem; margin-bottom: clamp(3rem, 6vw, 5.5rem); }

.rule {
  height: 1px; border: 0;
  background: linear-gradient(90deg, var(--line), transparent 85%);
}

/* ---------- nav: floating glass pill ---------- */
.nav {
  position: fixed; top: 1.1rem; left: 50%; z-index: 90;
  transform: translateX(-50%);
  width: min(100% - 2rem, 62rem);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.65rem 0.55rem 1.15rem;
  border-radius: 999px;
  background: rgba(8, 17, 13, 0.55);
  border: 1px solid var(--line-soft);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(237, 224, 200, 0.05);
  transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease);
}

.brand { display: inline-flex; align-items: center; gap: 0.7rem; flex-shrink: 0; }
.brand svg, .brand img { width: 2.15rem; height: 2.15rem; }
.brand-name { display: grid; line-height: 1.12; }
.brand-name b {
  font-weight: 600; font-size: 0.78rem; letter-spacing: 0.22em;
  color: var(--gold-pale); text-transform: uppercase;
}
.brand-name span {
  font-weight: 400; font-size: 0.5rem; letter-spacing: 0.42em;
  color: var(--gold); text-transform: uppercase;
}

.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-links a {
  position: relative;
  padding: 0.5rem 0.85rem;
  font-size: 0.72rem; font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
  border-radius: 999px;
  transition: color 0.45s var(--ease), background 0.45s var(--ease);
}
.nav-links a:hover { color: var(--gold-pale); background: rgba(237, 224, 200, 0.05); }
.nav-links a[aria-current="page"] { color: var(--gold-hi); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 50%; bottom: 0.18rem;
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--gold); transform: translateX(-50%);
}

/* ---------- buttons: nested-chip pills ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.85rem;
  padding: 0.5rem 0.55rem 0.5rem 1.5rem;
  border-radius: 999px;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  transition: transform 0.55s var(--ease), background 0.55s var(--ease),
              border-color 0.55s var(--ease), color 0.55s var(--ease);
  will-change: transform;
}
.btn:active { transform: scale(0.97); }
.btn .chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.1rem; height: 2.1rem; border-radius: 999px;
  transition: transform 0.55s var(--ease), background 0.55s var(--ease);
}
.btn .chip svg { width: 0.85rem; height: 0.85rem; transition: transform 0.55s var(--ease); }
.btn:hover .chip { transform: translate(2px, -1px) scale(1.05); }

.btn-gold { background: linear-gradient(120deg, var(--gold-hi), var(--gold) 70%); color: #14100a; }
.btn-gold .chip { background: rgba(6, 13, 10, 0.16); }
.btn-gold:hover { background: linear-gradient(120deg, var(--gold-pale), var(--gold-hi) 70%); }

.btn-ghost { border: 1px solid var(--line); color: var(--gold-pale); background: rgba(237, 224, 200, 0.02); }
.btn-ghost .chip { background: rgba(198, 160, 78, 0.12); color: var(--gold-hi); }
.btn-ghost:hover { border-color: rgba(198, 160, 78, 0.4); background: rgba(198, 160, 78, 0.06); }

.btn-nav { padding: 0.35rem 0.4rem 0.35rem 1.1rem; font-size: 0.64rem; }
.btn-nav .chip { width: 1.8rem; height: 1.8rem; }

/* ---------- hamburger (mobile) ---------- */
.burger {
  display: none;
  position: relative; width: 2.6rem; height: 2.6rem;
  border-radius: 999px; border: 1px solid var(--line-soft);
  flex-shrink: 0;
}
.burger span {
  position: absolute; left: 50%; top: 50%;
  width: 1.05rem; height: 1px; background: var(--gold-pale);
  transition: transform 0.55s var(--ease), opacity 0.4s var(--ease);
}
.burger span:nth-child(1) { transform: translate(-50%, calc(-50% - 4px)); }
.burger span:nth-child(2) { transform: translate(-50%, calc(-50% + 4px)); }
.menu-open .burger span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.menu-open .burger span:nth-child(2) { transform: translate(-50%, -50%) rotate(-45deg); }

/* ---------- mobile overlay menu ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-content: center; gap: 0.5rem;
  background: rgba(5, 11, 8, 0.88);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.6s var(--ease), visibility 0s linear 0.6s;
}
.menu-open .overlay { opacity: 1; visibility: visible; transition-delay: 0s; }
.overlay a {
  font-family: var(--serif); font-size: clamp(2.2rem, 9vw, 3.4rem); font-weight: 500;
  color: var(--gold-pale); text-align: center; line-height: 1.25;
  opacity: 0; transform: translateY(1.2rem);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), color 0.4s var(--ease);
}
.overlay a:hover { color: var(--gold-hi); }
.menu-open .overlay a { opacity: 1; transform: none; }
.menu-open .overlay a:nth-child(1) { transition-delay: 0.10s; }
.menu-open .overlay a:nth-child(2) { transition-delay: 0.16s; }
.menu-open .overlay a:nth-child(3) { transition-delay: 0.22s; }
.menu-open .overlay a:nth-child(4) { transition-delay: 0.28s; }
.overlay .overlay-tag {
  margin-top: 2rem;
  font-size: 0.6rem; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--gold); text-align: center;
  opacity: 0; transition: opacity 0.7s var(--ease) 0.34s;
}
.menu-open .overlay .overlay-tag { opacity: 1; }
.menu-open { overflow: hidden; }

/* ---------- hero ----------
   isolate: makes .hero its own stacking context so the layers below stack
   ONLY against each other (positive z-indexes), never against the page's
   fixed .atmos background. This is why the video/3D now reliably show. */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh; min-height: 100dvh;
  display: grid; align-content: end;
  padding-block: 8.5rem clamp(3rem, 7vh, 5.5rem);
  overflow: clip;
}
/* still-image base layer: dusk skyline. Always visible instantly, so the hero
   is never blank even before JS/video/3D — and the ultimate fallback if all
   of them fail. */
.hero-fallback {
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(102deg, rgba(6, 13, 10, 0.66) 0%, rgba(6, 13, 10, 0.30) 42%, rgba(8, 20, 15, 0.06) 74%, rgba(6, 13, 10, 0.18) 100%),
    linear-gradient(rgba(18, 58, 45, 0.12), rgba(18, 58, 45, 0.12)),
    linear-gradient(to bottom, rgba(6, 13, 10, 0.16), transparent 30%, transparent 58%, var(--ink) 98%),
    radial-gradient(60rem 42rem at 70% 10%, rgba(30, 92, 70, 0.30), transparent 60%),
    url("../assets/img/skyline.jpg"), var(--ink);
  background-size: cover; background-position: center;
}
.hero-fallback svg { display: none; }

#hero3d {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
}

/* graded background video — fades in once actually playing (.on set by JS) */
.hero-video {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.92) brightness(1.05) contrast(1.05);
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}
.hero-video.on { opacity: 1; }

/* brand grade over the footage: emerald cast + left text-protection + fade to ink.
   Kept light — the footage itself (dusk) is already fairly dark, so a heavy
   scrim on top of it reads as a near-black rectangle instead of a video. */
.hero-scrim {
  position: absolute; inset: 0; z-index: 3;
  background:
    linear-gradient(102deg, rgba(6, 13, 10, 0.66) 0%, rgba(6, 13, 10, 0.28) 40%, rgba(8, 20, 15, 0.02) 72%, rgba(6, 13, 10, 0.16) 100%),
    linear-gradient(rgba(18, 58, 45, 0.10), rgba(18, 58, 45, 0.10)),
    linear-gradient(to bottom, rgba(6, 13, 10, 0.16), transparent 30%, transparent 58%, var(--ink) 98%);
}
.hero-inner { position: relative; z-index: 4; }

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}

/* phones: no video/3D (see hero3d.js) — the fallback is the hero, so it
   uses the lighter 900px skyline and the video scrim switches off
   (the fallback's own grade is already baked into its gradient stack) */
@media (max-width: 719px) {
  .hero-scrim { display: none; }
  .hero-fallback {
    background:
      linear-gradient(102deg, rgba(6, 13, 10, 0.66) 0%, rgba(6, 13, 10, 0.30) 42%, rgba(8, 20, 15, 0.06) 74%, rgba(6, 13, 10, 0.18) 100%),
      linear-gradient(rgba(18, 58, 45, 0.12), rgba(18, 58, 45, 0.12)),
      linear-gradient(to bottom, rgba(6, 13, 10, 0.16), transparent 30%, transparent 58%, var(--ink) 98%),
      radial-gradient(60rem 42rem at 70% 10%, rgba(30, 92, 70, 0.30), transparent 60%),
      url("../assets/img/skyline-900.jpg"), var(--ink);
    background-size: cover; background-position: center;
  }
}

.hero-inner { display: grid; gap: 2rem; }
.hero .lede { margin-top: 0.4rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1rem; }

.hero-foot {
  margin-top: clamp(3rem, 7vh, 5rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--faint);
}
.scroll-cue { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--gold); }
.scroll-cue::after {
  content: ""; width: 1px; height: 2.4rem;
  background: linear-gradient(var(--gold), transparent);
  animation: cue 2.4s var(--ease) infinite;
  transform-origin: top;
}
@keyframes cue { 0% { transform: scaleY(0); } 45% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .scroll-cue::after { animation: none; } }

/* ---------- double-bezel shell ---------- */
.shell {
  background: var(--shell);
  border: 1px solid var(--line-soft);
  border-radius: 1.6rem;
  padding: 0.45rem;
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.8);
}
.shell > .core {
  border-radius: 1.2rem;
  background: linear-gradient(160deg, var(--ink-3), var(--ink-2) 65%);
  border: 1px solid rgba(237, 224, 200, 0.05);
  box-shadow: inset 0 1px 0 rgba(237, 224, 200, 0.06);
  overflow: hidden;
  height: 100%;
}

/* ---------- project cards (home) ---------- */
.projects-grid {
  display: grid; gap: 1.4rem;
  grid-template-columns: repeat(12, 1fr);
}
.pcard { grid-column: span 4; }
.pcard.wide { grid-column: span 8; }
.pcard.wide .pcard-img { aspect-ratio: 16 / 9.5; }
.pcard.full { grid-column: span 12; }
.pcard.full .pcard-img { aspect-ratio: 16 / 6; }

.pcard .core { display: grid; }
.pcard-img {
  position: relative; aspect-ratio: 4 / 4.4; overflow: hidden;
}
.pcard-img img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.82) contrast(1.04) brightness(0.86);
  transform: scale(1.02);
  transition: transform 1.4s var(--ease), filter 1.4s var(--ease);
}
.pcard:hover .pcard-img img { transform: scale(1.07); filter: saturate(0.95) contrast(1.05) brightness(0.95); }
.pcard-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(185deg, transparent 45%, rgba(6, 13, 10, 0.82));
}

.status {
  position: absolute; top: 1rem; left: 1rem; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.38rem 0.85rem; border-radius: 999px;
  background: rgba(6, 13, 10, 0.6);
  border: 1px solid rgba(198, 160, 78, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.56rem; font-weight: 500; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--gold-hi);
}
.status::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold-hi);
  box-shadow: 0 0 8px var(--gold);
}
.status.live::before { background: #8fd6a8; box-shadow: 0 0 8px #4faf74; }

.pcard-body { padding: 1.5rem 1.6rem 1.7rem; display: grid; gap: 0.45rem; }
.pcard-body h3 { font-family: var(--serif); font-size: 1.65rem; font-weight: 500; color: var(--gold-pale); }
.pcard-meta {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem;
  font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--faint);
}
.pcard-meta b { color: var(--gold); font-weight: 500; }

/* ---------- alternating project panels (projects page) ---------- */
.panel {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.4rem;
  align-items: stretch;
}
.panel + .panel { margin-top: clamp(3.5rem, 7vw, 6rem); }
.panel-img { grid-column: 1 / 8; }
.panel-txt { grid-column: 8 / 13; align-self: center; padding: clamp(0.5rem, 2vw, 2rem); display: grid; gap: 1.1rem; }
.panel.flip .panel-img { grid-column: 6 / 13; order: 2; }
.panel.flip .panel-txt { grid-column: 1 / 6; order: 1; }

.panel-img .core { position: relative; aspect-ratio: 16 / 11; }
.panel-img img {
  position: absolute; inset: 0; width: 100%; height: 110%; object-fit: cover;
  filter: saturate(0.85) contrast(1.04) brightness(0.88);
  will-change: transform;
}
.panel-txt h2 { font-family: var(--serif); font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 500; color: var(--gold-pale); }
.panel-txt .pcard-meta { font-size: 0.64rem; }

.specs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.3rem; }
.specs li {
  padding: 0.42rem 0.9rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(198, 160, 78, 0.04);
  font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.panel-txt .btn { justify-self: start; margin-top: 0.6rem; }

/* ---------- category cards ---------- */
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.cat .core { position: relative; aspect-ratio: 4 / 5; display: grid; align-content: end; }
.cat img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.75) brightness(0.62) contrast(1.05);
  transform: scale(1.02);
  transition: transform 1.4s var(--ease), filter 1.4s var(--ease);
}
.cat:hover img { transform: scale(1.06); filter: saturate(0.9) brightness(0.74) contrast(1.05); }
.cat-body {
  position: relative; z-index: 1; padding: 1.6rem;
  background: linear-gradient(transparent, rgba(6, 13, 10, 0.88) 55%);
  display: grid; gap: 0.3rem;
}
.cat-body h3 { font-family: var(--serif); font-size: 1.55rem; font-weight: 500; color: var(--gold-pale); }
.cat-body p { font-size: 0.85rem; color: var(--muted); }
.cat-idx {
  position: absolute; top: 1.2rem; right: 1.4rem; z-index: 1;
  font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--gold);
  opacity: 0.85;
}

/* ---------- values ---------- */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line-soft); }
.value {
  padding: 2.2rem 1.8rem 2.4rem;
  border-bottom: 1px solid var(--line-soft);
  display: grid; gap: 0.9rem; align-content: start;
  transition: background 0.7s var(--ease);
}
.value:hover { background: rgba(198, 160, 78, 0.035); }
.value + .value { border-left: 1px solid var(--line-soft); }
.value svg { width: 1.7rem; height: 1.7rem; color: var(--gold); }
.value h3 {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--gold-pale);
}
.value p { font-size: 0.86rem; color: var(--muted); }

/* ---------- editorial split ---------- */
.split { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.split-a { grid-column: 1 / 7; display: grid; gap: 1.6rem; }
.split-b { grid-column: 7 / 13; display: grid; gap: 1.4rem; }

/* ---------- wide parallax band ---------- */
.band { position: relative; overflow: clip; border-block: 1px solid var(--line-soft); }
.band-img { position: absolute; inset: -12% 0; }
.band-img::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(6, 13, 10, 0.88) 25%, rgba(6, 13, 10, 0.45) 60%, rgba(6, 13, 10, 0.65)),
    linear-gradient(rgba(6, 13, 10, 0.25), rgba(6, 13, 10, 0.25));
}
.band-img img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.7) brightness(0.42) contrast(1.06);
  will-change: transform;
}
.band-inner {
  position: relative; z-index: 1;
  padding-block: clamp(6rem, 13vw, 10rem);
  display: grid; gap: 1.6rem; justify-items: start;
}

/* ---------- marquee ticker ---------- */
.ticker {
  overflow: hidden; white-space: nowrap;
  border-block: 1px solid var(--line-soft);
  padding-block: 1.1rem;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ticker-track { display: inline-flex; gap: 3.5rem; animation: tick 36s linear infinite; will-change: transform; }
.ticker span {
  display: inline-flex; align-items: center; gap: 3.5rem;
  font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--gold);
  opacity: 0.75;
}
.ticker span::after { content: "✦"; font-size: 0.6rem; opacity: 0.7; }
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ---------- CTA band ---------- */
.cta { position: relative; overflow: clip; }
.cta .band-img img { filter: saturate(0.65) brightness(0.3) contrast(1.08); }
.cta-inner {
  position: relative; z-index: 1;
  padding-block: clamp(6.5rem, 13vw, 11rem);
  display: grid; gap: 1.8rem; justify-items: center; text-align: center;
}
.cta-inner .display { max-width: 16em; }
.cta-inner .lede { margin-inline: auto; text-align: center; }

/* ---------- steps (about) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; counter-reset: step; }
.step .core { padding: 2rem 1.8rem 2.2rem; display: grid; gap: 0.8rem; align-content: start; }
.step-num { font-family: var(--serif); font-style: italic; font-size: 2.6rem; color: var(--gold); line-height: 1; }
.step h3 { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; color: var(--gold-pale); }
.step p { font-size: 0.88rem; color: var(--muted); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 1.4rem; }
.contact-main { grid-column: 1 / 8; }
.contact-side { grid-column: 8 / 13; display: grid; gap: 1.4rem; align-content: start; }
.contact-main .core, .contact-side .core { padding: clamp(1.8rem, 3.5vw, 3rem); display: grid; gap: 1.3rem; align-content: start; }

.info-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem;
  padding-block: 1rem; border-bottom: 1px solid var(--line-soft);
}
.info-row:last-child { border-bottom: 0; }
.info-row .label { font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--faint); }
.info-row .val { font-size: 0.92rem; color: var(--cream); text-align: right; }
.info-row a.val:hover { color: var(--gold-hi); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line-soft); padding: clamp(3.5rem, 7vw, 5.5rem) 0 2.2rem; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 3rem 2rem; }
.foot-brand { display: grid; gap: 1.1rem; justify-items: start; }
.foot-brand .brand svg { width: 2.6rem; height: 2.6rem; }
.foot-tag { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--gold); }
.foot-col h4 { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--faint); margin-bottom: 1.1rem; }
.foot-col ul { display: grid; gap: 0.55rem; }
.foot-col a { font-size: 0.88rem; color: var(--muted); transition: color 0.4s var(--ease); }
.foot-col a:hover { color: var(--gold-hi); }
.foot-base {
  margin-top: 3.5rem; padding-top: 1.6rem;
  border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.8rem;
  font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--faint);
}

/* ---------- page headers (inner pages) ---------- */
.page-head { padding-top: clamp(9rem, 16vh, 12rem); display: grid; gap: 1.5rem; }

/* ---------- reveals (JS-gated) ---------- */
html.js .rv {
  opacity: 0;
  transform: translateY(2rem);
  filter: blur(6px);
  transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease);
  transition-delay: var(--d, 0s);
}
html.js .rv.in { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .rv { opacity: 1; transform: none; filter: none; transition: none; }
}

/* ============================================================
   LIGHT SECTIONS — warm ivory bands (alternating rhythm)
   Re-maps the token palette inside .light, so every component
   restyles itself: headings go deep emerald, gold goes deeper,
   hairlines go emerald, shells go paper-white.
   ============================================================ */
.light {
  --gold:      #a07c33;
  --gold-hi:   #bd9243;
  --gold-pale: #0e241c;            /* display + card headings → deep emerald */
  --cream:     #22352c;
  --muted:     rgba(23, 41, 33, 0.68);
  --faint:     rgba(23, 41, 33, 0.46);
  --line:      rgba(18, 58, 45, 0.20);
  --line-soft: rgba(18, 58, 45, 0.11);
  --shell:     rgba(18, 58, 45, 0.035);
  background: linear-gradient(180deg, #f7f2e6, #f2ebdb);
  color: var(--muted);
}

/* consecutive light bands continue as one seamless ivory zone */
.light + .light { background: #f2ebdb; }

.light .shell {
  box-shadow: 0 34px 70px -48px rgba(24, 44, 36, 0.40);
}
.light .shell > .core {
  background: linear-gradient(165deg, #fffdf6, #f8f2e4 70%);
  border-color: rgba(18, 58, 45, 0.09);
  box-shadow: inset 0 1px 0 #ffffff;
}

.light .btn-ghost {
  border-color: rgba(18, 58, 45, 0.28);
  color: #123a2d;
  background: rgba(255, 255, 253, 0.4);
}
.light .btn-ghost .chip { background: rgba(18, 58, 45, 0.09); color: #123a2d; }
.light .btn-ghost:hover { border-color: rgba(18, 58, 45, 0.5); background: rgba(255, 255, 253, 0.75); }

.light .btn-gold { color: #1b1509; }

.light .value:hover { background: rgba(18, 58, 45, 0.035); }
.light .specs li { background: rgba(18, 58, 45, 0.045); }

/* status chips sit on photography — keep the bright gold there */
.light .status { color: #e6c97e; }

.light ::selection { background: rgba(18, 58, 45, 0.18); color: #0e241c; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .pcard, .pcard.wide { grid-column: span 12; }
  .panel-img, .panel.flip .panel-img { grid-column: 1 / 13; order: 1; }
  .panel-txt, .panel.flip .panel-txt { grid-column: 1 / 13; order: 2; padding: 0.5rem 0.2rem; }
  .split-a, .split-b { grid-column: 1 / 13; }
  .cats { grid-template-columns: 1fr; }
  .values { grid-template-columns: repeat(2, 1fr); }
  .value:nth-child(odd) { border-left: 0; }
  .contact-main, .contact-side { grid-column: 1 / 13; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav { top: 0.8rem; padding-left: 0.9rem; }
  .nav-links, .nav .btn-nav { display: none; }
  .burger { display: block; }
  .values { grid-template-columns: 1fr; }
  .value + .value { border-left: 0; }
  .foot-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .hero { padding-top: 7rem; }
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .cta-inner { text-align: left; justify-items: start; }
  .cta-inner .lede { text-align: left; margin-inline: 0; }
}

/* ---------- no-JS: everything visible, canvas + video hidden ---------- */
html:not(.js) #hero3d { display: none; }
html:not(.js) .hero-video { display: none; }

/* ============================================================
   LOADING SCREEN — first visit: cinematic; after: quick veil
   ============================================================ */
.loader {
  position: fixed; inset: 0; z-index: 130;
  display: grid; place-items: center;
  background:
    radial-gradient(46rem 32rem at 50% 42%, rgba(30, 92, 70, 0.18), transparent 65%),
    #060d0a;
  transition: transform 1s var(--ease) 0.18s;
  will-change: transform;
}
.loader.done { transform: translateY(-101%); }

html:not(.js) .loader { display: none; }

.loader-core {
  display: grid; justify-items: center; gap: 1.1rem;
  transition: opacity 0.4s var(--ease);
}
.loader.done .loader-core, .loader.done .loader-pct { opacity: 0; }

.loader-mark { width: 5.2rem; height: 5.2rem; }
.loader-mark path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: ld-draw 1.5s var(--ease) forwards;
}
.loader-mark path:nth-child(2) { animation-delay: 0.2s; }
.loader-mark path:nth-child(3) { animation-delay: 0.35s; }
.loader-mark path:nth-child(4) { animation-delay: 0.5s; }
.loader-mark path:nth-child(5) { animation-delay: 0.62s; }
.loader-mark path:nth-child(6) { animation-delay: 0.72s; }
@keyframes ld-draw { to { stroke-dashoffset: 0; } }

.loader-brand {
  font-size: 0.58rem; font-weight: 500;
  letter-spacing: 0.44em; text-transform: uppercase;
  color: var(--gold); opacity: 0.85;
}
.loader-line {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.2rem, 2.6vw, 1.5rem);
  color: var(--gold-pale);
  min-height: 1.6em;
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease);
}
.loader-line.swap { opacity: 0; transform: translateY(0.5rem); }

.loader-pct {
  position: absolute; right: clamp(1.4rem, 4vw, 3rem); bottom: clamp(1.2rem, 3.5vh, 2.4rem);
  font-family: var(--serif); font-style: italic;
  font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1;
  color: var(--gold); opacity: 0.9;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.4s var(--ease);
}
.loader-pct::after { content: "%"; font-size: 0.45em; margin-left: 0.1em; opacity: 0.7; }

/* quick veil for repeat visits within the session */
html.ld-quick .loader-core, html.ld-quick .loader-pct { display: none; }
html.ld-quick .loader { transition-delay: 0s; transition-duration: 0.7s; }

@media (prefers-reduced-motion: reduce) {
  .loader { transition: opacity 0.5s ease; }
  .loader.done { transform: none; opacity: 0; }
  .loader-mark path { animation: none; stroke-dashoffset: 0; }
  .loader-line { transition: none; }
}

/* ============================================================
   LOGO-BREAK INTRO — first home visit per session.
   Two ink panels carry the two halves of the mark; the playing
   hero video cracks them open from the middle. Phases (classes
   set by js/intro.js): .p1 mark blooms → .p2 seam draws →
   .p3 hairline crack → .p4 panels fling open.
   ============================================================ */
.intro {
  position: fixed; inset: 0; z-index: 100; /* above nav (90), below loader (130) */
  pointer-events: none;
}
html:not(.js) .intro { display: none; }

.intro-half {
  position: absolute; left: 0; right: 0; height: 50.1%; /* .1 overlap: no seam flash */
  overflow: hidden;
  transition: transform 0.4s var(--ease);
  will-change: transform;
}
.intro-top {
  top: 0;
  background: radial-gradient(46rem 30rem at 50% 92%, rgba(30, 92, 70, 0.18), transparent 65%), #060d0a;
}
.intro-bot {
  bottom: 0;
  background: radial-gradient(46rem 30rem at 50% 8%, rgba(30, 92, 70, 0.18), transparent 65%), #060d0a;
}

/* each panel holds a full copy of the mark, centred exactly on the seam,
   clipped by its panel — together they read as one logo */
.intro-mark {
  position: absolute; left: 50%;
  width: clamp(6.5rem, 13vw, 9rem); height: auto;
  opacity: 0;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.intro-top .intro-mark { bottom: 0.2%; transform: translate(-50%, 50%) scale(0.9); }
.intro-bot .intro-mark { top: 0.2%; transform: translate(-50%, -50%) scale(0.9); }
.intro.p1 .intro-top .intro-mark { opacity: 1; transform: translate(-50%, 50%) scale(1); }
.intro.p1 .intro-bot .intro-mark { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* gold seam that "cuts" the mark before the break */
.intro-seam {
  position: absolute; top: 50%; left: 50%; z-index: 1;
  width: min(40rem, 76vw); height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-hi) 18%, var(--gold-hi) 82%, transparent);
  transform: translate(-50%, -50%) scaleX(0);
  transition: transform 0.55s var(--ease), opacity 0.4s var(--ease);
}
.intro.p2 .intro-seam { transform: translate(-50%, -50%) scaleX(1); }

/* hairline crack: video sliver appears between the halves */
.intro.p3 .intro-top { transform: translateY(-9px); }
.intro.p3 .intro-bot { transform: translateY(9px); }

/* the break: panels fling open, seam dissolves */
.intro.p4 .intro-half { transition: transform 1.05s cubic-bezier(0.76, 0, 0.24, 1); }
.intro.p4 .intro-top { transform: translateY(-102%); }
.intro.p4 .intro-bot { transform: translateY(102%); }
.intro.p4 .intro-seam { opacity: 0; }

/* hold the hero copy hidden until the break releases it */
html.intro-pending .hero .rv {
  opacity: 0 !important;
  transform: translateY(2.4rem) !important;
  filter: blur(6px) !important;
  transition: none !important;
}

/* ============================================================
   CUSTOM CURSOR — inverting circle (fine pointers only; the
   .cur-on class + the element itself are added by main.js).
   Rest: white circle that inverts what's beneath it.
   Hover on anything clickable: blooms into a gold disc.
   ============================================================ */
html.cur-on, html.cur-on * { cursor: none !important; }
/* text fields keep a usable caret cursor (none on this site yet, but safe) */
html.cur-on input, html.cur-on textarea, html.cur-on select { cursor: text !important; }

.cursor {
  position: fixed; left: 0; top: 0; z-index: 140;
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff;
  mix-blend-mode: difference;
  border: 1px solid transparent;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s var(--ease), background 0.35s var(--ease),
              border-color 0.35s var(--ease);
  will-change: transform;
}
.cursor.hov {
  mix-blend-mode: normal;
  background: rgba(198, 160, 78, 0.14);
  border-color: rgba(198, 160, 78, 0.55);
}

/* ============================================================
   MAGNETIC ELEMENTS — buttons, burger and value icons get pulled
   toward the pointer (spring physics in main.js) and warm to gold
   while attracted. Same fine-pointer gate as the cursor.
   ============================================================ */
.mag-near { filter: brightness(1.12) drop-shadow(0 0 14px rgba(198, 160, 78, 0.4)); }

/* the spring drives transform per-frame — transform must NOT be in the
   transition list or the two fight and the pull feels laggy */
html.cur-on .btn, html.cur-on .burger {
  transition: background 0.55s var(--ease), border-color 0.55s var(--ease),
              color 0.55s var(--ease), filter 0.35s var(--ease);
}
.vicon { transition: filter 0.35s var(--ease); }

/* ============================================================
   VALUE ICONS — shape → icon morph on scroll-in (once per visit).
   JS wraps each icon in .vicon and adds a solid gold .vshape
   (circle / triangle / square, cycling); .vgo runs the sequence:
   shape pops in → spins out → real icon draws itself.
   ============================================================ */
.vicon { position: relative; width: 1.75rem; height: 1.75rem; display: block; }
.vicon svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.vshape { fill: var(--gold); opacity: 0; transform-origin: 50% 50%; }

/* icons stay undrawn until their .vgo fires (.vicon only exists when JS armed the morph) */
html.js .vicon .vicon-icon :is(path, circle, rect) {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.value.vgo .vshape {
  animation: vshape-in 0.5s var(--ease) forwards,
             vshape-out 0.55s 0.6s var(--ease) forwards;
}
.value.vgo .vicon-icon :is(path, circle, rect) {
  animation: vdraw 1s 0.75s var(--ease) forwards;
}
@keyframes vshape-in {
  0%   { opacity: 0; transform: scale(0.15) rotate(-135deg); }
  70%  { opacity: 1; transform: scale(1.15) rotate(10deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes vshape-out {
  to { opacity: 0; transform: scale(0.25) rotate(120deg); }
}
@keyframes vdraw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .vshape { display: none; }
  html.js .vicon .vicon-icon :is(path, circle, rect) { stroke-dashoffset: 0; animation: none; }
  .mag-near { filter: none; }
}
