/* ============================================================
   CapyOnsen — design system & site styles
   Palette and typography are the brand tokens (see docs/DESIGN-SYSTEM.md)
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Core brand palette */
  --oat:        #F4EFE7;  /* primary background */
  --oat-soft:   #FAF7F1;  /* raised surfaces / cards */
  --oat-deep:   #ECE3D4;  /* alternating sections, borders */
  --clay:       #C9896A;  /* primary accent — CTAs, step 1 */
  --clay-deep:  #B0714F;  /* CTA hover, links on oat */
  --moss:       #60735A;  /* secondary accent — step 2, waitlist band */
  --moss-deep:  #4A5A45;  /* moss hover / deep band */
  --cocoa:      #2E2925;  /* ink — text, footer bg */
  --petal:      #E6CBC4;  /* tertiary accent — step 3, soft fills */
  --yuzu:       #E8B84B;  /* highlight — small accents only */

  /* Semantic aliases */
  --bg: var(--oat);
  --surface: var(--oat-soft);
  --text: var(--cocoa);
  --muted: #6E655C;
  --line: rgba(46, 41, 37, .12);

  /* Type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Shape & depth */
  --radius: 18px;
  --radius-sm: 10px;
  --shadow-soft: 0 12px 40px rgba(46, 41, 37, .09);
  --shadow-lift: 0 6px 18px rgba(46, 41, 37, .12);

  --maxw: 1140px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--clay-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cocoa); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 550;
  line-height: 1.12;
  margin: 0 0 .6em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.55rem); }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.1rem, 1.9vw, 1.3rem); color: var(--muted); max-width: 38em; }
.muted { color: var(--muted); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55em;
  font-size: .78rem; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--clay-deep); margin-bottom: 1.1rem;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--clay); }

.container { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-tight { padding-block: clamp(2.25rem, 5vw, 4rem); }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* ---------- 3. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--oat) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 2px 20px rgba(46,41,37,.06); }
.header-inner {
  display: flex; align-items: center; gap: 1.5rem;
  max-width: var(--maxw); margin: 0 auto; padding: .9rem var(--pad);
}
.brand {
  font-family: var(--font-display); font-size: 1.45rem; font-weight: 600;
  color: var(--cocoa); text-decoration: none; letter-spacing: -.01em;
  display: inline-flex; align-items: baseline; gap: .4rem;
}
.brand .steam { color: var(--clay); font-size: .9em; }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: 1.6rem; }
.main-nav a {
  color: var(--cocoa); text-decoration: none; font-size: .95rem; font-weight: 500;
  padding-block: .25rem; border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--clay); }
.lang-switch { display: flex; gap: .5rem; font-size: .82rem; color: var(--muted); }
.lang-switch a { color: var(--muted); text-decoration: none; font-weight: 500; }
.lang-switch a:hover, .lang-switch a[aria-current="true"] { color: var(--cocoa); }

.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .5rem .7rem; font-size: 1.05rem; color: var(--cocoa); cursor: pointer; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--oat-soft); border-bottom: 1px solid var(--line);
    padding: .5rem var(--pad) 1rem;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: .65rem 0; width: 100%; }
  .main-nav .btn { margin-top: .6rem; }
  .lang-switch { padding-top: .75rem; }
}

/* ---------- 4. Buttons & forms ---------- */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: .98rem;
  padding: .85rem 1.7rem; border-radius: 999px;
  background: var(--clay); color: #fff; text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}
.btn:hover { background: var(--clay-deep); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--cocoa); box-shadow: inset 0 0 0 1.5px var(--cocoa); }
.btn-ghost:hover { background: var(--cocoa); color: var(--oat); }
.btn-yuzu { background: var(--yuzu); color: var(--cocoa); }
.btn-yuzu:hover { background: #D9A93A; color: var(--cocoa); }

.waitlist-form { display: flex; gap: .6rem; flex-wrap: wrap; max-width: 480px; }
.waitlist-form input[type="email"] {
  flex: 1 1 240px; padding: .85rem 1.15rem; font-size: 1rem; font-family: var(--font-body);
  border: 1.5px solid transparent; border-radius: 999px; background: var(--oat-soft); color: var(--cocoa);
}
.waitlist-form input[type="email"]:focus { outline: none; border-color: var(--clay); }
.form-note { font-size: .8rem; margin-top: .7rem; opacity: .75; }
.form-success { display: none; font-weight: 600; padding: .85rem 0; }

/* ---------- 5. Hero ---------- */
.hero { padding-block: clamp(3rem, 7vw, 5.5rem); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad);
}
.hero-copy .btn { margin-right: .75rem; margin-top: .5rem; }
.hero-art { position: relative; }
.hero-art img {
  border-radius: 50%; box-shadow: var(--shadow-soft);
  border: 10px solid var(--oat-soft);
}
.hero-art::after {
  content: ""; position: absolute; inset: -7%; z-index: -1; border-radius: 50%;
  border: 1.5px solid rgba(201, 137, 106, .35);
}
.hero-art::before {
  content: ""; position: absolute; inset: -14%; z-index: -1; border-radius: 50%;
  border: 1px solid rgba(201, 137, 106, .18);
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 340px; margin: 0 auto; order: -1; }
}

/* ---------- 6. Motifs ---------- */
.ripple-divider { display: block; margin: 0 auto; color: var(--clay); opacity: .55; }
.steam-mark { color: var(--clay); }

/* ---------- 7. Cards, grids, splits ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border-radius: var(--radius);
  padding: 1.8rem 1.6rem; box-shadow: var(--shadow-soft);
  border-top: 4px solid var(--oat-deep);
}
.card h3 { margin-top: .4rem; }
.card .step-no {
  font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; line-height: 1;
  color: var(--oat-deep);
}
.card-clay  { border-top-color: var(--clay); }  .card-clay .step-no  { color: var(--clay); }
.card-moss  { border-top-color: var(--moss); }  .card-moss .step-no  { color: var(--moss); }
.card-petal { border-top-color: var(--petal); } .card-petal .step-no { color: #C9998D; }

.value-item { text-align: center; padding: 1rem .5rem; }
.value-item svg { color: var(--moss); margin-bottom: .6rem; }
.value-item h3 { font-size: 1.02rem; font-family: var(--font-body); font-weight: 600; }
.value-item p { font-size: .88rem; color: var(--muted); margin: 0; }

.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.split.reverse > .split-media { order: 2; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow-soft); }
@media (max-width: 860px) {
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse > .split-media { order: 0; }
}

.section-alt { background: var(--oat-deep); }
.section-petal { background: color-mix(in srgb, var(--petal) 38%, var(--oat)); }

/* ---------- 8. Product blocks (ritual page) ---------- */
.product-block { border-radius: var(--radius); padding: clamp(1.6rem, 4vw, 3rem); }
.product-block + .product-block { margin-top: 2rem; }
.product-clay  { background: color-mix(in srgb, var(--clay) 16%, var(--oat)); }
.product-moss  { background: color-mix(in srgb, var(--moss) 14%, var(--oat)); }
.product-petal { background: color-mix(in srgb, var(--petal) 45%, var(--oat)); }
.product-meta { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.product-facts { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1.1rem 0 0; list-style: none; }
.product-facts li {
  font-size: .8rem; font-weight: 600; padding: .35rem .8rem;
  background: var(--oat-soft); border-radius: 999px; border: 1px solid var(--line);
}

/* ---------- 9. Journal ---------- */
.journal-card {
  background: var(--surface); border-radius: var(--radius); padding: 1.7rem 1.5rem;
  box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: .4rem;
}
.journal-card .tag { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--moss); }
.journal-card h3 { margin: 0; color: var(--text); }
a.journal-card:hover h3 { color: var(--clay-deep); }
.journal-card p { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- 10. FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-list details {
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 1.05rem 1.3rem; margin-bottom: .8rem; box-shadow: var(--shadow-soft);
}
.faq-list summary {
  cursor: pointer; font-weight: 600; font-size: 1.02rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-family: var(--font-display); font-size: 1.4rem; color: var(--clay); transition: transform .2s ease; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { margin: .8rem 0 .2rem; color: var(--muted); }

/* ---------- 11. Waitlist band ---------- */
.waitlist-band { background: var(--moss); color: var(--oat); }
.waitlist-band h2 { color: #fff; }
.waitlist-band .lead { color: color-mix(in srgb, var(--oat) 85%, transparent); }
.waitlist-band .waitlist-form input[type="email"] { background: var(--oat); }
.waitlist-band .form-note { color: var(--oat); }
.waitlist-band .form-success { color: var(--yuzu); }

/* ---------- 12. Footer ---------- */
.site-footer { background: var(--cocoa); color: color-mix(in srgb, var(--oat) 82%, transparent); font-size: .93rem; }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 3.5rem var(--pad) 2rem;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem;
}
.site-footer .brand { color: var(--oat); font-size: 1.5rem; }
.site-footer h4 { color: var(--oat); font-family: var(--font-body); font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .55rem; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--yuzu); }
.footer-tagline { font-family: var(--font-display); font-style: italic; margin-top: .6rem; opacity: .85; }
.footer-bottom {
  border-top: 1px solid rgba(244, 239, 231, .14);
  max-width: var(--maxw); margin: 0 auto; padding: 1.4rem var(--pad);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .82rem; opacity: .75;
}
@media (max-width: 860px) { .footer-inner { grid-template-columns: 1fr 1fr; } }

/* ---------- 13. Page hero band (subpages) ---------- */
.page-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3rem); }
.page-hero h1 { max-width: 16em; }

/* ---------- 14. Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- 15. Utility ---------- */
.mt-2 { margin-top: 2rem; }
.badge-est {
  display: inline-block; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .4rem 1rem;
}
