/* ==========================================================================
   Rmoniz® — theme.css
   Design system: tokens, reset, and shared components (nav, footer, buttons,
   the measurement-scale device, section furniture).
   Direction: Clinical Editorial. Structure encodes measurement, because the
   brand's core instruments are the Rmoniz® Score and the Harmony Index™.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   Light palette is defined in full on bare :root. Dark redefines tokens only,
   guarded so an explicit light choice beats a dark OS.
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces — neutrals carry a slight plum bias so they read as chosen,
     not as the default warm-cream that every editorial template ships with. */
  --paper:        #FAF7F5;
  --paper-2:      #F2ECEF;
  --paper-3:      #E9E0E7;
  --ink:          #1E1622;
  --ink-2:        #4E4356;
  --ink-3:        #6F6479;   /* 4.77:1 on --paper-2, 5.22:1 on --paper */
  --rule:         #E4DAE3;
  --rule-strong:  #CFC0CE;

  /* Brand — plum and gold are the client's own trademarked palette.
     Gold is lightened from the live site's #A39B08, which measured 4.05:1
     on plum and failed WCAG AA. These values pass. */
  --plum:         #54245E;
  --plum-deep:    #35143D;
  --plum-soft:    #7A4A85;
  --gold:         #7E7714;           /* on cream */
  --gold-on-plum: #C9BE55;           /* on plum */
  --gold-wash:    #F5F1DC;

  /* Instrument — the measurement scale runs depleted → harmony */
  --scale-low:    #8E5C74;
  --scale-mid:    #7A4A85;
  --scale-high:   #C9BE55;

  /* Typography */
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --body:    "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--2: 0.735rem;
  --step--1: 0.857rem;
  --step-0:  1rem;
  --step-1:  1.18rem;
  --step-2:  1.45rem;
  --step-3:  clamp(1.7rem, 1.4rem + 1.3vw, 2.15rem);
  --step-4:  clamp(2.1rem, 1.6rem + 2.4vw, 3rem);
  --step-5:  clamp(2.3rem, 1.6rem + 3.2vw, 3.7rem);
  --step-6:  clamp(2.55rem, 1.7rem + 3.9vw, 4.6rem);

  /* Spatial rhythm — sections breathe heavily, bottom padding runs slightly
     larger than top so the optical centre sits true. */
  --gap-xs: .5rem;
  --gap-s:  1rem;
  --gap-m:  1.75rem;
  --gap-l:  3rem;
  --gap-xl: 5rem;
  --sec-top:    clamp(4.5rem, 3rem + 7vw, 8.5rem);
  --sec-bottom: clamp(5.5rem, 3.5rem + 8vw, 10rem);

  --measure: 66ch;
  --shell:   1240px;
  --shell-narrow: 780px;

  /* Shadows carry the plum hue rather than generic black */
  --lift-1: 0 1px 2px rgba(48, 24, 56, .05), 0 6px 18px -10px rgba(48, 24, 56, .16);
  --lift-2: 0 2px 4px rgba(48, 24, 56, .06), 0 22px 48px -24px rgba(48, 24, 56, .28);

  /* Motion — spring-ish curves, never linear or ease-in-out */
  --ease:      cubic-bezier(.32, .72, 0, 1);
  --ease-soft: cubic-bezier(.4, .14, .3, 1);

  /* Systemic z-index scale — no arbitrary values anywhere in the build */
  --z-base: 1;
  --z-sticky: 100;
  --z-nav: 200;
  --z-overlay: 300;
  --z-skip: 400;

  --logo-blend: multiply;
  --logo-filter: none;
  --focus-ring: var(--plum);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:        #171119;
    --paper-2:      #201823;
    --paper-3:      #2C2230;
    --ink:          #F1E9F3;
    --ink-2:        #C1B4C8;
    --ink-3:        #8E8298;
    --rule:         #342A39;
    --rule-strong:  #4B3D51;

    --plum:         #C9A2D6;
    --plum-deep:    #1F1524;
    --plum-soft:    #A87CB8;
    --gold:         #CFC55E;
    --gold-on-plum: #D8CE6B;
    --gold-wash:    #2A2718;

    --scale-low:    #B08195;
    --scale-mid:    #A87CB8;
    --scale-high:   #D8CE6B;

    --lift-1: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px -10px rgba(0, 0, 0, .6);
    --lift-2: 0 2px 4px rgba(0, 0, 0, .45), 0 22px 48px -24px rgba(0, 0, 0, .75);

    --logo-blend: normal;
    --logo-filter: invert(1) hue-rotate(180deg) saturate(1.35) brightness(1.1);
    --focus-ring: var(--gold);

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper:        #171119;
  --paper-2:      #201823;
  --paper-3:      #2C2230;
  --ink:          #F1E9F3;
  --ink-2:        #C1B4C8;
  --ink-3:        #8E8298;
  --rule:         #342A39;
  --rule-strong:  #4B3D51;

  --plum:         #C9A2D6;
  --plum-deep:    #1F1524;
  --plum-soft:    #A87CB8;
  --gold:         #CFC55E;
  --gold-on-plum: #D8CE6B;
  --gold-wash:    #2A2718;

  --scale-low:    #B08195;
  --scale-mid:    #A87CB8;
  --scale-high:   #D8CE6B;

  --lift-1: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px -10px rgba(0, 0, 0, .6);
  --lift-2: 0 2px 4px rgba(0, 0, 0, .45), 0 22px 48px -24px rgba(0, 0, 0, .75);

  --logo-blend: normal;
  --logo-filter: invert(1) hue-rotate(180deg) saturate(1.35) brightness(1.1);
  --focus-ring: var(--gold);

  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.014em;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: var(--step-6); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0; text-wrap: pretty; }

a { color: inherit; }

/* Every heading anchor clears the sticky masthead — the live site's
   in-page links land underneath it. */
[id] { scroll-margin-top: 6.5rem; }

/* Focus is always visible. The live site removed outlines from 13 of 14
   interactive elements; nothing here ships without a ring. */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--plum); color: var(--paper); }

.skip {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: var(--z-skip);
  background: var(--plum);
  color: #fff;
  padding: .85rem 1.5rem;
  border-radius: 0 0 6px 6px;
  font-size: var(--step--1);
  font-weight: 600;
  text-decoration: none;
  transition: transform .3s var(--ease);
}
.skip:focus { transform: translate(-50%, 0); }

.vh {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, .6rem + 2.4vw, 2.75rem);
}
.shell--narrow { max-width: var(--shell-narrow); }

section { padding-block: var(--sec-top) var(--sec-bottom); }
section.tight { padding-block: calc(var(--sec-top) * .6) calc(var(--sec-bottom) * .6); }

.stack        { display: grid; gap: var(--gap-m); }
.stack--s     { display: grid; gap: var(--gap-s); }
.stack--l     { display: grid; gap: var(--gap-l); }
.prose        { max-width: var(--measure); }
.prose p + p  { margin-top: 1.1em; }
.prose p      { color: var(--ink-2); font-size: var(--step-1); }

/* Deliberately asymmetric editorial split — heading left, body offset right.
   Not a centred column, and not three equal cards. */
.split {
  display: grid;
  gap: var(--gap-l);
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: start;
}
.split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 900px) {
  .split, .split--even { grid-template-columns: 1fr; gap: var(--gap-m); }
}

/* --------------------------------------------------------------------------
   4. Section furniture — eyebrow + rule
   The eyebrow is a plain letterspaced label with a hairline, not a pill badge.
   -------------------------------------------------------------------------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: .85rem;
  font-family: var(--mono);
  font-size: var(--step--2);
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--plum);
  margin: 0 0 var(--gap-m);
}
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.eyebrow--muted { color: var(--ink-3); }
.on-plum .eyebrow { color: var(--gold-on-plum); }
.on-plum .eyebrow::after { background: rgba(255, 255, 255, .18); }

.lede {
  font-size: var(--step-2);
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 54ch;
  font-weight: 400;
}

/* --------------------------------------------------------------------------
   5. The measurement scale — the system's signature device
   A labelled axis with ticks and a marker. Used for the Rmoniz® Score, the
   organisational statistic, and the three pillars. It exists because the
   brand's instruments measure position on a continuum; it is information,
   not decoration.
   -------------------------------------------------------------------------- */
.scale {
  --pos: 50%;
  display: grid;
  gap: .7rem;
  padding-block: .35rem;
}
.scale__track {
  position: relative;
  height: 2px;
  background: linear-gradient(90deg, var(--scale-low), var(--scale-mid) 52%, var(--scale-high));
  border-radius: 2px;
}
.scale__ticks {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.scale__ticks span {
  width: 1px;
  height: 9px;
  background: var(--rule-strong);
}
.on-plum .scale__ticks span { background: rgba(255, 255, 255, .3); }

.scale__marker {
  position: absolute;
  top: 50%;
  left: var(--pos);
  width: 13px;
  height: 13px;
  margin: -6.5px 0 0 -6.5px;
  border-radius: 50%;
  background: var(--paper);
  border: 2.5px solid var(--plum);
  box-shadow: var(--lift-1);
}
.on-plum .scale__marker { background: var(--plum-deep); border-color: var(--gold-on-plum); }

.scale__labels {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: var(--step--2);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.on-plum .scale__labels { color: rgba(255, 255, 255, .62); }

/* --------------------------------------------------------------------------
   6. Buttons
   Nested trailing-icon architecture on the primary action only, so the
   emphasis lands once per view rather than on every link.
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: var(--plum);
  --btn-fg: #FFFFFF;
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-height: 48px;                /* live site had 18px-tall targets */
  padding: .7rem .8rem .7rem 1.5rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .45s var(--ease), transform .45s var(--ease),
              box-shadow .45s var(--ease), color .45s var(--ease);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  flex-shrink: 0;
  transition: transform .45s var(--ease), background-color .45s var(--ease);
}
.btn__icon svg { width: 13px; height: 13px; }
.btn:hover { box-shadow: var(--lift-2); }
.btn:hover .btn__icon { transform: translate(3px, -1px) scale(1.06); background: rgba(255, 255, 255, .26); }
.btn:active { transform: scale(.985); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--rule-strong);
  padding-right: 1.5rem;
}
.btn--ghost:hover { border-color: var(--plum); color: var(--plum); box-shadow: none; }

.btn--gold { --btn-bg: var(--gold-on-plum); --btn-fg: #2A2405; }
.btn--gold .btn__icon { background: rgba(0, 0, 0, .14); }
.btn--gold:hover .btn__icon { background: rgba(0, 0, 0, .22); }

/* Tertiary: a text link with a rule, to cut down on button noise */
.tlink {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--plum);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
  transition: border-color .4s var(--ease), color .4s var(--ease), gap .4s var(--ease);
}
.tlink:hover { border-color: var(--plum); gap: .85rem; }
.on-plum .tlink { color: var(--gold-on-plum); border-color: rgba(255, 255, 255, .28); }
.on-plum .tlink:hover { border-color: var(--gold-on-plum); }

.actions { display: flex; flex-wrap: wrap; gap: .85rem 1.25rem; align-items: center; }

/* --------------------------------------------------------------------------
   7. Masthead
   -------------------------------------------------------------------------- */
.announce {
  background: var(--plum-deep);
  color: #F3ECF5;
  text-align: center;
  padding: .6rem 1rem;
  font-family: var(--mono);
  font-size: var(--step--2);
  letter-spacing: .19em;
  text-transform: uppercase;
}

.masthead {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  /* Opaque rather than translucent: the logo's blend mode needs a solid
     backdrop, and a solid bar keeps nav legible over the dark hero. */
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-m);
  min-height: 78px;
}
.brand { display: inline-flex; align-items: center; min-height: 48px; text-decoration: none; }
/* The supplied logo PNG carries a baked-in white plate. Multiply drops that
   plate into the cream ground; dark mode lightens the asset instead. Both are
   driven by tokens set in the theme blocks — never by a bare
   :root:not([data-theme="light"]) rule, which would match in light mode too. */
.brand img {
  width: 158px; height: 40px; object-fit: contain;
  mix-blend-mode: var(--logo-blend);
  filter: var(--logo-filter);
}

.nav { display: flex; align-items: center; gap: .35rem; }
.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 .85rem;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 4px;
  white-space: nowrap;
  transition: color .35s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: .85rem; right: .85rem; bottom: 12px;
  height: 1.5px;
  background: var(--plum);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--plum); font-weight: 600; }
.nav a[aria-current="page"]::after { transform: scaleX(1); }

.masthead .btn { padding-block: .55rem; min-height: 46px; }

/* Hamburger morphs into an X rather than swapping glyphs */
.burger {
  display: none;
  width: 48px; height: 48px;
  align-items: center; justify-content: center;
  background: none; border: 1px solid var(--rule);
  border-radius: 50%; cursor: pointer;
  touch-action: manipulation;
}
.burger span {
  display: block;
  position: relative;
  width: 17px; height: 1.5px;
  background: var(--ink);
  transition: background-color .3s var(--ease);
}
.burger span::before, .burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 17px; height: 1.5px;
  background: var(--ink);
  transition: transform .5s var(--ease);
}
.burger span::before { transform: translateY(-5.5px); }
.burger span::after  { transform: translateY(5.5px); }
.burger[aria-expanded="true"] span { background-color: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(0) rotate(45deg); }
.burger[aria-expanded="true"] span::after  { transform: translateY(0) rotate(-45deg); }

.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  display: grid;
  align-content: center;
  justify-items: start;
  gap: .35rem;
  padding: 2rem clamp(1.15rem, 6vw, 3rem);
  overscroll-behavior: contain;
}
.drawer[hidden] { display: none; }
.drawer a {
  font-family: var(--display);
  font-size: var(--step-4);
  color: var(--ink);
  text-decoration: none;
  padding: .18em 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  opacity: 1;
  transition: color .35s var(--ease);
}
.drawer a:hover { color: var(--plum); }
.drawer a[aria-current="page"] { color: var(--plum); }
.drawer .btn { margin-top: var(--gap-m); }

@media (max-width: 940px) {
  .nav, .masthead > .shell > .masthead__inner > .btn { display: none; }
  .burger { display: inline-flex; }
}

/* Staggered reveal for drawer links, motion-safe only */
@media (prefers-reduced-motion: no-preference) {
  .drawer[data-open="true"] a { animation: drawerIn .55s var(--ease) both; }
  .drawer[data-open="true"] a:nth-child(1) { animation-delay: .04s; }
  .drawer[data-open="true"] a:nth-child(2) { animation-delay: .08s; }
  .drawer[data-open="true"] a:nth-child(3) { animation-delay: .12s; }
  .drawer[data-open="true"] a:nth-child(4) { animation-delay: .16s; }
  .drawer[data-open="true"] a:nth-child(5) { animation-delay: .20s; }
  .drawer[data-open="true"] a:nth-child(6) { animation-delay: .24s; }
  @keyframes drawerIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
  }
}

/* --------------------------------------------------------------------------
   8. Instrument panel — the one place the nested "machined" treatment is used,
   because a diagnostic instrument is the one thing on this site that should
   read as a physical device.
   -------------------------------------------------------------------------- */
.instrument {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 22px;
  padding: 7px;
}
.instrument__core {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: clamp(1.5rem, 1rem + 2.4vw, 2.75rem);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}
:root[data-theme="dark"] .instrument__core,
:root:not([data-theme="light"]) .instrument__core {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.on-plum {
  background: var(--plum-deep);
  color: #F3ECF5;
}
.on-plum h2, .on-plum h3 { color: #FFFFFF; }
.on-plum .lede, .on-plum .prose p { color: rgba(243, 236, 245, .82); }
.on-plum .instrument { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); }
.on-plum .instrument__core { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }

/* --------------------------------------------------------------------------
   9. Statement figure — used sparingly, only where a number is the point
   -------------------------------------------------------------------------- */
.figure-stat {
  font-family: var(--display);
  font-size: var(--step-6);
  line-height: .9;
  font-variant-numeric: tabular-nums;
  color: var(--plum);
  letter-spacing: -.03em;
}
.on-plum .figure-stat { color: var(--gold-on-plum); }
.figure-source {
  font-family: var(--mono);
  font-size: var(--step--2);
  letter-spacing: .08em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.on-plum .figure-source { color: rgba(243, 236, 245, .55); }

/* --------------------------------------------------------------------------
   10. Marker list — replaces the site's ✔/✔️ emoji bullets
   -------------------------------------------------------------------------- */
.marks { list-style: none; margin: 0; padding: 0; display: grid; gap: .95rem; }
.marks li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--ink-2);
  max-width: 62ch;
}
.marks li::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: 11px; height: 1.5px;
  background: var(--gold);
}
.on-plum .marks li { color: rgba(243, 236, 245, .84); }
.on-plum .marks li::before { background: var(--gold-on-plum); }

/* Numbered sequence — only used where order genuinely carries meaning */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap-m); counter-reset: s; }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start; counter-increment: s; }
.steps li::before {
  content: counter(s, decimal-leading-zero);
  font-family: var(--mono);
  font-size: var(--step--2);
  letter-spacing: .1em;
  color: var(--plum);
  padding-top: .35em;
}
.on-plum .steps li::before { color: var(--gold-on-plum); }

/* --------------------------------------------------------------------------
   11. Quote
   -------------------------------------------------------------------------- */
blockquote.pull {
  margin: 0;
  border-left: 2px solid var(--gold);
  padding-left: clamp(1.1rem, .7rem + 1.6vw, 2rem);
  max-width: 62ch;
}
blockquote.pull p {
  font-family: var(--display);
  font-size: var(--step-3);
  line-height: 1.28;
  color: var(--ink);
  font-style: italic;
}
blockquote.pull cite {
  display: block;
  margin-top: 1.1rem;
  font-family: var(--mono);
  font-size: var(--step--2);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-style: normal;
}
.on-plum blockquote.pull { border-left-color: var(--gold-on-plum); }
.on-plum blockquote.pull p { color: #FFFFFF; }
.on-plum blockquote.pull cite { color: rgba(243, 236, 245, .6); }

.stars { color: var(--gold); letter-spacing: .22em; font-size: var(--step--1); }
.on-plum .stars { color: var(--gold-on-plum); }

/* --------------------------------------------------------------------------
   12. Footer
   Navigation lives in a <nav> with real links — the live site marked each of
   these as an <h5>, which put seven nav items into the heading outline.
   -------------------------------------------------------------------------- */
.footer {
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  padding-block: var(--gap-xl) var(--gap-l);
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gap-l);
}
@media (max-width: 780px) { .footer__grid { grid-template-columns: 1fr; } }

.footer h2 {
  font-size: var(--step-2);
  max-width: 22ch;
  margin-bottom: var(--gap-s);
}
.footer__label {
  font-family: var(--mono);
  font-size: var(--step--2);
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 var(--gap-s);
}
.footer nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: var(--step--1);
  transition: color .35s var(--ease);
}
.footer nav a:hover { color: var(--plum); }

.footer__base {
  margin-top: var(--gap-l);
  padding-top: var(--gap-m);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--gap-s);
  font-family: var(--mono);
  font-size: var(--step--2);
  color: var(--ink-3);
  letter-spacing: .04em;
}
.social { display: flex; gap: .4rem; }
.social a {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--ink-2);
  transition: color .35s var(--ease), border-color .35s var(--ease);
}
.social a:hover { color: var(--plum); border-color: var(--plum); }
.social svg { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   13. Scroll reveal
   Elements rest VISIBLE and animate from a visible state. Nothing is parked
   at opacity:0 waiting on an observer, so the page reads with JS disabled,
   in a thumbnail, and under reduced-motion.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: .001;
    transform: translateY(18px);
    transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
