*, *::before, *::after { box-sizing: border-box; }
:root {
  /* Paper grain: feTurbulence noise tinted cocoa, 3.5% opacity (brief: at most 4%). */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .23 0 0 0 0 .18 0 0 0 0 .17 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
  /* Torn kraft-paper edge, tiled horizontally by .deckle-divider. */
  --deckle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 24' preserveAspectRatio='none'%3E%3Cpath d='M0 24V7.6L6 8.2L11 5.6L20 5.8L29 5.5L38 6.7L43 8.5L48 6.9L57 8.4L68 9.5L74 10L83 12.6L92 9.7L97 12.8L102 9.5L108 7.3L114 9.3L123 7.5L134 10.5L139 9.7L149 6.5L154 9.4L159 9.5L168 6.6L178 9.3L189 7.5L198 12.4L205 7.4L216 6.4L227 7L236 7.4L240 7.6V24z'/%3E%3C/svg%3E");
  accent-color: var(--peony); caret-color: var(--peony); scrollbar-color: var(--line-strong) transparent;
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 8px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background-color: var(--paper); color: var(--cocoa);
  font-family: var(--font-body); font-size: var(--fs-body); line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  /* Room for the fixed bottom dock; the footer adds it below its own content so the dock never covers it. */
  --dock-space: calc(var(--dock-h) + env(safe-area-inset-bottom));
  overflow-x: clip;
}
body:not(:has(.dock)) { --dock-space: 0px; }
@media (min-width: 768px) { body:has(.dock--cta) { --dock-space: 0px; } }
@media (min-width: 1024px) { body { --dock-space: 0px; } }
.paper-grain { background-image: var(--grain); background-size: 240px 240px; }
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
picture { display: contents; } /* the <img> inside keeps the layout it had without the wrapper */
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { list-style: none; padding: 0; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; padding-left: 1.2em; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- Links ----------
   Text links inside running text (and .link) keep a quiet underline at rest that draws to full
   strength from the left on hover (250ms). .link--draw has no rest line (lists, footers). */
a { color: var(--sage-deep); text-underline-offset: 4px; text-decoration-thickness: 1px; transition: color var(--dur-quick) var(--ease-bloom); }
a:hover { color: var(--sage-ink); }
:where(p, dd, td, figcaption, .prose, .hint, .field, .check) a:not([class]), .link, .link--draw {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(color-mix(in srgb, currentColor 32%, transparent), color-mix(in srgb, currentColor 32%, transparent));
  background-size: 0% 1px, 100% 1px; background-position: 0 100%, 0 100%; background-repeat: no-repeat;
  padding-bottom: 1px;
  transition: color var(--dur-quick) var(--ease-bloom), background-size var(--dur-quick) var(--ease-bloom);
}
.link--draw { background-size: 0% 1px, 0% 1px; }
:where(p, dd, td, figcaption, .prose, .hint, .field, .check) a:not([class]):hover, .link:hover, .link--draw:hover { background-size: 100% 1px, 100% 1px; }
:focus-visible { outline: 2px solid var(--peony); outline-offset: 3px; border-radius: 2px; }
/* Headings and regions that receive focus from script (tabindex="-1") are not controls: no ring. */
:is(h1, h2, h3, section, main, [role="region"])[tabindex="-1"]:focus-visible { outline: none; }
::selection { background: var(--blush); color: var(--cocoa); }
[hidden] { display: none !important; }

/* ---------- Type ---------- */
.hero-display, .display, .heading, .subhead { font-family: var(--font-display); font-variation-settings: var(--display-soft); font-optical-sizing: auto; text-wrap: balance; }
.hero-display { font-weight: 400; font-size: var(--fs-hero); line-height: 0.98; letter-spacing: -0.03em; }
.display { font-weight: 400; font-size: var(--fs-display); line-height: 1.04; letter-spacing: var(--tracking-tight); }
.heading { font-weight: 400; font-size: var(--fs-heading); line-height: 1.08; letter-spacing: var(--tracking-tight); }
.subhead { font-weight: 500; font-size: var(--fs-subhead); line-height: 1.2; letter-spacing: -0.01em; }
.hero-display em, .display em, .heading em, .subhead em { font-style: italic; color: var(--peony); }
.title { font-size: var(--fs-title); font-weight: 700; line-height: 1.35; }
.small { font-size: var(--fs-small); line-height: 1.5; }
/* Eyebrow label: sentence case, sage, a short kraft rule before it. No shouting caps. */
.label { font-size: var(--fs-label); font-weight: 700; line-height: 1.3; letter-spacing: var(--tracking-label); color: var(--sage-deep); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-label); font-weight: 700; letter-spacing: var(--tracking-label); color: var(--sage-deep); }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--kraft); }
.script { font-family: var(--font-script); font-weight: 500; font-size: var(--fs-script); line-height: 1.2; color: var(--peony-deep); }
.price { font-weight: 700; font-variant-numeric: tabular-nums lining-nums; line-height: 1.3; }
.muted { color: var(--cocoa-soft); }
.nowrap { white-space: nowrap; } /* phone numbers, time ranges */
.rose, .peony { color: var(--peony); }
.lead { font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); line-height: 1.6; color: var(--cocoa-soft); max-width: 46ch; text-wrap: pretty; }
.prose { max-width: 65ch; text-wrap: pretty; }
.prose p + p { margin-top: var(--space-4); }
.prose h2 { font-family: var(--font-display); font-weight: 500; font-size: 1.625rem; line-height: 1.2; margin: var(--space-12) 0 var(--space-3); }
.prose ul { padding-left: 1.2em; margin: var(--space-3) 0; }
.prose li + li { margin-top: var(--space-2); }
.prose li::marker { color: var(--peony); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: calc(760px + 2 * var(--gutter)); }
.section { padding-block: var(--section-pad); }
.section--tight { padding-top: 0; }
/* Section tones: grain rides on every tone so paper stays paper. */
.section--kraft { background-color: var(--kraft-50); background-image: var(--grain); }
.section--mint { background-color: var(--mint-50); background-image: var(--grain); }
.section--blush { background-color: var(--blush-50); background-image: var(--grain); }
.section--paper { background-color: var(--paper); }
/* Ink: black wrapping paper. One per page at most, the rhythm breaker. Text flips to paper; blush and
   mint may be text only here (8.5:1 and 6.8:1 on cocoa). Peony fails on cocoa, so accents go blush. */
.section--ink { --ink-soft: #CFC4BB; position: relative; background-color: var(--cocoa); color: var(--paper);
  background-image: radial-gradient(60% 70% at 12% 8%, rgba(244, 198, 207, .10), transparent 70%), radial-gradient(50% 60% at 92% 100%, rgba(168, 195, 166, .08), transparent 70%); }
.section--ink .eyebrow { color: var(--kraft-50); }
.section--ink .heading em, .section--ink .subhead em, .section--ink blockquote em { color: var(--blush); }
.section--ink .link-arrow { color: var(--blush); }
.section--ink .script { color: var(--blush); }
.section--ink :focus-visible { outline-color: var(--blush); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--space-3) var(--space-6); margin-bottom: clamp(28px, 3.5vw, 56px); }
.section-head > div { display: grid; gap: var(--space-3); max-width: 42rem; }
.section-head > a { white-space: nowrap; flex: none; }
.stack > * + * { margin-top: var(--space-4); }
.page-head { padding-block: var(--space-8) clamp(28px, 3.5vw, 48px); display: grid; gap: var(--space-3); }
.page-head .intro { color: var(--cocoa-soft); max-width: 58ch; text-wrap: pretty; }
.hairline { height: 1px; background: var(--line); border: 0; margin: 0; }

.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; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--cocoa); color: var(--white); padding: 12px 16px; border-radius: var(--radius-sm); text-decoration: none; }
.skip-link:focus { top: 8px; color: var(--white); }

/* Leaf divider (legacy markup in about.html). */
.divider-leaf { display: flex; justify-content: center; color: var(--mint); padding-block: var(--space-8); }

/* ---------- Motion ---------- */
.htmx-added { opacity: 0; }
.htmx-settling .htmx-added, .htmx-added.htmx-settling { opacity: 1; transition: opacity var(--dur-quick) var(--ease-bloom); }
.fade-in { animation: fade-up var(--dur-soft) var(--ease-bloom) both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Scroll reveal. Content is visible without JS: the hidden start state needs html.js (set by boot.js
   in <head>). motion.js adds html.has-motion and toggles .is-revealed with an IntersectionObserver.
   Until it runs (or if it never does) a CSS view() timeline, else a timed fade, reveals the content.
   Stagger: set --reveal-i on items, or put .reveal items inside .reveal-group. */
html.js .reveal {
  opacity: 0; transform: translateY(var(--reveal-y, 22px));
  transition: opacity var(--dur-bloom) var(--ease-bloom), transform var(--dur-bloom) var(--ease-bloom), clip-path var(--dur-slow) var(--ease-bloom);
  transition-delay: calc(var(--reveal-i, 0) * 90ms);
}
html.js .reveal--fade { --reveal-y: 0px; }
html.js .reveal--mask { --reveal-y: 0px; opacity: 1; clip-path: inset(0 0 100% 0); }
html.js .reveal--scale { --reveal-y: 0px; transform: scale(.96); }
html.js .reveal.is-revealed { opacity: 1; transform: none; }
/* Only mask reveals clip; a clip on the others would crop hanging tags and paper sheets. */
html.js .reveal--mask.is-revealed { clip-path: inset(0); }
/* Line-by-line text: <span class="reveal-line"><span>…</span></span> inside a .reveal. */
.reveal-line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.reveal-line > span { display: block; }
html.js .reveal .reveal-line > span { transform: translateY(105%); transition: transform var(--dur-bloom) var(--ease-bloom); transition-delay: calc(var(--line-i, 0) * 110ms); }
html.js .reveal.is-revealed .reveal-line > span { transform: none; }
html.js .reveal:has(.reveal-line) { opacity: 1; transform: none; }
.reveal-group > :nth-child(2) { --reveal-i: 1; } .reveal-group > :nth-child(3) { --reveal-i: 2; }
.reveal-group > :nth-child(4) { --reveal-i: 3; } .reveal-group > :nth-child(5) { --reveal-i: 4; }
.reveal-group > :nth-child(n+6) { --reveal-i: 5; }
.reveal-line:nth-child(2) { --line-i: 1; } .reveal-line:nth-child(3) { --line-i: 2; } .reveal-line:nth-child(4) { --line-i: 3; }
/* Failsafe while motion.js has not taken over. */
@keyframes reveal-in { to { opacity: 1; transform: none; } }
@keyframes reveal-mask-in { to { clip-path: inset(0); } }
@keyframes reveal-line-in { to { transform: none; } }
html.js:not(.has-motion) .reveal, html.js:not(.has-motion) .reveal .reveal-line > span { animation: reveal-in var(--dur-bloom) var(--ease-bloom) 1.2s forwards; }
html.js:not(.has-motion) .reveal .reveal-line > span { animation-name: reveal-line-in; }
html.js:not(.has-motion) .reveal--mask { animation-name: reveal-mask-in; }
@supports (animation-timeline: view()) {
  html.js:not(.has-motion) .reveal { animation: reveal-in linear forwards; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  html.js:not(.has-motion) .reveal--mask { animation-name: reveal-mask-in; }
  html.js:not(.has-motion) .reveal .reveal-line > span { animation: reveal-line-in var(--dur-bloom) var(--ease-bloom) .2s forwards; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  html.js .reveal, html.js .reveal .reveal-line > span { opacity: 1; transform: none; clip-path: none; animation: none; transition: none; }
}
