/* HALFLIGHT main.css: consumes tokens only. Organized as:
   1. reset + base   2. shared roles (folio, inscription, titleline, prose, press)
   3. ribbon + veil  4. the spread (counterpoint mechanic)  5. sections
   6. datebook form kit  7. keepsake  8. loose-leaf (404)  9. styleguide extras */

/* ---------- 1. reset + base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--ribbon-h) + 1rem); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  /* the ribbon is fixed, so the page keeps its band clear and the bar always
     sits on the body ground rather than half on a dark hero */
  padding-top: var(--ribbon-h);
}

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

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r-1);
}

::selection { background: var(--juniper); color: var(--candle); }

.skip-link {
  position: fixed;
  top: -100%;
  left: var(--s-4);
  z-index: var(--z-skip);
  background: var(--umber);
  color: var(--candle);
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-2);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: var(--s-4); }

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

[data-theme] { background: var(--bg); color: var(--fg); }

/* ---------- 2. shared roles ---------- */
.folio {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--edge);
}

.inscription {
  font-family: var(--font-body);
  font-size: var(--t-inscription);
  font-weight: 600;
  letter-spacing: var(--track-inscription);
  text-transform: uppercase;
  color: var(--muted);
}
.inscription--accent { color: var(--accent); }
.inscription--chip {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 0.3em 0.9em;
}

.titleline {
  font-family: var(--font-display);
  font-size: var(--t-h2);
  font-weight: 500;
  line-height: var(--lh-heading);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.titleline em { font-style: italic; color: var(--accent); }

.prose {
  max-width: var(--measure);
  color: var(--fg);
}
.prose--muted { color: var(--muted); }

.lead {
  font-family: var(--font-display);
  font-size: var(--t-lead);
  line-height: 1.45;
  max-width: var(--measure);
}

.press {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-body);
  font-size: var(--t-small);
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--press-fg);
  background: var(--press-bg);
  border: 1px solid var(--press-bg);
  border-radius: var(--r-pill);
  padding: 0.95em 1.7em;
  cursor: pointer;
  transition: background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}
.press:hover { background: var(--press-hover-bg); border-color: var(--press-hover-bg); color: var(--press-hover-fg); }
.press--quiet {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-strong);
}
.press--quiet:hover { background: transparent; color: var(--accent); border-color: var(--accent); }

/* paper scopes: a plate is always printed stock, whatever ground it sits on */
.plate-frame, .loose-leaf-plate {
  --fg: var(--umber);
  --muted: #5d4e40;
  --line: rgba(62, 47, 35, 0.18);
  --line-strong: rgba(62, 47, 35, 0.55);
  --accent: var(--juniper);
  --accent-raw: var(--juniper);
  --focus: #274a3a;
  --press-bg: var(--umber);
  --press-fg: var(--candle);
  --press-hover-bg: var(--juniper);
  --press-hover-fg: var(--candle);
  color: var(--fg);
}

.section { padding-block: var(--section-pad); }
.section--flush { padding-block: 0; }
.section--hairline { border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--s-3) var(--s-6);
  margin-bottom: var(--s-8);
}
.section-head .titleline { flex: 1 1 auto; }
.section-head > div { flex: 1 1 24rem; }
.section-head .inscription { margin-bottom: var(--s-3); }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(74, 93, 83, 0.12);
  border-radius: var(--r-1);
  padding: 0.12em 0.4em;
}

.deckle {
  border: 0;
  border-top: 1px solid var(--line);
}

/* sample honesty chip */
.sample-chip {
  display: inline-block;
  font-size: var(--t-inscription);
  font-weight: 700;
  letter-spacing: var(--track-inscription);
  text-transform: uppercase;
  color: var(--accent);
  border: 1px dashed var(--accent);
  border-radius: var(--r-pill);
  padding: 0.25em 0.8em;
}

/* ---------- reveals (JS-gated; no-JS shows everything) ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out);
}
html.js .reveal[data-delay="1"] { transition-delay: 90ms; }
html.js .reveal[data-delay="2"] { transition-delay: 180ms; }
html.js .reveal[data-delay="3"] { transition-delay: 270ms; }
html.js .reveal.is-inview { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 3. ribbon (header) + veil (menu overlay) ---------- */
.ribbon {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-ribbon);
  min-height: var(--ribbon-h);
  display: flex;
  align-items: center;
  background: var(--candle);
  border-bottom: 1px solid var(--line);
  transition: color var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}
.ribbon .folio {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}
.ribbon a { text-decoration: none; }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.wordmark svg { width: 1.15em; height: 1.15em; }
.ribbon-right { display: flex; align-items: center; gap: var(--s-5); }
.ribbon-nav { display: flex; gap: var(--s-5); }
.ribbon-nav a {
  font-size: var(--t-small);
  font-weight: 550;
  opacity: 0.85;
}
.ribbon-nav a:hover, .ribbon-nav a[aria-current] { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.ribbon-cta {
  font-size: var(--t-inscription);
  font-weight: 700;
  letter-spacing: var(--track-inscription);
  text-transform: uppercase;
  border: 1px solid currentColor;
  border-radius: var(--r-pill);
  padding: 0.55em 1.1em;
  transition: background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
}
.ribbon-cta:hover { background: var(--juniper); border-color: var(--juniper); color: var(--candle); }

/* the ribbon re-inks whole while an umber section passes beneath it */
.ribbon { color: var(--umber); }
.ribbon.over-umber {
  color: var(--candle);
  background: var(--umber);
  border-bottom-color: rgba(243, 232, 218, 0.2);
}
.ribbon.over-umber .ribbon-cta:hover { background: var(--juniper-bright); border-color: var(--juniper-bright); color: var(--umber-3); }

.veil-btn {
  display: none;
  font: inherit;
  font-size: var(--t-small);
  font-weight: 650;
  background: none;
  border: 1px solid currentColor;
  border-radius: var(--r-pill);
  color: inherit;
  padding: 0.5em 1.1em;
  cursor: pointer;
}

.veil {
  position: fixed;
  inset: 0;
  z-index: var(--z-veil);
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--s-6) + env(safe-area-inset-top)) var(--edge) var(--s-8);
  background: var(--bg);
  color: var(--fg);
}
.veil.is-open { display: flex; }
.veil-close {
  align-self: flex-end;
  font: inherit;
  font-size: var(--t-small);
  font-weight: 650;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  color: inherit;
  padding: 0.5em 1.2em;
  cursor: pointer;
}
.veil nav { display: flex; flex-direction: column; gap: var(--s-4); }
.veil nav a {
  font-family: var(--font-display);
  font-size: var(--t-h2);
  line-height: 1.15;
  text-decoration: none;
}
.veil nav a .inscription { margin-right: 0.8em; }
.veil nav a:hover { color: var(--accent); }

@media (max-width: 760px) {
  .ribbon-nav, .ribbon-cta { display: none; }
  .veil-btn { display: inline-block; }
}

/* ---------- 4. the spread: counterpoint scroll mechanic ----------
   A .spread is a run of .pair rows. Each pair: happened plate | seam | felt plate.
   The seam carries a shared caption (.seam-note) that lights as the pair centers.
   JS adds a small opposing translateY drift to the two plates (counterpoint);
   without JS or with reduced motion the spread is a complete static album. */

.spread-run { display: flex; flex-direction: column; gap: clamp(3rem, 8vh, 6rem); }

.pair {
  display: grid;
  grid-template-columns: 1fr var(--seam-w) 1fr;
  align-items: center;
}

.plate { position: relative; width: min(100%, 32rem); }
html.js .plate { will-change: transform; }
.plate-frame {
  background: var(--white);
  padding: clamp(0.5rem, 1.2vw, 0.85rem);
  padding-bottom: clamp(1rem, 2.2vw, 1.6rem);
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  box-shadow: var(--shadow-plate);
}
.plate img {
  width: 100%;
  filter: sepia(0.16) saturate(0.88) contrast(1.02);
  border-radius: 1px;
}
.plate-note {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  margin-top: var(--s-3);
  font-size: var(--t-inscription);
  font-weight: 600;
  letter-spacing: var(--track-inscription);
  text-transform: uppercase;
  color: var(--muted);
}
/* every drawn plate says so on its own caption, not only in the section header */
.plate-flag {
  border: 1px dashed var(--accent);
  border-radius: var(--r-pill);
  padding: 0.2em 0.7em;
  color: var(--accent);
  font-weight: 700;
  white-space: nowrap;
}
@media (max-width: 420px) {
  .plate-note { flex-wrap: wrap; }
}
.plate--happened { justify-self: end; }
.plate--felt { justify-self: start; }
.plate--happened .plate-frame { transform: rotate(-0.4deg); }
.plate--felt .plate-frame { transform: rotate(0.4deg); }

.seam {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: var(--s-4);
}
.seam::before {
  content: "";
  position: absolute;
  inset: calc(-1 * clamp(1.5rem, 4vh, 3rem)) auto;
  left: 50%;
  width: 1px;
  background: var(--line);
}
.seam-note {
  position: relative;
  background: var(--bg);
  padding-block: var(--s-4);
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  line-height: 1.4;
  color: var(--muted);
  max-width: 16ch;
  transition: color var(--dur-3) var(--ease-out);
}
.seam-note::before, .seam-note::after {
  content: "";
  display: block;
  width: 7px; height: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  margin: var(--s-3) auto;
  background: var(--bg);
  transition: background var(--dur-3) var(--ease-out), border-color var(--dur-3) var(--ease-out);
}
.seam-note.is-lit { color: var(--accent); }
.seam-note.is-lit::before, .seam-note.is-lit::after {
  background: var(--accent);
  border-color: var(--accent);
}
/* no-JS: every seam note stands lit; the album reads complete at rest */
html:not(.js) .seam-note { color: var(--accent); }
html:not(.js) .seam-note::before, html:not(.js) .seam-note::after {
  background: var(--accent);
  border-color: var(--accent);
}

.spread-cols {
  display: grid;
  grid-template-columns: 1fr var(--seam-w) 1fr;
  margin-bottom: var(--s-7);
}
.spread-col-label {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  text-align: center;
}
.spread-col-label em { font-style: italic; color: var(--accent); }

/* narrow screens: the columns interleave A / seam / B, top to bottom */
@media (max-width: 900px) {
  .pair { grid-template-columns: 1fr; }
  .plate--happened, .plate--felt { justify-self: stretch; }
  .plate--happened { padding-right: clamp(1.5rem, 12vw, 5rem); }
  .plate--felt { padding-left: clamp(1.5rem, 12vw, 5rem); }
  .seam { padding-block: var(--s-5); }
  .seam::before { display: none; }
  .seam-note { max-width: 30ch; }
  .spread-cols { display: none; }
}

/* a leaf plate: the same frame holding a written page instead of a photograph */
.leaf-page {
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  justify-content: flex-start;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: repeating-linear-gradient(var(--white) 0 calc(1.9rem - 1px), rgba(62, 47, 35, 0.13) calc(1.9rem - 1px) 1.9rem);
  color: var(--umber);
  border-radius: 1px;
}
.plate--leaf .plate-frame { background: var(--white); }
.leaf-page .inscription { color: var(--juniper); }
.leaf-lines { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.leaf-lines li {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: var(--s-3);
  font-size: var(--t-small);
  line-height: 1.45;
  align-items: baseline;
}
.leaf-lines li span {
  font-size: var(--t-inscription);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.leaf-page--felt { justify-content: center; }
.leaf-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 1.6vw, 1.45rem);
  line-height: 1.45;
  text-wrap: pretty;
}

/* the seam does not stop at the last pair: it runs on into the datebook */
.seam-close {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-4);
  text-align: center;
  padding-top: var(--s-6);
}
.seam-close-rule {
  width: 1px;
  height: clamp(3rem, 8vh, 5rem);
  background: linear-gradient(to bottom, var(--line), var(--accent));
}
.seam-close-line {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  line-height: 1.3;
  max-width: 22ch;
  text-wrap: balance;
}
.seam-close .inscription a { color: var(--accent); }

/* 06 questions: the four first-call answers */
.queries { display: flex; flex-direction: column; }
.query {
  display: grid;
  grid-template-columns: minmax(0, 26rem) 1fr;
  gap: var(--s-5) var(--s-8);
  padding-block: var(--s-6);
  border-top: 1px solid var(--line);
}
.query dt {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  font-weight: 500;
  line-height: 1.25;
}
.query dd { margin: 0; color: var(--muted); max-width: var(--measure); }
@media (max-width: 760px) { .query { grid-template-columns: 1fr; gap: var(--s-3); } }

/* the umber band that carries a single spoken line */
.one-story .inscription { text-align: center; }
.one-story .folio { display: flex; flex-direction: column; gap: var(--s-5); align-items: center; }

/* ---------- 5. sections ---------- */

/* 01 threshold (hero): the split field introduces the two columns */
.threshold { position: relative; }
.threshold-field {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: min(56vh, 34rem);
  position: relative;
}
.threshold-half {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--s-4);
  padding: var(--s-9) var(--edge) var(--s-7);
}
.threshold-half--happened { background: var(--candle); color: var(--umber); align-items: flex-end; text-align: right; }
.threshold-half--felt { background: var(--umber); color: var(--candle); align-items: flex-start; }
.threshold-half .half-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 4.2vw, 3.6rem);
  line-height: var(--lh-tight);
  max-width: none;
}
.threshold-half--felt .half-title { font-style: italic; }
.threshold-half p { max-width: 24ch; font-size: var(--t-small); }
.threshold-half--happened p { color: var(--muted); }
.threshold-half--felt p { color: #b3a290; }
.threshold-seam {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--juniper-raw) 30%, var(--juniper-raw) 70%, transparent);
}
.threshold-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(3.5rem, 7vw, 5.5rem);
  height: auto;
}
.threshold-base {
  text-align: center;
  padding-block: var(--s-8) var(--s-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-5);
}
.threshold-base h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4.1vw, 3.9rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  max-width: 21ch;
  text-wrap: balance;
}
.threshold-base h1 em { font-style: italic; color: var(--accent); }
.threshold-ctas { display: flex; flex-wrap: wrap; gap: var(--s-4); justify-content: center; }
.threshold-meta { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: center; }

@media (max-width: 760px) {
  .threshold-field { grid-template-columns: 1fr; min-height: 0; }
  .threshold-half { padding-block: var(--s-8); align-items: flex-start; text-align: left; }
  .threshold-seam { display: none; }
  .threshold-mark {
    top: auto; bottom: 0;
    transform: translate(-50%, 50%);
  }
}

/* 03 approach: the two of us + the four steps */
.approach-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-8);
  margin-bottom: var(--s-9);
}
.approach-duo article h3 {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  font-weight: 500;
  margin-bottom: var(--s-3);
}
.approach-duo article h3 em { font-style: italic; color: var(--accent); }
.approach-duo article p { color: var(--muted); max-width: 34rem; }
@media (max-width: 760px) { .approach-duo { grid-template-columns: 1fr; } }

.approach-steps { list-style: none; padding: 0; counter-reset: step; }
.approach-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: var(--s-5);
  padding-block: var(--s-5);
  border-top: 1px solid var(--line);
}
.approach-steps li::before {
  content: "0" counter(step);
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--t-h3);
  color: var(--accent);
}
.approach-steps strong { display: block; font-weight: 650; margin-bottom: 0.35em; }
.approach-steps p { color: var(--muted); max-width: var(--measure); }

/* 04 collections: album volumes on a shelf */
.shelf {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}
.volume {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  border: 1px solid var(--line);
  border-left: 6px double var(--line-strong);
  border-radius: var(--r-1);
  background: var(--bg);
  padding: var(--s-6);
}
.volume--kept { border-left-color: var(--accent); }
.volume h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--t-h3);
}
.volume-hours {
  font-size: var(--t-inscription);
  font-weight: 700;
  letter-spacing: var(--track-inscription);
  text-transform: uppercase;
  color: var(--accent);
}
.volume-price { font-family: var(--font-display); font-style: italic; font-size: 1.35rem; }
.volume ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); color: var(--muted); font-size: var(--t-small); }
.volume ul li { padding-left: 1.1em; position: relative; }
.volume ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.volume .press { margin-top: auto; align-self: flex-start; }
@media (max-width: 900px) { .shelf { grid-template-columns: 1fr; } }

/* 05 story teaser */
.story-teaser {
  display: grid;
  grid-template-columns: minmax(0, 22rem) 1fr;
  gap: var(--s-8);
  align-items: center;
}
.story-teaser .plate-frame { max-width: 22rem; }
@media (max-width: 760px) { .story-teaser { grid-template-columns: 1fr; } }

/* vow: the wide italic line */
.vow {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 3.2vw, 2.6rem);
  line-height: 1.3;
  text-align: center;
  max-width: 28ch;
  margin-inline: auto;
  text-wrap: balance;
}
.vow strong { font-style: normal; font-weight: 500; color: var(--accent); }

/* ---------- 6. datebook (inquiry form kit) ---------- */
.datebook-layout {
  display: grid;
  grid-template-columns: minmax(0, 24rem) 1fr;
  gap: var(--s-9);
}
@media (max-width: 900px) { .datebook-layout { grid-template-columns: 1fr; gap: var(--s-7); } }

.datebook-aside { display: flex; flex-direction: column; gap: var(--s-5); }
.datebook-aside .lead { font-size: 1.25rem; }
.datebook-aside a { color: var(--accent); text-underline-offset: 3px; }
.datebook-line { font-size: var(--t-small); color: var(--muted); }

.entry { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-5); }
.entry label { font-weight: 650; font-size: var(--t-small); }
.entry .entry-hint { font-size: var(--t-inscription); letter-spacing: 0.04em; color: var(--muted); }
.entry input, .entry textarea, .entry select {
  font: inherit;
  color: var(--fg);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  padding: 0.8em 1em;
  width: 100%;
}
.entry input:focus-visible, .entry textarea:focus-visible, .entry select:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
.entry.is-invalid input, .entry.is-invalid textarea { border-color: #8a3524; }
.entry-error { color: #8a3524; font-size: var(--t-small); font-weight: 600; }
.entry-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }
@media (max-width: 640px) { .entry-row { grid-template-columns: 1fr; } }

/* the quiet second signal: humans never see or fill this line */
.entry--vellum {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* the no-JS notice: the form still posts to a mail app, and says so */
.datebook-nojs {
  display: none;
  border: 1px solid var(--accent);
  border-radius: var(--r-2);
  background: rgba(74, 93, 83, 0.08);
  padding: var(--s-4) var(--s-5);
  margin-bottom: var(--s-5);
  font-size: var(--t-small);
  color: var(--fg);
}
.datebook-nojs a { color: var(--accent); font-weight: 650; }
html:not(.js) .datebook-nojs { display: block; }

.datebook-errors {
  border: 1px solid #8a3524;
  border-radius: var(--r-2);
  background: rgba(138, 53, 36, 0.06);
  padding: var(--s-4) var(--s-5);
  margin-bottom: var(--s-5);
}
.datebook-errors h3 { font-size: var(--t-body); margin-bottom: var(--s-2); }
.datebook-errors ul { margin: 0; padding-left: 1.2em; }
.datebook-errors a { color: #8a3524; font-weight: 600; }

.datebook-status { min-height: 1.5em; margin-top: var(--s-3); font-weight: 600; color: var(--accent); }

.datebook-fallback {
  margin-top: var(--s-5);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-2);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.datebook-fallback textarea {
  font: inherit;
  font-size: var(--t-small);
  width: 100%;
  min-height: 9rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  padding: var(--s-3);
  color: var(--fg);
}
.datebook-fallback-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---------- 7. keepsake (footer) ---------- */
.keepsake { border-top: 1px solid var(--line); padding-block: var(--s-8); }
.keepsake-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-6);
  align-items: start;
}
.keepsake nav { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6); }
.keepsake nav a { font-size: var(--t-small); color: var(--muted); }
.keepsake nav a:hover { color: var(--fg); }
.keepsake-colophon { margin-top: var(--s-6); font-size: var(--t-inscription); letter-spacing: 0.06em; color: var(--muted); max-width: 60ch; }
@media (max-width: 640px) { .keepsake-grid { grid-template-columns: 1fr; } }

/* ---------- 8. loose leaf (404) ---------- */
.loose-leaf {
  min-height: calc(100vh - var(--ribbon-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--s-8) var(--edge);
}
.loose-leaf-plate {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-1);
  box-shadow: var(--shadow-plate);
  padding: var(--s-8) var(--s-7) var(--s-7);
  max-width: 30rem;
  transform: rotate(-1.2deg);
}
.loose-leaf-plate .leaf-page { aspect-ratio: auto; text-align: center; align-items: center; padding: 0; background: none; }
.loose-leaf-mark { width: 7.5rem; height: auto; margin-inline: auto; }
.loose-leaf-plate .inscription a { color: var(--accent); }
.loose-leaf-plate h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  line-height: 1.14;
  text-wrap: balance;
  margin-block: var(--s-4);
}
body.unbound { padding-top: 0; }
.loose-leaf-plate p { color: var(--muted); margin-bottom: var(--s-6); }
.loose-leaf-ctas { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: center; }

/* ---------- 9. banner (interior page opener) + story extras ---------- */
.banner { padding-block: calc(var(--section-pad) * 0.9) var(--s-8); }
.banner .crumb { margin-bottom: var(--s-5); display: inline-flex; gap: 0.6em; }
.banner .crumb a { color: var(--muted); }
.banner h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--t-h1);
  line-height: var(--lh-heading);
  letter-spacing: -0.01em;
  max-width: 16ch;
  text-wrap: balance;
}
.banner h1 em { font-style: italic; color: var(--accent); }
.banner .lead { margin-top: var(--s-5); color: var(--muted); }

.story-close { text-align: center; display: flex; flex-direction: column; gap: var(--s-6); align-items: center; }

/* ---------- styleguide extras ---------- */
.guide-swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: var(--s-4); }
.guide-swatch { border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; }
.guide-swatch-chip { height: 5rem; }
.guide-swatch figcaption { padding: var(--s-3); font-size: var(--t-inscription); letter-spacing: 0.06em; }
.guide-block { margin-block: var(--s-7); }
.guide-block > h3 { font-family: var(--font-display); font-size: var(--t-h3); font-weight: 500; margin-bottom: var(--s-4); }
.guide-note { color: var(--muted); font-size: var(--t-small); max-width: var(--measure); }
.guide-note + .guide-note, .prose + .prose { margin-top: var(--s-4); }
.guide-block .entry + .entry { margin-top: var(--s-5); }
