/* Sonder Dahlias — design tokens & styles
   Palette: blush ivory ground, deep mulberry ink, coral-flame accent, sage support.
   Type: Fraunces (display) / Karla (body). Mobile baseline 338 px. */

:root {
  --ground: #FBF6F2;
  --ground-2: #F4E9E2;
  --ink: #571A32;
  --ink-soft: #7A4258;
  --accent: #E05C3A;
  --accent-ink: #FBF6F2;
  --sage: #5A6650;
  --line: #E5D3CA;
  --card: #FFFFFF;
  --shadow: 0 18px 50px -22px rgba(87, 26, 50, 0.35);
  --radius: 14px;
  --disp: "Fraunces", Georgia, serif;
  --body: "Karla", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1A1014;
    --ground-2: #241419;
    --ink: #F2DFDA;
    --ink-soft: #C9A3AC;
    --accent: #E8734F;
    --accent-ink: #1A1014;
    --sage: #97A489;
    --line: #3D262E;
    --card: #241419;
    --shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.7);
  }
}
:root[data-theme="light"] {
  --ground: #FBF6F2; --ground-2: #F4E9E2; --ink: #571A32; --ink-soft: #7A4258;
  --accent: #E05C3A; --accent-ink: #FBF6F2; --sage: #5A6650; --line: #E5D3CA;
  --card: #FFFFFF; --shadow: 0 18px 50px -22px rgba(87, 26, 50, 0.35);
}
:root[data-theme="dark"] {
  --ground: #1A1014; --ground-2: #241419; --ink: #F2DFDA; --ink-soft: #C9A3AC;
  --accent: #E8734F; --accent-ink: #1A1014; --sage: #97A489; --line: #3D262E;
  --card: #241419; --shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html, body { overflow-x: hidden; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .strip-track { animation: none; }
}

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.05rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }

img, video, svg, canvas { max-width: 100%; height: auto; }

h1, h2, h3 { font-family: var(--disp); font-weight: 480; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 8vw, 5.2rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.8rem); }
h3 { font-size: 1.3rem; }
p { max-width: 62ch; }
a { color: inherit; }

.sr-only, .skip {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip:focus {
  width: auto; height: auto; clip: auto; z-index: 99;
  top: 8px; left: 8px; background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; border-radius: 8px;
}

.eyebrow {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--accent); font-weight: 700; margin-bottom: 0.8rem;
}

/* ---------- Header ---------- */
.site-head {
  display: flex; align-items: center; gap: 1.2rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-family: var(--disp); font-size: 1.35rem; font-weight: 600;
  text-decoration: none; font-style: italic;
}
.wordmark span { font-style: normal; font-weight: 380; }
.site-nav { display: flex; gap: clamp(0.7rem, 2vw, 1.6rem); margin-left: auto; }
.site-nav a {
  text-decoration: none; font-size: 0.92rem; font-weight: 700;
  color: var(--ink-soft); letter-spacing: 0.02em;
}
.site-nav a:hover { color: var(--accent); }
.cart-btn {
  font: inherit; font-weight: 700; cursor: pointer;
  background: none; border: 1.5px solid var(--ink); border-radius: 999px;
  color: var(--ink); padding: 0.45rem 1rem; display: flex; align-items: center; gap: 0.45rem;
}
.cart-btn:hover { border-color: var(--accent); color: var(--accent); }
.cart-count {
  background: var(--accent); color: var(--accent-ink); border-radius: 999px;
  font-size: 0.75rem; min-width: 1.35em; height: 1.35em;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 0.3em;
}
@media (max-width: 700px) {
  /* Keep navigation reachable on a phone: wrap to a second row rather than
     hiding it, so the research pages stay discoverable from every page. */
  .site-head { flex-wrap: wrap; row-gap: 0.6rem; padding-bottom: 0.75rem; }
  .site-nav {
    order: 3; width: 100%; margin-left: 0;
    justify-content: space-between; gap: 0.5rem;
    overflow-x: auto; padding-bottom: 0.15rem;
  }
  .site-nav a { font-size: 0.82rem; white-space: nowrap; }
  .cart-btn { margin-left: auto; }
}

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(2.5rem, 7vw, 6rem) clamp(1rem, 4vw, 3rem);
  min-height: min(72vh, 680px);
}
.hero-copy { order: 0; }
.hero-art { order: 1; display: grid; place-items: center; }
.hero-art canvas, .hero-art img {
  width: min(100%, 520px); aspect-ratio: 1; border-radius: 50%;
  object-fit: cover; object-position: center 18%; box-shadow: var(--shadow);
}
.lede { font-size: 1.15rem; color: var(--ink-soft); margin: 1.2rem 0 1.8rem; }
.hero-cta { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.btn {
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border-radius: 999px; padding: 0.8rem 1.7rem; display: inline-block;
  border: 1.5px solid transparent; transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, .chip:focus-visible, .qty-btn:focus-visible, .session-card:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.btn-solid { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-small { padding: 0.45rem 1.1rem; background: var(--ink); color: var(--ground); }
.btn-small:hover { background: var(--accent); color: var(--accent-ink); }
.btn-wide { width: 100%; text-align: center; }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; min-height: 0; text-align: left; }
  .hero-art { order: -1; }
  .hero-art canvas, .hero-art img { width: min(72vw, 340px); }
}

/* ---------- Marquee strip ---------- */
.strip {
  overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--ground-2); padding: 0.7rem 0; white-space: nowrap;
}
.strip-track { display: inline-flex; align-items: center; gap: 2.2rem; animation: slide 26s linear infinite; }
.strip-track span {
  font-family: var(--disp); font-style: italic; font-size: 1.05rem; color: var(--ink-soft);
}
.strip-track i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none;
}
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
section { padding: clamp(3rem, 8vw, 6.5rem) clamp(1rem, 4vw, 3rem); }
.section-head { margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.section-note { color: var(--ink-soft); margin-top: 0.8rem; }

/* ---------- Sonder ---------- */
.sonder {
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 5vw, 5rem);
  align-items: start; background: var(--ink); color: var(--ground);
}
:root[data-theme="dark"] .sonder, .sonder-dark-guard { color: var(--ground); }
.sonder .eyebrow { color: var(--accent); }
.sonder-def { border-left: 3px solid var(--accent); padding-left: 1.4rem; position: sticky; top: 6rem; }
.dict-word { font-family: var(--disp); font-size: clamp(1.8rem, 4vw, 2.6rem); font-style: italic; }
.dict-pos { font-family: var(--body); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.15em; opacity: 0.7; margin-left: 0.5rem; }
.dict-body { font-size: 1.15rem; opacity: 0.85; margin-top: 0.6rem; max-width: 30ch; }
.sonder-story h2 { margin-bottom: 1.2rem; }
.sonder-story p + p { margin-top: 1rem; }
.sonder-story p { opacity: 0.88; }
@media (max-width: 800px) {
  .sonder { grid-template-columns: 1fr; }
  .sonder-def { position: static; }
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(0.6rem, 1.5vw, 1.2rem);
}
.gallery-item { border-radius: var(--radius); overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.gallery-item canvas, .gallery-item img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.gallery-item figcaption {
  font-size: 0.82rem; color: var(--ink-soft); padding: 0.55rem 0.8rem;
  font-style: italic; font-family: var(--disp);
}
.gallery-item:nth-child(4n+2) { transform: translateY(14px); }
.gallery-item:nth-child(4n+4) { transform: translateY(26px); }
@media (max-width: 800px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery-item:nth-child(n) { transform: none; }
}

.variety-table-wrap { overflow-x: auto; margin-top: clamp(2rem, 5vw, 3.5rem); }
.variety-table { border-collapse: collapse; width: 100%; min-width: 460px; }
.variety-table caption {
  text-align: left; font-family: var(--disp); font-style: italic;
  font-size: 1.15rem; padding-bottom: 0.8rem;
}
.variety-table th, .variety-table td {
  text-align: left; padding: 0.7rem 1rem 0.7rem 0; border-bottom: 1px solid var(--line);
}
.variety-table th {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-soft);
}
.variety-table td:first-child { font-weight: 700; }

/* ---------- Shop ---------- */
.shop { background: var(--ground-2); }
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: clamp(1rem, 2.5vw, 1.8rem);
}
.product {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.product-art { background: var(--ground); }
.product-art canvas, .product-art img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.product-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.product-kind {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--sage); font-weight: 700;
}
.badge {
  background: var(--accent); color: var(--accent-ink); border-radius: 999px;
  padding: 0.1rem 0.6rem; font-size: 0.7rem; letter-spacing: 0.05em; margin-left: 0.4rem;
}
.product-blurb { font-size: 0.92rem; color: var(--ink-soft); flex: 1; }
.product-row { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-top: 0.4rem; }
.price { font-family: var(--disp); font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.price span { font-family: var(--body); font-size: 0.78rem; color: var(--ink-soft); font-weight: 400; }

/* ---------- Booking ---------- */
.booking { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.2rem, 3vw, 2.5rem); align-items: start; }
.booking-sessions { display: flex; flex-direction: column; gap: 0.9rem; }
.session-card {
  font: inherit; text-align: left; cursor: pointer;
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.3rem; display: flex; flex-direction: column; gap: 0.35rem;
  transition: border-color 0.15s ease;
  color: inherit;
}
.session-card[aria-checked="true"] { border-color: var(--accent); box-shadow: var(--shadow); }
.session-card p { font-size: 0.92rem; color: var(--ink-soft); }
.session-meta { font-size: 0.85rem; font-weight: 700; color: var(--sage); }
.booking-panel {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(1.2rem, 3vw, 1.8rem); display: flex; flex-direction: column; gap: 1.2rem;
}
.booking-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-soft); font-weight: 700; margin-bottom: 0.5rem; }
.date-row, .time-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  font: inherit; font-size: 0.88rem; font-weight: 700; cursor: pointer;
  border: 1.5px solid var(--line); background: none; color: var(--ink);
  border-radius: 999px; padding: 0.45rem 0.95rem;
}
.chip-on { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.qty-row { display: flex; align-items: center; gap: 1rem; }
.qty-btn {
  font: inherit; font-size: 1.1rem; font-weight: 700; cursor: pointer;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  border: 1.5px solid var(--ink); background: none; color: var(--ink);
}
.qty-btn:hover { border-color: var(--accent); color: var(--accent); }
.qty-num { font-family: var(--disp); font-size: 1.3rem; min-width: 1.5ch; text-align: center; }
.booking-summary {
  border-top: 1px solid var(--line); padding-top: 1rem;
  font-size: 0.95rem; display: flex; flex-direction: column; gap: 0.2rem;
}
.tiny-note { font-size: 0.78rem; color: var(--ink-soft); }
@media (max-width: 800px) { .booking { grid-template-columns: 1fr; } }

/* ---------- Drop list ---------- */
.drop-list { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.drop-list p { color: var(--ink-soft); }
.drop-form { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; width: 100%; }
.drop-form input {
  font: inherit; padding: 0.75rem 1.2rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink);
  width: min(320px, 100%);
}
.drop-form input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Footer ---------- */
.site-foot {
  background: var(--ink); color: var(--ground);
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 4vw, 3rem);
  display: flex; flex-direction: column; gap: 1.6rem;
}
.foot-brand { display: flex; flex-direction: column; gap: 0.4rem; }
.foot-brand p { opacity: 0.85; font-size: 0.92rem; }
.foot-brand .wordmark { font-size: 1.5rem; opacity: 1; }
.demo-note {
  font-size: 0.8rem; opacity: 0.6; border-top: 1px solid color-mix(in srgb, var(--ground) 25%, transparent);
  padding-top: 1.2rem; max-width: 70ch;
}

/* ---------- Cart drawer ---------- */
.cart-scrim {
  position: fixed; inset: 0; background: rgba(20, 8, 12, 0.5); z-index: 30;
}
.cart {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 31;
  width: min(420px, 100vw); background: var(--ground);
  display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0,0,0,0.25);
}
.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--line);
}
.cart-close {
  font-size: 1.6rem; line-height: 1; background: none; border: none;
  cursor: pointer; color: var(--ink); padding: 0.2rem 0.5rem;
}
.cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.4rem; display: flex; flex-direction: column; gap: 1rem; }
.cart-empty { color: var(--ink-soft); font-style: italic; font-family: var(--disp); }
.cart-row { display: grid; grid-template-columns: 1fr auto auto; gap: 0.8rem; align-items: center; }
.cart-row-info { display: flex; flex-direction: column; }
.cart-row-info span { font-size: 0.8rem; color: var(--ink-soft); }
.cart-row-qty { display: flex; align-items: center; gap: 0.5rem; }
.cart-row-qty .qty-btn { width: 1.7rem; height: 1.7rem; font-size: 0.9rem; }
.cart-row-sum { font-variant-numeric: tabular-nums; }
.cart-foot { border-top: 1px solid var(--line); padding: 1.2rem 1.4rem; display: flex; flex-direction: column; gap: 0.8rem; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.15rem; }
.cart-total strong { font-family: var(--disp); }

/* ---------- Doc pages (research) ---------- */
.page-hero {
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
  max-width: 980px;
}
.page-hero h1 { font-size: clamp(2.1rem, 6vw, 3.8rem); margin-bottom: 1rem; }
.page-hero .lede { font-size: 1.12rem; }
.stat-band {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat { background: var(--ground-2); padding: 1.3rem clamp(1rem, 3vw, 2rem); }
.stat strong { font-family: var(--disp); font-size: clamp(1.4rem, 3vw, 1.9rem); display: block; font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.82rem; color: var(--ink-soft); }
.doc { padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 3rem); max-width: 980px; }
.doc section { padding: 0 0 clamp(2rem, 5vw, 3.5rem); }
.doc h2 { margin-bottom: 1rem; }
.doc h3 { margin: 1.6rem 0 0.6rem; }
.doc p { margin-bottom: 0.9rem; color: var(--ink); }
.doc p.soft, .doc li.soft { color: var(--ink-soft); }
.doc ul, .doc ol { margin: 0 0 1rem 1.2rem; display: flex; flex-direction: column; gap: 0.45rem; }
.doc li { max-width: 68ch; }
.doc a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.table-wrap { overflow-x: auto; margin: 1rem 0 1.4rem; }
.doc table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; padding: 0.65rem 1rem 0.65rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc th { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.13em; color: var(--ink-soft); }
.doc td:first-child { font-weight: 700; white-space: nowrap; }
.callout {
  background: var(--card); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.4rem; margin: 1.2rem 0; box-shadow: var(--shadow); max-width: 70ch;
}
.callout.quiet { border-left-color: var(--sage); box-shadow: none; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.vcard { background: var(--card); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); }
.vcard h3 { margin: 0 0 0.3rem; font-size: 1.15rem; }
.vcard .tag { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.13em; color: var(--sage); font-weight: 700; display: block; margin-bottom: 0.4rem; }
.vcard p { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
.season { border-left: 3px solid var(--line); padding: 0.2rem 0 1.4rem 1.4rem; position: relative; }
.season::before {
  content: ""; position: absolute; left: -8px; top: 0.35rem;
  width: 13px; height: 13px; border-radius: 50%; background: var(--accent);
}
.season h3 { margin-top: 0; }
.pull {
  font-family: var(--disp); font-style: italic; font-size: clamp(1.3rem, 3vw, 1.8rem);
  line-height: 1.3; max-width: 26ch; margin: 1.6rem 0; color: var(--ink);
}
.page-note {
  font-size: 0.85rem; color: var(--ink-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.9rem 1.2rem; margin: 0 0 1.6rem; max-width: 75ch;
}
.doc-cross {
  display: flex; gap: 0.8rem; flex-wrap: wrap; padding: 0 clamp(1rem, 4vw, 3rem) clamp(3rem, 6vw, 4rem);
}

/* ---------- Dialog ---------- */
.confirm {
  border: none; border-radius: var(--radius); padding: clamp(1.5rem, 5vw, 2.5rem);
  max-width: min(440px, 92vw); background: var(--card); color: var(--ink);
  box-shadow: var(--shadow); text-align: center;
}
.confirm::backdrop { background: rgba(20, 8, 12, 0.55); }
.confirm h2 { margin-bottom: 0.8rem; }
.confirm p { color: var(--ink-soft); margin-bottom: 1.4rem; }
