/* Hale & Dunmore. Brand settings live in :root; change these to restyle the template. */
@font-face { font-family: 'Playfair Display'; src: url('../fonts/playfair-display-latin-wght-normal.woff2') format('woff2'); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('../fonts/playfair-display-latin-wght-italic.woff2') format('woff2'); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Space Mono'; src: url('../fonts/space-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Space Mono'; src: url('../fonts/space-mono-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --desk: #1d2b22;      /* the green desk: opening, services, contact */
  --desk-2: #24352a;
  --desk-3: #142019;
  --paper: #f1ebdd;     /* ledger paper: prices, how it works, questions */
  --paper-2: #e9e1cf;
  --ink: #22261f;
  --ink-2: #4a4f44;
  --muted: #6d7064;
  --red: #b23a26;       /* the ledger's red pen: small accents only */
  --cream: #efe8d8;
  --cream-2: #c6c2b1;
  --line: rgba(34, 38, 31, 0.16);
  --line-2: rgba(34, 38, 31, 0.3);
  --line-dark: rgba(239, 232, 216, 0.16);
  --line-dark-2: rgba(239, 232, 216, 0.32);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;
  --gutter: clamp(20px, 4.5vw, 72px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--desk); color: var(--cream); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--cream); color: var(--desk); border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }

.label { font: 700 12px/1.2 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--cream-2); }
.figure { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 6px; border: 1px solid var(--cream);
  background: var(--cream); color: var(--desk); font: 500 15px/1 var(--sans);
  text-decoration: none; cursor: pointer; transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { background: #fffaf0; }
.btn:active { transform: scale(0.98); }
.btn-ghost { background: transparent; color: var(--cream); border-color: var(--line-dark-2); }
.btn-ghost:hover { background: rgba(239, 232, 216, 0.08); border-color: var(--cream-2); }
.btn-ink { background: var(--desk); color: var(--cream); border-color: var(--desk); }
.btn-ink:hover { background: var(--desk-2); }
.btn-ink.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ink.btn-ghost:hover { background: rgba(34, 38, 31, 0.05); border-color: var(--ink); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 14px; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 20; height: 72px; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: rgba(20, 32, 25, 0.86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-dark);
}
.nav-brand { font: 500 24px/1 var(--serif); letter-spacing: 0.01em; text-decoration: none; }
.nav-links { display: flex; gap: 30px; font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--cream-2); transition: color 0.3s; }
.nav-links a:hover { color: var(--cream); }

/* ---------- The desk ---------- */
.stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.stage canvas, .stage-poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage canvas { opacity: 0; transition: opacity 1.2s var(--ease); }
.scene-ready .stage canvas { opacity: 1; }
.stage-poster { object-fit: cover; object-position: 70% 50%; }
.live.scene-ready .stage-poster { opacity: 0; transition: opacity 1.2s var(--ease); }
/* Desk-green shade behind the text column: always a little, fully during the services. */
.stage-shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(29, 43, 34, 0.96) 0%, rgba(29, 43, 34, 0.92) 36%, rgba(29, 43, 34, 0) 58%);
  opacity: calc(0.35 + 0.65 * var(--story, 0));
}

main, .footer { position: relative; z-index: 1; }

/* ---------- Opening ---------- */
.hero { min-height: 100svh; display: grid; align-items: center; padding: 96px var(--gutter) 48px; }
.hero-copy { max-width: min(560px, 40vw); display: grid; gap: 22px; align-content: start; }
.hero-title { font: 400 clamp(46px, 5.4vw, 84px)/1.02 var(--serif); letter-spacing: -0.012em; }
.hero-lede { color: var(--cream-2); max-width: 44ch; font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }

/* ---------- Services (pinned) ---------- */
.story-pin { position: relative; height: 100svh; overflow: hidden; }
.story-head { position: absolute; top: 108px; left: var(--gutter); display: flex; gap: 16px; align-items: baseline; }
.story-count { color: var(--muted); }
.stops { position: absolute; left: var(--gutter); top: 50%; width: min(33vw, 460px); height: 0; }
.stop { position: absolute; left: 0; right: 0; top: 0; transform: translateY(-50%); }
.stop-photo { display: none; }
.stop-text { display: grid; gap: 16px; opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.9s var(--ease); }
.stop.is-active .stop-text { opacity: 1; transform: none; transition-delay: 0.1s; }
.stop-kind { color: #e2836b; }
.stop-title { font: 400 clamp(36px, 3.8vw, 58px)/1.05 var(--serif); letter-spacing: -0.01em; }
.stop-body { color: var(--cream-2); max-width: 38ch; }
.story-ticks { position: absolute; left: var(--gutter); bottom: 44px; display: flex; gap: 8px; }
.story-ticks span { width: 28px; height: 2px; background: var(--line-dark-2); transition: background 0.5s var(--ease); }
.story-ticks span.on { background: var(--cream); }

/* ---------- Ledger-paper sections ---------- */
.sheet {
  padding: clamp(96px, 11vw, 160px) var(--gutter);
  background: var(--paper) url('../assets/paper.webp') repeat; background-size: 640px;
  color: var(--ink);
}
.sheet .label { color: var(--red); }
.sheet + .sheet { padding-top: 0; }
.section-head { display: grid; gap: 18px; max-width: 880px; margin-bottom: clamp(44px, 5vw, 72px); }
.section-title { font: 400 clamp(38px, 4.6vw, 70px)/1.04 var(--serif); letter-spacing: -0.01em; }
.section-lede { color: var(--ink-2); max-width: 54ch; }
.mini-title { font: 700 12px/1.2 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }

.prices { box-shadow: 0 -30px 60px rgba(0, 0, 0, 0.25); }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.plan { display: grid; grid-template-rows: auto auto 1fr auto; gap: 18px; padding: 30px 28px 28px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(255, 252, 244, 0.5); }
.plan-mid { background: var(--desk); color: var(--cream); border-color: var(--desk); }
.plan-name { font: 400 28px/1.1 var(--serif); }
.plan-price { color: var(--ink-2); }
.plan-mid .plan-price { color: var(--cream-2); }
.plan-price .figure { display: block; font-size: 44px; line-height: 1.1; color: var(--ink); letter-spacing: -0.02em; }
.plan-mid .plan-price .figure { color: var(--cream); }
.plan-list { display: grid; align-content: start; }
.plan-list li { padding: 10px 0 10px 26px; border-top: 1px solid var(--line); position: relative; font-size: 16px; }
.plan-mid .plan-list li { border-color: var(--line-dark); }
.plan-list li::before { content: ''; position: absolute; left: 2px; top: 17px; width: 12px; height: 7px; border-left: 2px solid var(--red); border-bottom: 2px solid var(--red); transform: rotate(-48deg); }
.plan-mid .plan-list li::before { border-color: #e2836b; }
.plan .btn { justify-self: start; margin-top: 8px; }
.plan-mid .btn-ink { background: var(--cream); color: var(--desk); border-color: var(--cream); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.steps li { border-top: 2px solid var(--ink); padding-top: 22px; display: grid; gap: 10px; align-content: start; }
.step-n { color: var(--red); font-size: 14px; }
.steps h3 { font: 400 28px/1.12 var(--serif); }
.steps p { color: var(--ink-2); }
.who { margin-top: clamp(64px, 8vw, 112px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px 40px; align-items: start; }
.who .mini-title { grid-column: 1; margin: 0; padding-top: 6px; }
.who-lede { grid-column: 2; font: 400 26px/1.25 var(--serif); }
.who-list { grid-column: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; margin-top: 12px; }
.who-list li { padding: 12px 0; border-top: 1px solid var(--line); }

.faq-list { max-width: 880px; border-bottom: 1px solid var(--line-2); }
.faq-list details { border-top: 1px solid var(--line-2); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; padding: 22px 0; font: 400 24px/1.25 var(--serif); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; font: 400 24px/1 var(--mono); color: var(--red); transition: transform 0.3s var(--ease); }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding: 0 0 24px; color: var(--ink-2); max-width: 62ch; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 96px); padding: clamp(96px, 11vw, 160px) var(--gutter); background: var(--desk); }
.contact .section-lede { color: var(--cream-2); }
.contact-intro { display: grid; gap: 18px; align-content: start; }
.contact-facts { display: grid; gap: 0; margin-top: 18px; border-bottom: 1px solid var(--line-dark); }
.contact-facts div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line-dark); }
.contact-facts dt { font: 700 12px/1.6 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--cream-2); }
.contact-facts a { text-underline-offset: 3px; }
.contact-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; align-content: start; }
.field { display: grid; gap: 8px; }
.field span { font: 700 11px/1.2 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--cream-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid var(--line-dark-2); border-radius: 6px;
  background: rgba(239, 232, 216, 0.05); color: var(--cream); font: 400 17px/1.3 var(--sans); color-scheme: dark;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cream); background: rgba(239, 232, 216, 0.08); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #e2836b; }
.field-wide { grid-column: 1 / -1; }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.form-status { color: var(--cream-2); font-size: 15px; }

.footer { padding: 48px var(--gutter) 40px; display: flex; flex-wrap: wrap; gap: 10px 36px; align-items: baseline; background: var(--desk-3); color: var(--cream-2); font-size: 15px; border-top: 1px solid var(--line-dark); }
.footer-brand { font: 500 24px/1 var(--serif); color: var(--cream); }
.footer-small { margin-left: auto; color: var(--muted); }

/* ---------- Still version: reduced motion, no WebGL, or opened from the folder ---------- */
:root:not(.live) .stage { position: absolute; height: 100svh; }
:root:not(.live) .stage canvas { display: none; }
:root:not(.live) .story-pin { height: auto; overflow: visible; padding: 110px var(--gutter) 96px; background: var(--desk); }
:root:not(.live) .story-ticks, :root:not(.live) .story-count { display: none; }
:root:not(.live) .story-head { position: static; margin-bottom: 40px; }
:root:not(.live) .stops { position: static; width: auto; height: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px 40px; }
:root:not(.live) .stop { position: static; transform: none; display: grid; gap: 22px; align-content: start; }
:root:not(.live) .stop-photo { display: block; width: 100%; border-radius: 8px; }
:root:not(.live) .stop-text { opacity: 1; transform: none; }
:root:not(.live) .stop-title { font-size: clamp(30px, 3vw, 42px); }

/* Screenshots (?shot=1, ?y=..., ?poster=1): no fade-in. */
.instant .stage canvas, .instant .stage-poster { transition: none !important; }

.poster-mode .nav, .poster-mode main, .poster-mode .footer, .poster-mode .skip, .poster-mode .stage-shade { visibility: hidden; }

/* ---------- Tablets and phones ---------- */
@media (max-width: 980px) {
  .hero { align-items: start; }
  .hero-copy { max-width: 600px; }
  .stage-shade { background: linear-gradient(180deg, rgba(29, 43, 34, 0.92) 0%, rgba(29, 43, 34, 0.75) 38%, rgba(29, 43, 34, 0) 56%); opacity: calc(1 - var(--story, 0)); }
  .story-pin::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(29, 43, 34, 0.96) 0%, rgba(29, 43, 34, 0.86) 34%, rgba(29, 43, 34, 0) 58%); }
  .story-pin { z-index: 0; }
  .stops { left: var(--gutter); right: var(--gutter); width: auto; top: auto; bottom: 72px; }
  .stop { top: auto; bottom: 0; transform: none; }
  .story-head { display: none; }
  :root:not(.live) .story-head { display: flex; }
  .plans, .steps { grid-template-columns: minmax(0, 1fr); }
  .who { grid-template-columns: minmax(0, 1fr); }
  .who .mini-title, .who-lede, .who-list { grid-column: 1; }
  .contact { grid-template-columns: minmax(0, 1fr); }
  :root:not(.live) .story-pin::after { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav { height: 62px; }
  .nav-links { display: none; }
  .hero { padding-top: 92px; }
  .hero-lede { font-size: 16px; }
  .stop-title { font-size: clamp(32px, 8.6vw, 40px); }
  .stop-body { font-size: 15px; }
  .story-ticks { bottom: 34px; }
  .who-list { grid-template-columns: minmax(0, 1fr); }
  .contact-form { grid-template-columns: minmax(0, 1fr); }
  .faq-list summary { font-size: 20px; }
  :root:not(.live) .stops { grid-template-columns: minmax(0, 1fr); }
  .footer-small { margin-left: 0; }
}

/* Entrances: js/scroll.js marks elements .reveal and adds .in when they come into view. */
.live .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.live .reveal.in, .instant .reveal { opacity: 1; transform: none; }
.instant .reveal { transition: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

/* Screenshot mode: captions switch without fading. */
.instant .stop-text { transition: none !important; }
