:root {
    --fog: #FAF9F6;
    --paper: #FFFFFF;
    --harbour: #141414;
    --slate: #5C6068;
    --rule: #E7E4DD;
    --red: #6A2FD9;
    --teal: #2FD0BC;
    --sun: #F6CF3F;
    --coral: #F26B6B;
    --display: "Reddit Mono", "SFMono-Regular", Menlo, monospace;
    --body: "Reddit Mono", "SFMono-Regular", Menlo, monospace;
    --mono: "Reddit Mono", "SFMono-Regular", Menlo, monospace;
    --measure: 34rem;
  }
  * { box-sizing: border-box; }
  html { background: var(--fog); color: var(--harbour); }
  body {
    margin: 0;
    font-family: var(--body);
    font-size: 1rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
  }
  a { color: inherit; text-decoration: none; }
  a:focus-visible, button:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
  .wrap { max-width: 68rem; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }

  /* header */
  header {
    display: flex; justify-content: space-between; align-items: baseline;
    padding-top: 1.5rem;
    font-family: var(--mono); font-size: 0.8125rem; color: var(--slate);
  }
  header .domain { color: var(--harbour); font-weight: 500; }
  header .domain span { color: var(--red); }
  header time { font-variant-numeric: tabular-nums; }

  /* hero */
  .hero { padding: clamp(4rem, 12vh, 8rem) 0 clamp(3rem, 8vh, 5rem); }
  h1 {
    font-family: var(--display);
    font-weight: 800;
    font-variation-settings: "opsz" 96;
    font-size: clamp(2.6rem, 8.6vw, 6.75rem);
    line-height: 1.0;
    letter-spacing: -0.06em;
    margin: 0 0 1.75rem -0.04em;
    max-width: 12ch;
  }
  h1 .dot { color: var(--red); }
  .dek {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    line-height: 1.45;
    max-width: 66ch;
    margin: 0;
    font-weight: 400;
  }

  /* sections */
  section {
    display: grid;
    grid-template-columns: 11rem 1fr;
    gap: 1.5rem 2rem;
    padding: 2.5rem 0;
    border-top: 1px solid var(--rule);
  }
  section > h2 {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--slate);
    margin: 0.35rem 0 0;
  }
  section p { margin: 0 0 1rem; max-width: var(--measure); }
  section p:last-child { margin-bottom: 0; }

  /* ai */
  .ai { margin: 0; max-width: 44rem; }
  .ai > div { display: grid; grid-template-columns: 15rem 1fr; gap: 0.35rem 1.5rem; padding: 0.85rem 0; border-top: 1px solid var(--rule); }
  .ai > div:first-child { border-top: 0; padding-top: 0; }
  .ai dt { font-family: var(--display); font-weight: 500; font-variation-settings: "opsz" 12; font-size: 1.125rem; margin: 0; }
  .ai dd { margin: 0; color: var(--slate); }
  .ai-note { color: var(--slate); margin-top: 1.5rem; max-width: 44rem; }

  /* stack */
  .stack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.25rem 2rem; }
  .stack h3 {
    font-family: var(--display); font-weight: 500; font-variation-settings: "opsz" 12;
    font-size: 1.125rem; margin: 0 0 0.5rem;
  }
  .stack ul { list-style: none; margin: 0; padding: 0; color: var(--slate); font-size: 0.9375rem; }
  .stack li { padding: 0.15rem 0; }
  @media (max-width: 1000px) and (min-width: 721px) { .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

  /* links */
  .links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; }
  .links a { border-bottom: 1.5px solid var(--red); padding-bottom: 1px; font-weight: 500; }
  .links a:hover { color: var(--red); }

  /* route ledger: the signature */
  .route { position: relative; padding-left: 2.25rem; max-width: 40rem; }
  .route svg { position: absolute; left: 0.45rem; top: 0.6rem; height: calc(100% - 1.2rem); width: 2px; overflow: visible; }
  .route line { stroke: var(--rule); stroke-width: 2; }
  .hop { position: relative; padding: 0.65rem 0; display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; align-items: baseline; }
  .hop::before {
    content: ""; position: absolute; left: -2.25rem; top: 0.95rem;
    width: 12px; height: 12px; margin-left: 2px; border-radius: 50%;
    border: 2px solid var(--red);
  }
  .hop:nth-of-type(1)::before { border-color: var(--red); background: var(--red); }
  .hop:nth-of-type(2)::before { border-color: var(--teal); background: var(--teal); }
  .hop:nth-of-type(3)::before { border-color: var(--sun); background: var(--sun); }
  .hop:nth-of-type(4)::before { border-color: var(--coral); background: var(--coral); }
  .hop .k { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); }
  .hop .v { font-family: var(--mono); font-size: 0.875rem; }
  .hop .v em { font-style: normal; color: var(--slate); }
  .route-note { color: var(--slate); max-width: var(--measure); margin-top: 1.25rem; }

  footer {
    border-top: 1px solid var(--rule);
    padding: 2rem 0 3rem;
    font-family: var(--mono); font-size: 0.75rem; color: var(--slate);
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 2rem;
  }

  /* motion */
  @media (prefers-reduced-motion: no-preference) {
    .hero h1, .hero .dek { animation: rise 0.7s cubic-bezier(.2,.7,.2,1) both; }
    .hero .dek { animation-delay: 0.12s; }
    @keyframes rise { from { opacity: 0; transform: translateY(0.6rem); } to { opacity: 1; transform: none; } }
    .route line { stroke-dasharray: 1; stroke-dashoffset: 1; pathLength: 1; }
    .route.on line { animation: draw 1.4s cubic-bezier(.4,0,.2,1) forwards; }
    @keyframes draw { to { stroke-dashoffset: 0; } }
    .hop::before { transform: scale(0); transition: transform 0.35s cubic-bezier(.2,.7,.2,1); }
    .route.on .hop:nth-of-type(1)::before { transform: none; transition-delay: 0.05s; }
    .route.on .hop:nth-of-type(2)::before { transform: none; transition-delay: 0.45s; }
    .route.on .hop:nth-of-type(3)::before { transform: none; transition-delay: 0.85s; }
    .route.on .hop:nth-of-type(4)::before { transform: none; transition-delay: 1.25s; }
  }

  @media (max-width: 720px) {
    section { grid-template-columns: 1fr; gap: 0.75rem; padding: 2rem 0; }
    .stack { grid-template-columns: 1fr; gap: 1.25rem; }
    .hop { grid-template-columns: 1fr; gap: 0.1rem; }
    .ai > div { grid-template-columns: 1fr; gap: 0.2rem; }
    header { flex-direction: column; gap: 0.25rem; }
  }

/* nav */
.nav { display: flex; gap: 1.5rem; align-items: baseline; }
.navlink { color: var(--slate); }
.navlink:hover, .navlink[aria-current="page"] { color: var(--red); }

/* ---------- work index & case studies ---------- */
section.full { grid-template-columns: 1fr; gap: 1.25rem; }
.hero.work { padding-bottom: clamp(2rem, 5vh, 3.5rem); }
.hero.work h1, .hero.case h1 { font-size: clamp(2.4rem, 7vw, 5.5rem); }
.hero.work .dek, .hero.case .dek { max-width: 60ch; }
.eyebrow { font-size: 0.8125rem; color: var(--slate); margin: 0 0 1.25rem; letter-spacing: 0.04em; text-transform: uppercase; }
.eyebrow a { color: var(--red); }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.card {
  display: grid; grid-template-columns: 6rem 1fr; gap: 1.5rem;
  padding: 1.75rem; border-radius: 1rem; background: var(--paper);
  border: 1px solid var(--rule); color: inherit;
  transition: transform 0.25s cubic-bezier(.2,.7,.2,1), box-shadow 0.25s, border-color 0.25s;
}
.card:hover, .card:focus-visible { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(20,20,20,0.35); border-color: var(--tile); }
.tile {
  aspect-ratio: 1; border-radius: 0.75rem; display: grid; place-items: center;
  font-weight: 800; font-size: 1.75rem; letter-spacing: -0.06em; color: var(--harbour);
  background: var(--tile, var(--sun));
}
.t-purple { --tile: var(--red); }
.t-purple .tile, .tile.t-purple { color: #fff; }
.t-teal { --tile: var(--teal); }
.t-sun { --tile: var(--sun); }
.t-coral { --tile: var(--coral); }
.tile.t-purple { background: var(--red); } .tile.t-teal { background: var(--teal); } .tile.t-sun { background: var(--sun); } .tile.t-coral { background: var(--coral); }
.card h3 { margin: 0 0 0.35rem; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.03em; }
.card p { margin: 0 0 1.1rem; color: var(--slate); font-size: 0.9375rem; max-width: 46ch; }
.card .more { display: inline-block; margin-top: 1rem; font-size: 0.8125rem; color: var(--red); border-bottom: 1.5px solid var(--red); }
.card .more::after { content: " →"; }
.spec { display: grid; grid-template-columns: 4.5rem 1fr; gap: 0.2rem 0.75rem; font-size: 0.8125rem; margin: 0; }
.spec dt { color: var(--slate); text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.6875rem; padding-top: 0.15em; }
.spec dd { margin: 0; }
.award { display: inline-block; margin-top: 0.75rem; padding: 0.15rem 0.6rem; border-radius: 999px; background: var(--sun); font-size: 0.75rem; font-weight: 500; }

/* case study */
.case-head { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.25rem; }
.case-head .tile { width: 4.5rem; flex: none; }
.case-head h1 { margin: 0; }
.spec.strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin-top: 2rem; font-size: 0.875rem; }
.spec.strip > div { border-top: 2px solid var(--rule); padding-top: 0.6rem; }
.spec.strip dt { margin-bottom: 0.25rem; }
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 0; align-items: center; }
.flow li { padding: 0.4rem 0.75rem; border: 1.5px solid var(--harbour); border-radius: 999px; font-size: 0.8125rem; white-space: nowrap; }
.flow li + li::before { content: "→"; display: inline-block; margin: 0 0.6rem 0 -0.75rem; transform: translateX(-0.6rem); color: var(--red); }
.flow li + li { margin-left: 1.5rem; position: relative; }
.flow li + li::before { position: absolute; left: -1.35rem; top: 0.4rem; margin: 0; transform: none; }
.flow li:first-child { background: var(--sun); border-color: var(--sun); }
.flow li:last-child { background: var(--red); border-color: var(--red); color: #fff; }
.hard { margin: 0; padding-left: 1.2rem; max-width: var(--measure); }
.hard li { margin-bottom: 0.5rem; }
.hard li::marker { color: var(--red); }
.screens { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.5rem; }
.screens figure { margin: 0; }
.screens img { width: 100%; border-radius: 0.75rem; border: 1px solid var(--rule); background: var(--paper); }
.screens figcaption { font-size: 0.8125rem; color: var(--slate); margin-top: 0.5rem; }
.pager { display: flex; justify-content: space-between; gap: 2rem; padding: 2.5rem 0 1rem; border-top: 1px solid var(--rule); font-size: 0.875rem; }
.pager a { border-bottom: 1.5px solid var(--red); }
.pager a:hover { color: var(--red); }

@media (prefers-reduced-motion: no-preference) {
  .card { animation: rise 0.6s cubic-bezier(.2,.7,.2,1) both; }
  .card:nth-child(2) { animation-delay: 0.06s; }
  .card:nth-child(3) { animation-delay: 0.12s; }
  .card:nth-child(4) { animation-delay: 0.18s; }
}
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  section.full { grid-template-columns: 1fr; }
  .spec.strip { grid-template-columns: 1fr; gap: 0.9rem; }
  .case-head { align-items: flex-start; }
  .pager { flex-direction: column; gap: 0.75rem; }
}
@media (max-width: 480px) { .card { grid-template-columns: 1fr; } .card .tile { width: 4.5rem; } }

/* ---------- home v2 ---------- */
.bleed { background: var(--red); color: #fff; margin-top: 1.5rem; }
.hero-x { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: end; padding: clamp(3rem, 9vh, 6rem) 0 clamp(2.5rem, 7vh, 4.5rem); }
.hero-x h1 { font-size: clamp(2.8rem, 8.2vw, 6.5rem); line-height: 1; letter-spacing: -0.06em; margin: 0; color: #fff; max-width: none; }
.hero-x h1 .dot { color: var(--sun); }
.hero-x .dek { color: rgba(255,255,255,0.86); font-size: clamp(1rem, 1.5vw, 1.125rem); max-width: 40ch; margin: 0 0 1.5rem; }
.hero-links { display: flex; gap: 1rem; margin: 0; flex-wrap: wrap; }
.hero-links a { display: inline-block; padding: 0.6rem 1.1rem; border-radius: 999px; font-weight: 500; font-size: 0.9375rem; }
.hero-links a:first-child { background: var(--sun); color: var(--harbour); }
.hero-links a:last-child { border: 1.5px solid rgba(255,255,255,0.7); color: #fff; }
.hero-links a:hover { transform: translateY(-1px); }

.trace { background: var(--harbour); color: #fff; font-size: 0.8125rem; }
.trace .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; align-items: center; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.trace-label { color: rgba(255,255,255,0.6); }
.trace-hops { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }
.trace-hops li b { font-weight: 500; color: rgba(255,255,255,0.6); margin-right: 0.4rem; }
.trace-hops li span { color: var(--teal); font-variant-numeric: tabular-nums; }
.trace-hops li:nth-child(2) span { color: var(--sun); }
.trace-hops li:nth-child(3) span { color: var(--coral); }
.trace-hops li:nth-child(4) span { color: #fff; }
.trace-hops li:nth-child(5) span { color: rgba(255,255,255,0.8); }
.trace-path { margin-left: auto; color: rgba(255,255,255,0.6); }

.beliefs { padding-top: 3.5rem; }
.belief-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.belief-grid h3 { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.04em; margin: 0 0 0.5rem; }
.belief-grid h3::after { content: ""; display: block; width: 2.5rem; height: 3px; margin-top: 0.75rem; background: var(--teal); }
.belief-grid > div:nth-child(2) h3::after { background: var(--sun); }
.belief-grid > div:nth-child(3) h3::after { background: var(--coral); }
.belief-grid p { color: var(--slate); margin: 0; }

.featured { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.feat { display: flex; flex-direction: column; justify-content: space-between; min-height: 18rem; padding: 1.5rem; border-radius: 1rem; color: var(--harbour); background: var(--tile, var(--sun)); transition: transform 0.25s cubic-bezier(.2,.7,.2,1); }
.feat.t-purple { color: #fff; }
.feat:hover { transform: translateY(-4px); }
.feat .glyph { font-size: 3rem; font-weight: 800; letter-spacing: -0.06em; line-height: 1; }
.feat h3 { margin: 0 0 0.4rem; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.03em; }
.feat p { margin: 0 0 1rem; font-size: 0.875rem; opacity: 0.85; }
.feat .more { font-size: 0.8125rem; border-bottom: 1.5px solid currentColor; align-self: flex-start; }
.all-work { margin: 1.5rem 0 0; }
.all-work a { border-bottom: 1.5px solid var(--red); }

.mini { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; font-size: 0.6875rem; letter-spacing: 0.04em; text-transform: uppercase; }
.mini li { padding: 0.15rem 0.5rem; border: 1px solid var(--rule); border-radius: 999px; color: var(--slate); }
.mini li:last-child { border-color: var(--red); color: var(--red); }

.numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin: 1.75rem 0 0; max-width: 44rem; }
.numbers > div { border-top: 2px solid var(--rule); padding-top: 0.5rem; }
.numbers dd { margin: 0; font-size: 1.75rem; font-weight: 800; letter-spacing: -0.05em; }
.numbers dt { font-size: 0.75rem; color: var(--slate); }

.runin p { max-width: 48rem; margin: 0 0 0.6rem; color: var(--slate); }
.runin b { color: var(--harbour); font-weight: 700; margin-right: 0.4rem; }

@media (max-width: 900px) {
  .hero-x { grid-template-columns: 1fr; gap: 1.5rem; }
  .belief-grid, .featured { grid-template-columns: 1fr; }
  .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trace-path { margin-left: 0; }
}
