/* The manifesto at /ai-manifesto/. A page apart from the rest of the site: light
   where the site is dark, and sharing nothing with styles.css. The tokens and
   base components below are the parts of the designer's Classical system this
   page uses, with the manifesto's own palette and type on top. */

/* ── Tokens ──────────────────────────────────────────────────────────────── */

:root {
  --font-heading: "Cormorant Garamond", Georgia, serif;
  --font-heading-weight: 400;
  --font-body: "Jost", system-ui, sans-serif;

  --space-1: 4.6px;
  --space-2: 9.2px;
  --space-3: 13.8px;
  --space-4: 18.4px;
  --space-6: 27.6px;
  --space-8: 36.8px;

  /* Palette: Pebble #444444 · Olive #716D64 · Fern #9B997B · Dusk #D1B9B4 · Ivory #FAF8F6 · Oat #DFD1C9 */
  --pebble: #444444;
  --olive: #716d64;
  --fern: #9b997b;
  --ivory: #faf8f6;
  --line: color-mix(in srgb, var(--olive) 28%, var(--ivory));
  --mist: color-mix(in srgb, var(--olive) 4%, var(--ivory));
}

/* ── Base ────────────────────────────────────────────────────────────────── */

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

/* The page scrolls inside .scroller, which is what carries the snap. */
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ivory); }

body {
  color: var(--pebble);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}

h1, h2 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  letter-spacing: 0.01em;
  margin: 0;
}
h2 { color: var(--fern); font-size: clamp(32px, 4.5vw, 44px); line-height: 1.1; }

p, li { font-weight: 300; }
a { color: var(--olive); text-underline-offset: 3px; }
a:hover { color: var(--olive); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--fern); outline-offset: 2px; }
::selection { background: var(--line); }

/* Visible only to screen readers, until focused. */
.skip-link {
  position: fixed; left: var(--space-4); top: -100px; z-index: 2;
  padding: var(--space-2) var(--space-4); background: var(--pebble); color: var(--ivory);
}
.skip-link:focus { top: var(--space-4); color: var(--ivory); }

/* ── Layout ──────────────────────────────────────────────────────────────── */

.scroller {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}

.slide {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100dvh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px var(--space-6);
}
.slide:nth-of-type(even) { background: var(--mist); }
.slide-cover { flex-direction: column; }

.slide-body {
  max-width: 42rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.begin {
  position: absolute;
  bottom: var(--space-8);
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--olive);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}
.begin-line { width: 1px; height: 32px; background: currentColor; }

/* ── Copy ────────────────────────────────────────────────────────────────── */

.slide li, .slide p:not([style*="font-heading"]) {
  font-family: "Nunito", system-ui, sans-serif !important;
  font-weight: 300 !important;
  font-style: normal !important;
  letter-spacing: 0.01em !important;
  color: var(--olive) !important;
  font-size: 16px !important;
  line-height: 1.8 !important;
  hyphens: none !important;
}
.slide.slide-cover p:not([style*="font-heading"]) {
  font-family: var(--font-body) !important;
  font-weight: 400 !important;
  text-transform: uppercase;
  letter-spacing: 0.14em !important;
  color: var(--olive) !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
}

.pts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); counter-reset: pt; }
.pts > li.pt { display: flex; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); counter-increment: pt; }
.pts > li.pt::before {
  content: counter(pt, decimal-leading-zero);
  flex: none;
  width: 36px;
  font-family: "Jost", sans-serif;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.14em;
  line-height: 1.5;
  color: var(--fern);
  padding-top: 7px;
}
.pt-b { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pt-l { font-family: var(--font-heading); font-weight: 400; font-size: 22px; line-height: 1.35; color: var(--pebble); text-wrap: pretty; }
.pt-d { font-size: 15px; line-height: 1.75; color: var(--olive); text-wrap: pretty; }

/* The footer sits in the last slide, full width against its bottom edge, so
   the slide drops its bottom padding and centres the content above it. On a
   short screen the slide outgrows the viewport, so the footer keeps its own
   snap point or the mandatory snap pulls the reader back before it is seen.
   Visible overflow is what ties that snap point to the scroller, not the slide. */
.slide-closing { overflow: visible; flex-direction: column; padding-top: 64px; padding-bottom: 0; }
.slide-closing > div { margin-block: auto; }
.credits {
  scroll-snap-align: end;
  align-self: stretch;
  margin: 32px calc(-1 * var(--space-6)) 0;
  background: var(--olive);
  color: var(--ivory);
  padding: var(--space-3) var(--space-6);
  text-align: center;
  font-family: var(--font-heading);
  font-size: 16px;
  line-height: 1.8;
}
.credits p { margin: 0; font-weight: 400; }
.credits em { white-space: nowrap; }

/* ── Controls ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.2;
  background: transparent;
  border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
}
.btn svg { display: block; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--olive);
  color: var(--ivory);
  border-color: var(--olive);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 11px !important;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.btn-primary:hover:enabled { background: var(--pebble); border-color: var(--pebble); }

.btn-ghost {
  color: var(--fern);
  padding-inline: var(--space-1);
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0.03em;
}
.btn-ghost:hover { background: color-mix(in srgb, var(--fern) 10%, transparent); color: var(--fern); }

.input {
  width: 100%;
  min-height: 36px;
  padding: 6px 10px;
  color: var(--pebble);
  caret-color: var(--fern);
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 0;
  font-family: var(--font-body);
  font-weight: 300;
}
.input:hover { border-color: color-mix(in srgb, var(--pebble) 45%, transparent); }
.input:focus-visible { border-color: var(--fern); outline-offset: 0; }
textarea.input { resize: vertical; }

/* ── Section ticks ───────────────────────────────────────────────────────── */

.ticks {
  position: fixed;
  right: var(--space-6);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.tick { background: none; border: 0; padding: 6px 0; cursor: pointer; display: flex; justify-content: flex-end; width: 36px; }
.tick span { display: block; height: 1px; width: 12px; background: var(--line); transition: width .3s ease, background .3s ease; }
.tick[aria-current="true"] span { width: 28px; background: var(--fern); }

/* ── Small screens and reduced motion ────────────────────────────────────── */

/* Slides run taller than a phone's screen, and a mandatory snap fights the reader
   on the way through them. The ticks would sit on top of the text. */
@media (max-width: 720px) {
  .scroller { scroll-snap-type: y proximity; }
  .ticks { display: none; }
  .pts > li.pt { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .scroller { scroll-behavior: auto; }
  .tick span { transition: none; }
}
