/* ============================================================
   ART MERLIN — design system
   Palette: obsidian ink / warm ivory / brass. One accent, no more.
   Type: Fraunces (display) + Instrument Sans (text).
   Spacing: 8px scale. Motion: ≤400ms ease-out, reduced-motion safe.
   ============================================================ */

:root {
  --ink: #0B0D10;
  --ink-2: #12151A;
  --ink-3: #191D24;
  --ivory: #F2EEE5;
  --ivory-70: rgba(242, 238, 229, 0.70);
  --ivory-50: rgba(242, 238, 229, 0.50);
  --brass: #C9A25D;
  --brass-bright: #E0BC7A;
  --aurora: 62, 230, 170; /* emerald ambient light, RGB triplet */
  --halo: 125, 208, 252; /* light-blue timeline glow, RGB triplet */
  --line: rgba(242, 238, 229, 0.12);
  --line-strong: rgba(242, 238, 229, 0.22);
  /* light section tokens */
  --lt-bg: #F2EEE5;
  --lt-ink: #14161A;
  --lt-ink-70: rgba(20, 22, 26, 0.72);
  --lt-line: rgba(20, 22, 26, 0.14);
  --brass-on-light: #7A5C21;

  --font-display: "Fraunces", Georgia, serif;
  --font-text: "Instrument Sans", -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* modular scale ~1.25 with fluid clamps */
  --fs-body: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  --fs-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --fs-h2: clamp(2rem, 1.4rem + 2.6vw, 3.4rem);
  --fs-h1: clamp(2.6rem, 1.6rem + 5vw, 5.6rem);
  --fs-small: 0.8125rem;
  --fs-eyebrow: 0.6875rem;

  /* spacing scale (8px base) */
  --s-1: 8px;  --s-2: 16px; --s-3: 24px; --s-4: 32px;
  --s-6: 48px; --s-8: 64px; --s-12: 96px; --s-16: 128px; --s-20: 160px;

  --section-pad: clamp(var(--s-12), 12vw, var(--s-20));
  --container: 1200px;
  --radius: 2px;
  --radius-lg: 16px; /* card surfaces */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

body {
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--brass); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brass); color: var(--ink);
  padding: 10px 18px; z-index: 200; font-weight: 600;
}
.skip-link:focus { left: 16px; top: 16px; }

.container {
  width: min(100% - clamp(40px, 8vw, 96px), var(--container));
  margin-inline: auto;
}
.container.narrow { max-width: 780px; }

/* ---------- typography ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; }
h1, h2, .statement, .journey-coda, .cta-title { text-wrap: balance; }
p { text-wrap: pretty; }

h2 {
  font-size: var(--fs-h2);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.eyebrow {
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: var(--s-3);
}

.section-head { margin-bottom: clamp(var(--s-6), 7vw, var(--s-12)); max-width: 720px; }
.section-sub {
  margin-top: var(--s-3);
  color: var(--ivory-70);
  max-width: 58ch;
}
.section-sub em { font-style: italic; color: var(--ivory); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  transition: background-color 250ms var(--ease), color 250ms var(--ease),
              border-color 250ms var(--ease), transform 250ms var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-solid { background: var(--brass); color: var(--ink); }
.btn-solid:hover { background: var(--brass-bright); }

.btn-outline {
  border: 1px solid var(--line-strong);
  color: var(--ivory);
}
.btn-outline:hover { border-color: var(--brass); color: var(--brass-bright); }

.btn-ghost { color: var(--ivory-70); padding-inline: 12px; }
.btn-ghost::after {
  content: "→"; margin-left: 10px;
  transition: transform 250ms var(--ease);
}
.btn-ghost:hover { color: var(--brass-bright); }
.btn-ghost:hover::after { transform: translateX(4px); }

.btn-lg { min-height: 56px; padding: 0 40px; font-size: 1rem; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background-color 300ms var(--ease), border-color 300ms var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(11, 13, 16, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.header-inner {
  width: min(100% - clamp(40px, 8vw, 96px), var(--container));
  margin-inline: auto;
  display: flex; align-items: center; gap: var(--s-4);
  height: 76px;
}

.wordmark { display: inline-flex; align-items: center; gap: 12px; color: var(--ivory); }
.wordmark .sigil { width: 26px; height: 26px; color: var(--brass); flex: none; }
.wordmark-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.site-nav { display: flex; gap: var(--s-4); margin-left: auto; }
.site-nav a {
  font-size: 0.875rem; font-weight: 500;
  color: var(--ivory-70);
  padding: 8px 2px;
  position: relative;
  transition: color 250ms var(--ease);
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 2px;
  height: 1px; background: var(--brass);
  transition: right 300ms var(--ease);
}
.site-nav a:hover { color: var(--ivory); }
.site-nav a:hover::after { right: 0; }

.header-cta { margin-left: var(--s-2); min-height: 42px; padding: 0 20px; font-size: 0.875rem; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 48px; height: 48px;
  flex-direction: column; align-items: center; justify-content: center; gap: 7px;
}
.nav-toggle span {
  display: block; width: 24px; height: 1.5px; background: var(--ivory);
  transition: transform 300ms var(--ease), opacity 300ms var(--ease);
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: 76px 0 auto 0; z-index: 99;
  background: rgba(11, 13, 16, 0.97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: none;
  flex-direction: column; gap: var(--s-1);
  padding: var(--s-3) clamp(20px, 6vw, 48px) var(--s-4);
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 1.375rem;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.mobile-nav a.btn { border-bottom: 0; margin-top: var(--s-2); font-family: var(--font-text); font-size: 0.9375rem; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
  padding-top: 76px;
}
#heroCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0.9;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(ellipse 120% 90% at 28% 42%, rgba(11, 13, 16, 0.72) 0%, rgba(11, 13, 16, 0) 55%),
    linear-gradient(180deg, rgba(11, 13, 16, 0.4) 0%, rgba(11, 13, 16, 0) 30%, rgba(11, 13, 16, 0) 70%, var(--ink) 100%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 2;
  width: min(100% - clamp(40px, 8vw, 96px), var(--container));
  margin: auto;
  padding: var(--s-8) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(var(--s-4), 5vw, var(--s-8));
  align-items: center;
}
.hero-title {
  font-size: clamp(2.4rem, 1.4rem + 3.4vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  max-width: 14ch;
  margin-bottom: var(--s-4);
}
.hero-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
  aspect-ratio: 16 / 10;
}
.hero-media video {
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11, 13, 16, 0.08) 0%, rgba(11, 13, 16, 0) 40%, rgba(11, 13, 16, 0.34) 100%);
  pointer-events: none;
}
.hero-title em {
  font-style: italic;
  color: var(--brass-bright);
}
.hero-sub {
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  color: var(--ivory-70);
  max-width: 52ch;
  margin-bottom: var(--s-6);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: center; }

.hero-foot {
  position: relative; z-index: 2;
  width: min(100% - clamp(40px, 8vw, 96px), var(--container));
  margin: auto auto 0;
  padding: var(--s-6) 0 var(--s-4);
  display: flex; align-items: center; gap: var(--s-3);
}
.hero-foot-line { flex: 1; height: 1px; background: var(--line); }
.hero-foot-label {
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ivory-50);
  white-space: nowrap;
}

/* ---------- supported by ---------- */
.supported {
  padding: var(--s-8) 0 var(--s-12);
  text-align: center;
}
.supported .eyebrow {
  display: block;
  text-align: center;
  color: var(--ivory-50);
}
.logo-row {
  display: flex; flex-wrap: wrap;
  justify-content: center; align-items: stretch;
  gap: var(--s-3);
}
.logo-card {
  display: grid; place-items: center;
  width: 180px; height: 88px;
  padding: var(--s-2);
  background: var(--lt-bg);
  border: 1px solid var(--lt-line);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  transition: translate 250ms var(--ease), box-shadow 250ms var(--ease), border-color 250ms var(--ease);
}
.logo-card:hover {
  translate: 0 -3px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34), 0 0 20px rgba(201, 162, 93, 0.14);
  border-color: rgba(201, 162, 93, 0.4);
}
.logo-card img {
  max-width: 128px; max-height: 52px;
  width: auto; height: auto;
  object-fit: contain;
}

@media (max-width: 480px) {
  .logo-card { width: 148px; height: 76px; }
  .logo-card img { max-width: 104px; max-height: 44px; }
}

/* ---------- light sections ---------- */
.section-light {
  background: var(--lt-bg);
  color: var(--lt-ink);
}
.section-light .eyebrow { color: var(--brass-on-light); }

/* ---------- conviction ---------- */
.conviction { padding: var(--section-pad) 0; }
.statement {
  font-size: clamp(1.75rem, 1.2rem + 2.6vw, 3rem);
  line-height: 1.14;
  margin-bottom: var(--s-4);
}
.statement-accent { display: block; color: var(--brass-on-light); font-style: italic; }
.lede { color: var(--lt-ink-70); max-width: 62ch; font-size: clamp(1rem, 0.96rem + 0.25vw, 1.125rem); }

/* ---------- build ---------- */
.build { padding: var(--section-pad) 0; }

.build-lede {
  color: var(--ivory-70);
  max-width: 68ch;
  font-size: clamp(1rem, 0.96rem + 0.25vw, 1.125rem);
  margin-top: var(--s-3);
}
.build-bridge {
  color: var(--ivory);
  max-width: 58ch;
  margin-top: var(--s-4);
  font-size: clamp(1rem, 0.96rem + 0.25vw, 1.125rem);
}

.build-cta {
  margin-top: clamp(var(--s-6), 6vw, var(--s-8));
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4);
}
.build-cta p { color: var(--ivory-70); max-width: 46ch; }

/* ---------- software types (own section) ---------- */
.soft-types { padding: var(--section-pad) 0; position: relative; }
.type-list {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: var(--s-2);
  position: relative;
  margin-top: clamp(var(--s-6), 6vw, var(--s-8));
}
/* the hairline that cuts through the pills — same recipe as .stage-track::before */
.type-list::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
  z-index: 0;
}
.type-list li {
  position: relative;
  z-index: 1;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  color: var(--ivory-70);
  white-space: nowrap;
  transition: border-color 300ms var(--ease), color 300ms var(--ease);
}
.type-list li:hover { border-color: var(--brass); color: var(--ivory); }

/* ---------- stage track (self-diagnostic strip) ---------- */
.stage-track-wrap {
  margin-top: clamp(var(--s-6), 6vw, var(--s-8));
  margin-bottom: clamp(var(--s-8), 8vw, var(--s-12));
}
.stage-label {
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ivory-70);
  margin-bottom: var(--s-6);
}
.stage-track {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--s-4);
  position: relative;
}
.stage-track::before {
  content: "";
  position: absolute;
  top: 44px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--line);
  z-index: 0;
}
.stage-item {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--s-1);
}
.stage-circle {
  width: 88px; height: 88px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 300ms var(--ease), background-color 300ms var(--ease);
}
.stage-num { font-family: var(--font-display); font-size: 1.375rem; color: var(--brass); }
.stage-item h3 { font-size: 0.9375rem; margin-top: var(--s-2); }
.stage-item p { font-size: var(--fs-small); color: var(--ivory-70); max-width: 22ch; }
.stage-item--wall .stage-circle { border-color: var(--brass); background: var(--ink); }
.stage-item--wall .stage-num { color: var(--brass-bright); }

.stage-track-wrap .build-bridge { margin-top: var(--s-8); }

/* ---------- current projects ---------- */
.projects { padding: var(--section-pad) 0; position: relative; }

.projects-lede {
  color: var(--ivory-70);
  max-width: 58ch;
  margin-top: var(--s-3);
  font-size: clamp(1rem, 0.96rem + 0.25vw, 1.125rem);
}

.projects-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: clamp(var(--s-6), 6vw, var(--s-8));
}

.project-card {
  --card-pad: clamp(var(--s-4), 4vw, var(--s-6));
  background: var(--ink);
  padding: var(--card-pad);
  position: relative;
  transition: background-color 300ms var(--ease);
}
.project-shot {
  margin: calc(var(--card-pad) * -1) calc(var(--card-pad) * -1) var(--card-pad);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.project-shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  filter: saturate(0.94);
  transition: transform 400ms var(--ease);
}
.project-card:hover .project-shot img { transform: scale(1.02); }
/* the full-width odd card gets a wide cinematic crop instead of a tall one */
.project-card:last-child:nth-child(odd) .project-shot img { aspect-ratio: 32 / 10; object-position: center 20%; }
.project-card::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 100%;
  height: 1px; background: var(--brass);
  transition: right 400ms var(--ease);
}
.project-card:hover { background: var(--ink-2); }
.project-card:hover::before { right: 0; }

.project-tag {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: var(--s-4);
}
.project-card h3 { font-size: var(--fs-h3); margin-bottom: var(--s-2); }
.project-card p { color: var(--ivory-70); font-size: 0.9375rem; max-width: 48ch; }
/* an odd last card spans the full row so no empty grid cell shows through */
.project-card:last-child:nth-child(odd) { grid-column: 1 / -1; }

/* ---------- journey ---------- */
.journey { padding: var(--section-pad) 0; background: var(--ink-2); }

.journey-progress {
  display: none; /* mobile only — replaces the dial */
  position: sticky; top: 76px; z-index: 5;
  align-items: center; gap: var(--s-2);
  background: var(--ink-2);
  padding: 14px 0;
  margin-bottom: var(--s-3);
}
.journey-progress-num,
.journey-progress-total {
  font-family: var(--font-display);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.journey-progress-num { color: var(--brass-bright); }
.journey-progress-total { color: var(--ivory-50); }
.journey-progress-track {
  flex: 1; height: 1px; background: var(--line);
  position: relative; overflow: hidden;
}
.journey-progress-fill {
  position: absolute; inset: 0 auto 0 0;
  width: 12.5%;
  background: var(--brass);
  transition: width 400ms var(--ease);
}
/* vertical alternating timeline */
.timeline {
  position: relative;
  max-width: 980px;
  margin-inline: auto;
  padding: var(--s-4) 0;
  --tl-progress: 12.5%;
}
.timeline::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 1px; translate: -50% 0;
  background: var(--line);
}
.timeline::after {
  content: ""; position: absolute; top: 0; left: 50%;
  width: 1px; translate: -50% 0;
  height: var(--tl-progress);
  background: linear-gradient(180deg, rgba(var(--halo), 0.1), rgb(var(--halo)));
  transition: height 500ms var(--ease);
}
.tl-item {
  position: relative;
  width: 50%;
  padding: clamp(var(--s-3), 3vw, var(--s-4)) clamp(var(--s-6), 5vw, var(--s-8));
}
.tl-item:nth-child(odd) { text-align: right; }
.tl-item:nth-child(even) { margin-left: 50%; }
.tl-item:nth-child(odd) p { margin-left: auto; }

.tl-dot {
  position: absolute; top: calc(clamp(var(--s-3), 3vw, var(--s-4)) + 6px);
  width: 13px; height: 13px; border-radius: 50%;
  background: rgb(var(--halo));
  box-shadow: 0 0 0 5px rgba(var(--halo), 0.14), 0 0 22px rgba(var(--halo), 0.5);
  z-index: 1;
  transition: background-color 300ms var(--ease), box-shadow 300ms var(--ease);
}
.tl-item:nth-child(odd) .tl-dot { right: -6.5px; }
.tl-item:nth-child(even) .tl-dot { left: -6.5px; }
.tl-dot::before, .tl-dot::after {
  content: ""; position: absolute; inset: 0;
  border-radius: 50%;
  background: rgba(var(--halo), 0.35);
  animation: haloPulse 2.8s var(--ease) infinite;
}
.tl-dot::after { animation-delay: 1.4s; }
@keyframes haloPulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  70%  { transform: scale(3.4); opacity: 0; }
  100% { transform: scale(3.4); opacity: 0; }
}

.phase-num {
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: rgb(var(--halo));
  font-weight: 600;
  white-space: nowrap;
  display: block;
  margin-bottom: var(--s-1);
}
.phase h3 { font-size: var(--fs-h3); margin-bottom: var(--s-1); }
.phase p { color: var(--ivory-70); max-width: 44ch; font-size: 0.9375rem; }
.phase.is-active h3 { color: var(--brass-bright); }
.phase.is-active .tl-dot {
  background: #fff;
  box-shadow: 0 0 0 6px rgba(var(--halo), 0.22), 0 0 30px rgba(var(--halo), 0.8);
}

.journey-coda {
  margin-top: clamp(var(--s-8), 8vw, var(--s-12));
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 1.1rem + 1.4vw, 2rem);
  line-height: 1.3;
  max-width: 30ch;
}
.journey-coda em { color: var(--brass-bright); }

/* ---------- ownership ---------- */
.ownership { padding: var(--section-pad) 0; }
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
  align-items: stretch;
}
.compare-panel {
  padding: clamp(var(--s-4), 4vw, var(--s-6));
  border-radius: var(--radius-lg);
}
.compare-rent { border: 1px solid var(--lt-line); }
.compare-own { background: var(--ink); color: var(--ivory); }

.compare-label {
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600;
  margin-bottom: var(--s-2);
}
.compare-rent .compare-label { color: var(--lt-ink-70); }
.compare-own .compare-label { color: var(--brass); }

.compare-panel h3 { font-size: clamp(1.375rem, 1.2rem + 0.9vw, 1.75rem); margin-bottom: var(--s-4); }

.compare-panel ul li {
  padding: var(--s-2) 0 var(--s-2) 26px;
  position: relative;
  font-size: 0.9375rem;
}
.compare-rent ul li { border-top: 1px solid var(--lt-line); color: var(--lt-ink-70); }
.compare-own ul li { border-top: 1px solid var(--line); color: var(--ivory-70); }
.compare-panel ul li::before {
  content: ""; position: absolute; left: 2px; top: 1.45em;
  width: 6px; height: 6px; border-radius: 50%;
}
.compare-rent ul li::before { background: var(--lt-line); }
.compare-own ul li::before { background: var(--brass); }

/* ---------- education / AI literacy ---------- */
.learn { padding: var(--section-pad) 0; position: relative; }
.learn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
}
.learn-card {
  padding: clamp(var(--s-4), 4vw, var(--s-6));
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color 300ms var(--ease), translate 300ms var(--ease);
}
.learn-card:hover {
  border-color: rgba(201, 162, 93, 0.4);
  translate: 0 -3px;
}
.learn-num {
  display: block;
  font-family: var(--font-display); font-weight: 500;
  font-size: 1.75rem; line-height: 1; color: var(--brass);
  margin-bottom: var(--s-3);
}
.learn-card h3 {
  font-size: var(--fs-h3); line-height: 1.2;
  margin-bottom: var(--s-2);
}
.learn-card p { color: var(--ivory-70); line-height: 1.6; }

/* ---------- numbers ---------- */
.numbers { padding: var(--section-pad) 0; border-bottom: 1px solid var(--line); }
.numbers-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-4);
}
.number { border-top: 1px solid var(--line-strong); padding-top: var(--s-3); }
.number dt {
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ivory-50);
  font-weight: 600;
  margin-bottom: var(--s-2);
}
.number dd {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 2rem + 2.4vw, 4rem);
  line-height: 1;
  color: var(--brass-bright);
  font-variant-numeric: tabular-nums;
}

/* ---------- cta ---------- */
.cta { padding: var(--section-pad) 0; text-align: center; }
.cta-sigil { width: 40px; height: 40px; margin: 0 auto var(--s-4); color: var(--brass); }
.cta-title { font-size: var(--fs-h2); line-height: 1.08; margin-bottom: var(--s-3); }
.cta-sub { color: var(--ivory-70); max-width: 46ch; margin: 0 auto var(--s-6); }
.cta-actions { margin-bottom: var(--s-3); }
.cta-note { font-size: var(--fs-small); color: var(--ivory-50); letter-spacing: 0.04em; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--s-8) 0 var(--s-6);
  background: var(--ink);
}
.footer-inner { display: flex; flex-direction: column; gap: var(--s-4); }
.wordmark-footer .sigil { width: 22px; height: 22px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-4); }
.footer-nav a {
  font-size: 0.875rem; color: var(--ivory-70);
  transition: color 250ms var(--ease);
}
.footer-nav a:hover { color: var(--brass-bright); }
.footer-fine { font-size: var(--fs-small); color: var(--ivory-50); }

/* ---------- reveal (JS adds .is-visible; without JS nothing hides) ---------- */
html.js .reveal, html.js .hero-reveal { opacity: 0; transform: translateY(20px); }
html.js .reveal.is-visible, html.js .hero-reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}

/* ---------- guide page ---------- */
.guide-main { padding: calc(76px + var(--s-12)) 0 var(--section-pad); }
.guide-main h1 {
  font-size: clamp(2.25rem, 1.6rem + 3vw, 3.75rem);
  line-height: 1.05; letter-spacing: -0.01em;
  margin-bottom: var(--s-4);
}
.guide-main .lede { color: var(--ivory-70); margin-bottom: var(--s-8); }
.guide-section { margin-bottom: var(--s-8); }
.guide-section h2 {
  font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  margin-bottom: var(--s-3);
}
.guide-section p { color: var(--ivory-70); max-width: 66ch; margin-bottom: var(--s-2); }
.guide-section ul, .guide-section ol { margin: var(--s-2) 0 var(--s-3); }
.guide-section li {
  color: var(--ivory-70);
  padding: 10px 0 10px 26px;
  position: relative;
  border-top: 1px solid var(--line);
  max-width: 66ch;
}
.guide-section li::before {
  content: ""; position: absolute; left: 2px; top: 1.35em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--brass);
}
.guide-section li strong { color: var(--ivory); font-weight: 600; }
.guide-section code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.85em;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px 6px;
  color: var(--brass-bright);
}
.guide-back { margin-top: var(--s-8); }

/* ============================================================
   MOTION LAYER — ambient aurora, heading ornaments, line-mask
   reveals, JS parallax hooks. transform = JS parallax only;
   translate/rotate + pseudo-elements = ambient loops. No fights.
   ============================================================ */

main section { position: relative; }
main section > .container { position: relative; z-index: 2; }

/* ---------- aurora (emerald ambient light on dark areas) ---------- */
.aurora {
  position: absolute; inset: 0; z-index: 1;
  overflow: hidden; pointer-events: none;
}
.aurora-blob {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle,
    rgba(var(--aurora), 0.30) 0%,
    rgba(var(--aurora), 0.10) 40%,
    rgba(var(--aurora), 0) 70%);
  filter: blur(46px);
  animation: auroraDrift 16s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
  0%   { transform: translate3d(-5%, 2%, 0) scale(1);    opacity: 0.7; }
  50%  { transform: translate3d(4%, -5%, 0) scale(1.12); opacity: 1; }
  100% { transform: translate3d(8%, 3%, 0)  scale(0.94); opacity: 0.6; }
}
.aurora-hero .ab-1 {
  width: min(1200px, 130vw); height: 560px;
  left: 50%; bottom: -300px; translate: -50% 0;
}
.aurora-hero .ab-2 {
  width: 520px; height: 420px;
  left: 8%; bottom: -180px;
  animation-duration: 21s; animation-delay: -7s;
}
.aurora-journey .ab-1 {
  width: 900px; height: 720px;
  right: -320px; top: 6%;
  animation-duration: 23s;
}
.aurora-journey .ab-2 {
  width: 620px; height: 540px;
  left: -260px; bottom: 4%;
  animation-duration: 18s; animation-delay: -9s;
}
.aurora-cta .ab-1 {
  width: min(1000px, 120vw); height: 520px;
  left: 50%; bottom: -260px; translate: -50% 0;
  animation-duration: 19s;
}

/* ---------- floating ornaments around headings ---------- */
.orn {
  position: absolute; z-index: 1;
  pointer-events: none;
  color: var(--brass);
  opacity: 0.45;
}
.orn::before {
  content: ""; display: block; width: 100%; height: 100%;
  animation: ornFloat 8s ease-in-out infinite alternate;
}
.orn-ring { width: 64px; height: 64px; }
.orn-ring::before { border: 1px solid currentColor; border-radius: 50%; }
.orn-diamond { width: 22px; height: 22px; }
.orn-diamond::before { border: 1px solid currentColor; rotate: 45deg; }
.orn-dot { width: 9px; height: 9px; }
.orn-dot::before { background: currentColor; border-radius: 50%; }
.orn:nth-of-type(even)::before { animation-duration: 11s; animation-delay: -4s; }
@keyframes ornFloat {
  from { transform: translateY(-10px); }
  to   { transform: translateY(12px); }
}
.section-light .orn { color: var(--brass-on-light); opacity: 0.3; }

/* ---------- spinning spark inside headings ---------- */
.h-spark {
  display: inline-block;
  width: 0.4em; height: 0.4em;
  margin-left: 0.14em;
  color: var(--brass);
  vertical-align: baseline;
  animation: sparkSpin 22s linear infinite;
}
@keyframes sparkSpin { to { rotate: 360deg; } }
.cta-sigil { animation: sparkSpin 30s linear infinite; }

/* ---------- glowing, breathing display headings ----------
   Glow breathes via text-shadow; drift rides the separate
   `translate` channel so it never collides with the JS
   parallax engine, which owns `transform`. */
.glow-head {
  animation:
    headGlow 5.5s ease-in-out infinite alternate,
    headFloat 9s ease-in-out infinite alternate;
}
@keyframes headGlow {
  from {
    text-shadow:
      0 0 14px rgba(224, 188, 122, 0.08),
      0 0 46px rgba(201, 162, 93, 0.05);
  }
  to {
    text-shadow:
      0 0 26px rgba(224, 188, 122, 0.36),
      0 0 90px rgba(201, 162, 93, 0.2);
  }
}
@keyframes headFloat {
  from { translate: 0 4px; }
  to   { translate: 0 -7px; }
}

/* ---------- masked line reveals for headings ---------- */
.hl {
  display: block; overflow: hidden;
  padding-bottom: 0.1em; margin-bottom: -0.1em; /* keep descenders */
}
.hl-in { display: block; }
html.js .reveal .hl-in,
html.js .hero-reveal .hl-in { transform: translateY(112%); }
html.js .reveal.is-visible .hl-in,
html.js .hero-reveal.is-visible .hl-in {
  transform: none;
  transition: transform 400ms var(--ease);
}
html.js .is-visible .hl:nth-child(2) .hl-in { transition-delay: 80ms; }
html.js .is-visible .hl:nth-child(3) .hl-in { transition-delay: 160ms; }

/* ---------- parallax hooks (JS writes transform) ---------- */
[data-plx] { will-change: transform; }

/* ---------- responsive ---------- */
@media (max-width: 1260px) {
  /* pills wrap on smaller screens — the through-line only works on one row */
  .type-list { flex-wrap: wrap; justify-content: flex-start; }
  .type-list::before { display: none; }
}

@media (max-width: 900px) {
  .site-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { aspect-ratio: 16 / 9; }

  .journey-progress { display: flex; }

  .timeline::before, .timeline::after { left: 6px; translate: 0 0; }
  .tl-item,
  .tl-item:nth-child(even) { width: 100%; margin-left: 0; padding: var(--s-3) 0 var(--s-3) 40px; }
  .tl-item:nth-child(odd) { text-align: left; }
  .tl-item:nth-child(odd) p { margin-left: 0; }
  .tl-item:nth-child(odd) .tl-dot,
  .tl-item:nth-child(even) .tl-dot { left: 0; right: auto; }

  .projects-grid { grid-template-columns: 1fr; }
  .compare { grid-template-columns: 1fr; }
  .learn-grid { grid-template-columns: 1fr; }
  .numbers-row { grid-template-columns: repeat(2, 1fr); gap: var(--s-6) var(--s-4); }

  .stage-track { grid-template-columns: repeat(3, 1fr); row-gap: var(--s-6); }
  .stage-track::before { display: none; }
  /* single column: the last card is no longer wide, use the standard crop */
  .project-card:last-child:nth-child(odd) .project-shot img { aspect-ratio: 16 / 10; object-position: top; }
}

@media (max-width: 480px) {
  .hero-ctas .btn { width: 100%; }
  .numbers-row { grid-template-columns: 1fr 1fr; }
  .stage-track { grid-template-columns: 1fr; row-gap: var(--s-4); }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .hero-reveal { opacity: 1; transform: none; }
  .hl-in { transform: none !important; }
  [data-plx] { transform: none !important; }
  .glow-head { animation: none; text-shadow: none; translate: none; }
  .aurora-blob { animation: none; opacity: 0.5; }
  #heroCanvas { display: none; }
  .merlin-panel { transition: none; }
}

/* ============================================================
   MERLIN — floating assistant widget
   ============================================================ */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.merlin-launch {
  position: fixed; right: var(--s-3); bottom: var(--s-3); z-index: 90;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 12px 20px 12px 14px;
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.5), 0 0 24px rgba(201, 162, 93, 0.12);
  transition: border-color 250ms var(--ease), box-shadow 250ms var(--ease), translate 250ms var(--ease);
}
.merlin-launch svg { width: 26px; height: 26px; color: var(--brass); }
.merlin-launch-label {
  font-size: var(--fs-small); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ivory);
}
.merlin-launch:hover,
.merlin-launch:focus-visible {
  border-color: var(--brass);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), 0 0 34px rgba(201, 162, 93, 0.28);
  translate: 0 -2px;
}
.merlin-launch:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.merlin-launch[aria-expanded="true"] { opacity: 0; pointer-events: none; }

.merlin-panel {
  position: fixed; inset: 0; z-index: 120; /* above site header (100) */
  display: flex; flex-direction: column;
  background: rgba(11, 13, 16, 0.9);
  backdrop-filter: blur(22px) saturate(1.1);
  -webkit-backdrop-filter: blur(22px) saturate(1.1);
  opacity: 1;
  transition: opacity 300ms var(--ease);
}
.merlin-panel[hidden] { display: none; }
.merlin-panel.is-closing { opacity: 0; }
/* centered "hello" state — greeting + input sit mid-screen */
.merlin-panel.is-centered { justify-content: center; }

.merlin-head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  padding: var(--s-2) var(--s-3);
}
.merlin-head svg { width: 28px; height: 28px; flex: none; color: var(--brass); }
.merlin-head-text { flex: 1; min-width: 0; line-height: 1.3; }
.merlin-head-text strong {
  display: block; font-family: var(--font-display); font-weight: 500;
  font-size: 1.0625rem; color: var(--ivory);
}
.merlin-head-text span { display: block; font-size: var(--fs-small); color: var(--ivory-50); }
.merlin-close {
  flex: none; width: 44px; height: 44px; margin-right: -8px;
  display: grid; place-items: center;
  font-size: 1.5rem; line-height: 1; color: var(--ivory-70);
  border-radius: 50%;
  transition: color 200ms var(--ease), background 200ms var(--ease);
}
.merlin-close:hover { color: var(--ivory); background: var(--ink-3); }
.merlin-close:focus-visible { outline: 2px solid var(--brass); outline-offset: -2px; }

.merlin-log {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 88px var(--s-3) var(--s-3);
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.is-centered .merlin-log {
  flex: 0 0 auto; overflow: visible;
  padding: 0 var(--s-3);
}
.merlin-msg {
  max-width: 86%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.9375rem; line-height: 1.55;
  white-space: pre-wrap; overflow-wrap: break-word;
  animation: msgIn 300ms var(--ease) both;
}
@keyframes msgIn {
  from { opacity: 0; translate: 0 8px; }
  to   { opacity: 1; translate: 0 0; }
}
.merlin-msg.from-merlin {
  align-self: flex-start;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
  color: var(--ivory);
}
.merlin-msg.from-user {
  align-self: flex-end;
  background: rgba(201, 162, 93, 0.16);
  border: 1px solid rgba(201, 162, 93, 0.35);
  border-bottom-right-radius: 4px;
  color: var(--ivory);
}
.merlin-msg.is-error {
  border-color: rgba(224, 122, 122, 0.4);
  color: var(--ivory-70);
}
/* centered state: Merlin's greeting reads as a display headline */
.is-centered .merlin-msg.from-merlin {
  align-self: center; max-width: 620px;
  background: none; border: 0; padding: 0;
  text-align: center;
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.375rem, 1rem + 1.8vw, 2.125rem);
  line-height: 1.4;
  text-shadow: 0 0 40px rgba(201, 162, 93, 0.14);
}
.is-centered .merlin-typing {
  align-self: center;
  background: none; border: 0;
}

/* typing indicator */
.merlin-typing {
  align-self: flex-start;
  display: flex; gap: 5px;
  padding: 14px 16px;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 14px; border-bottom-left-radius: 4px;
}
.merlin-typing i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brass);
  animation: typingDot 1.1s ease-in-out infinite;
}
.merlin-typing i:nth-child(2) { animation-delay: 0.15s; }
.merlin-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.25; translate: 0 0; }
  30% { opacity: 1; translate: 0 -3px; }
}

/* report card */
.merlin-report {
  align-self: stretch; max-width: 100%;
  padding: var(--s-3);
  background: var(--ink);
  border: 1px solid rgba(201, 162, 93, 0.45);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 30px rgba(201, 162, 93, 0.1) inset;
  animation: msgIn 300ms var(--ease) both;
}
.merlin-report h4 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 1rem; color: var(--brass-bright);
  letter-spacing: 0.04em; margin-bottom: var(--s-2);
}
.merlin-report dl { display: grid; gap: 8px; }
.merlin-report dt {
  font-size: var(--fs-eyebrow); font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ivory-50);
}
.merlin-report dd { font-size: 0.9rem; line-height: 1.5; color: var(--ivory); }

.merlin-form {
  display: flex; gap: 8px; align-items: center;
  width: min(680px, calc(100% - 2 * var(--s-3)));
  margin: var(--s-2) auto var(--s-4);
  padding: 6px 6px 6px 24px;
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  transition: border-color 250ms var(--ease), box-shadow 250ms var(--ease);
}
.merlin-form:focus-within {
  border-color: rgba(201, 162, 93, 0.55);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 0 28px rgba(201, 162, 93, 0.14);
}
.is-centered .merlin-form { margin-top: var(--s-4); }
.merlin-form input {
  flex: 1; min-width: 0;
  background: none; border: 0; outline: none;
  font: inherit; font-size: 0.9375rem;
  color: var(--ivory);
  padding: 10px 0;
}
.merlin-form input::placeholder { color: var(--ivory-50); }
.merlin-send {
  flex: none; width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brass); color: var(--ink);
  transition: background 200ms var(--ease), translate 200ms var(--ease);
}
.merlin-send svg { width: 18px; height: 18px; }
.merlin-send:hover { background: var(--brass-bright); translate: 0 -1px; }
.merlin-send:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: 2px; }
.merlin-send:disabled { opacity: 0.4; cursor: default; translate: none; }

@media (max-width: 480px) {
  .merlin-log { padding-top: 76px; }
  .is-centered .merlin-log { padding-top: 0; }
  .merlin-form { margin-bottom: var(--s-3); }
  .merlin-launch { right: var(--s-2); bottom: var(--s-2); }
}

/* ============================================================
   GUIDE GATE — lead capture before the "Why" PDF opens
   ============================================================ */
body.modal-open { overflow: hidden; }

.guide-gate {
  position: fixed; inset: 0; z-index: 130; /* above merlin (120) */
  display: grid; place-items: center;
  padding: var(--s-3);
}
.guide-gate[hidden] { display: none; }

.guide-gate-backdrop {
  position: absolute; inset: 0;
  background: rgba(11, 13, 16, 0.82);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  opacity: 0;
  transition: opacity 280ms var(--ease);
}
.guide-gate.is-open .guide-gate-backdrop { opacity: 1; }

.guide-card {
  position: relative; z-index: 1;
  width: min(460px, 100%);
  max-height: calc(100dvh - 2 * var(--s-3));
  overflow-y: auto;
  padding: clamp(var(--s-4), 5vw, var(--s-6));
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), 0 0 40px rgba(201, 162, 93, 0.08);
  opacity: 0; translate: 0 14px;
  transition: opacity 280ms var(--ease), translate 280ms var(--ease);
}
.guide-gate.is-open .guide-card { opacity: 1; translate: 0 0; }

.guide-sigil { width: 34px; height: 34px; color: var(--brass); margin-bottom: var(--s-3); }
.guide-card .eyebrow { margin-bottom: var(--s-2); }
.guide-close {
  position: absolute; top: 10px; right: 10px;
  width: 40px; height: 40px; display: grid; place-items: center;
  font-size: 1.4rem; line-height: 1; color: var(--ivory-50);
  border-radius: 50%;
  transition: color 200ms var(--ease), background 200ms var(--ease);
}
.guide-close:hover { color: var(--ivory); background: var(--ink-3); }
.guide-close:focus-visible { outline: 2px solid var(--brass); outline-offset: -2px; }

.guide-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
  line-height: 1.14; margin-bottom: var(--s-2);
}
.guide-lede {
  color: var(--ivory-70); font-size: 0.95rem; line-height: 1.55;
  margin-bottom: var(--s-4);
}
.guide-lede em { font-style: italic; color: var(--ivory); }

.guide-form { display: grid; gap: var(--s-3); }
.guide-field { display: grid; gap: 6px; }
.guide-field label {
  font-size: var(--fs-eyebrow); font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ivory-50);
}
.guide-field input {
  width: 100%;
  padding: 12px 14px;
  background: var(--ink); color: var(--ivory);
  border: 1px solid var(--line-strong); border-radius: 10px;
  font: inherit; font-size: 0.95rem;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.guide-field input::placeholder { color: var(--ivory-50); }
.guide-field input:focus-visible {
  outline: none;
  border-color: rgba(201, 162, 93, 0.6);
  box-shadow: 0 0 0 3px rgba(201, 162, 93, 0.14);
}
.guide-error { margin: -6px 0 0; font-size: 0.85rem; color: #E79A9A; line-height: 1.4; }
.guide-submit { width: 100%; justify-content: center; margin-top: var(--s-1); }
.guide-fine {
  margin: 0; text-align: center;
  font-size: 0.75rem; color: var(--ivory-50); line-height: 1.5;
}
