/* ==========================================================================
   TTHC v3 — base: reset, type, layout, components, safety, motion.
   Owned by the lead. Section files must not restyle these; compose them.
   ========================================================================== */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); scroll-padding-bottom: 88px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: var(--fs-body); line-height: var(--lh-body);
  font-optical-sizing: auto; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--garden); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--garden-hover); text-decoration-thickness: 2px; }
::selection { background: var(--blush); color: var(--forest); }
:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; }

/* paper grain: a fixed, static tile — cheap, and it makes the flat pastels feel like paper */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .045;
  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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .2 0 0 0 0 .15 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- type ---------- */
h1, h2, h3, h4, .display, .h1, .h2, .h3 {
  font-family: var(--serif); color: var(--forest); font-weight: 350; margin: 0 0 .45em;
  font-optical-sizing: auto; text-wrap: balance;
}
.display { font-size: clamp(2.9rem, 1.4rem + 5.6vw, 6.4rem); line-height: .98; letter-spacing: -.025em; font-weight: 300; }
h1, .h1   { font-size: clamp(2.6rem, 1.5rem + 4.2vw, 5rem); line-height: 1; letter-spacing: -.022em; font-weight: 300; }
h2, .h2   { font-size: clamp(2.05rem, 1.3rem + 2.6vw, 3.5rem); line-height: 1.04; letter-spacing: -.018em; }
h3, .h3   { font-size: clamp(1.35rem, 1.15rem + .6vw, 1.7rem); line-height: 1.18; letter-spacing: -.008em; font-weight: 400; }
h4        { font-family: var(--sans); font-size: 1.05rem; font-weight: 700; color: var(--forest); letter-spacing: 0; }
h1 em, h2 em, h3 em, .display em, .h1 em, .h2 em {
  font-style: italic; font-weight: 300; color: var(--rose-deep);
}
.lead { font-size: clamp(1.2rem, 1.05rem + .55vw, 1.45rem); line-height: 1.55; color: var(--ink-soft); max-width: 36em; }
.small { font-size: .95rem; }
.muted { color: var(--ink-soft); }
.nowrap { white-space: nowrap; }
strong, b { font-weight: 700; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em; margin: 0 0 1.1rem;
  font-family: var(--sans); font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--garden);
}
.eyebrow::before, .leaf-list > li::before, .leaf {
  content: ""; flex: none; width: .72em; height: .96em; background: currentColor;
  -webkit-mask: url(../assets/leaf.svg) center / contain no-repeat; mask: url(../assets/leaf.svg) center / contain no-repeat;
}
.leaf { display: inline-block; vertical-align: middle; }
.eyebrow { text-wrap: balance; }
.eyebrow--rose { color: var(--rose-deep); }
.center { text-align: center; }
.center .eyebrow { justify-content: center; }
.center .lead { margin-inline: auto; }

/* ---------- layout ---------- */
.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }
.wrap--narrow { width: min(760px, 100% - var(--gutter) * 2); margin-inline: auto; }
.wrap--reading { width: min(680px, 100% - var(--gutter) * 2); margin-inline: auto; }
.sec { padding-block: clamp(72px, 9vw, 136px); position: relative; }
.sec--tight { padding-block: clamp(44px, 5.5vw, 80px); }
.sec + .sec--flush-top, .sec--flush-top { padding-top: 0; }

/* sheets: rounded colour fields inset from the page edge */
.sheet {
  position: relative; isolation: isolate; overflow: hidden; overflow: clip; /* clip keeps position: sticky working inside */
  margin-inline: clamp(8px, 1.6vw, 24px); border-radius: var(--r-sheet);
  background: var(--field, var(--mint));
  padding-block: clamp(64px, 8vw, 120px);
}
.sheet[data-field="mint"]  { --field: var(--mint); }
.sheet[data-field="blush"] { --field: var(--blush); }
.sheet[data-field="lilac"] { --field: var(--lilac); }
.sheet[data-field="sage"]  { --field: var(--sage-field); }
.sheet[data-field="white"] { --field: var(--white); box-shadow: var(--shadow-sm); }
.sheet--tight { padding-block: clamp(40px, 5vw, 72px); }

.split { display: grid; grid-template-columns: var(--split, 1.1fr .9fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.split > * { min-width: 0; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.head { margin-bottom: clamp(32px, 4.5vw, 64px); max-width: 44rem; }
.head.center { margin-inline: auto; }
.head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem 3rem; flex-wrap: wrap; max-width: none; }
.head--row > div { max-width: 44rem; }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--white); --fg: var(--forest); --bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: .8rem 1.55rem; border-radius: 999px; border: 1.5px solid var(--bd);
  background: var(--bg); color: var(--fg); text-decoration: none; white-space: nowrap;
  font-family: var(--sans); font-weight: 700; font-size: 1.0625rem; line-height: 1.15; letter-spacing: .005em;
  cursor: pointer; transition: background .25s, color .25s, border-color .25s, box-shadow .3s var(--ease-out), transform .3s var(--ease-out);
}
.btn:hover { color: var(--fg); text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { --bg: var(--garden); --fg: #fff; --bd: var(--garden); box-shadow: 0 10px 24px -12px rgba(43, 106, 67, .7); }
.btn--primary:hover { --bg: var(--garden-hover); --bd: var(--garden-hover); box-shadow: 0 14px 30px -14px rgba(43, 106, 67, .8); }
.btn--soft { box-shadow: var(--shadow-sm); }
.btn--soft:hover { --bd: var(--sage); }
.btn--ghost { --bg: transparent; --bd: transparent; padding-inline: 0; border-width: 0; min-height: 44px; box-shadow: none; }
.btn--ghost:hover { --fg: var(--garden-hover); transform: none; }
.btn--blush { --bg: var(--blush); --fg: var(--rose-deep); --bd: transparent; }
.btn--lg { min-height: 60px; padding: 1rem 1.9rem; font-size: 1.125rem; }
.btn .ico { width: 20px; height: 20px; flex: none; }
.btn .arr { display: inline-block; transition: transform .35s var(--ease-out); }
.btn:hover .arr { transform: translateX(4px); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* ---------- small things ---------- */
.ico { width: 20px; height: 20px; flex: none; }
.chip {
  display: inline-flex; align-items: center; gap: .4em; padding: .35em .85em; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line); color: var(--forest);
  font-size: .9rem; font-weight: 700; line-height: 1.3;
}
.chip--mint { background: var(--mint); border-color: transparent; }
.chip--blush { background: var(--blush); border-color: transparent; color: var(--rose-deep); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.trust { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; list-style: none; font-size: 1rem; font-weight: 700; color: var(--forest); }
.trust li { display: inline-flex; align-items: center; gap: .5em; }
.trust li::before { content: ""; width: .5em; height: .66em; background: var(--garden); -webkit-mask: url(../assets/leaf.svg) center / contain no-repeat; mask: url(../assets/leaf.svg) center / contain no-repeat; }

/* ---------- lists ---------- */
.leaf-list { list-style: none; display: grid; gap: .8rem; }
.leaf-list > li { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: baseline; }
.leaf-list > li::before { width: .8em; height: 1.05em; transform: translateY(.18em); background: var(--garden); }

.steps { list-style: none; counter-reset: step; display: grid; gap: clamp(20px, 3vw, 40px); }
.steps--row { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
@media (max-width: 860px) { .steps--row { grid-template-columns: 1fr; } }
.steps > li { counter-increment: step; position: relative; padding-top: 4.6rem; }
.steps > li::before {
  content: counter(step); position: absolute; top: 0; left: 0;
  font-family: var(--serif); font-weight: 300; font-size: 3.6rem; line-height: 1; color: var(--rose-deep);
  font-feature-settings: "lnum";
}
.steps h3 { margin-bottom: .35rem; }
.steps p { color: var(--ink-soft); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 0; }
.facts dt { font-weight: 700; color: var(--forest); }
.facts dd { margin: 0; }

/* ---------- cards ---------- */
.card {
  position: relative; background: var(--white); border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 40px); box-shadow: var(--shadow-sm);
}
.card--flat { box-shadow: none; border: 1px solid var(--line); }
.tile-link {
  display: flex; flex-direction: column; gap: .6rem; text-decoration: none; color: var(--ink);
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.tile-link:hover { color: var(--ink); transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.tile-link .go { margin-top: auto; padding-top: 1rem; display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--garden); }
.tile-link .go .arr { transition: transform .35s var(--ease-out); }
.tile-link:hover .go .arr { transform: translateX(5px); }

/* ---------- quotes & notes ---------- */
.quote { margin: 0; }
.quote p { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(1.45rem, 1.1rem + 1.3vw, 2.3rem); line-height: 1.28; color: var(--forest); letter-spacing: -.01em; }
.quote cite { display: block; margin-top: 1rem; font-style: normal; font-size: .9rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rose-deep); }
.note { background: var(--white); border-radius: var(--r); padding: 1.3rem 1.5rem; border: 1px solid var(--line); }
.note--urgent { background: var(--blush); border: 0; border-left: 5px solid var(--rose-deep); border-radius: 6px var(--r) var(--r) 6px; }
.note--urgent strong { color: var(--rose-deep); }

/* ---------- accordion ---------- */
details.acc { border-bottom: 1px solid var(--line); }
details.acc:first-of-type { border-top: 1px solid var(--line); }
details.acc > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1.2rem;
  padding: 1.25rem .2rem; min-height: 60px; font-family: var(--serif); font-size: clamp(1.2rem, 1.05rem + .5vw, 1.45rem); color: var(--forest); line-height: 1.25;
}
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after {
  content: "+"; content: "+" / ""; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--mint); color: var(--forest); font-family: var(--sans); font-size: 1.35rem; line-height: 1; transition: transform .3s var(--ease-out), background .3s;
}
details.acc[open] > summary::after { content: "–"; content: "–" / ""; background: var(--blush); }
details.acc > .acc-body { padding: 0 .2rem 1.5rem; color: var(--ink-soft); max-width: 44rem; }

/* ---------- forms ---------- */
.form { display: grid; gap: 1.15rem; }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.15rem; align-items: end; }
.field { display: grid; gap: .4rem; }
.field label, .field .label { font-weight: 700; font-size: 1rem; color: var(--forest); }
.field label .opt, .hint { font-weight: 400; color: var(--ink-soft); font-size: .95rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 56px; padding: .85rem 1rem; border-radius: var(--r-sm);
  border: 1.5px solid var(--line-strong); background: var(--white); font-size: 1.0625rem; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--forest); outline-offset: 2px; border-color: var(--forest); }
.field [aria-invalid="true"] { border-color: var(--rose-deep); }
.check { display: grid; grid-template-columns: 24px 1fr; gap: .8rem; align-items: start; font-size: 1rem; color: var(--ink); cursor: pointer; }
.check input { width: 22px; height: 22px; margin: .15rem 0 0; accent-color: var(--garden); flex: none; }
.form-done { display: none; padding: 1.3rem 1.5rem; border-radius: var(--r); background: var(--mint); color: var(--forest); font-weight: 700; }
.form.is-done .form-done { display: block; }
.form.is-done > :not(.form-done) { display: none; }

/* ---------- media ---------- */
.photo { border-radius: var(--r-lg); overflow: hidden; background: var(--mint); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo--leaf { border-radius: 0; -webkit-mask: url(../assets/leaf.svg) center / contain no-repeat; mask: url(../assets/leaf.svg) center / contain no-repeat; }

/* ---------- safety ---------- */
.skip {
  position: fixed; top: 12px; left: 12px; z-index: 300; padding: .8rem 1.2rem; border-radius: 999px;
  background: var(--forest); color: #fff; font-weight: 700; text-decoration: none; transform: translateY(-160%);
}
.skip:focus { transform: none; color: #fff; }
.quick-exit {
  position: fixed; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); z-index: 250;
  display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: .7rem 1.1rem;
  border-radius: 999px; background: var(--forest); color: #fff; text-decoration: none;
  font-weight: 700; font-size: .95rem; line-height: 1; box-shadow: 0 12px 28px -10px rgba(31, 74, 51, .55);
  transition: background .2s, transform .25s var(--ease-out);
}
.quick-exit:hover { background: #163826; color: #fff; transform: translateY(-2px); text-decoration: none; }
.quick-exit .ico { width: 16px; height: 16px; }
.quick-exit kbd { font: 700 .72rem/1 var(--sans); padding: .3rem .45rem; border-radius: 6px; background: rgba(255, 255, 255, .16); }
@media (max-width: 600px) { .quick-exit kbd { display: none; } .quick-exit { min-height: 44px; padding: .6rem 1rem; } }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- motion ---------- */
html.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); transition-delay: var(--d, 0s); }
html.js [data-reveal="fade"] { transform: none; }
html.js [data-reveal].in { opacity: 1; transform: none; }
[data-split] .w { display: inline-block; }
html.js [data-split]:not(.in) .w { opacity: 0; transform: translateY(.4em); }
html.js [data-split] .w { transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms + var(--d, 0s)); }

/* full-page screenshots: let the grain cover the whole document, not just the first screen */
html.static body { position: relative; }
html.static body::before { position: absolute; }
html.static *, html.static *::before, html.static *::after { transition: none !important; animation-delay: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
html.static [data-reveal], html.static [data-split] .w { opacity: 1 !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js [data-reveal], html.js [data-split] .w { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
}
