/* M Sphinx — base v2. Reset, type system, 12-col grid, buttons, reveal states. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--ink-0);
  color: var(--cream);
  font: 400 var(--fs-body)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* Basalt grain: one faint layer, the only texture on dark */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--ink-0); }

/* Layout */
.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
@media (max-width: 767px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.section { padding-block: var(--section-y); position: relative; }
.is-day { background: var(--papyrus); color: var(--ink-text); }

/* Type. Display = Ed's DNA: caps, condensed slab, tight. */
.display, .h-hero {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  line-height: var(--lh-display); letter-spacing: -.01em;
}
.h-hero { font-size: var(--fs-hero); }
.display { font-size: var(--fs-h2); }
.display em, .h-hero em { font-style: normal; color: var(--gold); display: block; }
.is-day .display em { color: var(--gold-lo); }
.h3 { font: 700 var(--fs-h3)/1 var(--font-display); text-transform: uppercase; }
/* Ed's eyebrows become a magazine running head: lowercase-ish sentence case, no lines, no glyphs */
.runhead { font: 500 15px/1.4 var(--font-body); color: var(--mute); letter-spacing: 0; text-transform: none; }
.is-day .runhead { color: var(--ink-mute); }
.lead { font-size: var(--fs-lead); line-height: 1.55; max-width: 34ch; color: var(--cream); opacity: .86; }
.is-day .lead, .is-day p { color: var(--ink-mute); }
.body { max-width: 38ch; }
.small { font-size: var(--fs-small); }

/* Buttons: colour change only, never move. Sentence case, square. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: 0 1.6em;
  border: 1px solid var(--gold); border-radius: var(--radius);
  background: var(--gold); color: var(--ink-0);
  font: 500 16px/1 var(--font-body); text-decoration: none; white-space: nowrap;
  transition: background var(--dur-hover) var(--ease), color var(--dur-hover) var(--ease), border-color var(--dur-hover) var(--ease);
}
.btn--line { background: transparent; color: var(--cream); border-color: rgba(242, 234, 223, .4); }
.is-day .btn { background: var(--ink-text); border-color: var(--ink-text); color: var(--papyrus); }
.is-day .btn--line { background: transparent; color: var(--ink-text); border-color: rgba(29, 24, 20, .35); }
@media (hover: hover) {
  .btn:hover { background: var(--gold-hi); border-color: var(--gold-hi); }
  .btn--line:hover { background: var(--cream); color: var(--ink-0); border-color: var(--cream); }
  .is-day .btn:hover { background: var(--gold-lo); border-color: var(--gold-lo); }
  .is-day .btn--line:hover { background: var(--ink-text); color: var(--papyrus); }
}
.link { color: var(--gold); text-decoration: underline; text-underline-offset: .3em; text-decoration-thickness: 1px; transition: color var(--dur-hover); }
.is-day .link { color: var(--gold-lo); }
@media (hover: hover) { .link:hover { color: var(--cream); } .is-day .link:hover { color: var(--ink-text); } }

/* Temple arch frame for photos of people */
.arch { border-radius: var(--arch); overflow: hidden; }

/* Reveal states (driven by js/motion.js). Whole block only, never per letter. */
[data-reveal] { opacity: 0; transform: translateY(10px); }
[data-reveal].is-in { opacity: 1; transform: none; transition: opacity var(--dur) var(--ease-text), transform var(--dur) var(--ease-text); }
[data-img-reveal] { clip-path: inset(100% 0 0 0); }
[data-img-reveal] > img { transform: scale(1.06); }
[data-img-reveal].is-in { clip-path: inset(0 0 0 0); transition: clip-path var(--dur-img) var(--ease); }
[data-img-reveal].is-in > img { transform: none; transition: transform var(--dur-img) var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .3s !important; }
  [data-reveal], [data-img-reveal], [data-img-reveal] > img { opacity: 1; transform: none; clip-path: none; }
}
