/* ============================================================
   RAVENSTACK.NET — Dark editorial one-pager
   ============================================================ */

:root {
  /* Palette */
  --bg:    #0b0b0d;
  --bg-2:  #14141a;
  --ink:   #ece7dd;
  --muted: #8a8478;
  --rule:  #2a2a30;
  --ember: #ff7a3d;

  /* Type */
  --display: "Fraunces", "Times New Roman", serif;
  --sans:    "Inter", system-ui, -apple-system, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Spacing */
  --pad:        clamp(20px, 3vw, 40px);
  --section-y:  clamp(80px, 12vh, 160px);
  --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.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color-scheme: dark;
}

body {
  position: relative;
  overflow-x: hidden;
}

/* Subtle film grain via inline SVG noise. No HTTP request. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* Reveal-on-scroll baseline */
.reveal, .reveal-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in, .reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 0.24s; }

/* Section primitive */
.section {
  padding: var(--section-y) var(--pad);
  border-top: var(--rule-w) solid var(--rule);
}

/* Eyebrow text (mono labels) */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--ember { color: var(--ember); }

/* Row-between utility (used in eyebrow headers) */
.row-between {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ==== Nav ==== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px var(--pad);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
}
.nav.solid {
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  border-bottom-color: var(--rule);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.nav__brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.nav__brand b { color: var(--ember); font-weight: 700; }
.nav__links {
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav__links a {
  position: relative;
  padding: 6px 0;
  opacity: 0.75;
  transition: opacity 0.2s ease, color 0.2s ease;
}
.nav__links a:hover { opacity: 1; color: var(--ember); }
.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.nav__cta:hover {
  border-color: var(--ember);
  color: var(--ember);
}
.nav__cta:hover .arr { transform: translateX(4px); }
.nav__cta .arr { transition: transform 0.2s ease; }

/* ==== Hero ==== */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 120px var(--pad) 80px;
  overflow: hidden;
  isolation: isolate;
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: saturate(0.7) contrast(1.05);
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 80% at 50% 40%, rgba(11,11,13,0.45) 0%, rgba(11,11,13,0.92) 100%),
    linear-gradient(180deg, rgba(11,11,13,0.55) 0%, rgba(11,11,13,0.85) 100%);
}
.hero__inner {
  text-align: center;
  display: grid;
  gap: 28px;
  justify-items: center;
  max-width: 1100px;
}
.hero__headline {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(72px, 11vw, 168px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0;
}
.hero__headline em {
  font-style: italic;
  font-weight: 400;
  color: var(--ember);
}
.hero__sub {
  font-family: var(--sans);
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--ink);
  opacity: 0.85;
  max-width: 38ch;
  margin: 0;
}
.hero__scroll {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s ease;
}
.hero__scroll:hover { color: var(--ember); }
.hero__chevron { display: inline-block; animation: hero-bob 2.4s ease-in-out infinite; }
@keyframes hero-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* ==== Premise ==== */
.section--premise { border-top: none; }
.premise {
  margin-top: 60px;
  display: grid;
  grid-template-columns: 1fr 2.4fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
.premise__mark {
  color: var(--ember);
  max-width: 200px;
}
.premise__mark svg { width: 100%; height: auto; }
.premise__lede {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
}
.premise__lede em {
  font-style: italic;
  font-weight: 400;
  color: var(--ember);
}
.premise__body {
  font-family: var(--sans);
  font-size: clamp(16px, 1.2vw, 19px);
  color: var(--ink);
  opacity: 0.85;
  max-width: 60ch;
  margin: 0 0 24px;
}
.premise__sig {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0;
}

/* ==== Capabilities ==== */
.caps__title {
  margin: 60px 0 40px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.caps__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
}
.caps {
  display: grid;
  border-top: 1px solid var(--rule);
}
.cap {
  display: grid;
  grid-template-columns: 80px 1.4fr 2fr 40px;
  align-items: baseline;
  gap: clamp(16px, 2vw, 32px);
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  transition: background 0.25s ease, color 0.25s ease;
}
.cap__num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ember);
}
.cap__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(22px, 2.2vw, 30px);
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.cap__body {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--muted);
  max-width: 56ch;
}
.cap__arrow {
  font-family: var(--mono);
  font-size: 20px;
  color: var(--muted);
  justify-self: end;
  transition: transform 0.25s ease, color 0.25s ease;
}
.cap:hover {
  background: color-mix(in oklab, var(--bg-2) 70%, var(--bg) 30%);
  padding-left: 12px;
  padding-right: 12px;
}
.cap:hover .cap__arrow {
  transform: translateX(6px);
  color: var(--ember);
}
.cap:hover .cap__title { color: var(--ember); }

/* ==== Method ==== */
.method {
  margin-top: 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.method__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.method__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--ember);
}
.method__phases {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 32px;
}
.method__phases li {
  border-left: 1px solid var(--rule);
  padding: 4px 0 4px 20px;
}
.method__phases .eyebrow { margin-bottom: 10px; display: block; }
.method__phases p {
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  opacity: 0.85;
  margin: 0;
  max-width: 52ch;
}

/* ==== Stats (inverted) ==== */
.section--invert {
  background: var(--ink);
  color: var(--bg);
  border-top: none;
}
.section--invert .eyebrow { color: color-mix(in oklab, var(--bg) 60%, transparent); }
.stats {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(24px, 3vw, 48px);
  border-top: 1px solid color-mix(in oklab, var(--bg) 15%, transparent);
  padding-top: 40px;
}
.stat__num {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(56px, 7vw, 112px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--bg);
}
.stat__num em {
  font-style: italic;
  font-weight: 400;
  color: var(--ember);
  font-size: 0.75em;
  margin-left: 4px;
}
.stat__label {
  margin-top: 16px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  color: color-mix(in oklab, var(--bg) 70%, transparent);
  max-width: 24ch;
}

/* visually-hidden helper */
.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;
}

/* ==== Footer ==== */
.foot {
  padding: var(--section-y) var(--pad) 32px;
  border-top: 1px solid var(--rule);
}
.foot__big {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(40px, 6.5vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 80px;
  max-width: 18ch;
}
.foot__big em {
  font-style: italic;
  font-weight: 400;
  color: var(--ember);
}
.foot__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  padding-bottom: 60px;
  border-bottom: 1px solid var(--rule);
}
.foot__col h3 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
  font-weight: 400;
}
.foot__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-family: var(--sans);
  font-size: 15px;
}
.foot__col ul a:hover { color: var(--ember); }
.foot__lede {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.3;
  max-width: 28ch;
  margin: 0 0 32px;
}
.foot__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border: 1px solid var(--ember);
  color: var(--ember);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}
.foot__cta:hover {
  background: var(--ember);
  color: var(--bg);
}
.foot__cta .arr { transition: transform 0.2s ease; }
.foot__cta:hover .arr { transform: translateX(4px); }
.foot__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.foot__signal {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.foot__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--ember) 50%, transparent);
  animation: signal-pulse 1.8s ease-out infinite;
}
@keyframes signal-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--ember) 50%, transparent); }
  70%  { box-shadow: 0 0 0 10px color-mix(in oklab, var(--ember) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--ember) 0%, transparent); }
}

/* ==== Responsive ==== */
@media (max-width: 1024px) {
  .method,
  .premise {
    grid-template-columns: 1fr;
  }
  .premise__mark { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .foot__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav { padding: 12px var(--pad); }
  .nav__brand { font-size: 18px; }
  .nav__brand img { width: 26px; height: 26px; }
  .nav__links { display: none; }     /* keep brand + CTA on small screens */
  .nav__cta { padding: 8px 14px; }

  .hero { padding-top: 100px; }
  .hero__headline { font-size: clamp(56px, 18vw, 96px); }

  .cap {
    grid-template-columns: 56px 1fr 24px;
    grid-template-areas:
      "num title arrow"
      ".   body  .";
    row-gap: 6px;
  }
  .cap__num   { grid-area: num; }
  .cap__title { grid-area: title; }
  .cap__body  { grid-area: body; font-size: 14px; }
  .cap__arrow { grid-area: arrow; }

  .stats { grid-template-columns: 1fr; gap: 32px; }
  .foot__grid { grid-template-columns: 1fr; }
  .foot__big { font-size: clamp(36px, 12vw, 64px); }
  .foot__bottom { flex-direction: column; align-items: flex-start; }
}

/* ==== Accessibility ==== */
:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; }
  .hero__video { display: none; }
  .hero {
    background-image: url("assets/hero-poster.jpg");
    background-size: cover;
    background-position: center;
  }
  .hero__chevron { animation: none; }
  .foot__dot { animation: none; }
}
