/* ============================================================
   alanabas — editorial minimal design system
   Paper, ink, one clay accent. Serif display / grotesque body /
   mono metadata.
   ============================================================ */

/* ---------- 1. Reset ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; }

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

::selection {
  background: var(--accent);
  color: var(--paper);
}

/* ---------- 2. Tokens ---------- */

:root {
  /* paper + ink */
  --paper:      #FAF9F5;
  --paper-warm: #F4F2EB;
  --paper-deep: #EDEAE1;
  --ink:        #17160F;
  --ink-2:      #423F37;
  --ink-3:      #79746A;
  --ink-4:      #A7A197;
  --rule:       #E0DCD1;
  --rule-soft:  #EBE8DF;

  /* accent — clay */
  --accent:      #B0451F;
  --accent-deep: #8E3517;
  --accent-tint: rgba(176, 69, 31, 0.08);

  /* ink inverse block */
  --slab:      #17160F;
  --slab-ink:  #F4F2EB;
  --slab-ink-2: #A9A499;
  --slab-rule: rgba(244, 242, 235, 0.16);

  /* type */
  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --step-display: clamp(3rem, 8.6vw, 6.75rem);
  --step-title:   clamp(2.5rem, 6.4vw, 5rem);
  --step-h2:      clamp(1.85rem, 3.6vw, 3rem);
  --step-h3:      clamp(1.25rem, 1.9vw, 1.6rem);
  --step-lede:    clamp(1.1rem, 1.55vw, 1.375rem);
  --step-body:    1.0625rem;
  --step-small:   0.9375rem;
  --step-mono:    0.6875rem;

  /* space */
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --measure: 1240px;
  --section-y: clamp(4rem, 9vw, 8rem);

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.5s;
}

/* ---------- 3. Base ---------- */

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.62;
  letter-spacing: -0.008em;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: var(--step-title); }
h2 { font-size: var(--step-h2); }
h3 { font-size: var(--step-h3); line-height: 1.1; }

p { text-wrap: pretty; }

strong { font-weight: 600; }

/* ---------- 4. Layout primitives ---------- */

.shell {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Sections carry top padding only, so stacked sections don't double
   their gutters. The last one is closed off by main's bottom padding. */
.section { padding-top: var(--section-y); }

.section--tight { padding-top: clamp(3rem, 6vw, 5.5rem); }

main { padding-bottom: var(--section-y); }

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
}

/* Section header: mono index + serif heading, hairline above */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 5fr);
  gap: clamp(1rem, 4vw, 3rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head h2 { max-width: 20ch; }

.section-head .lede {
  margin-top: 1rem;
  max-width: 46ch;
  color: var(--ink-2);
}

@media (max-width: 720px) {
  .section-head { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* ---------- 5. Type utilities ---------- */

.mono {
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.4;
}

.mono--accent { color: var(--accent); }
.mono--ink { color: var(--ink); }

.lede {
  font-size: var(--step-lede);
  line-height: 1.5;
  letter-spacing: -0.014em;
  color: var(--ink-2);
}

.small {
  font-size: var(--step-small);
  color: var(--ink-3);
  line-height: 1.6;
}

.italic { font-style: italic; }

/* mono index numeral used across cards + rows */
.numeral {
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}

/* ---------- 6. Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-stuck { border-bottom-color: var(--rule); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 4.5rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.brand__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-2px);
  flex: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.6vw, 2.25rem);
}

.site-nav a {
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--ink-2);
  position: relative;
  padding-block: 0.35rem;
  transition: color 0.25s var(--ease);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { transform: scaleX(1); }

.site-nav a[aria-current="page"] {
  color: var(--ink);
}
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--accent);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 100px;
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}

.nav-cta:hover { background: var(--ink); color: var(--paper); }

/* mobile menu */
.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  border-radius: 100px;
}

.nav-toggle span {
  display: block;
  width: 15px;
  height: 1px;
  background: var(--ink);
  position: relative;
  transition: background 0.2s var(--ease);
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 15px;
  height: 1px;
  background: var(--ink);
  transition: transform 0.3s var(--ease);
}

.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }

body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: translateY(5px) rotate(45deg); }
body.nav-open .nav-toggle span::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 800px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    inset: 4.5rem 0 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 1rem var(--gutter) 2rem;
    transform: translateY(-105%);
    transition: transform 0.45s var(--ease);
    z-index: 55;
  }

  body.nav-open .site-nav { transform: translateY(0); }

  .site-nav a {
    width: 100%;
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--ink);
    padding-block: 0.7rem;
    border-bottom: 1px solid var(--rule-soft);
  }

  .site-nav a::after { display: none; }
  .nav-cta { border: 0; padding-inline: 0; font-size: 2rem; }
  .nav-cta:hover { background: none; color: var(--accent); }
}

/* ---------- 7. Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.5rem;
  border-radius: 100px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
              border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn:hover { transform: translateY(-2px); }

.btn--solid {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
}
.btn--solid:hover { background: var(--accent); border-color: var(--accent); }

.btn--ghost {
  border: 1px solid var(--rule);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--ink); }

.btn__arrow { transition: transform 0.3s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* text link with animated underline */
.link {
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 0.4s var(--ease), color 0.3s var(--ease);
  padding-bottom: 1px;
}

.link:hover {
  background-size: 100% 1px;
  color: var(--accent);
}

/* ---------- 8. Hero ---------- */

.hero {
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
}

.hero__status {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  position: relative;
  margin-top: 0.42em;
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0.35;
  animation: pulse 2.8s var(--ease) infinite;
}

@keyframes pulse {
  0%   { transform: scale(0.7); opacity: 0.5; }
  70%  { transform: scale(1.5); opacity: 0; }
  100% { transform: scale(1.5); opacity: 0; }
}

.hero__title {
  font-size: var(--step-display);
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.hero__title em {
  font-style: italic;
  color: var(--accent);
}

.hero__lede {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  max-width: 44ch;
  font-size: var(--step-lede);
  line-height: 1.5;
  color: var(--ink-2);
  letter-spacing: -0.014em;
}

.hero__actions { margin-top: clamp(1.75rem, 3vw, 2.5rem); }

/* portrait */
.portrait {
  position: relative;
}

.portrait__frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--paper-deep);
  border-radius: 2px;
}

.portrait__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.04);
  transition: filter 0.8s var(--ease), transform 1.2s var(--ease);
}

.portrait:hover .portrait__frame img {
  filter: grayscale(0%) contrast(1);
  transform: scale(1.02);
}

.portrait__caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.85rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--rule);
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; align-items: start; }
  .portrait { max-width: 340px; }
}

/* ---------- 9. Ticker (facts strip) ---------- */

.factbar {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.factbar__item {
  padding: clamp(1.25rem, 2.5vw, 2rem) clamp(1rem, 2vw, 1.75rem);
  border-right: 1px solid var(--rule);
  min-width: 0;
}

.factbar__item:last-child { border-right: 0; }
.factbar__item:first-child { padding-left: 0; }

.factbar__value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.05;
  margin-top: 0.5rem;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  hyphens: manual;
}

@media (max-width: 760px) {
  .factbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .factbar__item { border-bottom: 1px solid var(--rule); }
  .factbar__item:nth-child(2n) { border-right: 0; }
  .factbar__item:nth-child(odd) { padding-left: 0; }
  .factbar__item:nth-last-child(-n+2) { border-bottom: 0; }
}

/* ---------- 10. Feature case study ---------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.feature__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.75rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: 100px;
  padding: 0.4rem 0.8rem;
  white-space: nowrap;
}

.tag--accent {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
  background: var(--accent-tint);
}

/* stacked labelled blocks (problem / approach / outcome) */
.beats { display: grid; gap: 0; }

.beat {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: clamp(1.25rem, 2.2vw, 1.75rem);
  border-top: 1px solid var(--rule);
}

.beat:last-child { border-bottom: 1px solid var(--rule); }

.beat h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

.beat p { color: var(--ink-2); font-size: var(--step-small); }

@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
}

/* ---------- 11. Work index rows ---------- */

.rows { border-top: 1px solid var(--ink); }

.row-item {
  display: grid;
  grid-template-columns: 3rem minmax(0, 2.2fr) minmax(0, 2.6fr) minmax(0, 0.9fr) 1.5rem;
  gap: clamp(0.75rem, 2vw, 2rem);
  align-items: baseline;
  padding-block: clamp(1.5rem, 2.6vw, 2.1rem);
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  position: relative;
  transition: padding 0.4s var(--ease);
}

.row-item::before {
  content: "";
  position: absolute;
  left: calc(var(--gutter) * -1);
  right: calc(var(--gutter) * -1);
  top: 0;
  bottom: 0;
  background: var(--paper-warm);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  z-index: -1;
}

.row-item:hover::before { opacity: 1; }
.row-item:hover { padding-inline: 0.75rem; }

.row-item__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  transition: color 0.3s var(--ease);
}

.row-item:hover .row-item__title { color: var(--accent); }

.row-item__desc {
  color: var(--ink-3);
  font-size: var(--step-small);
  line-height: 1.55;
}

.row-item__tag {
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.row-item__arrow {
  color: var(--ink-4);
  transform: translateX(-6px);
  opacity: 0;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
  align-self: center;
}

.row-item:hover .row-item__arrow {
  transform: translateX(0);
  opacity: 1;
  color: var(--accent);
}

@media (max-width: 860px) {
  .row-item {
    grid-template-columns: 2.25rem minmax(0, 1fr);
    row-gap: 0.5rem;
    align-items: start;
  }
  .row-item__desc,
  .row-item__tag { grid-column: 2; }
  .row-item__arrow { display: none; }
  .row-item:hover { padding-inline: 0; }
}

/* ---------- 12. Cards ---------- */

.grid {
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.75rem);
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.card {
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease),
              background 0.35s var(--ease);
}

a.card { text-decoration: none; }

a.card:hover,
.card--hover:hover {
  border-color: var(--ink);
  transform: translateY(-3px);
}

.card h3 { margin-top: 0.25rem; }
.card p { color: var(--ink-2); font-size: var(--step-small); }

.card__foot {
  margin-top: auto;
  padding-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* numbered principle card — hairline rule on top, big mono numeral */
.principle {
  border-top: 1px solid var(--ink);
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.principle h3 {
  font-family: var(--font-display);
  font-size: var(--step-h3);
  max-width: 18ch;
}

.principle p { color: var(--ink-2); font-size: var(--step-small); }

/* ---------- 13. Dark slab ---------- */

.slab {
  background: var(--slab);
  color: var(--slab-ink);
  border-radius: 4px;
  padding: clamp(2rem, 5vw, 4rem);
}

.slab .mono { color: var(--slab-ink-2); }
.slab p { color: var(--slab-ink-2); }
.slab h2, .slab h3 { color: var(--slab-ink); }
.slab .rule { background: var(--slab-rule); }

.slab__quote {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 26ch;
  color: var(--slab-ink);
}

/* ---------- 14. Beyond strip (condensed personal) ---------- */

.beyond {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
}

.beyond__col {
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1rem, 2vw, 2rem);
  border-right: 1px solid var(--rule);
}

.beyond__col:last-child { border-right: 0; }
.beyond__col:first-child { padding-left: 0; }

.beyond__col h3 {
  font-size: 1.35rem;
  margin-block: 0.6rem 0.5rem;
}

.beyond__col p { color: var(--ink-3); font-size: var(--step-small); }

@media (max-width: 760px) {
  .beyond { grid-template-columns: 1fr; }
  .beyond__col {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    padding-inline: 0;
  }
  .beyond__col:last-child { border-bottom: 0; }
}

/* inline pill list */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  list-style: none;
  padding: 0;
}

.pills li {
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--rule);
  border-radius: 100px;
  padding: 0.35rem 0.75rem;
}

/* ---------- 15. Contact ---------- */

.contact { text-align: left; }

.contact__mail {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 7vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-decoration: none;
  word-break: break-word;
  transition: color 0.35s var(--ease);
}

.contact__mail:hover { color: var(--accent); }

.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

/* ---------- 16. Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 2.25rem 3rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-footer a {
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.site-footer a:hover { color: var(--accent); }

/* ---------- 17. Interior page headers ---------- */

.page-head {
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.page-head h1 {
  font-size: var(--step-title);
  letter-spacing: -0.03em;
  line-height: 0.95;
  max-width: 16ch;
  margin-top: 1.25rem;
}

.page-head h1 em { font-style: italic; color: var(--accent); }

.page-head .lede {
  margin-top: 1.5rem;
  max-width: 52ch;
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--ink-3);
  transition: color 0.25s var(--ease);
}

.crumb:hover { color: var(--accent); }

/* subnav — anchor jump list */
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-block: 1rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.subnav a {
  font-family: var(--font-mono);
  font-size: var(--step-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-3);
  transition: color 0.25s var(--ease);
}

.subnav a:hover { color: var(--accent); }

/* ---------- 18. Prose (docs, policy pages) ---------- */

.prose { max-width: 68ch; }

.prose h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin-top: 2.75rem;
  margin-bottom: 0.85rem;
}

.prose h3 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.prose p { margin-bottom: 1.1rem; color: var(--ink-2); }

.prose > *:first-child { margin-top: 0; }

.prose ul, .prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  color: var(--ink-2);
}

.prose li { margin-bottom: 0.5rem; }
.prose li::marker { color: var(--ink-4); }

.prose a { color: var(--accent); text-underline-offset: 3px; }

/* clean list with hairlines */
.list-rule { list-style: none; padding: 0; margin: 0; }

.list-rule li {
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink-2);
  font-size: var(--step-small);
}

.list-rule li:first-child { padding-top: 0; }
.list-rule li:last-child { border-bottom: 0; }

/* ---------- 19. App page bits ---------- */

.applogo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.applogo__mark {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 7px;
  background: var(--ink);
  position: relative;
  flex: none;
}

.applogo__mark::after {
  content: "";
  position: absolute;
  inset: 35%;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- 20. Motion ---------- */

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

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@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 { opacity: 1; transform: none; }
}

/* ---------- 21. Helpers ---------- */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.stack-sm > * + * { margin-top: 0.6rem; }
.stack   > * + * { margin-top: 1.1rem; }
.stack-lg > * + * { margin-top: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.75rem; }
.mt-2 { margin-top: 1.5rem; }
.mt-3 { margin-top: 2.25rem; }
.mt-4 { margin-top: 3rem; }

.muted { color: var(--ink-3); }
.accent { color: var(--accent); }
.max-46 { max-width: 46ch; }
.max-36 { max-width: 36ch; }
