/* Rootwave — haircare (fictional demo shop)
   BATCH FORMAT: routine-builder quiz — three quick questions (hair type,
   concern, routine length) drive a scoring recommender into a personalized
   routine with ingredient callouts and a discounted bundle add. Same
   centerpiece as Basin & Bloom, different palette/type/copy.
   Dark terracotta/copper theme, warm serif display type. */

:root {
  --bg: #241712;
  --bg-2: #2d1e17;
  --panel: #332219;
  --line: #4d372a;
  --ink: #f2e6da;
  --muted: #b0a08c;
  --clay: #c07a52;
  --clay-ink: #a3623f;
  --sage: #d9b98a;
  --danger: #ff6b56;
  --r: 12px;
  --wrap: 1180px;
  --display: "Spectral", Georgia, serif;
  --sans: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.18; margin: 0; }

.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--clay); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 500; font-size: 14.5px; padding: 13px 28px; border-radius: 100px; cursor: pointer; border: 1px solid transparent; transition: transform .15s, background .15s, color .15s, border-color .15s; }
.btn-accent { background: var(--clay); color: #241712; }
.btn-accent:hover { transform: translateY(-2px); background: var(--clay-ink); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn-ghost { background: none; border: 0; color: var(--clay); font-size: 13px; text-decoration: underline; padding: 6px 0; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none !important; }

.site-header { position: sticky; top: 0; z-index: 60; background: rgba(36,23,18,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { font-family: var(--display); font-weight: 500; font-size: 22px; display: flex; align-items: center; gap: 9px; }
.brand .bloom { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--sage), var(--clay)); }
.nav-links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: 13.5px; font-weight: 500; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 18px; }
.cart-btn { position: relative; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 8px; display: flex; }
.cart-badge { position: absolute; top: -2px; right: -2px; background: var(--clay); color: #241712; font-size: 10.5px; font-weight: 800; min-width: 17px; height: 17px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0 2px; }
.menu-btn { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .25s, opacity .25s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.announce { background: var(--clay); color: #241712; text-align: center; font-size: 12.5px; font-weight: 600; padding: 9px; letter-spacing: .02em; }

.hero { position: relative; height: 76vh; min-height: 500px; display: flex; align-items: center; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(36,23,18,.96) 0%, rgba(36,23,18,.6) 55%, rgba(36,23,18,.12) 100%); }
.hero-inner { position: relative; z-index: 1; max-width: 600px; }
.hero h1 { font-size: clamp(36px, 5.4vw, 60px); }
.hero h1 em { font-style: italic; color: var(--clay); }
.hero-lead { font-size: 16.5px; color: var(--muted); max-width: 44ch; margin: 18px 0 26px; }

section { padding: 72px 0; }
.sec-head { text-align: center; max-width: 46ch; margin: 0 auto 38px; }
.sec-head h2 { font-size: clamp(28px, 4vw, 40px); }
.sec-head h2 em { font-style: italic; color: var(--clay); }
.sec-head p { color: var(--muted); margin: 14px 0 0; font-size: 14.5px; }

.value-strip { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.value-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 44px; padding: 18px 0; }
.value-row span { font-size: 12.5px; color: var(--muted); }
.value-row b { color: var(--clay); }

/* ---------- Routine quiz (centerpiece) ---------- */
.quiz-shell { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; max-width: 760px; margin: 0 auto; padding: 44px 48px; box-shadow: 0 30px 70px -40px rgba(0,0,0,.5); }
.quiz-progress { display: flex; gap: 8px; margin-bottom: 32px; }
.quiz-progress span { flex: 1; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.quiz-progress span::after { content: ""; display: block; height: 100%; width: 0; background: var(--clay); transition: width .3s ease; }
.quiz-progress span.done::after, .quiz-progress span.active::after { width: 100%; }
.quiz-step { display: none; }
.quiz-step.active { display: block; }
.quiz-step h3 { font-size: 24px; margin-bottom: 22px; text-align: center; }
.quiz-opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.quiz-opt { background: var(--bg); border: 2px solid var(--line); border-radius: 14px; padding: 20px 18px; cursor: pointer; text-align: center; transition: border-color .15s, transform .15s, background .15s; }
.quiz-opt:hover { border-color: var(--clay); transform: translateY(-2px); }
.quiz-opt.selected { border-color: var(--clay); background: rgba(192,122,82,.1); }
.quiz-opt .qo-name { font-family: var(--display); font-size: 17px; margin-bottom: 4px; }
.quiz-opt .qo-desc { font-size: 12px; color: var(--muted); }
.quiz-actions { display: flex; justify-content: space-between; margin-top: 30px; align-items: center; }
.quiz-back { font-size: 13px; color: var(--muted); cursor: pointer; background: none; border: 0; text-decoration: underline; }
.quiz-back:disabled { visibility: hidden; }

/* Results / routine */
.routine-head { text-align: center; margin-bottom: 28px; }
.routine-head h3 { font-size: 26px; margin-bottom: 8px; }
.routine-head p { color: var(--muted); font-size: 14px; }
.routine-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 26px; }
.routine-item { display: grid; grid-template-columns: 60px 1fr auto; gap: 16px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.routine-item .ri-step { font-family: var(--display); font-size: 12px; color: var(--clay); text-transform: uppercase; letter-spacing: .08em; }
.routine-item img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; background: var(--bg-2); }
.routine-item .ri-name { font-weight: 500; font-size: 14.5px; }
.routine-item .ri-ingredients { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.ri-ingredients span { font-size: 10.5px; background: rgba(217,185,138,.15); color: var(--sage); padding: 2px 8px; border-radius: 100px; font-weight: 600; letter-spacing: .01em; }
.routine-item .ri-price { font-family: var(--display); font-size: 15px; color: var(--clay); }
.routine-summary { display: flex; justify-content: space-between; align-items: center; background: rgba(192,122,82,.1); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; margin-bottom: 18px; }
.routine-summary .rs-label { font-size: 13px; color: var(--muted); }
.routine-summary .rs-price { font-family: var(--display); font-size: 24px; color: var(--clay); }
.routine-summary .rs-was { font-size: 13px; color: var(--muted); text-decoration: line-through; margin-right: 8px; }
.retake-link { display: block; text-align: center; margin-top: 16px; }

/* Shop all grid */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; cursor: pointer; transition: transform .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); border-color: var(--clay); }
.card-media { aspect-ratio: 1/1; background: var(--bg-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px; display: flex; justify-content: space-between; align-items: baseline; }
.card-body h3 { font-size: 15px; font-family: var(--sans); font-weight: 500; }
.card-body .price { font-family: var(--display); color: var(--clay); font-weight: 600; }

.lifestyle img { width: 100%; aspect-ratio: 16/8; object-fit: cover; border-radius: var(--r); }

.site-footer { background: #170f0b; padding: 50px 0 26px; border-top: 1px solid var(--line); }
.foot-top { display: flex; justify-content: space-between; gap: 36px; flex-wrap: wrap; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.foot-brand { max-width: 30ch; } .foot-brand .brand { margin-bottom: 12px; } .foot-brand p { color: var(--muted); font-size: 13px; margin: 0; }
.foot-cols { display: flex; gap: 48px; flex-wrap: wrap; }
.foot-col h5 { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--clay); margin: 0 0 12px; }
.foot-col a { display: block; color: var(--muted); font-size: 13px; margin-bottom: 9px; }
.foot-col a:hover { color: var(--ink); }
.foot-bottom { padding-top: 16px; font-size: 11.5px; color: #6e5c4a; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

/* ---------- Overlay shell (quick-view, cart, checkout) ---------- */
.overlay-scrim { position: fixed; inset: 0; background: rgba(15,9,6,.72); z-index: 100; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.overlay-scrim.open { opacity: 1; pointer-events: auto; }

.quickview { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-48%); width: min(800px, calc(100% - 40px)); max-height: 86vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); z-index: 101; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.quickview.open { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%); }
.qv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.qv-media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r) 0 0 var(--r); }
.qv-body { padding: 32px; position: relative; }
.qv-close { position: absolute; top: 16px; right: 16px; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 22px; line-height: 1; }
.qv-close:hover { color: var(--ink); }
.qv-body h3 { font-size: 22px; margin: 6px 0 6px; }
.qv-price { font-family: var(--display); font-size: 20px; color: var(--clay); margin-bottom: 14px; }
.qv-desc { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.qty-row { display: flex; align-items: center; gap: 14px; margin: 18px 0; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 100px; }
.qty-stepper button { width: 34px; height: 34px; background: none; border: 0; color: var(--ink); font-size: 15px; cursor: pointer; }
.qty-stepper span { min-width: 28px; text-align: center; font-weight: 600; }

.cart-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(410px, 100%); background: var(--panel); border-left: 1px solid var(--line); z-index: 101; transform: translateX(100%); transition: transform .3s ease; display: flex; flex-direction: column; }
.cart-drawer.open { transform: none; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.cart-head h3 { font-size: 17px; }
.cart-close { background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; }
.cart-close:hover { color: var(--ink); }
.cart-items { flex: 1; overflow-y: auto; padding: 8px 22px; }
.cart-empty { color: var(--muted); text-align: center; padding: 60px 20px; font-size: 13.5px; }
.cart-line { display: grid; grid-template-columns: 58px 1fr auto; gap: 13px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.cart-line img { width: 58px; height: 58px; object-fit: cover; border-radius: 8px; background: var(--bg-2); }
.cart-line .cl-name { font-size: 13.5px; font-weight: 500; }
.cart-line .cl-variant { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.cart-line .cl-price { font-family: var(--display); color: var(--clay); font-size: 13.5px; margin-top: 8px; }
.cart-line .cl-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-line .qty-stepper button { width: 25px; height: 25px; font-size: 12.5px; }
.cart-line .remove-btn { background: none; border: 0; color: var(--muted); font-size: 11.5px; cursor: pointer; text-decoration: underline; }
.cart-line .remove-btn:hover { color: var(--danger); }
.cart-foot { padding: 20px 22px; border-top: 1px solid var(--line); }
.cart-subtotal { display: flex; justify-content: space-between; font-size: 14.5px; font-weight: 600; margin-bottom: 15px; }
.cart-subtotal b { color: var(--clay); font-family: var(--display); }

.checkout { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-48%); width: min(700px, calc(100% - 32px)); max-height: 88vh; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); z-index: 102; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; }
.checkout.open { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%); }
.checkout-inner { padding: 34px; position: relative; }
.checkout-close { position: absolute; top: 16px; right: 16px; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 22px; }
.checkout-close:hover { color: var(--ink); }
.steps-track { display: flex; gap: 8px; margin-bottom: 28px; }
.steps-track span { flex: 1; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.steps-track span::after { content: ""; display: block; height: 100%; width: 0; background: var(--clay); transition: width .3s ease; }
.steps-track span.done::after, .steps-track span.active::after { width: 100%; }
.co-step { display: none; }
.co-step.active { display: block; }
.co-step h3 { font-size: 21px; margin-bottom: 20px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 7px; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 14.5px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--clay); }
.field textarea { resize: vertical; min-height: 78px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-error { font-size: 11.5px; color: var(--danger); margin-top: 6px; display: none; }
.field.invalid input { border-color: var(--danger); }
.field.invalid .field-error { display: block; }
.co-actions { display: flex; gap: 12px; margin-top: 24px; }
.demo-note { font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 16px; }
.review-list { border: 1px solid var(--line); border-radius: 8px; padding: 4px 15px; margin-bottom: 14px; }
.review-line { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.review-line:last-child { border-bottom: 0; }
.upsell-row { display: flex; align-items: center; gap: 10px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 13px 15px; margin-bottom: 18px; font-size: 13px; }
.upsell-row input { accent-color: var(--clay); width: 16px; height: 16px; }
.upsell-row b { color: var(--clay); }
.review-total { display: flex; justify-content: space-between; font-size: 16px; font-weight: 600; padding-top: 14px; }
.review-total b { color: var(--clay); font-family: var(--display); }
.confirm { text-align: center; padding: 18px 0; }
.confirm .check { width: 60px; height: 60px; border-radius: 50%; background: var(--clay); color: #241712; display: grid; place-items: center; margin: 0 auto 18px; font-size: 28px; font-weight: 800; }
.confirm h3 { font-size: 25px; margin-bottom: 10px; }
.confirm .order-no { font-family: var(--display); color: var(--clay); font-size: 14px; margin-bottom: 18px; }
.confirm p { color: var(--muted); max-width: 40ch; margin: 0 auto 24px; font-size: 14px; }

html.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.js .reveal { opacity: 1; transform: none; transition: none; } }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .qv-grid { grid-template-columns: 1fr; }
  .qv-media img { border-radius: var(--r) var(--r) 0 0; max-height: 270px; }
  .quiz-shell { padding: 32px 24px; }
  .routine-item { grid-template-columns: 50px 1fr auto; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .menu-btn { display: block; }
  .nav-links.open { display: flex; position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; gap: 4px; padding: 16px 24px 22px; background: var(--bg); border-bottom: 1px solid var(--line); z-index: 59; }
  .nav-links.open a { padding: 10px 0; font-size: 14px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .quiz-opts { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  section { padding: 50px 0; }
  .checkout-inner, .qv-body { padding: 20px; }
  .quiz-shell { padding: 26px 18px; }
}
