/* PELSKIN — design tokens */
:root {
  --bg-base: #F1E7D7;
  --bg-soft: #EBDDC8;
  --bg-warm: #E8D9C2;
  --bg-deep: #DDCCB1;
  --text-primary: #2B1810;
  --text-secondary: #5C4033;
  --text-muted: #8A7461;
  --accent-taupe: #C9A98A;
  --accent-line: #D4C4A8;
  --serif: "Cormorant Garamond", "Cormorant", Garamond, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  line-height: 1.6;
}

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

/* Type system */
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.serif-italic { font-family: var(--serif); font-style: italic; font-weight: 400; }
.smallcaps {
  font-family: var(--serif);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}
.label-tiny {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 10px;
  font-weight: 500;
}

.h-display { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 7vw, 88px); line-height: 1.05; letter-spacing: -0.015em; }
.h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 5vw, 56px); line-height: 1.1; letter-spacing: -0.01em; }
.h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3.5vw, 40px); line-height: 1.15; }
.h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.25; }

/* Layout */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container-narrow { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .container, .container-narrow { padding: 0 48px; } }

.divider { height: 1px; background: var(--accent-line); width: 100%; }
.divider-soft { height: 1px; background: rgba(43,24,16,0.08); width: 100%; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  transition: all 220ms ease;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: var(--sans);
}
.btn-primary {
  background: var(--text-primary);
  color: var(--bg-base);
}
.btn-primary:hover { background: #1a0e08; }
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--text-primary);
}
.btn-secondary:hover { background: var(--text-primary); color: var(--bg-base); }
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-bottom: 1px solid var(--accent-taupe);
  padding: 6px 0;
  font-size: 12px;
  letter-spacing: 0.2em;
}
.btn-ghost:hover { border-bottom-color: var(--text-primary); }

/* Inputs */
.input {
  width: 100%;
  padding: 14px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--accent-line);
  font-family: var(--serif);
  font-size: 18px;
  color: var(--text-primary);
  transition: border-color 200ms ease;
}
.input:focus { outline: none; border-bottom-color: var(--text-primary); }
.input::placeholder { color: var(--text-muted); font-style: italic; }

.input-boxed {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-base);
  border: 1px solid var(--accent-line);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-primary);
}
.input-boxed:focus { outline: none; border-color: var(--text-primary); }

/* Header */
.header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  transition: background 240ms ease, border-color 240ms ease;
  border-bottom: 1px solid transparent;
}
.header.scrolled { background: var(--bg-base); border-bottom-color: var(--accent-line); }
.header.transparent { background: transparent; }
@media (min-width: 768px) { .header { padding: 22px 48px; } }
.wordmark {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.32em;
}
.nav-desktop { display: none; gap: 36px; }
.nav-desktop a {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 180ms;
}
.nav-desktop a:hover, .nav-desktop a.active { color: var(--text-primary); }
@media (min-width: 900px) { .nav-desktop { display: flex; } }
.nav-right { display: flex; align-items: center; gap: 16px; }
.icon-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  position: relative;
}
.icon-btn:hover { background: rgba(43,24,16,0.05); }
.cart-badge {
  position: absolute; top: 6px; right: 6px;
  min-width: 16px; height: 16px;
  background: var(--text-primary); color: var(--bg-base);
  border-radius: 999px;
  font-size: 10px; font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.hamburger { display: inline-flex; }
@media (min-width: 900px) { .hamburger { display: none; } }

/* Hero */
.hero {
  min-height: calc(100vh - 76px);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  padding: 80px 24px 120px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--bg-base) 0%, var(--bg-soft) 60%, var(--bg-warm) 100%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 40%, rgba(201,169,138,0.18), transparent 60%);
}
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 880px; }

/* Step cards */
.system-grid {
  display: grid; grid-template-columns: 1fr; gap: 56px;
}
@media (min-width: 768px) {
  .system-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}
.step-card { text-align: center; }

/* Silk scroll reveal — applied via IntersectionObserver in index.html */
.silk-reveal { opacity: 0; transform: translateY(32px); transition: opacity 950ms cubic-bezier(0.22, 1, 0.36, 1), transform 950ms cubic-bezier(0.22, 1, 0.36, 1); }
.silk-reveal > .product-frame { opacity: 0; transform: translateY(18px); transition: opacity 1100ms cubic-bezier(0.22, 1, 0.36, 1), transform 1100ms cubic-bezier(0.22, 1, 0.36, 1); }
.silk-reveal.is-in { opacity: 1; transform: translateY(0); }
.silk-reveal.is-in > .product-frame { opacity: 1; transform: translateY(0); }
.step-card.silk-reveal:nth-child(1) { transition-delay: 100ms; }
.step-card.silk-reveal:nth-child(1) > .product-frame { transition-delay: 100ms; }
.step-card.silk-reveal:nth-child(2) { transition-delay: 280ms; }
.step-card.silk-reveal:nth-child(2) > .product-frame { transition-delay: 280ms; }
.step-card.silk-reveal:nth-child(3) { transition-delay: 460ms; }
.step-card.silk-reveal:nth-child(3) > .product-frame { transition-delay: 460ms; }
@media (prefers-reduced-motion: reduce) {
  .silk-reveal, .silk-reveal > .product-frame { opacity: 1 !important; transform: none !important; transition: none !important; }
}
.step-num { font-family: var(--serif); font-size: 64px; line-height: 1; font-weight: 400; }
.product-frame {
  aspect-ratio: 4/5;
  background: var(--bg-soft);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--accent-line);
}
.product-frame.warm { background: var(--bg-warm); }
.product-frame.deep { background: var(--bg-deep); }

/* SVG bottle silhouettes — simple primitives */
.bottle {
  display: block;
  width: 56%;
  height: auto;
  filter: drop-shadow(0 1px 0 rgba(43,24,16,0.04));
}

.product-card {
  display: flex; flex-direction: column;
  text-decoration: none;
  transition: transform 320ms ease;
}
.product-card:hover { transform: translateY(-4px); }
.product-card .product-frame { margin-bottom: 20px; }

/* Manifesto rows */
.manifesto-row {
  display: grid; grid-template-columns: 1fr; gap: 0;
  border-top: 1px solid var(--accent-line);
  border-bottom: 1px solid var(--accent-line);
}
@media (min-width: 768px) { .manifesto-row { grid-template-columns: repeat(4, 1fr); } }
.manifesto-cell {
  padding: 28px 20px;
  text-align: center;
  border-right: 1px solid var(--accent-line);
}
.manifesto-cell:last-child { border-right: none; }
@media (max-width: 767px) {
  .manifesto-cell { border-right: none; border-bottom: 1px solid var(--accent-line); }
  .manifesto-cell:last-child { border-bottom: none; }
}

/* Marquee */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--accent-line);
  border-bottom: 1px solid var(--accent-line);
  padding: 24px 0;
  background: var(--bg-soft);
}
.marquee-track {
  display: flex; gap: 64px;
  animation: marquee 38s linear infinite;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: 24px;
  color: var(--text-secondary);
}
.marquee-track > span { display: inline-flex; align-items: center; gap: 64px; }
.marquee-dot { width: 4px; height: 4px; background: var(--accent-taupe); border-radius: 999px; display: inline-block; }
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Sections */
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
@media (max-width: 767px) { .section { padding: 64px 0; } .section-tight { padding: 48px 0; } }
.section.alt { background: var(--bg-soft); }
.section.warm { background: var(--bg-warm); }

/* Quiz */
.quiz-card {
  background: var(--bg-base);
  border: 1px solid var(--accent-line);
  padding: 40px 28px;
  max-width: 640px;
  margin: 0 auto;
}
@media (min-width: 768px) { .quiz-card { padding: 64px 56px; } }
.progress-track {
  height: 1px;
  background: var(--accent-line);
  position: relative;
}
.progress-fill {
  position: absolute; top: 0; left: 0; height: 100%;
  background: var(--text-primary);
  transition: width 420ms cubic-bezier(.4,0,.2,1);
}
.radio-list { display: flex; flex-direction: column; gap: 0; }
.radio-row {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--accent-line);
  cursor: pointer;
  transition: background 160ms ease;
  font-family: var(--serif);
  font-size: 19px;
}
.radio-row:first-child { border-top: 1px solid var(--accent-line); }
.radio-row:hover { background: rgba(201,169,138,0.08); padding-left: 12px; }
.radio-dot {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  border-radius: 999px;
  border: 1px solid var(--text-secondary);
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 200ms;
}
.radio-row.selected .radio-dot { border-color: var(--text-primary); }
.radio-row.selected .radio-dot::after {
  content: ""; width: 8px; height: 8px; border-radius: 999px;
  background: var(--text-primary);
}
.radio-row.selected { background: rgba(201,169,138,0.12); padding-left: 12px; }

/* Sheet (cart) */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(43,24,16,0.32);
  opacity: 0; pointer-events: none;
  transition: opacity 240ms ease;
}
.sheet-overlay.open { opacity: 1; pointer-events: all; }
.sheet {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 101;
  width: min(440px, 100%);
  background: var(--bg-base);
  transform: translateX(100%);
  transition: transform 320ms cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  border-left: 1px solid var(--accent-line);
}
.sheet.open { transform: translateX(0); }
.sheet-head { padding: 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--accent-line); }
.sheet-body { flex: 1; overflow-y: auto; padding: 24px; }
.sheet-foot { padding: 24px; border-top: 1px solid var(--accent-line); }

/* Mobile menu */
.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 90;
  width: min(360px, 100%);
  background: var(--bg-base);
  transform: translateX(100%);
  transition: transform 320ms cubic-bezier(.4,0,.2,1);
  border-left: 1px solid var(--accent-line);
  padding: 24px;
  display: flex; flex-direction: column; gap: 24px;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-link {
  font-family: var(--serif);
  font-size: 28px;
  padding: 12px 0;
  border-bottom: 1px solid var(--accent-line);
  text-align: left;
}

/* Footer */
.footer {
  background: var(--bg-soft);
  padding: 80px 0 32px;
  border-top: 1px solid var(--accent-line);
}
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 40px;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 48px; }
}
.footer h5 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.22em; font-weight: 500; margin-bottom: 16px; color: var(--text-secondary); }
.footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--text-secondary); }
.footer-bottom {
  margin-top: 64px; padding-top: 24px;
  border-top: 1px solid var(--accent-line);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted);
}

/* Mode toggle */
.mode-toggle {
  position: fixed; bottom: 20px; left: 20px; z-index: 80;
  background: var(--text-primary); color: var(--bg-base);
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  border-radius: 999px;
  border: 1px solid var(--text-primary);
}
.mode-toggle .seg {
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 200ms;
  background: transparent;
  color: var(--bg-base);
}
.mode-toggle .seg.active {
  background: var(--bg-base);
  color: var(--text-primary);
}

/* Page transitions */
.page-enter {
  animation: fadeUp 380ms cubic-bezier(.4,0,.2,1);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Utility */
.center { text-align: center; }
.muted { color: var(--text-secondary); }
.dim { color: var(--text-muted); }
.italic { font-style: italic; }
.flex { display: flex; }
.col { flex-direction: column; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; } .gap-48 { gap: 48px; }
.mt-12{margin-top:12px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}.mt-32{margin-top:32px}.mt-48{margin-top:48px}.mt-64{margin-top:64px}
.mb-12{margin-bottom:12px}.mb-16{margin-bottom:16px}.mb-24{margin-bottom:24px}.mb-32{margin-bottom:32px}.mb-48{margin-bottom:48px}.mb-64{margin-bottom:64px}
.w-full { width: 100%; }
.row { display: flex; gap: 24px; align-items: center; }
.between { justify-content: space-between; }

/* Accordion */
.accordion-item { border-bottom: 1px solid var(--accent-line); }
.accordion-trigger {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 22px 0; text-align: left;
  font-family: var(--serif); font-size: 22px;
  cursor: pointer;
}
.accordion-icon { transition: transform 280ms ease; font-size: 20px; }
.accordion-trigger.open .accordion-icon { transform: rotate(45deg); }
.accordion-content {
  max-height: 0; overflow: hidden;
  transition: max-height 320ms ease, padding 320ms ease;
  font-size: 15px; color: var(--text-secondary); line-height: 1.7;
}
.accordion-content.open { max-height: 600px; padding-bottom: 22px; }

/* Table (Journal post) */
.j-table {
  border: 1px solid var(--accent-line);
  width: 100%;
  border-collapse: collapse;
}
.j-table th, .j-table td { padding: 18px 20px; border: 1px solid var(--accent-line); text-align: left; vertical-align: top; }
.j-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.22em; font-weight: 500; background: var(--bg-soft); color: var(--text-secondary); }
.j-table td { font-size: 15px; line-height: 1.6; }
.j-table td strong { font-family: var(--serif); font-weight: 500; font-size: 17px; display: block; margin-bottom: 4px; }

/* Pulse quote */
.pull-quote {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.25;
  font-weight: 400;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}

/* Tag */
.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--accent-taupe);
  color: var(--bg-base);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--text-primary); color: var(--bg-base);
  padding: 14px 24px;
  font-size: 13px; letter-spacing: 0.12em;
  z-index: 200;
  transition: transform 360ms cubic-bezier(.4,0,.2,1);
}
.toast.show { transform: translateX(-50%) translateY(0); }
