:root {
  --bg: #0c0a08;
  --text: #e8dfd3;
  --muted: #9a9085;
  --amber: #d97a3d;
  --hairline: #2a241f;

  --measure: 640px;
  --gutter: 1.5rem;
  --photo-max: 1200px;

  --reveal-ease: cubic-bezier(.22, .61, .36, 1);
}

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

@media (min-width: 768px) {
  body { font-size: 18px; }
}

main { display: block; }

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

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

/* ---------- Layout ---------- */

main > .section {
  max-width: var(--measure);
  margin: 28vh auto;
  padding: 0 var(--gutter);
}

@media (min-width: 768px) {
  main > .section { margin: 38vh auto; }
}

.section.call { margin: 44vh auto; }

@media (min-width: 768px) {
  .section.call { margin: 56vh auto; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 var(--gutter);
  text-align: center;
}

.wordmark {
  font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  font-variation-settings: 'opsz' 144;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
  font-size: clamp(2.75rem, 9vw, 5.75rem);
  line-height: 1;
  margin: 0;
  text-shadow:
    0 0 18px rgba(217, 122, 61, 0.18),
    0 0 44px rgba(217, 122, 61, 0.05);
  will-change: text-shadow;
}

.subtitle {
  margin-top: 1.75rem;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  color: var(--text);
  font-size: clamp(0.95rem, 1.6vw, 1.125rem);
  letter-spacing: 0.005em;
  max-width: 32ch;
}

.scroll-hint {
  position: absolute;
  bottom: clamp(2rem, 6vh, 3.25rem);
  left: 50%;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(232, 223, 211, 0.55), rgba(232, 223, 211, 0));
  transform: translateX(-50%);
  pointer-events: none;
}

/* ---------- Quiet signposts (h2) ---------- */

.signpost {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 2.25em;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .signpost { font-size: 14px; }
}

.signpost::before {
  content: "";
  display: block;
  width: 40px;
  height: 1px;
  background: var(--hairline);
  margin-bottom: 2em;
}

/* ---------- Lean-in moments (Fraunces italic) ---------- */

.lean-in,
.tone-line em,
.call-line em,
.rule-name {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 400;
}

/* ---------- The Practice ---------- */

.rule { margin-block: 2em; }

.rule-name {
  display: inline-block;
  font-size: 1.15em;
  color: var(--text);
  margin-bottom: 0.35em;
}

/* ---------- The Tone ---------- */

.tone { text-align: center; }

.tone .tone-line {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  line-height: 1.55;
  color: var(--text);
  margin-block: 1.75em;
}

.tone .tone-line em { color: var(--text); }

/* ---------- The Call ---------- */

.call { text-align: center; }

/* The Call has no visible signpost — keep the h2 in the AOM but visually hide. */
.call .signpost {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.call .signpost::before { content: none; }

.call-line {
  font-size: clamp(1.75rem, 5vw, 3rem);
  line-height: 1.25;
  color: var(--text);
  margin: 0;
}

.call-line em { color: var(--text); }

/* ---------- Photographic images (native aspect, centred) ---------- */

figure.photo {
  margin: 0;
  display: flex;
  justify-content: center;
  padding: 0 var(--gutter);
}

figure.photo .parallax-track {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  will-change: transform;
}

figure.photo picture { display: block; }

figure.photo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 75vh;
}

@media (min-width: 768px) {
  figure.photo img {
    max-width: var(--photo-max);
    max-height: 85vh;
  }
}

/* The closing embers — a small visual echo of the opening one,
   sitting just under "Gather. Pay attention." */
figure.photo.coda img {
  max-height: 38vh;
  max-width: 100%;
}

@media (min-width: 768px) {
  figure.photo.coda img {
    max-height: 45vh;
    max-width: 700px;
  }
}

figure.photo.coda { margin-bottom: 18vh; }
.section.call:has(+ .photo.coda) { margin-bottom: 3vh; }

@media (min-width: 768px) {
  figure.photo.coda { margin-bottom: 24vh; }
  .section.call:has(+ .photo.coda) { margin-bottom: 4vh; }
}

/* ---------- Reveals (only when JS is enabled) ---------- */

.js .section .signpost,
.js .section > p {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 800ms var(--reveal-ease),
    transform 800ms var(--reveal-ease);
  transition-delay: calc(var(--i, 0) * 50ms);
  will-change: opacity, transform;
}

.js .section.in .signpost,
.js .section.in > p {
  opacity: 1;
  transform: none;
}

.js figure.photo img {
  opacity: 0;
  transform: scale(1.05);
  transition:
    opacity 1200ms var(--reveal-ease),
    transform 1400ms var(--reveal-ease);
  will-change: opacity, transform;
}

.js figure.photo.in img {
  opacity: 1;
  transform: scale(1);
}

/* Cinematic vignette over the image (retreats on reveal) */
.js figure.photo .parallax-track::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(12, 10, 8, 0) 50%, rgba(12, 10, 8, 0.45) 100%);
  opacity: 1;
  transition: opacity 1200ms var(--reveal-ease);
}

.js figure.photo.in .parallax-track::after { opacity: 0; }

/* ---------- Wordmark ember breathing ---------- */

@keyframes ember {
  0%, 100% {
    text-shadow:
      0 0 16px rgba(217, 122, 61, 0.14),
      0 0 40px rgba(217, 122, 61, 0.04);
  }
  50% {
    text-shadow:
      0 0 26px rgba(217, 122, 61, 0.32),
      0 0 68px rgba(217, 122, 61, 0.10);
  }
}

.wordmark { animation: ember 8s ease-in-out infinite; }

/* ---------- Film grain ---------- */

.grain {
  position: fixed;
  inset: -10vh -10vw;
  pointer-events: none;
  z-index: 9;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
  background-repeat: repeat;
  animation: grain-drift 7s steps(6) infinite;
  mix-blend-mode: overlay;
}

@keyframes grain-drift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%,  2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -1%); }
  80%  { transform: translate(3%,  3%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .wordmark { animation: none; }
  .grain { animation: none; }

  /* Simple fade, no translate, no stagger */
  .js .section .signpost,
  .js .section > p {
    transform: none;
    transition: opacity 500ms ease;
    transition-delay: 0ms !important;
  }

  .js figure.photo img {
    transform: none;
    transition: opacity 600ms ease;
  }

  .js figure.photo .parallax-track::after { transition: opacity 600ms ease; }
}

/* ---------- Selection ---------- */

::selection {
  background: rgba(217, 122, 61, 0.35);
  color: var(--text);
}
