/* Dwell with Maya — v9 "Arrival"
   Mobile-first: base styles are written for a 390px iPhone; min-width steps at 600px and 900px.
   One breath paces the motion: ~5.5s in, ~5.5s out. Nothing moves faster than it needs to. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* palette — morning shore → forest → night */
  --paper: #f8f4ed;
  --sand: #efe6d8;
  --ink: #1f1b17;
  --ink-2: #463e36;          /* 9.6:1 on paper */
  --muted: #62584c;          /* 6.4:1 on paper, 5.7:1 on sand */
  --line: rgba(31, 27, 23, 0.13);
  --line-strong: rgba(31, 27, 23, 0.28);
  --ember: #b0764c;
  --forest: #17221b;
  --night: #0f1812;
  --on-dark: #f1ece2;        /* 13.9:1 on forest */
  --on-dark-2: #c5cabb;      /* 10:1 on forest */
  --on-dark-line: rgba(241, 236, 226, 0.2);
  --error: #9a3b2e;

  /* type — Didot + Iowan Old Style ship with every iPhone; no font requests */
  --display: Didot, "Bodoni 72", "Bodoni MT", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Arial, sans-serif;

  --fs-display: clamp(3.3rem, 1.6rem + 7.2vw, 8.25rem);   /* ≈ 56px at 390 */
  --fs-h1: clamp(2.7rem, 1.7rem + 4.6vw, 5.5rem);
  --fs-h2: clamp(2.2rem, 1.5rem + 3.2vw, 4.25rem);       /* ≈ 36px at 390 */
  --fs-h3: clamp(1.6rem, 1.3rem + 1.3vw, 2.3rem);
  --fs-lede: clamp(1.3rem, 1.1rem + 0.9vw, 1.85rem);
  --fs-voice: clamp(1.55rem, 1.2rem + 1.8vw, 2.65rem);
  --fs-body: 1.0625rem;
  --fs-label: 12px;

  --gutter: 1.5rem;
  --space: clamp(5.5rem, 3.5rem + 8vw, 11rem);
  --space-s: clamp(3.25rem, 2.2rem + 4vw, 6rem);
  --nav-h: 64px;
  --sheet-r: 26px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --breath: cubic-bezier(0.16, 1, 0.3, 1);     /* legible fast, settles slowly */
  --inhale: cubic-bezier(0.37, 0, 0.63, 1);    /* sine in-out */
}

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; background: var(--night); }
html.is-locked { overflow: hidden; }
[id] { scroll-margin-top: 5rem; }

body {
  background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: var(--fs-body); line-height: 1.7;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; border-radius: 2px; }

.skip {
  position: absolute; left: 1rem; top: -5rem; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 0.8rem 1.2rem; border-radius: 999px;
  font-family: var(--sans); font-size: 13px; letter-spacing: 0.08em; text-decoration: none;
}
.skip:focus { top: calc(1rem + env(safe-area-inset-top, 0px)); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- layout ---------- */
.wrap {
  width: 100%; max-width: 1200px; margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.measure { max-width: 34rem; }
.measure-wide { max-width: 46rem; }
.center { text-align: center; }
.center .measure, .center .measure-wide { margin-left: auto; margin-right: auto; }
.chapter { position: relative; padding-top: var(--space); padding-bottom: var(--space); }
.chapter.tight-top { padding-top: var(--space-s); }

.tone-paper { background: var(--paper); }
.tone-sand { background: var(--sand); }
.tone-forest { background: var(--forest); }
.on-dark { color: var(--on-dark); }

/* sections never cut hard: long gradients carry the eye from shore to forest */
.fade { height: clamp(5rem, 16vh, 9rem); }
.fade-paper-sand { background: linear-gradient(180deg, var(--paper), var(--sand)); background: linear-gradient(in oklch 180deg, var(--paper), var(--sand)); }
.fade-sand-paper { background: linear-gradient(180deg, var(--sand), var(--paper)); background: linear-gradient(in oklch 180deg, var(--sand), var(--paper)); }
.dusk {
  position: relative;
  height: clamp(11rem, 34vh, 20rem);
  background: linear-gradient(180deg, var(--paper) 0%, #dcd9c9 30%, #8c957f 58%, #3a4a3d 82%, var(--forest) 100%);
  /* perceptual ramp + film grain: kills banding on wide-gamut phone displays */
  background: linear-gradient(in oklch 180deg, var(--paper) 0%, #eae7da 15%, #dcd9c9 30%, #a9ae97 44%, #8c957f 58%, #5e6d60 70%, #3a4a3d 82%, #28352c 91%, var(--forest) 100%);
}
.dusk::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.04; letter-spacing: -0.01em; text-wrap: balance; }
h1 em, h2 em, h3 em, .display em { font-style: italic; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); margin-bottom: 1.5rem; }
h3 { font-size: var(--fs-h3); line-height: 1.1; }
p { text-wrap: pretty; }

.eyebrow {
  font-family: var(--sans); font-size: var(--fs-label); letter-spacing: 0.24em; line-height: 1.5;
  text-transform: uppercase; color: var(--muted); margin-bottom: 1.1rem;
}
.lede { font-family: var(--serif); font-size: var(--fs-lede); line-height: 1.45; color: var(--ink); }
.lede-xl { font-family: var(--serif); font-size: var(--fs-voice); line-height: 1.32; color: var(--ink); letter-spacing: -0.005em; }
.lede-xl em, .lede em { font-style: italic; }
.prose p { font-size: var(--fs-body); line-height: 1.75; color: var(--ink-2); }
.prose p + p { margin-top: 1.15em; }
.voice {
  font-family: var(--display); font-style: italic; font-size: var(--fs-voice);
  line-height: 1.22; letter-spacing: -0.005em; color: var(--ink);
}
.sig { font-family: var(--display); font-style: italic; font-size: 1.5rem; color: var(--ink-2); margin-top: 1.25rem; }

.on-dark .eyebrow, .on-dark .prose p, .on-dark .sig { color: var(--on-dark-2); }
.on-dark .lede, .on-dark .lede-xl, .on-dark .voice { color: var(--on-dark); }

/* chapter mark: roman numeral, label, hairline */
.chapter-mark {
  display: flex; align-items: center; gap: 0.9rem; margin-bottom: 2.25rem;
  font-family: var(--sans); font-size: var(--fs-label); letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--muted);
}
.chapter-mark .num { font-family: var(--display); font-style: italic; font-size: 1.4rem; letter-spacing: 0; text-transform: none; color: var(--ink); }
.chapter-mark::after { content: ""; flex: 0 0 48px; height: 1px; background: var(--line-strong); }
.center .chapter-mark { justify-content: center; }
.center .chapter-mark::before { content: ""; flex: 0 0 48px; height: 1px; background: var(--line-strong); }
.on-dark .chapter-mark { color: var(--on-dark-2); }
.on-dark .chapter-mark .num { color: var(--on-dark); }
.on-dark .chapter-mark::after, .on-dark .chapter-mark::before { background: var(--on-dark-line); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; color: var(--ink);
  padding-top: env(safe-area-inset-top, 0px);
  transition: transform 0.8s var(--ease), background-color 0.6s var(--ease), color 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
body[data-hero="dark"] .nav { color: var(--on-dark); }
.nav.is-solid {
  color: var(--ink); background: rgba(248, 244, 237, 0.9);
  -webkit-backdrop-filter: saturate(1.3) blur(14px); backdrop-filter: saturate(1.3) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
/* the dark-hero rule (body[data-hero="dark"] .nav) outranks .nav.is-solid on
   specificity, so re-assert dark ink here: a solid header is always paper + ink */
body[data-hero="dark"] .nav.is-solid { color: var(--ink); }
.nav.is-hidden { transform: translateY(-110%); }
.nav-inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.wordmark {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--display); font-size: 1.3rem; letter-spacing: 0.01em; line-height: 1;
  text-decoration: none; white-space: nowrap;
}
.wordmark em { font-style: italic; }

.nav-links { display: none; list-style: none; }
.nav-links a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--sans); font-size: var(--fs-label); letter-spacing: 0.2em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
}
.nav-links a:not(.pill)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 10px; height: 1px; background: currentColor;
  transform: scaleX(0); transition: transform 0.5s var(--ease);
}
.nav-links a:not(.pill):hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links .pill { padding: 0 1.2rem; border: 1px solid currentColor; border-radius: 999px; transition: background-color 0.4s, color 0.4s; }
.nav-links .pill:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* no JS: plain inline links (the menu needs JS) */
html:not(.js) .nav-links { display: flex; gap: 1rem; }
html:not(.js) .nav-links a { font-size: 11px; letter-spacing: 0.12em; }
html:not(.js) .nav-links .nav-cta { display: none; }
/* no JS on a narrow phone: let the links scroll instead of pushing the wordmark out */
html:not(.js) .nav-inner nav { min-width: 0; }
html:not(.js) .nav-links { min-width: 0; overflow-x: auto; scrollbar-width: none; }
html:not(.js) .nav-links::-webkit-scrollbar { display: none; }

.menu-btn, .menu-close {
  display: none; align-items: center; gap: 0.75rem; min-height: 44px; min-width: 44px; padding: 0 0.1rem;
  background: none; border: 0; cursor: pointer; color: inherit;
  font-family: var(--sans); font-size: var(--fs-label); letter-spacing: 0.24em; text-transform: uppercase;
}
.js .menu-btn, .menu-close { display: inline-flex; }
.menu-lines { position: relative; width: 24px; height: 9px; }
.menu-lines::before, .menu-lines::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: currentColor; }
.menu-lines::before { top: 0; }
.menu-lines::after { bottom: 0; left: 8px; }
.menu-x { position: relative; width: 20px; height: 20px; }
.menu-x::before, .menu-x::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: currentColor; transform: rotate(45deg); }
.menu-x::after { transform: rotate(-45deg); }

/* ---------- full-screen menu ---------- */
.menu {
  position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
  background: var(--forest); color: var(--on-dark);
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.7s var(--ease), visibility 0s linear 0.7s;
}
.menu[hidden] { display: none; }
.menu-open .menu { opacity: 1; visibility: visible; transition: opacity 0.7s var(--ease); }
.menu-head { height: var(--nav-h); flex: none; display: flex; align-items: center; justify-content: space-between; }
.menu-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-top: 1.5rem; padding-bottom: 2.5rem; }
.menu-links { list-style: none; }
.menu-links a {
  display: flex; align-items: baseline; gap: 1.1rem; padding: 0.4rem 0; min-height: 44px;
  font-family: var(--display); font-size: clamp(2.7rem, 1.6rem + 6vw, 4.75rem); line-height: 1.1; text-decoration: none;
}
.menu-links .num { flex: 0 0 1.6rem; font-family: var(--sans); font-size: 12px; letter-spacing: 0.18em; color: var(--on-dark-2); }
.menu-links a[aria-current="page"] { font-style: italic; }
.menu-foot { margin-top: 2.75rem; display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; }
.menu-foot .btn { width: 100%; }
.menu-small { display: flex; flex-wrap: wrap; gap: 0 1.75rem; }
.menu-small a, .menu-small button {
  display: inline-flex; align-items: center; min-height: 44px; background: none; border: 0; cursor: pointer;
  font-family: var(--sans); font-size: var(--fs-label); letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--on-dark-2); text-decoration: underline; text-decoration-color: var(--on-dark-line); text-underline-offset: 6px;
}
.menu-small a:hover, .menu-small button:hover { color: var(--on-dark); text-decoration-color: currentColor; }
.motion .menu-links li, .motion .menu-foot { opacity: 0; transform: translateY(18px); transition: opacity 1.6s var(--breath), transform 1.6s var(--breath); }
.motion.menu-open .menu-links li, .motion.menu-open .menu-foot { opacity: 1; transform: none; }
.motion.menu-open .menu-links li:nth-child(2) { transition-delay: 0.1s; }
.motion.menu-open .menu-links li:nth-child(3) { transition-delay: 0.2s; }
.motion.menu-open .menu-links li:nth-child(4) { transition-delay: 0.3s; }
.motion.menu-open .menu-foot { transition-delay: 0.4s; }

/* ---------- hero: the photograph stays; the page rises over it like a sheet ---------- */
.curtain { position: relative; }
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  height: 100vh; height: 100svh; min-height: 560px;
  display: flex; flex-direction: column;
}
.hero--inner { height: 88vh; height: 88svh; }
.curtain > .hero { position: sticky; top: 0; }
.hero-media { position: absolute; inset: 0; z-index: -3; overflow: hidden; background: var(--forest); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; transform-origin: 47% 55%; }
.hero-shade, .hero-dim { position: absolute; inset: 0; pointer-events: none; }
.hero-shade { z-index: -2; }
.hero-dim { z-index: -1; background: #0e1510; opacity: 0; }
.motion .hero-dim { opacity: calc(var(--lift, 0) * 0.55); }

.hero-copy { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.motion .hero-copy { opacity: calc(1 - var(--lift, 0) * 1.7); transform: translate3d(0, calc(var(--lift, 0) * -70px), 0); }
.motion .hero-media { transform: scale(calc(1 + var(--lift, 0) * 0.07)); }
.hero-top { padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 1.25rem); }
.hero-bottom { margin-top: auto; padding-bottom: calc(var(--sheet-r) + 1.75rem + env(safe-area-inset-bottom, 0px)); }

.hero .display { font-size: var(--fs-display); line-height: 0.96; letter-spacing: -0.02em; }
.hero h1:not(.display) { font-size: var(--fs-h1); }
.display .l { display: block; }
.display .l2, .display .l3 { display: inline; }
.hero .eyebrow { color: inherit; opacity: 0.86; }
.hero-what { font-family: var(--serif); font-size: 1.15rem; line-height: 1.5; max-width: 23rem; margin-bottom: 1.4rem; }
.hero--inner .hero-what { margin: 1rem 0 0; max-width: 26rem; }
.hero-note { margin-top: 0.9rem; font-family: var(--sans); font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.86; }
.hero .btn { width: 100%; }
.hero .status { margin-top: 1.4rem; }
.hero .status + .btn { margin-top: 1.4rem; }

/* light hero: the sky becomes paper — dark type over morning haze and sand */
.hero--light { color: var(--ink); background: linear-gradient(180deg, var(--paper) 0%, #e4eaec 11%, #d3e1ea 22%); background: linear-gradient(in oklch 180deg, var(--paper) 0%, #e4eaec 11%, #d3e1ea 22%); }
.hero--light .hero-media { top: 15%; background: transparent; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%); mask-image: linear-gradient(180deg, transparent 0, #000 22%); }
.hero--light .hero-shade {
  background: linear-gradient(180deg, rgba(248, 244, 237, 0.5) 0%, rgba(248, 244, 237, 0) 36%,
    rgba(239, 230, 216, 0) 64%, rgba(239, 230, 216, 0.86) 88%, var(--sand) 100%);
}
.hero--light .hero-note, .hero--light .eyebrow { color: var(--ink-2); opacity: 1; }
/* dark hero: forest photographs, cream type over a low shadow */
.hero--dark { color: var(--on-dark); }
.hero--dark .hero-shade {
  background: linear-gradient(180deg, rgba(12, 18, 14, 0.5) 0%, rgba(12, 18, 14, 0) 24%,
    rgba(12, 18, 14, 0.05) 42%, rgba(12, 18, 14, 0.82) 100%);
}
.hero--dark .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.hero--dark .btn:hover { background: #fff; }

/* the sheet that rises over the hero */
.sheet {
  position: relative; z-index: 1; margin-top: calc(var(--sheet-r) * -1);
  border-radius: var(--sheet-r) var(--sheet-r) 0 0;
  box-shadow: 0 -30px 60px -40px rgba(20, 16, 12, 0.5);
}

/* ---------- status: a soft pulse — something is taking shape ---------- */
.status {
  display: inline-flex; align-items: center; gap: 0.7rem; padding: 0.55rem 1rem 0.55rem 0.85rem;
  border: 1px solid currentColor; border-radius: 999px;
  font-family: var(--sans); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; line-height: 1.3;
}
.status::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 0 rgba(176, 118, 76, 0.5); }
.on-dark .status, .hero--dark .status { border-color: var(--on-dark-line); }
.on-dark .status::before, .hero--dark .status::before { background: #e0a878; }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.8rem; min-height: 54px;
  padding: 0.9rem 2.1rem; border: 1px solid var(--ink); border-radius: 999px; cursor: pointer;
  font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none;
  color: var(--paper); background: var(--ink);
  transition: background-color 0.35s, color 0.35s, transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.btn:hover { background: #3a332c; transform: translateY(-1px); box-shadow: 0 14px 28px -18px rgba(31, 27, 23, 0.7); }
.btn:active { transform: none; box-shadow: none; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; box-shadow: none; }
.btn-light { color: var(--ink); background: var(--paper); border-color: var(--paper); }
.btn-light:hover { background: #fff; }
.btn-block { width: 100%; }

.text-link, .link-btn {
  display: inline-flex; align-items: center; gap: 0.75rem; min-height: 44px; padding: 0; background: none; border: 0; cursor: pointer;
  font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; color: inherit;
}
.text-link::after { content: "\2192"; content: "\2192" / ""; font-size: 15px; letter-spacing: 0; transition: transform 0.6s var(--ease); }
.text-link:hover::after { transform: translateX(6px); }
.text-link span, .link-btn span { border-bottom: 1px solid var(--line-strong); padding-bottom: 3px; transition: border-color 0.3s; }
.text-link:hover span, .link-btn:hover span { border-color: currentColor; }
.on-dark .text-link span, .on-dark .link-btn span { border-color: var(--on-dark-line); }
.on-dark .text-link:hover span, .on-dark .link-btn:hover span { border-color: currentColor; }
.links { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin-top: 2.5rem; }

/* ---------- figures ---------- */
.frame { position: relative; overflow: hidden; border-radius: 4px; background: var(--sand); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame.r45 { aspect-ratio: 4 / 5; }
.frame.r34 { aspect-ratio: 3 / 4; }
/* arch: a doorway — the recurring shape for Maya's portraits */
.arch { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border-radius: 999px 999px 6px 6px; background: var(--sand); }
.arch img { width: 100%; height: 100%; object-fit: cover; }
.motion [data-parallax] img { transform: scale(1.16); will-change: transform; }
/* full-bleed on phones */
.bleed-m { margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); border-radius: 0; }

/* ---------- I. arrive + the breath ---------- */
.statement { padding-top: calc(var(--space-s) + 1rem); padding-bottom: var(--space-s); }
.statement .prose { margin-top: 2rem; }

.breath { padding-top: var(--space-s); padding-bottom: var(--space); text-align: center; }
.breath h2 { font-size: var(--fs-h3); line-height: 1.15; margin: 0 auto 2.75rem; max-width: 16em; }
.orb-wrap { position: relative; width: min(74vw, 340px); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; }
.orb-guide { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line-strong); }
.orb {
  position: absolute; inset: 0; border-radius: 50%; transform: scale(0.8);
  background: radial-gradient(circle at 50% 42%, #fffaf2 0%, #f1dcc4 34%, rgba(214, 160, 118, 0.55) 58%, rgba(176, 118, 76, 0) 71%);
  background: radial-gradient(in oklch circle at 50% 42%, #fffaf2 0%, #f1dcc4 34%, rgba(214, 160, 118, 0.55) 58%, rgba(176, 118, 76, 0) 71%);
}
.orb-word { grid-area: 1 / 1; position: relative; font-family: var(--display); font-style: italic; font-size: 1.55rem; color: var(--ink-2); }
.orb-word.in, .orb-word.out { opacity: 0; }
.breath-note { margin-top: 2.25rem; font-family: var(--sans); font-size: var(--fs-label); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }

/* ---------- II. the teacher ---------- */
.teacher { display: grid; gap: 2.75rem; }
.teacher .arch { max-width: 30rem; }
.teacher h2 { margin-bottom: 1.75rem; }
.teacher .voice { margin-bottom: 1.75rem; }
.creds { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.75rem; }
.creds li {
  padding: 0.5rem 0.95rem; border: 1px solid var(--line-strong); border-radius: 999px;
  font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.04em; line-height: 1.4; color: var(--ink-2);
}

/* ---------- III. the practices: sensory panels ---------- */
.practices-head { margin-bottom: 3rem; }
.panels { display: grid; gap: 4rem; }
.panel-media { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--forest); color: var(--on-dark); }
.panel-media img { width: 100%; height: 100%; object-fit: cover; }
.panel-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 6rem var(--gutter) 1.6rem;
  background: linear-gradient(180deg, rgba(12, 18, 14, 0) 0%, rgba(12, 18, 14, 0.74) 100%);
}
.panel-cap .eyebrow { color: var(--on-dark-2); margin-bottom: 0.4rem; }
.panel-cap h3 { font-size: clamp(3rem, 2rem + 5vw, 5.5rem); line-height: 0.95; }
.panel-text { padding-top: 1.75rem; }
.panel-text .voice { font-size: var(--fs-h3); line-height: 1.3; }
.panel-text .prose { margin-top: 1rem; }

/* sound: slow ripples from the still point */
.rings { position: absolute; left: 50%; top: 50%; z-index: 1; width: 78%; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
.rings span, .rings .strike { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(255, 250, 240, 0.6); opacity: 0; }
.bowl {
  display: inline-flex; align-items: center; gap: 0.9rem; min-height: 52px; margin-top: 1.5rem;
  padding: 0.4rem 1.3rem 0.4rem 0.45rem; border: 1px solid var(--line-strong); border-radius: 999px;
  background: transparent; cursor: pointer; text-align: left;
  font-family: var(--sans); font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase;
  transition: border-color 0.4s, background-color 0.4s;
}
.bowl[hidden] { display: none; }
.bowl:hover { border-color: var(--ink); background: rgba(255, 255, 255, 0.35); }
.bowl-icon {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #e7b98f, #b0764c 58%, #7d4d2d 100%);
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.18), 0 6px 14px -8px rgba(90, 50, 25, 0.8);
}
.bowl small { display: block; margin-top: 0.15rem; font-size: 11px; letter-spacing: 0.08em; text-transform: none; color: var(--muted); }
.on-dark .bowl { border-color: var(--on-dark-line); }
.on-dark .bowl:hover { border-color: var(--on-dark); background: rgba(255, 255, 255, 0.05); }
.on-dark .bowl small { color: var(--on-dark-2); }

/* ---------- IV. the place ---------- */
.place { padding-top: var(--space-s); padding-bottom: var(--space); }
.place-grid { display: grid; gap: 2.5rem; }
.focus { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: #26332a; }
.focus img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.motion .focus img { filter: blur(var(--blur, 0px)); transform: scale(calc(1.03 + var(--haze, 0) * 0.09)); will-change: filter, transform; }
.focus-line {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 5rem var(--gutter) 1.6rem;
  background: linear-gradient(180deg, rgba(10, 16, 12, 0), rgba(10, 16, 12, 0.72));
  font-family: var(--display); font-size: clamp(2.5rem, 1.7rem + 4vw, 4.5rem); line-height: 1; color: #fff;
}
.focus-line em { font-style: italic; }
.motion .focus-line { opacity: var(--clear, 1); }

.notes { margin-top: 2.5rem; border-top: 1px solid var(--line); }
.notes div { display: grid; gap: 0.2rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.notes dt { font-family: var(--sans); font-size: var(--fs-label); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.notes dd { font-family: var(--serif); font-size: 1.15rem; line-height: 1.45; color: var(--ink); }
.on-dark .notes, .on-dark .notes div { border-color: var(--on-dark-line); }
.on-dark .notes dt { color: var(--on-dark-2); }
.on-dark .notes dd { color: var(--on-dark); }

/* ---------- V. the invitation ---------- */
.invite { position: relative; background: var(--forest); color: var(--on-dark); padding-bottom: var(--space); }
.invite-media { position: relative; overflow: hidden; height: 78vh; height: 78svh; min-height: 460px; max-height: 900px; }
.invite-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.invite-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(23, 34, 27, 0.35) 0%, rgba(23, 34, 27, 0) 25%, rgba(23, 34, 27, 0.2) 55%, var(--forest) 100%);
}
.invite-title { position: absolute; left: 0; right: 0; bottom: 4.5rem; z-index: 1; }
.invite-title .chapter-mark { margin-bottom: 1rem; color: var(--on-dark-2); }
.invite-title .chapter-mark .num { color: var(--on-dark); }
.invite-title .chapter-mark::after { background: var(--on-dark-line); }
.invite-title h2 { font-size: var(--fs-display); line-height: 0.95; margin: 0; }
.invite-card {
  position: relative; z-index: 2; max-width: 560px; margin: -2.5rem auto 0;
  background: var(--paper); color: var(--ink); border-radius: 22px;
  padding: 2.25rem 1.4rem 1.75rem; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6);
}
.invite-card h3 { font-size: clamp(2rem, 1.5rem + 2.4vw, 2.9rem); margin-bottom: 1rem; }
.invite-card > p:not(.eyebrow):not(.summary) { font-family: var(--sans); font-size: 15px; line-height: 1.7; color: var(--ink-2); margin-bottom: 1.5rem; }
.summary {
  display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; margin-bottom: 1.25rem;
  font-family: var(--sans); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.summary span + span::before { content: "\00b7"; margin-right: 0.9rem; }
.letter-aside { max-width: 560px; margin: 3rem auto 0; padding-top: 2rem; border-top: 1px solid var(--on-dark-line); }
.letter-aside p:not(.eyebrow) { font-family: var(--serif); font-size: 1.2rem; line-height: 1.5; color: var(--on-dark); margin-bottom: 0.5rem; }

/* ---------- forms ---------- */
.field { display: block; }
.field + .field { margin-top: 1rem; }
.field > span { display: block; margin-bottom: 0.5rem; font-family: var(--sans); font-size: var(--fs-label); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.field > span i { font-style: normal; letter-spacing: 0.04em; text-transform: none; }
/* 16px minimum keeps iOS Safari from zooming on focus */
.field input {
  width: 100%; min-height: 54px; padding: 0.85rem 1.05rem;
  font-family: var(--sans); font-size: 16px; color: var(--ink); background: #fffdf9;
  border: 1px solid var(--line-strong); border-radius: 14px; outline: none;
  -webkit-appearance: none; appearance: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.field input::placeholder { color: #8a8278; }
.field input:hover { border-color: rgba(31, 27, 23, 0.45); }
.field input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(31, 27, 23, 0.14); }
.field input[aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 3px rgba(154, 59, 46, 0.12); }
form .btn { width: 100%; margin-top: 1.4rem; }
.form-note { margin-top: 0.9rem; min-height: 1.4em; font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--muted); text-align: center; }
.form-note.is-error { color: var(--error); }
.form-done { font-family: var(--display); font-style: italic; font-size: 1.7rem; line-height: 1.3; padding: 1rem 0 0.5rem; }
.form-done:focus { outline: none; }
/* visually hidden, but keeps its place in the form: never offset -9999px,
   which would widen the scrollable overflow inside the popup panel */
.hp { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; }

/* ---------- split rows (stack on phones, side by side on desktop) ---------- */
.split > * + * { margin-top: 2.5rem; }

/* ---------- About ---------- */
.make-room { list-style: none; margin-top: 2rem; }
.make-room li { font-family: var(--display); font-style: italic; font-size: var(--fs-voice); line-height: 1.2; padding: 0.35rem 0; }
.make-room li + li { border-top: 1px solid var(--line); padding-top: 0.6rem; }
.closing .voice { font-size: clamp(2rem, 1.4rem + 3vw, 3.75rem); line-height: 1.15; }
.closing .links { justify-content: center; }

/* ---------- Retreats ---------- */
.included { list-style: none; border-top: 1px solid var(--line); margin-top: 2.5rem; }
.included li { display: grid; gap: 0.6rem; padding: 1.75rem 0; border-bottom: 1px solid var(--line); }
.included h3 { display: flex; align-items: baseline; gap: 1rem; font-size: clamp(2.5rem, 1.8rem + 3.2vw, 4.25rem); font-style: italic; line-height: 1; }
.included h3 .n { font-family: var(--sans); font-style: normal; font-size: 12px; letter-spacing: 0.2em; color: var(--muted); }
.included p { font-size: var(--fs-body); line-height: 1.7; color: var(--ink-2); max-width: 34rem; }

.twenty { position: relative; width: min(72vw, 320px); aspect-ratio: 1; margin: 0 auto 3rem; display: grid; place-items: center; }
.twenty span {
  position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--ember);
  transform: rotate(calc(var(--i) * 18deg)) translateY(calc(min(36vw, 160px) * -1 + 5px));
}
.twenty strong { font-family: var(--display); font-weight: 400; font-size: clamp(4.5rem, 3rem + 7vw, 7rem); line-height: 1; }
.twenty em { display: block; margin-top: 0.3rem; font-family: var(--sans); font-style: normal; font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.twenty-copy { text-align: center; }
.reveal-on .twenty span { opacity: 0; transition: opacity 1.6s var(--ease); transition-delay: calc(var(--i) * 0.14s + 0.4s); }
.reveal-on .twenty.is-in span { opacity: 1; }

/* ---------- Offerings ---------- */
.soon { text-align: center; }
.soon .links { justify-content: center; }

/* ---------- footer: the page closes like a sheet drawn up at night ---------- */
footer.site {
  position: relative; z-index: 2; margin-top: calc(var(--sheet-r) * -1);
  background: var(--night); color: var(--on-dark); border-radius: var(--sheet-r) var(--sheet-r) 0 0;
  padding: var(--space-s) 0 calc(2rem + env(safe-area-inset-bottom, 0px));
}
.foot-line { font-family: var(--display); font-style: italic; font-size: clamp(2.6rem, 1.6rem + 4.6vw, 5rem); line-height: 1; margin-bottom: 2.5rem; }
footer.site .wordmark { font-size: 1.4rem; margin-bottom: 1.25rem; }
.footer-links { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
.footer-links a, .footer-links button {
  display: inline-flex; align-items: center; min-height: 44px; background: none; border: 0; cursor: pointer; text-align: left;
  font-family: var(--sans); font-size: var(--fs-label); letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--on-dark-2); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 6px;
  transition: color 0.3s, text-decoration-color 0.3s;
}
.footer-links a:hover, .footer-links button:hover, .footer-links a[aria-current="page"] { color: var(--on-dark); text-decoration-color: currentColor; }
footer.site .meta {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--on-dark-line);
  font-family: var(--sans); font-size: 12px; letter-spacing: 0.12em; color: var(--on-dark-2);
}

/* ---------- the DWELL letter (popup) ---------- */
.letters { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.letters[hidden] { display: none; }
.letters-backdrop {
  position: absolute; inset: 0; background: rgba(15, 24, 18, 0.45);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity 0.8s var(--ease);
}
.letters-panel {
  position: relative; width: 100%; max-height: calc(100vh - 1rem); max-height: calc(100dvh - 1rem);
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); color: var(--ink); border-radius: var(--sheet-r) var(--sheet-r) 0 0;
  padding: 2.6rem 1.5rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -24px 60px -30px rgba(15, 24, 18, 0.6);
  transform: translateY(48px); opacity: 0;
  transition: transform 1.1s var(--breath), opacity 0.8s var(--ease);
}
.letters-panel::before { content: ""; position: absolute; top: 0.7rem; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--line-strong); }
.letters.is-open .letters-backdrop { opacity: 1; }
.letters.is-open .letters-panel { transform: none; opacity: 1; }
.letters-seal {
  width: 58px; height: 58px; margin-bottom: 1.3rem; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 36% 30%, #d09468, #a2653d 62%, #7d4d2d 100%);
  color: #fbf3e8; font-family: var(--display); font-style: italic; font-size: 1.7rem; line-height: 1;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.12), 0 8px 18px -8px rgba(90, 50, 25, 0.7);
}
.letters-panel .eyebrow { margin-bottom: 0.7rem; }
.letters-panel h2 { font-size: clamp(2.2rem, 1.7rem + 2vw, 2.8rem); margin-bottom: 0.7rem; padding-right: 2rem; }
.letters-desc { font-family: var(--serif); font-size: 1.1rem; line-height: 1.55; color: var(--ink-2); margin-bottom: 1.6rem; }
.letters-form .form-note:empty { min-height: 0; margin-top: 0; }
.letters-close {
  position: absolute; top: 0.75rem; right: 0.75rem; width: 44px; height: 44px; display: grid; place-items: center;
  background: none; border: 0; border-radius: 50%; color: var(--muted); cursor: pointer; transition: color 0.3s, background-color 0.3s;
}
.letters-close:hover { color: var(--ink); background: var(--sand); }
.letters-close svg { width: 18px; height: 18px; }
.letters-dismiss { display: flex; margin: 0.6rem auto 0; color: var(--muted); }
.letters-dismiss:hover { color: var(--ink); }
.letters-done { text-align: center; padding: 0.5rem 0 0.75rem; }
.letters-done p { font-family: var(--display); font-style: italic; font-size: 1.6rem; line-height: 1.35; }
.letters-done p:focus { outline: none; }

/* ---------- scroll reveal: slow rise, like an exhale (only with JS + motion) ---------- */
.reveal-on .reveal {
  opacity: 0; transform: translate3d(0, 28px, 0);
  transition: opacity 4.2s var(--breath), transform 4.2s var(--breath);
  transition-delay: var(--d, 0s);
}
.reveal-on .reveal.is-in { opacity: 1; transform: none; }

/* ---------- motion: only for people who haven't asked for less ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-media img { animation: arrive 3.2s var(--ease) both, drift 34s var(--inhale) 0.4s infinite alternate backwards; }
  .hero .rise { animation: rise 3.6s var(--breath) both; animation-delay: var(--d, 0.5s); }
  .hero.is-away .hero-media img { animation-play-state: paused; }

  .orb { animation: breathe 11s var(--inhale) infinite; }
  .orb-word.in { animation: word-in 11s linear infinite; }
  .orb-word.out { animation: word-out 11s linear infinite; }
  .orb-word.still { opacity: 0; }

  .rings span { animation: ripple 9s var(--ease) infinite; }
  .rings span:nth-child(2) { animation-delay: 3s; }
  .rings span:nth-child(3) { animation-delay: 6s; }
  .rings .strike { animation: ripple-once 5s var(--ease) forwards; border-color: rgba(255, 250, 240, 0.9); }

  .status::before { animation: pulse 11s var(--inhale) infinite; }
}
@keyframes arrive { from { opacity: 0; } to { opacity: 1; } }
@keyframes drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.13) translate3d(-1.2%, -1.4%, 0); }
}
@keyframes rise { from { opacity: 0; transform: translate3d(0, 22px, 0); } to { opacity: 1; transform: none; } }
@keyframes breathe {
  0% { transform: scale(0.6); }
  45%, 50% { transform: scale(1); }
  95%, 100% { transform: scale(0.6); }
}
@keyframes word-in { 0% { opacity: 0; } 7%, 38% { opacity: 1; } 46%, 100% { opacity: 0; } }
@keyframes word-out { 0%, 50% { opacity: 0; } 57%, 88% { opacity: 1; } 96%, 100% { opacity: 0; } }
@keyframes ripple { 0% { transform: scale(0.12); opacity: 0; } 12% { opacity: 0.75; } 100% { transform: scale(1.3); opacity: 0; } }
@keyframes ripple-once { 0% { transform: scale(0.1); opacity: 0; } 8% { opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 168, 120, 0.55); }
  45%, 50% { box-shadow: 0 0 0 7px rgba(224, 168, 120, 0); }
}

/* ---------- ≥600px ---------- */
@media (min-width: 600px) {
  :root { --gutter: 2.25rem; }
  .hero .btn, .menu-foot .btn { width: auto; }
  form .btn { width: 100%; }
  .notes div { grid-template-columns: 10rem 1fr; gap: 1.5rem; align-items: baseline; }
  .invite-card { padding: 3rem 2.75rem 2.25rem; }
  .letters { align-items: center; padding: 1.5rem; }
  .letters-panel {
    max-width: 480px; max-height: calc(100vh - 3rem); max-height: calc(100dvh - 3rem);
    border-radius: 22px; padding: 3rem 2.75rem 2.25rem; box-shadow: 0 40px 90px -40px rgba(15, 24, 18, 0.7);
  }
  .letters-panel::before { display: none; }
}

/* ---------- ≥900px: desktop ---------- */
@media (min-width: 900px) {
  :root { --gutter: 3rem; --nav-h: 76px; --sheet-r: 34px; }
  .nav-links { display: flex; align-items: center; gap: 2.25rem; }
  .js .menu-btn { display: none; }

  .display .l2, .display .l3 { display: block; }
  .hero--light .hero-media { top: 0; -webkit-mask-image: none; mask-image: none; }
  .hero--light .hero-shade {
    background: linear-gradient(180deg, rgba(248, 244, 237, 0.62) 0%, rgba(248, 244, 237, 0) 40%,
      rgba(239, 230, 216, 0) 66%, rgba(239, 230, 216, 0.8) 100%);
  }
  .hero-top { padding-top: calc(var(--nav-h) + 3rem); }
  .hero-what { font-size: 1.3rem; max-width: 28rem; }

  .bleed-m { margin-left: 0; margin-right: 0; border-radius: 4px; }
  .teacher { grid-template-columns: 5fr 6fr; align-items: center; gap: clamp(3rem, 7vw, 7rem); }
  .panels { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 4rem); }
  .panels .panel:nth-child(2) { margin-top: 8rem; }
  .panel-media { border-radius: 4px; }
  .place-grid { grid-template-columns: 1fr 1fr; align-items: start; gap: clamp(3rem, 6vw, 6rem); }
  .place-grid .sticky { position: sticky; top: calc(var(--nav-h) + 2rem); }
  .split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3rem, 6vw, 6rem); align-items: center; }
  .split > * + * { margin-top: 0; }
  .split.flip > :first-child { order: 2; }
  .included li { grid-template-columns: 22rem 1fr; align-items: baseline; gap: 2rem; }
  .invite-media { height: 92vh; max-height: 980px; }
  .invite-card { margin-top: -9rem; }
  .foot-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 3rem; }
  .footer-links { grid-template-columns: repeat(3, auto); justify-content: end; gap: 0 2.25rem; }
}

/* very small phones (<=360px): the display line "in your body." would exceed
   the line box at the 3.3rem clamp floor, so stack the lines like the desktop
   rhythm instead of squeezing or breaking awkwardly mid-phrase */
@media (max-width: 360px) {
  .display .l2, .display .l3 { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .btn:hover { transform: none; }
}
