/* ============================================================
   sanjayajmera.com — Core stylesheet
   Visual system: "Mineral Editorial"
   Parchment ground · graphite ink · moss · clay
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Surfaces */
  --bg-primary:      #F3F0E8;
  --bg-secondary:    #E9E4D8;
  --bg-tertiary:     #DFD8C8;
  --bg-deep:         #191C18;
  --bg-deep-2:       #22261F;

  /* Ink */
  --text-primary:    #1C1F1A;
  --text-secondary:  #4E5348;
  --text-muted:      #6B6F63;
  --text-on-deep:    #EFECE3;
  --text-on-deep-2:  #A9AF9F;

  /* Accents */
  --accent-primary:   #3F5240;  /* moss */
  --accent-primary-2: #56684F;
  --accent-secondary: #9C5527;  /* clay */
  --accent-secondary-2:#B76B38;

  /* Lines */
  --border:        #CFC7B5;
  --border-strong: #B6AC96;
  --border-deep:   #343A31;

  /* Type */
  --font-display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --step--2: clamp(0.688rem, 0.66rem + 0.14vw, 0.75rem);
  --step--1: clamp(0.813rem, 0.78rem + 0.16vw, 0.875rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --step-1:  clamp(1.125rem, 1.06rem + 0.32vw, 1.313rem);
  --step-2:  clamp(1.375rem, 1.24rem + 0.66vw, 1.75rem);
  --step-3:  clamp(1.75rem, 1.48rem + 1.34vw, 2.5rem);
  --step-4:  clamp(2.25rem, 1.74rem + 2.55vw, 3.75rem);
  --step-5:  clamp(2.875rem, 1.86rem + 5.07vw, 5.75rem);
  --step-6:  clamp(3.25rem, 1.44rem + 9.05vw, 8.25rem);

  /* Space */
  --gutter: clamp(1.25rem, 0.9rem + 1.8vw, 3rem);
  --section-y: clamp(4rem, 2.6rem + 7vw, 9rem);
  --maxw: 1560px;
  --measure: 34rem;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.55s;

  --nav-h: 76px;
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1.5rem);
  overflow-x: clip;
}

body {
  margin: 0;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}

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

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

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

a { color: inherit; }

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

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

/* Focus */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 200;
  background: var(--bg-deep);
  color: var(--text-on-deep);
  padding: 0.75rem 1.25rem;
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus-visible { top: 0.75rem; }

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

/* ---------- 3. Authentication guard (see js/auth.js) ---------- */
/* The class below is added AND removed synchronously by the inline head
   script. It can never persist if scripting is unavailable, so content
   is never permanently hidden. */
.sa-gate body { visibility: hidden; }

/* ---------- 4. Layout primitives ---------- */
.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(2.75rem, 1.9rem + 4vw, 5.5rem); }

.section--deep {
  background-color: var(--bg-deep);
  color: var(--text-on-deep);
}
.section--deep h1, .section--deep h2, .section--deep h3 { color: var(--text-on-deep); }

.section--band { background-color: var(--bg-secondary); }

/* Blueprint texture — used sparingly on deep panels */
.grain {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    repeating-linear-gradient(to right, rgba(239,236,227,0.055) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(to bottom, rgba(239,236,227,0.04) 0 1px, transparent 1px 88px);
  -webkit-mask-image: radial-gradient(120% 90% at 78% 10%, #000 5%, transparent 72%);
  mask-image: radial-gradient(120% 90% at 78% 10%, #000 5%, transparent 72%);
}

/* Rules */
.rule {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0;
}
.rule--strong { border-top-color: var(--border-strong); }
.section--deep .rule { border-top-color: var(--border-deep); }

/* ---------- 5. Typographic utilities ---------- */
.eyebrow {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
}
.section--deep .eyebrow { color: var(--text-on-deep-2); }
.eyebrow .num {
  font-variant-numeric: tabular-nums;
  color: var(--accent-secondary);
  font-weight: 600;
}
.section--deep .eyebrow .num { color: var(--accent-secondary-2); }
.eyebrow::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--border);
  transform: translateY(-0.28em);
}
.section--deep .eyebrow::after { background: var(--border-deep); }

.display { font-size: var(--step-5); }
.h1 { font-size: var(--step-4); }
.h2 { font-size: var(--step-3); }
.h3 { font-size: var(--step-2); line-height: 1.2; }

.lede {
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 42rem;
}
.section--deep .lede { color: var(--text-on-deep-2); }

.prose { max-width: var(--measure); color: var(--text-secondary); }
.prose p + p { margin-top: 0; }
.section--deep .prose { color: var(--text-on-deep-2); }

.meta {
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
}
.section--deep .meta { color: var(--text-on-deep-2); }

.serif-accent { font-family: var(--font-display); font-style: italic; }

/* Link with drawn underline */
.link {
  position: relative;
  text-decoration: none;
  display: inline-block;
  padding-bottom: 2px;
}
.link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(1);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.link:hover::after { transform: scaleX(0); }

/* Arrow action */
.action {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--accent-primary);
  padding-block: 0.4rem;
}
.section--deep .action { color: var(--accent-secondary-2); }
.action .bar {
  width: 2.75rem;
  height: 1px;
  background: currentColor;
  transition: width 0.4s var(--ease);
}
.action:hover .bar { width: 4.25rem; }

/* ---------- 6. Header / sticky navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: color-mix(in srgb, var(--bg-primary) 86%, transparent);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: rgba(243, 240, 232, 0.94); }
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    backdrop-filter: saturate(140%) blur(14px);
  }
}
.site-header.is-scrolled { border-bottom-color: var(--border-strong); }

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--nav-h);
  transition: min-height 0.3s var(--ease);
}
.site-header.is-scrolled .nav-bar { min-height: 62px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--text-primary);
}
.brand__mark {
  width: 30px; height: 30px;
  flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--accent-primary);
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}
.brand:hover .brand__mark { background: var(--accent-primary); color: var(--bg-primary); }
.brand__name {
  font-family: var(--font-display);
  font-size: 1.06rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand__role {
  font-size: var(--step--2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
  padding-left: 0.8rem;
  margin-left: 0.15rem;
  white-space: nowrap;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 0.2rem + 1.5vw, 2.1rem);
}
.nav-list a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  text-decoration: none;
  font-size: var(--step--1);
  letter-spacing: 0.045em;
  color: var(--text-secondary);
  padding-block: 0.5rem;
  transition: color 0.28s var(--ease);
}
.nav-list a .idx {
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  transition: color 0.28s var(--ease);
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0.15rem;
  height: 1px; width: 100%;
  background: var(--accent-secondary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-list a:hover { color: var(--text-primary); }
.nav-list a:hover::after { transform: scaleX(1); }
.nav-list a[aria-current="page"] { color: var(--text-primary); }
.nav-list a[aria-current="page"]::after { transform: scaleX(1); background: var(--accent-primary); }
.nav-list a[aria-current="page"] .idx { color: var(--accent-secondary); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.7rem;
  font-size: var(--step--2);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-primary);
  padding: 0.6rem 0.1rem 0.6rem 0.6rem;
}
.nav-toggle__bars { display: block; width: 26px; }
.nav-toggle__bars i {
  display: block;
  height: 1px;
  background: currentColor;
  margin: 6px 0;
  transition: transform 0.35s var(--ease), opacity 0.2s var(--ease);
}

/* Mobile drawer */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: var(--bg-deep);
  color: var(--text-on-deep);
  display: flex;
  flex-direction: column;
  padding: 1.1rem var(--gutter) 2.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-1.25rem);
  transition: opacity 0.4s var(--ease), transform 0.45s var(--ease), visibility 0.4s;
}
.nav-drawer.is-open { opacity: 1; visibility: visible; transform: none; }
.nav-drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--nav-h);
  border-bottom: 1px solid var(--border-deep);
  margin-bottom: 2rem;
}
.nav-drawer__title {
  font-family: var(--font-display);
  font-size: 1.06rem;
  color: var(--text-on-deep);
}
.nav-drawer__close {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: var(--step--2);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-on-deep-2);
  padding: 0.6rem 0.1rem 0.6rem 0.6rem;
}
.nav-drawer__close span[aria-hidden] { font-size: 1.4rem; line-height: 1; }
.nav-drawer ol { display: flex; flex-direction: column; }
.nav-drawer li { border-bottom: 1px solid var(--border-deep); }
.nav-drawer li:first-child { border-top: 1px solid var(--border-deep); }
.nav-drawer a {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  padding: 1.05rem 0;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.15rem + 1.7vw, 2.1rem);
  color: var(--text-on-deep);
}
.nav-drawer a .idx {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--accent-secondary-2);
  font-variant-numeric: tabular-nums;
}
.nav-drawer a[aria-current="page"] { color: var(--accent-secondary-2); }
.nav-drawer__foot {
  margin-top: auto;
  padding-top: 2.5rem;
  font-size: var(--step--1);
  color: var(--text-on-deep-2);
}
.nav-drawer__foot a { color: var(--text-on-deep); text-decoration: none; border-bottom: 1px solid var(--border-deep); }

body.is-locked { overflow: hidden; }

/* ---------- 7. Image plates (full image, never cropped) ---------- */
.plate {
  position: relative;
  background: var(--bg-deep-2);
  border: 1px solid var(--border-strong);
  padding: clamp(0.5rem, 0.3rem + 0.8vw, 0.9rem);
}
.plate__frame {
  position: relative;
  aspect-ratio: 1 / 1;
  background:
    radial-gradient(120% 100% at 50% 0%, #2C312A 0%, #15180F 100%);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.plate__frame img {
  width: 100%;
  height: 100%;
  /* contain guarantees the complete photograph — and the full face — is
     always visible at every viewport width */
  object-fit: contain;
  object-position: center;
}
.plate__frame.is-error::after {
  content: attr(data-fallback);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 2rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: var(--step-1);
  color: var(--text-on-deep-2);
  background: var(--bg-deep-2);
}
.plate__caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.8rem;
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-on-deep-2);
}
.plate__caption span:last-child { color: var(--accent-secondary-2); }

.plate--light { background: var(--bg-secondary); border-color: var(--border); }
.plate--light .plate__caption { color: var(--text-muted); }
.plate--light .plate__caption span:last-child { color: var(--accent-secondary); }

/* Corner ticks — drafting detail */
.plate::before, .plate::after {
  content: "";
  position: absolute;
  width: 12px; height: 12px;
  border: 1px solid var(--accent-secondary);
  opacity: 0.65;
}
.plate::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.plate::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* ---------- 8. Home hero ---------- */
.hero { padding-block: clamp(3rem, 1.6rem + 6vw, 7rem) clamp(3rem, 2rem + 5vw, 6.5rem); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 0.88fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: end;
}
.hero__index {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: var(--step--2);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: clamp(2rem, 1.4rem + 2.5vw, 3.5rem);
}
.hero__index .dot { width: 5px; height: 5px; background: var(--accent-secondary); border-radius: 50%; }
.hero__index .spacer { flex: 1 1 auto; height: 1px; background: var(--border); }

.hero__name {
  font-size: var(--step-6);
  line-height: 0.9;
  letter-spacing: -0.035em;
  margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.5rem);
}
.hero__name .l2 { display: block; padding-left: clamp(0rem, -1rem + 8vw, 5.5rem); }
.hero__name .l2 em {
  font-style: normal;
  color: var(--accent-primary);
}
.hero__role {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: baseline;
  border-top: 1px solid var(--border-strong);
  padding-top: 1.25rem;
  margin-bottom: 2rem;
}
.hero__role dt {
  font-size: var(--step--2);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hero__role dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.25;
}
.hero__statement { max-width: 33rem; color: var(--text-secondary); }

.hero__aside { display: flex; flex-direction: column; gap: 1.5rem; }
.hero__facts { border-top: 1px solid var(--border-strong); }
.hero__facts div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--step--1);
}
.hero__facts dt { color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; font-size: var(--step--2); }
.hero__facts dd { margin: 0; text-align: right; color: var(--text-primary); }

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: clamp(2rem, 1.4rem + 2vw, 3.25rem);
  font-size: var(--step--2);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
}
.scroll-cue i {
  display: block;
  width: 1px;
  height: 34px;
  background: linear-gradient(to bottom, var(--border-strong), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-cue i::after {
  content: "";
  position: absolute;
  left: 0; top: -100%;
  width: 1px; height: 100%;
  background: var(--accent-secondary);
  animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue { 0% { top: -100%; } 60%, 100% { top: 100%; } }

/* ---------- 9. Split / editorial blocks ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 0.66fr);
  gap: clamp(1.75rem, 0.9rem + 3.5vw, 4.5rem);
  align-items: start;
}
.split--reverse { grid-template-columns: minmax(0, 0.66fr) minmax(0, 0.34fr); }
.split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.stack { display: grid; gap: clamp(1.5rem, 1rem + 1.6vw, 2.5rem); }
.stack--sm { gap: 1rem; }

/* Numbered editorial entries */
.entries { border-top: 1px solid var(--border-strong); }
.entry {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1rem, 0.4rem + 2vw, 3rem);
  padding: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem) 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.entry__num {
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  color: var(--accent-secondary);
  font-variant-numeric: tabular-nums;
  padding-top: 0.55rem;
}
.entry__title { font-size: var(--step-2); }
.entry__body { color: var(--text-secondary); }
.section--deep .entry { border-bottom-color: var(--border-deep); }
.section--deep .entries { border-top-color: var(--border-deep); }
.section--deep .entry__body { color: var(--text-on-deep-2); }
.section--deep .entry__num { color: var(--accent-secondary-2); }

/* Statement / pull quote */
.statement {
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1.24;
  letter-spacing: -0.015em;
  max-width: 24ch;
}
.quote { max-width: 46rem; }
.quote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--step-2);
  line-height: 1.36;
  color: var(--text-primary);
}
.section--deep .quote blockquote { color: var(--text-on-deep); }
.quote blockquote::before { content: "\201C"; color: var(--accent-secondary); }
.quote blockquote::after { content: "\201D"; color: var(--accent-secondary); }
.quote figcaption {
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: var(--step--2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.section--deep .quote figcaption { border-top-color: var(--border-deep); color: var(--text-on-deep-2); }

/* Definition table */
.facts { border-top: 1px solid var(--border-strong); }
.facts > div {
  display: grid;
  grid-template-columns: minmax(0, 0.4fr) minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.facts dt {
  font-size: var(--step--2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 0.2rem;
}
.facts dd { margin: 0; color: var(--text-primary); }
.section--deep .facts { border-top-color: var(--border-deep); }
.section--deep .facts > div { border-bottom-color: var(--border-deep); }
.section--deep .facts dd { color: var(--text-on-deep); }

/* Marker list */
.marks { display: grid; gap: 0.9rem; }
.marks li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: baseline;
  color: var(--text-secondary);
}
.marks li::before {
  content: "";
  width: 1.4rem;
  height: 1px;
  background: var(--accent-secondary);
  transform: translateY(-0.35em);
}
.section--deep .marks li { color: var(--text-on-deep-2); }

/* ---------- 10. Journey timeline ---------- */
.timeline { position: relative; border-top: 1px solid var(--border-strong); }
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.22fr) minmax(0, 0.78fr);
  gap: clamp(1.25rem, 0.5rem + 3vw, 4rem);
  padding: clamp(2rem, 1.4rem + 2.2vw, 3.25rem) 0;
  border-bottom: 1px solid var(--border);
}
.tl-item__year {
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1;
  color: var(--accent-primary);
  font-variant-numeric: lining-nums;
  position: relative;
}
.tl-item__year small {
  display: block;
  margin-top: 0.7rem;
  font-family: var(--font-sans);
  font-size: var(--step--2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.tl-item__body { max-width: 44rem; }
.tl-item__title { font-size: var(--step-2); margin-bottom: 0.7rem; }
.tl-item__text { color: var(--text-secondary); }
.tl-item--role { background: linear-gradient(to right, var(--bg-secondary), transparent 78%); }
.tl-item--role .tl-item__year { color: var(--accent-secondary); }
.tl-strand {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: var(--step--2);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  padding: 0.28rem 0.65rem;
}
.tl-item--role .tl-strand { color: var(--accent-secondary); border-color: var(--accent-secondary); }

/* ---------- 11. Perspective principles ---------- */
.principle {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: clamp(1.5rem, 0.8rem + 3vw, 4rem);
  padding: clamp(2.25rem, 1.5rem + 2.5vw, 3.75rem) 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.principle:first-of-type { border-top: 1px solid var(--border-strong); }
.principle__head { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.principle__num {
  display: block;
  font-size: var(--step--2);
  letter-spacing: 0.2em;
  color: var(--accent-secondary);
  margin-bottom: 1rem;
}
.principle__title { font-size: var(--step-3); }
.principle__body { color: var(--text-secondary); }
.principle__body p + p { margin-top: 1.15em; }

/* ---------- 12. Impact ---------- */
/* Explicit column counts so a partly filled last row never leaves a
   visible empty block. Rules are drawn per cell, not by a background gap. */
.figure-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--bg-deep);
  border-top: 1px solid var(--border-deep);
  border-left: 1px solid var(--border-deep);
}
.figure-cell {
  background: var(--bg-deep);
  border-right: 1px solid var(--border-deep);
  border-bottom: 1px solid var(--border-deep);
  padding: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
}
.figure-cell__value {
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1.05;
  color: var(--text-on-deep);
  margin-bottom: 0.6rem;
  font-variant-numeric: lining-nums;
}
.figure-cell__label {
  font-size: var(--step--1);
  color: var(--text-on-deep-2);
  line-height: 1.5;
}
.figure-note {
  margin-top: 1.5rem;
  font-size: var(--step--1);
  color: var(--text-on-deep-2);
  letter-spacing: 0.04em;
  max-width: 60rem;
}

.domain {
  display: grid;
  grid-template-columns: minmax(0, 0.36fr) minmax(0, 0.64fr);
  gap: clamp(1.25rem, 0.6rem + 2.5vw, 3.5rem);
  padding: clamp(1.75rem, 1.2rem + 2vw, 2.75rem) 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.domain:first-of-type { border-top: 1px solid var(--border-strong); }
.domain__label {
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
}
.domain__label .n { font-size: var(--step--2); color: var(--accent-secondary); letter-spacing: 0.14em; }
.domain__label h3 { font-size: var(--step-2); }
.domain__text { color: var(--text-secondary); }

/* ---------- 13. Media / press page ---------- */
.kit {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: transparent;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.kit__cell {
  background: var(--bg-primary);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: clamp(1.5rem, 1.1rem + 1.5vw, 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.kit__cell h3 { font-size: var(--step-1); }
.kit__cell p { color: var(--text-secondary); font-size: var(--step--1); line-height: 1.6; }
.kit__cell .meta { margin-top: auto; padding-top: 0.5rem; }

.boiler {
  background: var(--bg-secondary);
  border-left: 2px solid var(--accent-primary);
  padding: clamp(1.5rem, 1.1rem + 1.5vw, 2.5rem);
}
.boiler p { color: var(--text-secondary); }
.boiler p:first-of-type { color: var(--text-primary); }

/* ---------- 14. Contact ---------- */
.contact-lines { border-top: 1px solid var(--border-strong); }
.contact-line {
  display: grid;
  grid-template-columns: minmax(0, 0.3fr) minmax(0, 1fr);
  gap: clamp(1rem, 0.4rem + 2vw, 3rem);
  align-items: center;
  padding: clamp(1.5rem, 1.1rem + 1.5vw, 2.25rem) 0;
  border-bottom: 1px solid var(--border);
}
.contact-line dt {
  font-size: var(--step--2);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.contact-line dd { margin: 0; }
.contact-line a,
.contact-line strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-2);
  line-height: 1.2;
  text-decoration: none;
  color: var(--text-primary);
  display: inline-block;
  word-break: break-word;
}
.contact-line a { border-bottom: 1px solid var(--border-strong); padding-bottom: 0.15rem; transition: color 0.3s var(--ease), border-color 0.3s var(--ease); }
.contact-line a:hover { color: var(--accent-secondary); border-bottom-color: var(--accent-secondary); }

.cta-panel {
  position: relative;
  background: var(--bg-deep);
  color: var(--text-on-deep);
  padding: clamp(2.25rem, 1.5rem + 3vw, 4.5rem);
  overflow: hidden;
}
.cta-panel__inner { position: relative; z-index: 1; }
.cta-panel h2 { color: var(--text-on-deep); }

/* ---------- 15. Footer ---------- */
.site-footer {
  background: var(--bg-deep);
  color: var(--text-on-deep-2);
  padding-block: clamp(3rem, 2.2rem + 3vw, 5rem) 2rem;
  position: relative;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr) minmax(0, 0.85fr);
  gap: clamp(1.75rem, 1rem + 3vw, 4rem);
  padding-bottom: clamp(2.25rem, 1.6rem + 2.5vw, 3.5rem);
  border-bottom: 1px solid var(--border-deep);
}
.footer-brand__name {
  font-family: var(--font-display);
  font-size: var(--step-3);
  color: var(--text-on-deep);
  line-height: 1.05;
  margin-bottom: 0.9rem;
}
.footer-brand p { max-width: 26rem; font-size: var(--step--1); }
.footer-col h2 {
  font-family: var(--font-sans);
  font-size: var(--step--2);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-on-deep-2);
  margin-bottom: 1.25rem;
}
.footer-contact { display: grid; gap: 0.7rem; }
.footer-contact div { display: grid; gap: 0.15rem; }
.footer-contact dt { font-size: var(--step--2); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-on-deep-2); opacity: 0.75; }
.footer-contact dd { margin: 0; }
.footer-contact a, .footer-contact strong {
  color: var(--text-on-deep);
  font-weight: 400;
  text-decoration: none;
  font-size: var(--step-0);
}
.footer-contact a { border-bottom: 1px solid var(--border-deep); transition: border-color 0.3s var(--ease), color 0.3s var(--ease); }
.footer-contact a:hover { color: var(--accent-secondary-2); border-bottom-color: var(--accent-secondary-2); }

.footer-nav { display: grid; gap: 0.55rem; }
.footer-nav a {
  text-decoration: none;
  color: var(--text-on-deep-2);
  font-size: var(--step--1);
  transition: color 0.28s var(--ease), padding-left 0.28s var(--ease);
}
.footer-nav a:hover { color: var(--text-on-deep); padding-left: 0.4rem; }

.socials { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.6rem; }
.social {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-deep);
  color: var(--text-on-deep-2);
  text-decoration: none;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.social svg { width: 17px; height: 17px; fill: currentColor; }
.social:hover { color: var(--bg-deep); background: var(--text-on-deep); border-color: var(--text-on-deep); }
.social[aria-disabled="true"] { opacity: 0.42; cursor: default; }
.social[aria-disabled="true"]:hover { color: var(--text-on-deep-2); background: none; border-color: var(--border-deep); }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.75rem;
  font-size: var(--step--2);
  letter-spacing: 0.04em;
}
.footer-base a { color: var(--text-on-deep); text-decoration: none; border-bottom: 1px solid var(--border-deep); }
.footer-base a:hover { border-bottom-color: var(--accent-secondary-2); color: var(--accent-secondary-2); }

/* ---------- 16. Page masthead (interior pages) ---------- */
.masthead {
  padding-block: clamp(2.5rem, 1.8rem + 3.5vw, 5rem) clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
  border-bottom: 1px solid var(--border-strong);
}
.masthead__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.75rem);
}
.crumbs {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: var(--step--2);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.crumbs a { text-decoration: none; color: var(--text-muted); border-bottom: 1px solid transparent; }
.crumbs a:hover { color: var(--text-primary); border-bottom-color: var(--accent-secondary); }
.masthead__title { font-size: var(--step-5); line-height: 0.94; letter-spacing: -0.03em; }
.masthead__title em { font-style: normal; color: var(--accent-primary); }
.masthead__lede { margin-top: clamp(1.25rem, 0.9rem + 1.4vw, 2rem); max-width: 44rem; }

/* Page-turn navigation */
.pageturn {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.pageturn a {
  background: var(--bg-primary);
  padding: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem) clamp(1rem, 0.7rem + 1.2vw, 2rem);
  text-decoration: none;
  display: grid;
  gap: 0.5rem;
  transition: background 0.35s var(--ease);
}
.pageturn a:hover { background: var(--bg-secondary); }
.pageturn a:last-child { text-align: right; }
.pageturn .meta { color: var(--text-muted); }
.pageturn strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-2);
  line-height: 1.15;
}

/* ---------- 17. Reveal animation (progressive enhancement) ---------- */
/* Elements are visible by default. The initial hidden state is applied ONLY
   when js/main.js has confirmed IntersectionObserver support, so a script
   failure can never leave content invisible. */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.js-reveal [data-reveal].is-visible { opacity: 1; transform: none; }

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

/* ---------- 18. Print ---------- */
@media print {
  .site-header, .nav-drawer, .scroll-cue, .pageturn { display: none !important; }
  body { background: #fff; color: #000; }
  .section--deep, .site-footer, .cta-panel { background: #fff !important; color: #000 !important; }
}

/* ---------- 19. Legacy fallbacks ---------- */
/* Safari 14 and older have no aspect-ratio: keep the portrait plate square
   with the padding technique so the image is never letter-boxed oddly. */
@supports not (aspect-ratio: 1 / 1) {
  .plate__frame { height: 0; padding-bottom: 100%; }
  .plate__frame img { position: absolute; inset: 0; }
}

/* overflow: clip is newer than overflow: hidden; fall back where needed. */
@supports not (overflow: clip) {
  html, body { overflow-x: hidden; }
}
