/* Isletta Reform Studio: accompanied editorial. One reading column, one drawn companion. */
:root {
  --paper: #FAF7F3;
  --paper-2: #F2EDE6;
  --ink: #272727;
  --ink-soft: #5F5A54;
  --rule: #D9D2C7;
  --line: 3.25px;
  --line-fine: 2px;
  --radius: 14px;
  --bar-h: 64px;
  --gutter: clamp(16px, 2.5vw, 40px);
  --pad-l: max(var(--gutter), env(safe-area-inset-left));
  --pad-r: max(var(--gutter), env(safe-area-inset-right));
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --font-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --font-text: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--bar-h) + 16px); scroll-padding-bottom: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-text);
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a, button, summary { touch-action: manipulation; -webkit-tap-highlight-color: rgba(39, 39, 39, 0.08); }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; text-wrap: balance; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.2rem, 3.6vw, 3.6rem); line-height: 1.02; font-variation-settings: "opsz" 96; }
h2 { font-size: clamp(1.7rem, 2.6vw, 2.5rem); line-height: 1.08; font-variation-settings: "opsz" 72; }
h3 { font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.005em; }
p { margin: 0; text-wrap: pretty; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; box-shadow: 0 0 0 3px var(--paper); }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px; border-radius: var(--radius);
  font: 600 1rem/1 var(--font-text); text-decoration: none; white-space: nowrap;
  transition: transform 140ms var(--ease-out), background-color 160ms ease, border-color 160ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-book { background: var(--ink); color: var(--paper); box-shadow: 0 6px 16px -8px rgba(39, 39, 39, 0.55); }
.btn-quiet { border: 1.5px solid var(--ink); color: var(--ink); background: transparent; }
@media (hover: hover) and (pointer: fine) {
  .btn-book:hover { background: #111; }
  .btn-quiet:hover { background: var(--paper-2); }
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 20; height: var(--bar-h);
  display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px);
  padding: 0 var(--pad-r) 0 var(--pad-l); background: color-mix(in srgb, var(--paper) 94%, transparent);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.bar-mark { display: block; padding: 6px 0; margin-right: auto; border-radius: 6px; }
.bar-mark img { width: 112px; }
.bar-nav { display: flex; gap: clamp(14px, 2vw, 28px); }
.bar-nav a { text-decoration: none; font-weight: 600; font-size: 0.97rem; padding: 10px 2px; }
@media (hover: hover) and (pointer: fine) {
  .bar-nav a:hover, summary:hover { text-decoration: underline; }
  .card a:hover, .visit a:hover, .foot-in a:hover { text-decoration-thickness: 2px; }
}
.bar .btn { min-height: 40px; padding: 0 18px; }
.menu-btn { display: none; }

/* ---------- the story: stage + reading column ---------- */
.story {
  max-width: 1320px; margin: 0 auto; padding: 0 var(--pad-r) 0 var(--pad-l);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
}
.stage-col { grid-column: 1 / span 6; position: relative; }
.stage {
  position: sticky; top: calc(var(--bar-h) + 24px);
  height: min(calc(100svh - var(--bar-h) - 48px), 760px);
  overflow: clip;
}
.stage svg { width: 100%; height: 100%; display: block; }
.read { grid-column: 8 / span 5; padding-bottom: 12vh; }

/* scene drawing */
.fig-fill, .ref-fill { fill: var(--paper); }
.fig-line, .ref-line, .fig-face, .fig-line2 {
  fill: none; stroke: var(--ink); stroke-width: var(--line);
  stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke;
}
.fig-face, .ref-fill.ref-line { fill: var(--paper); }
.fig-line2 { stroke-width: calc(var(--line) * 2); }
.fig-ink { fill: var(--ink); }
.room-line { fill: none; stroke: var(--rule); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.sf-wall { fill: var(--paper); }
.sf-line, .sf-leaf {
  fill: none; stroke: var(--ink); stroke-width: var(--line-fine);
  stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke;
}
.sf-leaf { fill: var(--paper); }
.stage svg.swap { animation: settle 200ms ease-out; }
@keyframes settle { from { opacity: 0; } to { opacity: 1; } }

/* ---------- stops ---------- */
.stop { position: relative; }
.stop > * + * { margin-top: 20px; }
.stop h2 + p { margin-top: 22px; }
.stop .actions { margin-top: 32px; }
.lead { font-size: 1.22rem; line-height: 1.5; }
.soft { color: var(--ink-soft); }

.stop-hero { min-height: calc(100svh - var(--bar-h)); display: flex; flex-direction: column; justify-content: center; padding: 48px 0 40px; }
.hero-mark { width: clamp(220px, 24vw, 340px); }
.tagline { color: var(--ink-soft); font-size: 1.05rem; margin-top: 14px !important; }
.stop-hero h1 { margin-top: 36px !important; max-width: 14ch; }
.stop-hero .lede { margin-top: 22px !important; max-width: 46ch; }
.stop-hero .actions { margin-top: 30px !important; }
.hero-front { display: none; margin: 40px 0 0; }
.marker { display: block; height: 0; margin: 0 !important; }

/* desktop band spacing: the room after each stop is the scroll its transition gets. It sits at the
   bottom of the stop, so a jump to any heading lands with the drawing settled, never mid-move. */
@media (min-width: 1024px) {
  .js #top { margin-bottom: 40vh; }
  .js #welcome { padding-bottom: 38vh; }
  .js #new-here { padding-bottom: 90vh; }
  .js #classes { padding-bottom: 46vh; }
  .js #what-to-expect { padding-bottom: 50vh; }
  .js .peak-quote { margin: 0 0 86vh !important; }
}

/* plates: phone drawings, and the still drawings when the rig is off */
.plate { margin: 0 0 28px; display: none; }
.plate img, .plate .plate-svg { width: 100%; max-width: 440px; aspect-ratio: 364 / 342; height: auto; }

.team { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.card {
  display: grid; grid-template-columns: 76px 1fr; gap: 16px; align-items: start;
  padding: 16px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper);
}
.card img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; background: var(--paper-2); }
.card h4 { font: 600 1.05rem/1.25 var(--font-text); margin: 2px 0 2px; }
.card .role { font-size: 0.9rem; color: var(--ink-soft); }
.card p { margin-top: 6px; font-size: 0.98rem; line-height: 1.5; }
.card details { margin-top: 8px; }
summary { cursor: pointer; font-weight: 600; min-height: 32px; display: inline-flex; align-items: center; gap: 8px; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 160ms var(--ease-out); flex: none; }
details[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.card details p { font-size: 0.96rem; }

.price {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 18px 20px; border-radius: var(--radius); background: var(--paper-2);
}
.price b { font: 600 1.6rem/1 var(--font-display); letter-spacing: -0.01em; }

.peak-quote { font: 600 clamp(1.5rem, 2.2vw, 2rem)/1.2 var(--font-display); letter-spacing: -0.01em; max-width: 20ch; }
.peak-quote p::before { content: "\201C"; } .peak-quote p::after { content: "\201D"; }
.peak-quote footer { margin-top: 12px; font: 400 1rem/1.4 var(--font-text); color: var(--ink-soft); letter-spacing: 0; }

.stop-book .actions .btn { min-height: 56px; padding: 0 30px; font-size: 1.1rem; }
.visit { display: grid; gap: 6px; padding: 22px 20px; border-radius: var(--radius); background: var(--paper-2); margin-top: 36px !important; }
.visit h3 { margin-bottom: 4px; }
.visit a { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; }
.visit svg { width: 18px; height: 18px; flex: none; }
.visit .rating { margin-bottom: 6px; }
.visit h4 { font: inherit; font-weight: 600; margin: 4px 0 0; }
.hours { display: grid; gap: 2px; margin: 0 0 10px; font-variant-numeric: tabular-nums; }
.hours div { display: flex; justify-content: space-between; gap: 16px; max-width: 280px; }
.hours dd { margin: 0; }
.faq { margin-top: 40px !important; }
.faq h3 { margin-bottom: 8px; }
.faq details { border-top: 1px solid var(--rule); padding: 10px 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { min-height: 44px; justify-content: space-between; width: 100%; }
.faq details p { padding: 2px 0 10px; color: var(--ink-soft); }
.closing { font: 600 1.6rem/1.2 var(--font-display); margin-top: 44px !important; }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--rule); background: var(--paper-2); }
.foot-in { max-width: 1320px; margin: 0 auto; padding: 48px var(--pad-r) 40px var(--pad-l); display: grid; gap: 28px; grid-template-columns: 2fr 1fr 1fr; }
.foot-in h2 { font-size: 1.1rem; letter-spacing: 0; margin-bottom: 10px; }
.foot-in ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot-in a { display: inline-flex; min-height: 32px; align-items: center; }
.foot-legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 0.9rem; color: var(--ink-soft); border-top: 1px solid var(--rule); padding-top: 18px; }
.still-btn { font: inherit; color: inherit; background: none; border: 1.5px solid var(--ink-soft); border-radius: 999px; min-height: 36px; padding: 0 14px; cursor: pointer; }
.still-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- phone dock + menu ---------- */
.dock { display: none; }
dialog#menu {
  border: 0; padding: 0; margin: 0 0 0 auto; width: min(360px, 100vw); height: 100dvh; max-height: none;
  background: var(--paper); color: var(--ink); box-shadow: -12px 0 40px -20px rgba(0, 0, 0, 0.4);
}
dialog#menu::backdrop { background: rgba(39, 39, 39, 0.32); }
dialog#menu { overscroll-behavior: contain; }
dialog#menu nav { display: grid; gap: 4px; padding: 20px var(--gutter); }
dialog#menu nav a:not(.btn) { font: 600 1.4rem/1.2 var(--font-display); text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--rule); }
dialog#menu .btn { margin-top: 18px; min-height: 52px; }
.menu-close { justify-self: end; font: 600 1rem var(--font-text); background: none; border: 1.5px solid var(--ink); border-radius: 999px; min-height: 40px; padding: 0 16px; color: var(--ink); cursor: pointer; }

/* ---------- JS on, rig running: desktop shows the stage, phones show live plates ---------- */
@media (min-width: 1024px) {
  .js .plate { display: none; }
}

/* ---------- JS off, or the rig failed: still plates inline, everywhere ---------- */
html:not(.js) .stage-col, .rig-failed .stage-col { display: none; }
html:not(.js) .plate, .rig-failed .plate { display: block; }
html:not(.js) .story, .rig-failed .story { display: block; max-width: 720px; }
html:not(.js) .hero-front, .rig-failed .hero-front { display: block; }
html:not(.js) .stop, .rig-failed .stop { padding: 12vh 0 0 !important; }
html:not(.js) .stop-hero, .rig-failed .stop-hero { padding-top: 48px !important; min-height: 0; }
html:not(.js) .peak-quote, .rig-failed .peak-quote { margin-bottom: 40px !important; }
.plate.live img { display: none; }
.rig-failed .plate.live img { display: block; }
.rig-failed .plate-svg { display: none; }

/* ---------- tablets and phones: no stage, no pin ---------- */
@media (max-width: 1023.98px) {
  .stage-col { display: none; }
  .story { display: block; max-width: 680px; }
  .read { padding-bottom: 40px; }
  .stop { padding: 72px 0 0 !important; }
  .stop-hero { min-height: 0; padding: 28px 0 8px !important; justify-content: flex-start; }
  .stop-hero h1 { margin-top: 24px !important; font-size: clamp(1.9rem, 8vw, 2.4rem); }
  .hero-front { display: block; margin-top: 36px !important; }
  .plate { display: block; }
  .peak-quote { margin: 0 0 40px !important; }
  .bar-nav, .bar .bar-book { display: none; }
  .menu-btn {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
    border: 1.5px solid var(--ink); font-weight: 600; text-decoration: none;
  }
  .dock {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
    padding: 10px var(--pad-r) calc(10px + env(safe-area-inset-bottom)) var(--pad-l);
    background: color-mix(in srgb, var(--paper) 92%, transparent); border-top: 1px solid var(--rule);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    transform: translateY(110%); transition: transform 260ms var(--ease-out);
  }
  .dock.on { transform: none; }
  .dock .btn { width: 100%; min-height: 56px; font-size: 1.05rem; }
  html:not(.js) .dock { transform: none; position: sticky; }
  .foot-in { grid-template-columns: 1fr; padding-bottom: 110px; }
  :root { --line: 2.75px; }
}
@media (max-width: 380px) { .card { grid-template-columns: 60px 1fr; } .card img { width: 60px; height: 60px; } }

@media (prefers-reduced-motion: reduce) {
  .btn, .dock, summary::after { transition: none; }
  .stage svg.swap { animation-duration: 200ms; }
}
