/* =========================================================
   CHOBO — Chocolatier
   Palette: only these three colours are used anywhere.
   ========================================================= */
:root {
  --cream: #F2E8D8;   /* main background */
  --ivory: #F7F0E4;   /* alternate background */
  --cocoa: #6B2E1A;   /* text, lines, details */
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --brand: "Cinzel", "Trajan Pro", Georgia, serif;   /* the CHOBO wordmark */
  --body: "Liberation Serif", "Tinos", "Times New Roman", Times, serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* Cinzel + Playfair Display (SIL OFL, variable, latin subset from Fontsource), served with the site */
@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("/static/fonts/Cinzel-Variable.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url("/static/fonts/PlayfairDisplay-Variable.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 400 900; font-display: swap;
  src: url("/static/fonts/PlayfairDisplay-Italic-Variable.woff2") format("woff2"); }

/* Liberation Serif (SIL OFL, licence in static/fonts), served with the site; an installed copy is used first */
@font-face { font-family: "Liberation Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: local("Liberation Serif"), local("LiberationSerif"), url("/static/fonts/LiberationSerif-Regular.woff2") format("woff2"); }
@font-face { font-family: "Liberation Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: local("Liberation Serif Italic"), local("LiberationSerif-Italic"), url("/static/fonts/LiberationSerif-Italic.woff2") format("woff2"); }
@font-face { font-family: "Liberation Serif"; font-style: normal; font-weight: 700; font-display: swap;
  src: local("Liberation Serif Bold"), local("LiberationSerif-Bold"), url("/static/fonts/LiberationSerif-Bold.woff2") format("woff2"); }
@font-face { font-family: "Liberation Serif"; font-style: italic; font-weight: 700; font-display: swap;
  src: local("Liberation Serif Bold Italic"), local("LiberationSerif-BoldItalic"), url("/static/fonts/LiberationSerif-BoldItalic.woff2") format("woff2"); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
button, a { -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--cocoa);
  font-family: var(--body);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
em { font-style: italic; font-family: var(--serif); font-weight: 400; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0; letter-spacing: -.01em; }
button { font: inherit; color: inherit; }
.stat strong, .cd strong, .waitlist-count strong, .step-num { font-variant-numeric: lining-nums tabular-nums; }
::selection { background: var(--cocoa); color: var(--cream); }
:focus-visible { outline: 1px solid var(--cocoa); outline-offset: 4px; }

/* ---------------- Nav ---------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px clamp(16px, 4vw, 56px);
  padding-top: max(14px, env(safe-area-inset-top));
  background: var(--cream);
  border-bottom: 1px solid var(--cocoa);
  transition: transform .8s cubic-bezier(.45, 0, .2, 1), opacity .8s ease, visibility 0s;
}
/* hidden while the hero is on screen (main.js); visibility keeps it out of the tab order */
.nav.hide { transform: translateY(-110%); opacity: 0; visibility: hidden; transition: transform .6s cubic-bezier(.45, 0, .2, 1), opacity .6s ease, visibility 0s .6s; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark { display: block; width: 36px; height: 36px; }
.logo-word { font-family: var(--brand); font-size: 1.35rem; font-weight: 500; letter-spacing: .12em; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 34px; border-radius: 0;
  border: 1px solid var(--cocoa);
  background: var(--cocoa); color: var(--cream);
  font-weight: 400; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  transition: background .35s, color .35s;
  cursor: pointer;
}
.btn:hover { background: transparent; color: var(--cocoa); }
.btn-ghost { background: transparent; color: var(--cocoa); }
.btn-ghost:hover { background: var(--cocoa); color: var(--cream); }
.btn:disabled { background: transparent; color: var(--cocoa); border-style: dashed; cursor: not-allowed; }
.btn-small { padding: 11px 22px; font-size: .7rem; }

/* ---------------- Reveal ---------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- Layout ---------------- */
.band { background: var(--cream); }
.band-alt { background: var(--ivory); border-top: 1px solid var(--cocoa); border-bottom: 1px solid var(--cocoa); }
.section { padding: clamp(90px, 12vw, 160px) clamp(16px, 5vw, 80px); max-width: 1200px; margin: 0 auto; }
.section-head { max-width: 680px; margin: 0 auto clamp(50px, 7vw, 90px); text-align: center; }
.kicker { margin: 0 0 22px; font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(2.4rem, 5.2vw, 4.2rem); }
.section-lede { margin: 26px auto 0; font-size: 1.02rem; max-width: 34rem; }

/* ---------------- Hero ---------------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding: 140px 16px 100px;
  text-align: center;
}
.hero-inner { max-width: 760px; --title-size: clamp(3.4rem, 12vw, 8.5rem); }
.eyebrow { margin: 0 0 30px; font-size: .72rem; letter-spacing: .32em; text-transform: uppercase; }
.hero-title {
  font-family: var(--brand); font-size: var(--title-size);
  font-weight: 500; line-height: 1; letter-spacing: .06em; margin-right: -.06em;
}
/* main.js spaces "Chocolatier" to sit 20px inside each end of CHOBO, 12px below it */
.hero-sub { margin: 0; font-family: var(--serif); font-weight: 400; font-size: calc(var(--title-size) * .4); line-height: 1; white-space: nowrap; }
.hero-sub span { position: relative; display: inline-block; letter-spacing: .3em; margin-right: -.4em; }
.ornament { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 36px auto; }
.ornament::before, .ornament::after { content: ""; width: 70px; height: 1px; background: var(--cocoa); }
.ornament span { width: 7px; height: 7px; border: 1px solid var(--cocoa); transform: rotate(45deg); }
.hero-lede { max-width: 30rem; margin: 0 auto 44px; font-size: 1.05rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------------- Values strip ---------------- */
.strip {
  overflow: hidden;
  padding: 22px 0;
  border-top: 1px solid var(--cocoa);
  font-family: var(--serif); font-style: italic; font-size: clamp(1.05rem, 1.8vw, 1.3rem);
}
/* main.js repeats the phrases so the row is long enough to loop seamlessly at -50% */
.strip-track { display: flex; align-items: center; gap: 26px; width: max-content; padding-right: 26px; animation: ticker 45s linear infinite; }
.strip span { white-space: nowrap; }
.strip i { flex: none; width: 5px; height: 5px; background: var(--cocoa); transform: rotate(45deg); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------------- Story ---------------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--cocoa); }
.step { position: relative; padding: 40px 28px 10px; }
.step + .step { border-left: 1px solid var(--cocoa); }
.step:nth-child(2) { transition-delay: .08s; }
.step:nth-child(3) { transition-delay: .16s; }
.step:nth-child(4) { transition-delay: .24s; }
.step-num { position: absolute; top: 36px; right: 28px; font-family: var(--serif); font-style: italic; font-size: 1.1rem; }
.step-icon { display: block; width: 64px; height: 64px; fill: var(--cocoa); margin-bottom: 26px; }
.step-icon .cut { fill: var(--ivory); }
.step-icon .cut-line { fill: none; stroke: var(--ivory); stroke-width: 1.4; stroke-linecap: round; }
.step-icon .wisp { fill: none; stroke: var(--cocoa); stroke-width: 2.2; stroke-linecap: round; }
.step-icon .wisp.thick { stroke-width: 3.2; }
.step h3 { font-size: 1.9rem; margin-bottom: 12px; }
.step p { margin: 0; font-size: .95rem; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 90px; text-align: center; }
.stat strong { display: block; font-family: var(--serif); font-size: clamp(2.8rem, 5vw, 4rem); font-weight: 400; line-height: 1; margin-bottom: 10px; }
.stat span { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; }

/* ---------------- Waitlist ---------------- */
.waitlist-card { max-width: 820px; margin: 0 auto; text-align: center; }
.waitlist-card h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
.countdown { display: flex; justify-content: center; margin: 56px 0 44px; border: 1px solid var(--cocoa); }
.cd { flex: 1; padding: 22px 8px 16px; }
.cd + .cd { border-left: 1px solid var(--cocoa); }
.cd strong { display: block; font-family: var(--serif); font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 400; line-height: 1; font-variant-numeric: tabular-nums; }
.cd span { font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; }
.countdown .launched { margin: 0; padding: 24px; font-family: var(--serif); font-style: italic; font-size: 1.4rem; }
.waitlist-lede { max-width: 32rem; margin: 0 auto 36px; }
.waitlist-form { display: flex; gap: 12px; max-width: 640px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.waitlist-form input {
  flex: 1 1 180px; min-width: 0;
  padding: 14px 4px;
  background: transparent; border: 0; border-bottom: 1px solid var(--cocoa); border-radius: 0;
  color: var(--cocoa); font: inherit; font-size: 1rem;
}
.waitlist-form input::placeholder { color: var(--cocoa); opacity: 1; font-family: var(--serif); font-style: italic; font-size: 1.1rem; }
.waitlist-form input:focus { outline: none; border-bottom-width: 2px; padding-bottom: 13px; }
.waitlist-form.error input[type="email"] { border-bottom-width: 2px; border-bottom-style: dashed; padding-bottom: 13px; animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.form-msg { min-height: 1.6em; margin: 20px 0 0; font-family: var(--serif); font-style: italic; font-size: 1.2rem; }
.waitlist-count { margin: 14px 0 0; font-size: .9rem; }
.waitlist-count strong { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; }

/* ---------------- Footer ---------------- */
.footer { padding: 80px 20px calc(60px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--cocoa); text-align: center; font-size: .78rem; letter-spacing: .12em; }
.footer p { margin: 6px 0; }
.footer { --logo-size: clamp(1.6rem, 4vw, 2rem); }
.footer-logo { font-family: var(--brand); font-size: var(--logo-size); font-weight: 400; line-height: 1; letter-spacing: .08em; margin-right: -.08em; }
/* like the hero: main.js spaces "Chocolatier" to CHOBO's width */
.footer .footer-sub { margin: 0; font-family: var(--serif); font-weight: 400; font-size: calc(var(--logo-size) * .4); line-height: 1; letter-spacing: normal; white-space: nowrap; }
.footer-sub span { position: relative; display: inline-block; }
.footer .footer-note { margin-top: 14px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(3) { border-left: 0; }
  .step:nth-child(n+3) { border-top: 1px solid var(--cocoa); }
  .step { padding-bottom: 36px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 44px 20px; }
}
@media (max-width: 560px) {
  .hero { padding: 110px 16px 70px; }
  .eyebrow { font-size: .62rem; letter-spacing: .22em; }
  .ornament { margin: 28px auto; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .strip-track { gap: 18px; padding-right: 18px; animation-duration: 35s; }

  .section { padding-left: 16px; padding-right: 16px; }
  .steps { grid-template-columns: 1fr; }
  .step + .step { border-left: 0; border-top: 1px solid var(--cocoa); }
  .step { padding: 32px 4px; }
  .step-num { right: 4px; top: 30px; }

  .countdown { margin: 40px 0 34px; }
  .cd { padding: 16px 2px 12px; }
  .cd span { font-size: .56rem; letter-spacing: .14em; }
  .waitlist-form { flex-direction: column; }
  .waitlist-form input { flex: none; width: 100%; }
  .waitlist-form .btn { width: 100%; margin-top: 10px; }

  .nav .btn-small { padding: 9px 14px; font-size: .62rem; letter-spacing: .16em; }
  .logo-word { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
