/* roomtone — site styles
   Brand rules (from the one-sheet):
   - Hard edges, no border-radius (the stamp dot is the one circle).
   - Everything sits on a 32px grid; 8/16 are allowed as half-steps inside components.
   - Red (--signal) appears once per page, kept small. Currently: the stamp dot in the header.
   - Ochre (--ochre) is for fills only. It fails text contrast on cream — never use it for text.
   - Fraunces Medium for the name and big statements; Hanken Grotesk for everything else.
*/

:root {
  --paper: #F4ECDF;
  --plaster: #E9DDC9;
  --line: #CDBBA0;
  --ink: #2A1D16;
  --ink-soft: #6A5C50;
  --walnut: #6B4A32;
  --ochre: #C48A2C;
  --signal: #B3342A;

  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Hanken Grotesk', system-ui, sans-serif;

  --max: 1216px;
  --gutter: 32px;
  --section: 128px;

  /* Focus ring color. Dark bands flip it to paper so it stays visible. */
  --focus: var(--ink);

  /* Motion: quick to start, slow to settle. Nothing bounces. */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* The `hidden` attribute should always win, even over display: flex. */
[hidden] { display: none !important; }

a {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--walnut); text-decoration-thickness: 2px; }

img { max-width: 100%; display: block; }

h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3, .quote { text-wrap: balance; }
p { text-wrap: pretty; }

::selection { background: var(--ochre); color: var(--ink); }

/* Anchor jumps land with a little breathing room. */
[id] { scroll-margin-top: 32px; }

.serif { font-family: var(--serif); font-weight: 500; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.lede { font-size: 20px; }
.soft { color: var(--ink-soft); }
.measure { max-width: 40em; }

/* Readable by screen readers, invisible on screen. */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper); padding: 12px 16px;
  --focus: var(--ink);
}
.skip:focus { left: 16px; top: 16px; z-index: 10; color: var(--paper); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
/* <main> takes focus from the skip link; no ring needed on the whole page. */
main:focus { outline: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 16px 32px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: 0;
  cursor: pointer;
}
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.1s; }
  .btn:active { transform: translateY(1px); }
}
.btn:hover { text-decoration: none; }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--walnut); border-color: var(--walnut); color: var(--paper); }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--plaster); color: var(--ink); }
.btn--light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn--light:hover { background: var(--plaster); border-color: var(--plaster); color: var(--ink); }
.btn--small { min-height: 44px; padding: 12px 24px; font-size: 16px; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  text-decoration: none;
}
/* The mark: a floor plan of a room, doorway and all, with the tone (red dot) inside. */
.stamp { display: block; flex: none; width: 32px; height: 32px; }
.stamp__walls { fill: var(--ink); }
.stamp__dot { fill: var(--signal); }
.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1;
  color: var(--ink);
  border-bottom: 3px solid currentColor;
  padding-bottom: 2px;
}

.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 32px; margin-left: auto; font-size: 16px; font-weight: 500; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.nav a:hover { text-decoration: underline; }

/* Tablets and phones: brand + Book button on top, section links in their own row below.
   (Any wider and the links and the full Book button don't fit on one row.) */
@media (max-width: 1040px) {
  .nav { order: 3; flex-basis: 100%; margin-left: 0; gap: 0 24px; }
}
/* Phones: smaller wordmark, and the Book button just says "Book". */
@media (max-width: 760px) {
  .wordmark { font-size: 24px; }
  .hide-sm { display: none; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.band--plaster { background: var(--plaster); border-block: 1px solid var(--line); }
.band--ink { background: var(--ink); color: var(--paper); --focus: var(--paper); }
.band--walnut { background: var(--walnut); color: var(--paper); --focus: var(--paper); }
.rule-top { border-top: 1px solid var(--line); }

.split {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
}
.split > :first-child { flex: 1 1 280px; }
.split > :last-child { flex: 2 1 480px; min-width: 0; }

.stack { display: flex; flex-direction: column; gap: 24px; }
.stack--tight { gap: 16px; }

.h2 { font-family: var(--serif); font-weight: 500; font-size: 48px; line-height: 1.1; }
.h2--sm { font-size: 40px; }

/* Hero */
.hero .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 64px;
  padding-block: 96px var(--section);
}
.hero__copy { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(44px, 6vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.hero__sub { max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* Color blocks frame the photo: a strip above, the photo in portrait, a strip below. */
.blocks {
  flex: 1 1 400px;
  max-width: 440px;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: 64px auto 32px;
}
.blocks .photo { aspect-ratio: 4 / 5; }
/* Keep the table and the people in frame when the photo is cropped. */
.blocks .photo img { object-position: 50% 62%; }
.blocks > :nth-child(1) { grid-column: 1 / 3; background: var(--walnut); }
.blocks > :nth-child(2) { grid-column: 3 / 5; background: var(--plaster); }
.blocks > :nth-child(3) { grid-column: 1 / 5; }
.blocks > :nth-child(4) { grid-column: 1 / 2; background: var(--ochre); }
.blocks > :nth-child(5) { grid-column: 2 / 5; background: var(--ink); }

/* Photo placeholder — swap for <img> when photography exists */
.photo {
  background: var(--plaster);
  border: 1px dashed var(--ink-soft);
  color: var(--ink-soft);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo:has(img) { padding: 0; border: 0; }

/* Quote */
.quote {
  max-width: 18em;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.15;
}
.quote-band { padding-block: 96px; }

/* Steps */
.steps {
  list-style: none;
  padding: 0;
  margin: 64px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}
/* The bar on top of each step is a ::before (not a border) so it can fill in on scroll. */
.step { position: relative; display: flex; flex-direction: column; gap: 16px; padding-top: 30px; }
.step::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--ink);
  transform-origin: left;
}
.step:last-child::before { background: var(--ochre); }
.step__num { font-size: 14px; font-weight: 600; letter-spacing: 0.12em; color: var(--ink-soft); }
.step h3 { font-family: var(--serif); font-weight: 500; font-size: 32px; }

/* Brief */
.brief-wrap { display: flex; flex-wrap: wrap; gap: 64px; align-items: flex-start; }
.brief-wrap > :first-child { flex: 1 1 320px; min-width: 0; }
.brief { flex: 1 1 480px; min-width: 0; border: 1px solid var(--line); background: var(--paper); }
.brief__head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  padding: 24px 32px; border-bottom: 1px solid var(--line);
}
.brief__rows { list-style: none; margin: 0; padding: 0; }
.brief__row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px 24px;
  padding: 24px 32px;
}
.brief__row + .brief__row { border-top: 1px solid var(--line); }
.brief__time, .brief__track { font-weight: 600; }
.brief__time { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

.brief__body { display: flex; flex-direction: column; gap: 0; }
.brief__listen { margin-top: 16px; }
.brief__listen a { font-weight: 600; }

/* Play triangle drawn in CSS (a ▶ character can turn into an emoji on phones). */
.btn--play { gap: 12px; }
.btn--play::before {
  content: "";
  width: 0; height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor;
}
.brief__player { display: block; width: 100%; max-width: 400px; height: 42px; border: 0; }
.brief__player--apple { max-width: 660px; height: 175px; background: transparent; }

/* js/site.js marks the row that matches the visitor's time of day. */
.brief__row.is-now { background: var(--plaster); box-shadow: inset 4px 0 0 var(--ochre); }
.brief__now {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  padding: 2px 8px;
}

/* Promises */
.promises { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 48px; padding-block: 96px; }
.promise { display: flex; flex-direction: column; gap: 12px; }
.promise__swatch { width: 32px; height: 32px; }
.promise__swatch--walnut { background: var(--walnut); }
.promise__swatch--ochre { background: var(--ochre); }
.promise__swatch--ink { background: var(--ink); }
.promise h3 { font-size: 22px; font-weight: 600; }

/* About */
.about .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 64px; }
.about .photo { flex: 1 1 320px; min-width: 0; aspect-ratio: 4 / 5; }
.about__copy { flex: 2 1 440px; min-width: 0; }

/* FAQ — a drawn +/− replaces the browser's triangle (display: flex removes it anyway).
   Two bars: ::after is the horizontal one, ::before the vertical one that turns flat when open. */
.faq details { border-top: 1px solid var(--line); padding-block: 24px; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-right: 56px;
  font-weight: 600;
  font-size: 20px;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 16px;
  height: 2px;
  margin-top: -1px;
  background: currentColor;
}
.faq summary::before { transform: rotate(90deg); }
.faq details[open] > summary::before { transform: rotate(0deg); }
.faq summary:hover { color: var(--walnut); }
.faq details p { margin-top: 16px; padding-right: 56px; color: var(--ink-soft); }

/* CTA band */
.cta .wrap { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px 64px; }
.cta__copy { flex: 1 1 480px; }
.cta h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(40px, 5vw, 64px); line-height: 1.05; }

/* Footer */
.site-footer { background: var(--ink); color: var(--plaster); font-size: 16px; --focus: var(--paper); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; padding-block: 64px; }
.site-footer a { color: var(--paper); }
.site-footer a:hover { color: var(--plaster); }
.site-footer .wordmark { color: var(--paper); font-size: 32px; align-self: flex-start; }
.footer-brand { display: flex; flex-direction: column; gap: 16px; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Book page ---------- */
.book .wrap { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 64px; padding-block: 96px var(--section); }
.book__intro { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.book h1, .not-found h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(40px, 5vw, 64px); line-height: 1.05; letter-spacing: -0.01em; }
.expect { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.expect__row { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; padding-block: 24px; border-bottom: 1px solid var(--line); }
.expect__row .step__num { padding-top: 3px; }
.mini-blocks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); height: 64px; }
.mini-blocks > :nth-child(1) { background: var(--walnut); }
.mini-blocks > :nth-child(2) { background: var(--ochre); }
.mini-blocks > :nth-child(3) { grid-column: 3 / 5; background: var(--ink); }

.scheduler {
  flex: 1 1 520px;
  min-width: 0;
  min-height: 640px;
  background: var(--plaster);
  border: 1px solid var(--line);
  overflow: auto;
}
.scheduler__fallback { padding: 48px 32px; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }

/* ---------- Notes ---------- */
/* Index page and home-page list share .note-list. */
.notes-head { padding-block: 96px 64px; }
.notes-head h1, .note__head h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(40px, 5vw, 64px); line-height: 1.05; letter-spacing: -0.01em; }

.note-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.note-list li { border-bottom: 1px solid var(--line); }
.note-list a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-block: 32px;
  text-decoration: none;
}
.note-list__title { font-family: var(--serif); font-weight: 500; font-size: 28px; line-height: 1.2; }
.note-list__dek { color: var(--ink-soft); }
.note-list a:hover .note-list__title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
.notes-index { padding-bottom: var(--section); }
.notes-all { margin-top: 32px; font-weight: 600; }

/* A single note */
.note__head { padding-block: 96px 64px; border-bottom: 1px solid var(--line); }
.note__head .stack { max-width: 40em; }
.note__body { padding-block: 64px var(--section); }

/* Long-form text. Kept to a readable line length. */
.prose { max-width: 38em; font-size: 20px; line-height: 1.65; }
.prose > * + * { margin-top: 24px; }
.prose h2 { font-family: var(--serif); font-weight: 500; font-size: 32px; line-height: 1.2; margin-top: 64px; }
.prose h3 { font-size: 22px; font-weight: 600; margin-top: 48px; }
.prose h2 + *, .prose h3 + * { margin-top: 16px; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 8px; }
/* .pull is a line from the text set large; blockquote is for quoting someone else. Same look. */
.prose blockquote, .prose .pull {
  margin-block: 48px;
  margin-inline: 0;
  padding-left: 24px;
  border-left: 4px solid var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.3;
}
.prose .brief__listen { margin-top: 16px; }

/* ---------- 404 ---------- */
.not-found .wrap { padding-block: var(--section); align-items: flex-start; }
.not-found .actions { margin-top: 8px; }

/* ---------- Motion ----------
   All of it sits behind prefers-reduced-motion. Load animations are CSS only;
   scroll reveals need js/site.js to add .reveal (and .is-in once on screen),
   so without JS everything is simply visible. */
@media (prefers-reduced-motion: no-preference) {

  /* Hero on load: copy rises, color blocks slide into place, photo rises into its frame. */
  .hero__copy > *, .book__intro > *, .not-found .wrap > *, .notes-head .stack > *, .note__head .stack > * { animation: rise 0.8s var(--ease) both; }
  .notes-head .stack > :nth-child(2), .note__head .stack > :nth-child(2) { animation-delay: 0.08s; }
  .notes-head .stack > :nth-child(3), .note__head .stack > :nth-child(3) { animation-delay: 0.16s; }
  .hero__copy > :nth-child(2), .book__intro > :nth-child(2), .not-found .wrap > :nth-child(2) { animation-delay: 0.08s; }
  .hero__copy > :nth-child(3), .book__intro > :nth-child(3), .not-found .wrap > :nth-child(3) { animation-delay: 0.16s; }
  .hero__copy > :nth-child(4), .book__intro > :nth-child(n+4), .not-found .wrap > :nth-child(4) { animation-delay: 0.24s; }

  .blocks > *, .mini-blocks > * { animation: lay-in 0.9s var(--ease) both; transform-origin: left; }
  .blocks > :nth-child(2), .blocks > :nth-child(5) { transform-origin: right; }
  .blocks > :nth-child(1) { animation-delay: 0.15s; }
  .blocks > :nth-child(2) { animation-delay: 0.25s; }
  .blocks > :nth-child(4) { animation-delay: 0.5s; }
  .blocks > :nth-child(5) { animation-delay: 0.6s; }
  .mini-blocks > :nth-child(2) { animation-delay: 0.1s; }
  .mini-blocks > :nth-child(3) { animation-delay: 0.2s; }

  .blocks > .photo { animation: wipe-up 1.1s var(--ease) 0.3s both; }
  .blocks .photo img { animation: settle 1.8s var(--ease) 0.3s both; }

  /* Scroll reveals (classes added by js/site.js) */
  .reveal { opacity: 0; transform: translateY(24px); }
  .reveal.is-in {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
    transition-delay: var(--delay, 0ms);
  }

  .reveal--wipe, .reveal--wipe.is-in { opacity: 1; transform: none; }
  .reveal--wipe { clip-path: inset(100% 0 0 0); }
  .reveal--wipe.is-in { clip-path: inset(0); transition: clip-path 1.1s var(--ease); }

  .reveal--words, .reveal--words.is-in { opacity: 1; transform: none; }
  .reveal--words .word { display: inline-block; opacity: 0; transform: translateY(0.35em); }
  .reveal--words.is-in .word {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
    transition-delay: calc(var(--i) * 70ms);
  }

  /* Step bars fill left to right, just after their step appears. */
  .step.reveal::before { transform: scaleX(0); }
  .step.reveal.is-in::before {
    transform: scaleX(1);
    transition: transform 0.9s var(--ease);
    transition-delay: calc(var(--delay, 0ms) + 200ms);
  }

  /* FAQ: the + turns into a −, and answers open smoothly where supported. */
  .faq summary::before { transition: transform 0.3s var(--ease); }
  .faq details { interpolate-size: allow-keywords; }
  .faq details::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size 0.35s var(--ease), content-visibility 0.35s allow-discrete;
  }
  .faq details[open]::details-content { block-size: auto; }
}

@keyframes rise    { from { opacity: 0; transform: translateY(16px); } }
@keyframes lay-in  { from { transform: scaleX(0); } }
@keyframes wipe-up { from { clip-path: inset(100% 0 0 0); } }
@keyframes settle  { from { transform: scale(1.08); } }

/* Printing shouldn't depend on having scrolled past everything. */
@media print {
  .reveal, .reveal .word { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}

@media (max-width: 600px) {
  :root { --gutter: 24px; --section: 64px; }
  .h2 { font-size: 36px; }
  .h2--sm { font-size: 32px; }
  .hero .wrap { padding-block: 48px 64px; gap: 48px; }
  .actions .btn { flex: 1 1 100%; }
  .blocks { flex-basis: 100%; max-width: none; grid-template-rows: 32px auto 32px; }
  .blocks .photo { aspect-ratio: 1 / 1; }
  .brief__row { grid-template-columns: 1fr; padding-inline: 24px; }
  .brief__head { padding-inline: 24px; }
  .faq details p { padding-right: 0; }
  .notes-head, .note__head { padding-block: 48px 48px; }
  .note__body { padding-top: 48px; }
  .prose { font-size: 18px; }
  .prose h2 { font-size: 28px; margin-top: 48px; }
  .note-list__title { font-size: 24px; }
  .book .wrap { padding-block: 48px var(--section); gap: 48px; }
  .scheduler { min-height: 720px; }
  .scheduler__fallback { padding: 32px 24px; }
}
