/* ============================================================
   RAVENSTACK · shared styles
   ============================================================ */

:root {
  /* Stone surface + espresso ink + rust accent. */
  --bg: #ddd6c6;
  --bg-2: #d3ccbb;
  --ink: #2a1d14;
  --navy: #14225e;
  --muted: #7a6e5e;
  --rule: #b8b0a0;
  --ember: #22d3ee;
  --signal: #22d3ee;

  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --pad: clamp(20px, 3vw, 40px);
  --rule-w: 1px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Tells the browser to render native UI (form dropdowns, scrollbars,
     autofill, date pickers) using dark-mode chrome so they don't flash white. */
  color-scheme: dark;
}

body {
  background-color: var(--bg);
  position: relative;
}

/* One solid bg color. No gradients, no overlays. */
body::before, body::after { content: none; display: none; }
body > * { position: relative; z-index: 1; }

img, video { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

/* Cursor accent intentionally removed — radial spotlight read as dated. */
.cursor-halo { display: none !important; }

/* ==== Top nav ==== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad);
  background: transparent;
  transition: background .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent;
}
.nav.solid {
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--ink) 10%, transparent);
  backdrop-filter: saturate(160%) blur(8px);
}
.nav__brand {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.nav__brand img {
  width: 44px; height: 44px;
  object-fit: contain;
}
.nav__brand b { font-weight: 700; color: var(--ember); }

.nav__links {
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.nav__links a {
  position: relative;
  padding: 6px 0;
  color: var(--ink);
  opacity: 0.7;
  transition: opacity .2s;
}
.nav__links a:hover, .nav__links a.is-active { opacity: 1; }
.nav__links a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  border-bottom: 1px solid currentColor;
}
.nav__cta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 10px 16px;
  border: 1px solid color-mix(in oklab, var(--ink) 40%, transparent);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .2s, color .2s, border-color .2s;
}
.nav__cta:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.nav__cta::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ember);
  display: inline-block;
  box-shadow: 0 0 0 0 var(--ember);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--ember) 60%, transparent); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ==== Mono eyebrow ==== */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: currentColor;
  display: inline-block;
}

/* ==== Headlines ==== */
.display {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.92;
  margin: 0;
}
.display em { font-style: normal; color: var(--ember); }

.h1 { font-size: clamp(48px, 8.5vw, 142px); }
.h2 { font-size: clamp(36px, 5.5vw, 92px); }
.h3 { font-size: clamp(24px, 2.9vw, 46px); line-height: 1.0; }
.h4 { font-size: clamp(18px, 1.8vw, 28px); line-height: 1.1; }

.lede {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 36px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--ink);
  max-width: 26ch;
}

p.body { max-width: 60ch; line-height: 1.55; color: var(--ink); }

/* ==== Section frame ==== */
.section {
  position: relative;
  padding: clamp(80px, 9vw, 140px) var(--pad);
  border-top: var(--rule-w) solid var(--rule);
}

/* Decorative triangle clusters that flank manifesto-style sections. */
.section--has-deco { overflow: hidden; }
.section--has-deco .manifesto { position: relative; z-index: 1; }
.deco {
  position: absolute;
  top: 50%;
  width: clamp(140px, 16vw, 240px);
  height: 80%;
  max-height: 700px;
  transform: translateY(-50%);
  color: var(--ember);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.deco--left  { left: 0; }
.deco--right { right: 0; }
@media (max-width: 1100px) {
  .deco { width: clamp(80px, 10vw, 140px); opacity: 0.7; }
}
@media (max-width: 760px) {
  .deco { display: none; }
}
.section--invert {
  background: var(--bg-2);
  color: var(--ink);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.section--invert + .section { border-top: 0; }
.section--invert .eyebrow { color: color-mix(in oklab, var(--ember) 70%, var(--ink)); }
.section--invert .stat__num em { color: var(--ember); }

/* ==== Hero ==== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 720px;
  overflow: hidden;
  color: var(--ink);
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Dim heavily so the dark bg dominates and type contrast is maximum. */
  opacity: 0.18;
  filter: none;
}
.hero__scrim {
  position: absolute; inset: 0;
  background: var(--bg);
  z-index: -1;
}
.hero__inner {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: clamp(80px, 12vh, 160px) var(--pad) clamp(30px, 5vw, 60px);
  display: flex;
  flex-direction: column;
}
.hero__inner > div:first-child { display: none; }
.hero__inner > div:last-child {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.hero__headline {
  /* Vertically centered in the hero. margin-top:auto pushes flex space above. */
  margin-top: auto;
  margin-bottom: clamp(28px, 4vw, 56px);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(48px, 9vw, 144px);
  line-height: 0.86;
  letter-spacing: -0.045em;
  color: var(--ink);
  text-wrap: pretty;
}
.hero__headline em {
  display: block;
  font-style: normal;
  color: var(--ember);
}
.hero__headline em {
  font-style: normal;
  color: var(--ember);
}
.hero__sub {
  font-family: var(--display);
  font-weight: 500;
  font-style: normal;
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  /* margin-bottom:auto absorbs flex space below, pushing meta to the bottom edge. */
  margin: 0 0 auto;
  color: var(--ink);
  max-width: 30ch;
}
.hero__meta {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
  flex-wrap: wrap;
  color: color-mix(in oklab, var(--ink) 75%, transparent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.01em;
}
.hero__meta .col { max-width: 36ch; }
.hero__meta .col b { display: block; color: var(--ink); font-weight: 500; margin-bottom: 6px; }

/* ==== Marquee ==== */
.marquee {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
}
.marquee__track {
  display: flex;
  gap: 56px;
  padding: 22px 0;
  animation: scroll 38s linear infinite;
  white-space: nowrap;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(38px, 5.5vw, 84px);
  letter-spacing: -0.03em;
}
.marquee__track span { display: inline-flex; align-items: center; gap: 56px; }
.marquee__track em { font-style: normal; color: var(--ember); }
.marquee__dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--ember);
  display: inline-block;
  flex: none;
  align-self: center;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ==== Capability grid ==== */
.cap {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 3fr;
  gap: 40px;
  align-items: start;
}
.cap__head { position: sticky; top: 100px; }
.cap__deco {
  margin-top: clamp(40px, 6vw, 80px);
  width: 100%;
  max-width: 240px;
  height: auto;
  color: var(--ember);
  opacity: 0.7;
  display: block;
}
.cap__list { display: grid; gap: 0; }
.cap__row {
  display: grid;
  grid-template-columns: 80px 1fr 1fr 60px;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid color-mix(in oklab, var(--ink) 15%, transparent);
  align-items: start;
}
.cap__row:last-child { border-bottom: 1px solid color-mix(in oklab, var(--ink) 15%, transparent); }
.cap__num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
  padding-top: 6px;
}
.cap__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 0;
}
.cap__body {
  font-size: 15px;
  color: color-mix(in oklab, var(--ink) 78%, var(--bg));
  line-height: 1.55;
  max-width: 42ch;
}
.cap__arrow {
  align-self: center;
  justify-self: end;
  width: 36px; height: 36px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background .2s, color .2s, transform .2s;
}
.cap__row:hover .cap__arrow { background: var(--ink); color: var(--bg); transform: rotate(-45deg); }

/* ==== Manifesto / pull quote ==== */
.manifesto {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 4fr;
  gap: 40px;
  align-items: start;
}
.manifesto__body {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(26px, 3.2vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  max-width: 22ch;
}
.manifesto__body em { font-style: normal; color: var(--ember); }
.manifesto__sig {
  margin-top: 40px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ==== Stat strip ==== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stat {
  padding: 40px 32px;
  border-left: 1px solid color-mix(in oklab, currentColor 25%, transparent);
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat__num {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(42px, 5.5vw, 92px);
  line-height: 0.9;
  letter-spacing: -0.045em;
}
.stat__num em { font-style: normal; color: var(--ember); }
.stat__label {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: color-mix(in oklab, currentColor 65%, transparent);
  max-width: 26ch;
}

/* ==== Work grid ==== */
.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px 24px;
}
.work-card {
  position: relative;
  grid-column: span 6;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-2);
  cursor: pointer;
  border: 1px solid color-mix(in oklab, var(--ink) 10%, transparent);
}
.work-card.span-12 { grid-column: span 12; aspect-ratio: 21/9; }
.work-card.span-7 { grid-column: span 7; }
.work-card.span-5 { grid-column: span 5; }
.work-card.span-8 { grid-column: span 8; }
.work-card.span-4 { grid-column: span 4; aspect-ratio: 1; }
.work-card__bg {
  position: absolute; inset: 0;
  background: var(--card-bg, var(--bg-2));
  transition: transform .8s cubic-bezier(.22,.61,.36,1);
}
.work-card:hover .work-card__bg { transform: scale(1.04); }
.work-card__meta {
  position: absolute; left: 24px; bottom: 22px; right: 24px;
  display: flex; justify-content: space-between; align-items: end;
  gap: 24px;
  color: var(--ink);
  z-index: 2;
}
.work-card.is-dark .work-card__meta { color: var(--bg); }
.work-card__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 0;
}
.work-card__tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  opacity: 0.7;
  white-space: nowrap;
}
.work-card__year {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  align-self: start;
  position: absolute;
  top: 22px; right: 24px;
  z-index: 2;
}
.work-card.is-dark .work-card__year { color: var(--bg); }

/* Placeholder textures */
.tex-stripes {
  background:
    repeating-linear-gradient(135deg,
      color-mix(in oklab, var(--card-fg, var(--ink)) 8%, transparent) 0 2px,
      transparent 2px 14px),
    var(--card-bg, var(--bg-2));
}
.tex-dots {
  background:
    radial-gradient(circle at 1px 1px, color-mix(in oklab, var(--card-fg, var(--ink)) 30%, transparent) 1px, transparent 1.6px),
    var(--card-bg, var(--bg-2));
  background-size: 16px 16px;
}
.tex-grid {
  background:
    linear-gradient(to right, color-mix(in oklab, var(--card-fg, var(--ink)) 10%, transparent) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(to bottom, color-mix(in oklab, var(--card-fg, var(--ink)) 10%, transparent) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--card-bg, var(--bg-2));
}

/* Placeholder label for unfilled imagery */
.placeholder-label {
  position: absolute;
  top: 22px; left: 24px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: color-mix(in oklab, var(--card-fg, var(--ink)) 55%, transparent);
}
.work-card.is-dark .placeholder-label { color: color-mix(in oklab, var(--bg) 65%, transparent); }

/* ==== Footer ==== */
.foot {
  background: var(--bg);
  color: var(--ink);
  padding: clamp(60px, 8vw, 120px) var(--pad) 28px;
  border-top: 1px solid var(--rule);
}
.foot__big {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(28px, 4.5vw, 72px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin: 0 0 60px;
}
.foot__big em { font-style: normal; color: var(--ember); }
.foot__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid color-mix(in oklab, var(--ink) 15%, transparent);
}
.foot__col h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  margin: 0 0 14px;
  color: color-mix(in oklab, var(--ink) 60%, transparent);
  font-weight: 400;
}
.foot__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot__col a:hover { color: var(--ember); }
.foot__col .lede { max-width: 30ch; color: var(--ink); }
.foot__bottom {
  margin-top: 60px;
  padding-top: 20px;
  border-top: 1px solid color-mix(in oklab, var(--ink) 12%, transparent);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: color-mix(in oklab, var(--ink) 60%, transparent);
  flex-wrap: wrap;
  gap: 20px;
}

/* ==== Page header (interior pages) ==== */
.page-hero {
  padding: clamp(140px, 18vw, 240px) var(--pad) clamp(60px, 8vw, 120px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  /* Align both columns by the bottom of their last text line so the title's
     baseline sits flush with the lede's final line. */
  align-items: last baseline;
  border-bottom: 1px solid var(--rule);
}
.page-hero__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(36px, 6.5vw, 100px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin: 0;
}
.page-hero__title em { font-style: normal; color: var(--ember); }
.page-hero__lede {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(18px, 1.8vw, 26px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 36ch;
  margin: 0;
  padding: 0;
}

/* ==== Contact form ==== */
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
}
.form .field {
  padding: 28px 0;
  border-bottom: 1px solid color-mix(in oklab, var(--ink) 18%, transparent);
  display: flex;
  align-items: baseline;
  gap: 20px;
}
.form .field.full { grid-column: 1/-1; }
.form .field label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  width: 110px;
  flex: none;
}
.form .field input,
.form .field textarea,
.form .field select {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(16px, 1.6vw, 22px);
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -0.01em;
  resize: vertical;
}
.form .field input::placeholder,
.form .field textarea::placeholder { color: color-mix(in oklab, var(--ink) 25%, transparent); }
.form .field select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  color-scheme: dark;
  background: transparent;
  /* Custom caret so the absent native arrow doesn't look like a bug. */
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(-45deg, transparent 50%, currentColor 50%);
  background-position: calc(100% - 14px) 55%, calc(100% - 8px) 55%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 28px;
}
.form .field select option {
  background: var(--bg);
  color: var(--ink);
}

.form .submit-row {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
}
.btn-pill {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 18px 26px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 12px;
  transition: background .2s, color .2s, transform .2s, border-color .2s;
}
.btn-pill:hover { background: var(--ember); border-color: var(--ember); color: var(--bg); transform: translateX(4px); }
.btn-pill .arr { display: inline-block; transform: translateY(-1px); }

/* ==== Reveal on scroll ==== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(20px); transition: opacity .8s ease, transform .8s ease; }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 70ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 140ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 210ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 280ms; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 350ms; }
.reveal-stagger.in > * { opacity: 0; transform: translateY(20px); }
.reveal-stagger.in > * { opacity: 1; transform: none; }

/* ==== Generic util ==== */
.row-between {
  display: flex; justify-content: space-between; align-items: end; gap: 24px;
  flex-wrap: wrap;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.divider { height: 1px; background: var(--rule); width: 100%; }
.spacer-lg { height: clamp(40px, 6vw, 80px); }

.signal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}
.signal::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--ember);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--ember);
  animation: pulse 2s infinite;
}

/* ==== Responsive ==== */
@media (max-width: 900px) {
  .grid-2, .page-hero { grid-template-columns: 1fr; }
  .cap { grid-template-columns: 1fr; }
  .cap__row { grid-template-columns: 36px 1fr 40px; }
  .cap__row .cap__body { grid-column: 2; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-left: 0; border-top: 1px solid color-mix(in oklab, currentColor 25%, transparent); padding: 28px 0; }
  .stat:nth-child(2) { border-left: 1px solid color-mix(in oklab, currentColor 25%, transparent); padding-left: 20px; }
  .stat:nth-child(4) { border-left: 1px solid color-mix(in oklab, currentColor 25%, transparent); padding-left: 20px; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .work-card, .work-card.span-12, .work-card.span-7, .work-card.span-5,
  .work-card.span-8, .work-card.span-4 { grid-column: span 12; aspect-ratio: 4/3; }
  .manifesto { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .form .field { flex-direction: column; align-items: flex-start; gap: 6px; }
  .form .field label { width: auto; }
  .nav__links { display: none; }
}
