/* =========================================================================
   820labs — site styles
   Aesthetic: chrome-on-slate. Industrial premium. Dark, textured, restrained.
   ========================================================================= */

:root {
  /* surfaces — slightly bluer charcoal to match the cinematic reference */
  --bg-base: #0a0d14;
  --bg-elevated: #10141d;
  --bg-card: #141925;
  --bg-card-hover: #1a2030;

  /* lines */
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.13);

  /* chrome / silver */
  --chrome-1: #f4f4f6;
  --chrome-2: #cfcfd4;
  --chrome-3: #8c8c92;
  --chrome-4: #4a4a52;

  /* text */
  --text-primary: #e8eaee;
  --text-secondary: #a4aab6;
  --text-muted: #6a7080;

  /* accents — warm (sunburst) / cool (gear) duality */
  --warm-1: #ffd89a;
  --warm-2: #e8a455;
  --warm-3: #a76722;
  --warm-glow: rgba(232, 164, 85, 0.28);

  --cool-1: #c8e7fb;
  --cool-2: #6aa3cf;
  --cool-3: #345f87;
  --cool-glow: rgba(106, 163, 207, 0.26);

  /* sizing */
  --container: 1180px;
  --container-narrow: 880px;
  --radius: 14px;
  --radius-sm: 8px;

  /* type */
  --font-display: "Space Grotesk", "Inter", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --shadow-lift: 0 30px 60px -30px rgba(0, 0, 0, 0.8), 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* NOTE: do NOT set 'overflow-x' on <html>. It removes the document
   scrolling context, which breaks 'position: sticky' on the nav.
   Horizontal-overflow guards live on <body> below and on .hero's
   own overflow-x: clip. */

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
  position: relative;
}

/* The cinematic stage — continuous warm/cool atmospheric wash, fixed to viewport
   so it provides one uninterrupted backdrop across every section. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1400px 900px at 92% 8%, rgba(106, 163, 207, 0.14), transparent 60%),
    radial-gradient(1500px 1000px at 4% 96%, rgba(232, 164, 85, 0.12), transparent 60%),
    radial-gradient(900px 600px at 50% 50%, rgba(200, 215, 240, 0.035), transparent 70%),
    linear-gradient(180deg, #0d111a 0%, #07090f 100%);
}

/* Edge vignette to deepen the cinematic frame */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(130% 95% at 50% 50%, transparent 58%, rgba(0, 0, 0, 0.42) 100%);
}

/* Refined micro-grain — smooth painted surface, not cracked stone */
.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.6 0 0 0 0 0.6 0 0 0 0 0.6 0 0 0 0.35 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}

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

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

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ============================ Type system ============================== */

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 0.4em;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
}
h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}
h3 {
  font-size: 1.2rem;
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  margin: 0 0 1.2em;
}

.lede {
  font-size: 1.12rem;
  color: var(--text-secondary);
}

/* Chrome — luminous polished platinum (top-down highlight, no muddy middle) */
.chrome {
  background: linear-gradient(180deg, #ffffff 0%, #f0f3f8 50%, #c8d0dc 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  position: relative;
}

/* ============================ Layout =================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

.section {
  padding: 120px 0;
  position: relative;
}

@media (max-width: 720px) {
  .section {
    padding: 80px 0;
  }
}

.section__head {
  max-width: 760px;
  margin: 0 auto 64px;
  text-align: center;
}

.section__title {
  margin: 0 0 0.5em;
}

.section__sub {
  color: var(--text-secondary);
  font-size: 1.08rem;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 64px;
  align-items: start;
  margin-bottom: 56px;
}

.two-col__lead .eyebrow {
  margin-top: 6px;
}

@media (max-width: 860px) {
  .two-col {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}

/* ============================ Buttons ================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease;
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(180deg, #f4f4f6 0%, #cccfd6 50%, #8d9098 100%);
  color: #0c0c10;
  box-shadow:
    0 8px 24px -10px rgba(255, 255, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.6);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 28px -10px rgba(232, 164, 85, 0.35),
    0 14px 28px -10px rgba(106, 163, 207, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  border-color: var(--line-strong);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn--lg {
  padding: 18px 32px;
  font-size: 1.05rem;
}

/* ============================ Nav ====================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #000;
  border-bottom: 1px solid var(--line);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  /* iOS: pad below the status bar when Safari's URL bar collapses */
  padding-top: env(safe-area-inset-top);
}

.nav.scrolled {
  border-bottom-color: var(--line-strong);
  box-shadow: 0 12px 24px -16px rgba(0, 0, 0, 0.8);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 184px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  height: 100%;
}

.nav__logo {
  display: block;
  height: 160px;
  width: auto;
}

.footer__wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: var(--chrome-1);
}

.footer__wordmark span {
  color: var(--text-secondary);
  font-weight: 500;
  margin-left: 2px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__links a {
  font-size: 0.93rem;
  color: var(--text-secondary);
  transition: color 0.18s ease;
}

.nav__links a:hover {
  color: var(--text-primary);
}

.nav__links .btn {
  padding: 9px 18px;
  font-size: 0.88rem;
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-primary);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

@media (max-width: 860px) {
  .nav__links {
    position: absolute;
    top: 100%; /* immediately below the nav, safe-area-aware */
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 18px 28px 26px;
    gap: 14px;
    background: #000;
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 0.2s ease,
      transform 0.2s ease;
  }
  .nav__links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav__toggle {
    display: flex;
  }
  .nav__toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }
  .nav__toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  .nav__toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }
}

/* ============================ Hero ===================================== */

.hero {
  position: relative;
  padding: 80px 0 120px;
  /* Clip the atmospheric pools horizontally so they can't inflate
     the mobile viewport width, but allow them to bleed vertically
     below the hero so the warm/cool glow continues smoothly into
     the next section (no visible seam between sections).
     'clip' (not 'hidden') is required here — the spec forces the
     perpendicular axis to 'auto' when 'hidden' is used. */
  overflow-x: clip;
  overflow-y: visible;
}

@media (max-width: 720px) {
  .hero {
    padding: 60px 0 90px;
  }
  .nav__inner {
    height: 136px;
  }
  .nav__logo {
    height: 116px;
  }
}

.hero__bg {
  position: absolute;
  inset: -10% -15% -40% -15%;
  z-index: -1;
  pointer-events: none;
}

.hero__pool {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.85;
  pointer-events: none;
}

.hero__pool--warm {
  width: 75vw;
  height: 75vw;
  left: -18%;
  bottom: -45%;
  background: radial-gradient(closest-side, var(--warm-glow), transparent 72%);
}

.hero__pool--cool {
  width: 70vw;
  height: 70vw;
  right: -15%;
  top: -30%;
  background: radial-gradient(closest-side, var(--cool-glow), transparent 72%);
}

.hero__inner {
  text-align: center;
  max-width: 920px;
  position: relative;
}

.hero__title {
  font-size: clamp(2.4rem, 6.4vw, 4.6rem);
  letter-spacing: -0.03em;
  margin: 0 0 24px;
}

.hero__lede {
  max-width: 720px;
  margin: 0 auto 36px;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--text-secondary);
}

.hero__cta {
  display: inline-flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 72px;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 780px;
  margin: 0 auto;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

.hero__stats li {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat__num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  background: linear-gradient(180deg, #ffffff 0%, #e0e6ee 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.stat__num sup {
  font-size: 0.6em;
  margin-left: 2px;
  vertical-align: top;
}

.stat__label {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.hero__divider {
  display: none;
}

@media (max-width: 720px) {
  .hero__stats {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

/* ============================ Problem mirror =========================== */

.section--problem {
}

.problem {
  max-width: 880px;
}

.problem__head {
  text-align: center;
  margin-bottom: 48px;
}

.problem__list {
  display: grid;
  gap: 14px;
  margin: 0 auto;
  max-width: 760px;
}

.problem__list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 18px 22px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 1rem;
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    transform 0.25s ease;
}

.problem__list li:hover {
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
  transform: translateX(2px);
}

.problem__icon {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--chrome-2);
  letter-spacing: 0;
  line-height: 1.5;
}

.problem__close {
  margin: 40px auto 0;
  max-width: 640px;
  text-align: center;
  font-size: 1.08rem;
  color: var(--text-primary);
  font-style: italic;
}

/* ============================ Why us / promises ======================== */

.section--why {
}

.promises {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 980px;
  margin: 0 auto;
}

.promises li {
  background: var(--bg-elevated);
  padding: 36px 32px;
  transition: background 0.25s ease;
}

.promises li:hover {
  background: var(--bg-card-hover);
}

.promises h3 {
  font-size: 1.18rem;
  margin: 0 0 10px;
  color: var(--chrome-1);
}

.promises p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  margin: 0;
}

@media (max-width: 720px) {
  .promises {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ============================ FAQ ====================================== */

.section--faq {
}

.faq {
  max-width: 820px;
}

.faq__list {
  display: grid;
  gap: 10px;
}

.faq__item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition:
    border-color 0.25s ease,
    background 0.25s ease;
}

.faq__item[open] {
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  list-style: none;
  user-select: none;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  background: var(--chrome-2);
  left: 50%;
  top: 50%;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.faq__icon::before {
  width: 14px;
  height: 1.5px;
  transform: translate(-50%, -50%);
}

.faq__icon::after {
  width: 1.5px;
  height: 14px;
  transform: translate(-50%, -50%);
}

.faq__item[open] .faq__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.faq__item[open] .faq__icon::before {
  background: var(--warm-2);
  box-shadow: 0 0 8px var(--warm-glow);
}

.faq__body {
  padding: 0 22px 22px;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.65;
}

.faq__body p {
  margin: 0;
}

/* ============================ Cards / Practice ========================= */

.section--practice {
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

@media (max-width: 820px) {
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card {
  position: relative;
  padding: 36px 32px 34px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    420px 220px at var(--mx, 50%) var(--my, -10%),
    rgba(232, 164, 85, 0.08),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:nth-child(even)::before {
  background: radial-gradient(
    420px 220px at var(--mx, 50%) var(--my, -10%),
    rgba(106, 163, 207, 0.09),
    transparent 60%
  );
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-lift);
}

.card:nth-child(odd):hover {
  box-shadow:
    var(--shadow-lift),
    inset 0 1px 0 rgba(232, 164, 85, 0.1);
}

.card:nth-child(even):hover {
  box-shadow:
    var(--shadow-lift),
    inset 0 1px 0 rgba(106, 163, 207, 0.12);
}

.card:hover::before {
  opacity: 1;
}

.card__num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--chrome-3);
  margin-bottom: 18px;
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.card__title {
  font-size: 1.45rem;
  margin: 0 0 12px;
}

.card__body {
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.card__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.card__list li {
  font-size: 0.92rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.card__list li::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-top: 9px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--chrome-1), var(--chrome-3));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

/* ============================ Method / Steps =========================== */

.section--method {
}

.steps {
  display: grid;
  /* minmax(0, 1fr) prevents implicit min-content from making the
     grid wider than its container — see CSS Grid 'blowout' bug. */
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  max-width: 880px;
  margin: 0 auto;
  counter-reset: step;
}

.steps__item {
  position: relative;
  display: grid;
  /* Same minmax fix on the inner grid: the 1fr content column must
     be allowed to shrink so long text wraps instead of inflating
     the whole card past viewport width on mobile. */
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 24px;
  padding: 26px 28px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  align-items: start;
  transition:
    border-color 0.25s ease,
    background 0.25s ease;
}

.steps__item:hover {
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
}

.steps__num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.8rem;
  color: var(--chrome-1);
  letter-spacing: 0.04em;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background:
    radial-gradient(closest-side, rgba(232, 164, 85, 0.12), transparent 70%),
    rgba(255, 255, 255, 0.02);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(232, 164, 85, 0.08);
  transition:
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.steps__item:nth-child(even) .steps__num {
  background:
    radial-gradient(closest-side, rgba(106, 163, 207, 0.14), transparent 70%),
    rgba(255, 255, 255, 0.02);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(106, 163, 207, 0.1);
}

.steps__item:hover .steps__num {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 24px -4px rgba(232, 164, 85, 0.35);
}

.steps__item:nth-child(even):hover .steps__num {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 24px -4px rgba(106, 163, 207, 0.4);
}

.steps__title {
  font-size: 1.2rem;
  margin: 4px 0 6px;
}

.steps__meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
}

.steps__item p {
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 620px) {
  .steps__item {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 16px;
    padding: 20px 20px;
  }
  .steps__num {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }
}

/* ============================ About ==================================== */

.section--about {
}

.creds {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-top: 24px;
}

.creds li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}

/* ============================ Contact ================================== */

.section--contact {
  padding: 140px 0 130px;
}

.contact {
  text-align: center;
  max-width: 760px;
}

.contact__title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  margin: 0 0 22px;
}

.contact__lede {
  color: var(--text-secondary);
  font-size: 1.12rem;
  margin: 0 auto 36px;
  max-width: 580px;
}

.contact__fine {
  margin-top: 28px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ============================ Footer =================================== */

.footer {
  border-top: 1px solid var(--line-strong);
  background: #07070a;
  padding: 72px 0 28px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.1fr 2fr;
  gap: 56px;
  align-items: start;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}

.footer__brand .nav__wordmark {
  font-size: 1.2rem;
}

.footer__tag {
  color: var(--text-muted);
  margin: 10px 0 0;
  font-size: 0.92rem;
  max-width: 320px;
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer__cols h4 {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 16px;
  font-weight: 500;
}

.footer__cols a,
.footer__cols span {
  display: block;
  color: var(--text-secondary);
  font-size: 0.94rem;
  margin-bottom: 8px;
  transition: color 0.18s ease;
}

.footer__cols a:hover {
  color: var(--text-primary);
}

.footer__meta {
  color: var(--text-muted) !important;
}

.footer__base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer__mono {
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
}

@media (max-width: 820px) {
  .footer__inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .footer__cols {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer__base {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* ============================ Reveal animations ======================== */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ============================ Selection ================================ */

::selection {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* ============================ Blog ===================================== */

.blog {
  padding: 80px 0 40px;
  position: relative;
}

@media (max-width: 720px) {
  .blog {
    padding: 56px 0 32px;
  }
}

.blog__head {
  max-width: 820px;
  margin: 0 auto 56px;
  text-align: center;
}

.blog__head .eyebrow {
  margin: 0 0 14px;
}

.blog__title {
  font-size: clamp(2.4rem, 5.2vw, 3.8rem);
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}

.blog__lede {
  color: var(--text-secondary);
  font-size: clamp(1.05rem, 1.5vw, 1.18rem);
  max-width: 640px;
  margin: 0 auto;
}

.posts {
  display: grid;
  gap: 18px;
  max-width: 880px;
  margin: 0 auto;
}

.post-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 30px 34px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-lift);
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.post-card__meta .dot {
  color: var(--chrome-4);
}

.post-card__title {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  margin: 0 0 10px;
  color: var(--text-primary);
}

.post-card__dek {
  color: var(--text-secondary);
  margin: 0;
  font-size: 1rem;
}

.post-card__arrow {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--chrome-2);
  border: 1px solid var(--line-strong);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
  flex-shrink: 0;
}

.post-card:hover .post-card__arrow {
  transform: translateX(3px);
  background: rgba(232, 164, 85, 0.08);
  border-color: rgba(232, 164, 85, 0.45);
  color: var(--warm-1);
}

@media (max-width: 620px) {
  .post-card {
    grid-template-columns: minmax(0, 1fr);
    padding: 24px 22px;
    gap: 18px;
  }
  .post-card__arrow {
    justify-self: start;
  }
}

/* ============================ Article (single post) ==================== */

.article {
  padding: 80px 0 40px;
  position: relative;
}

@media (max-width: 720px) {
  .article {
    padding: 56px 0 32px;
  }
}

.article__inner {
  max-width: 760px;
  margin: 0 auto;
}

.article__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 36px;
  transition: color 0.18s ease;
}

.article__back:hover {
  color: var(--text-primary);
}

.article__head {
  margin-bottom: 44px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.article__title {
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 16px 0 22px;
}

.article__dek {
  font-size: clamp(1.1rem, 1.7vw, 1.25rem);
  color: var(--text-secondary);
  margin: 0 0 28px;
  line-height: 1.5;
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

.article__meta .dot {
  color: var(--chrome-4);
}

.article__body {
  font-size: 1.06rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.article__body > p {
  margin: 0 0 1.2em;
}

.article__body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.article__body em {
  color: var(--text-primary);
}

.article__body h2 {
  font-size: clamp(1.55rem, 2.6vw, 1.95rem);
  margin: 56px 0 18px;
  color: var(--text-primary);
}

.article__lede {
  font-size: clamp(1.14rem, 1.7vw, 1.28rem);
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 32px;
}

.article__lede::first-letter {
  font-family: var(--font-display);
  font-size: 3.6em;
  float: left;
  line-height: 0.88;
  padding: 6px 12px 0 0;
  font-weight: 700;
  background: linear-gradient(180deg, var(--warm-1) 0%, var(--warm-2) 60%, var(--warm-3) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Pyramid figure */
.pyramid {
  margin: 40px 0 52px;
  padding: 32px 28px 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pyramid__diagram {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.pyramid__svg {
  width: 100%;
  height: auto;
  max-width: 360px;
  display: block;
  margin: 0 auto;
}

.pyramid__legend {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pyramid__legend li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.pyramid__legend li:last-child {
  border-bottom: 0;
}

.pyramid__swatch {
  display: block;
  width: 28px;
  height: 6px;
  border-radius: 3px;
}

.pyramid__swatch--l1 {
  background: linear-gradient(90deg, #1c2a3d, #2a3e5c);
}
.pyramid__swatch--l2 {
  background: linear-gradient(90deg, #2e4a6b, #4a6e95);
}
.pyramid__swatch--l3 {
  background: linear-gradient(90deg, #6a7080, #8c8c92);
}
.pyramid__swatch--l4 {
  background: linear-gradient(90deg, #a76722, #c9893f);
}
.pyramid__swatch--l5 {
  background: linear-gradient(90deg, #e8a455, #ffd89a);
  box-shadow: 0 0 14px var(--warm-glow);
}

.pyramid__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
}

.pyramid__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--text-primary);
  letter-spacing: -0.005em;
}

.pyramid__hint {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.pyramid__legend li:first-child .pyramid__hint {
  color: var(--warm-1);
}

.pyramid__caption {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

@media (max-width: 620px) {
  .pyramid {
    padding: 26px 20px 22px;
  }
  .pyramid__diagram {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .pyramid__svg {
    max-width: 260px;
  }
  .pyramid__legend li {
    padding: 12px 0;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 14px;
  }
}

/* Level cards */
.level {
  position: relative;
  padding: 28px 30px 26px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warm-2);
  border-radius: var(--radius);
  margin: 22px 0;
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.level:hover {
  background: var(--bg-card-hover);
  border-color: var(--line-strong);
  border-left-color: var(--warm-1);
  box-shadow: var(--shadow-lift);
}

.level:nth-of-type(1) {
  border-left-color: var(--cool-3);
}
.level:nth-of-type(2) {
  border-left-color: var(--cool-2);
}
.level:nth-of-type(3) {
  border-left-color: var(--chrome-3);
}
.level:nth-of-type(4) {
  border-left-color: var(--warm-2);
}
.level:nth-of-type(5) {
  border-left-color: var(--warm-1);
}

.level__tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 6px;
}

.level__title {
  font-size: 1.32rem;
  margin: 0 0 14px;
  color: var(--text-primary);
}

.level__who {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--chrome-2);
  background: rgba(255, 255, 255, 0.04);
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  margin-bottom: 16px;
}

.level__body {
  margin: 0 0 18px;
  color: var(--text-secondary);
}

.level__skills {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding-top: 16px;
  border-top: 1px dashed var(--line-strong);
  margin: 0;
}

.level__skills strong {
  color: var(--chrome-1);
  font-weight: 600;
  margin-right: 6px;
}

/* Callout */
.article__callout {
  position: relative;
  margin: 44px 0;
  padding: 30px 32px;
  background:
    radial-gradient(closest-side at 0% 0%, rgba(232, 164, 85, 0.12), transparent 70%),
    radial-gradient(closest-side at 100% 100%, rgba(106, 163, 207, 0.1), transparent 70%),
    var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 1.05rem;
  line-height: 1.6;
}

.article__callout strong {
  color: var(--warm-1);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Takeaway / bottom line */
.takeaway {
  margin: 56px 0 32px;
  padding: 38px 36px;
  background: linear-gradient(180deg, #0d111a 0%, #07090f 100%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.takeaway::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 60%;
  height: 200%;
  background: radial-gradient(closest-side, var(--warm-glow), transparent 70%);
  pointer-events: none;
  opacity: 0.6;
}

.takeaway > * {
  position: relative;
}

.takeaway h2 {
  margin: 0 0 14px;
  color: var(--chrome-1);
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
}

.takeaway p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.04rem;
  line-height: 1.65;
}

.article__cta {
  margin-top: 28px;
}

/* Article footer (source attribution) */
.article__footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.article__footer a {
  color: var(--text-secondary);
  border-bottom: 1px dotted var(--text-muted);
  transition: color 0.18s ease;
}

.article__footer a:hover {
  color: var(--warm-1);
  border-bottom-color: var(--warm-2);
}
