/* ============================================================
   DABOX FORMATION — Design System
   Editorial papeterie · founder-forward · warm minimal
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@300;400;500;600;700&family=Caveat:wght@500;600&display=swap');

/* ---------- Tokens ---------- */
:root {
  /* Surfaces */
  --cream: #F7F2EA;
  --cream-2: #EFE7D8;
  --cream-3: #E6DBC7;
  --paper: #FBF8F2;
  --white: #FFFFFF;

  /* Ink */
  --ink: #3A2A4A;
  --ink-soft: #5A4A6A;
  --ink-mute: #8A7B97;
  --ink-line: #E0D5C2;

  /* Brand */
  --mauve: #C8B6E2;
  --mauve-deep: #9881C4;
  --mauve-wash: #EDE5F5;

  /* Accents */
  --terracotta: #D9856B;
  --terracotta-deep: #B8694F;
  --terracotta-wash: #F5E3D9;
  --peach: #E8B59E;
  --sage: #A8B89E;
  --sage-deep: #7B8E72;
  --gold: #B8A06A;

  /* System */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(58,42,74,.04), 0 2px 6px rgba(58,42,74,.04);
  --shadow-md: 0 4px 12px rgba(58,42,74,.06), 0 8px 24px rgba(58,42,74,.05);
  --shadow-lg: 0 12px 32px rgba(58,42,74,.08), 0 24px 60px rgba(58,42,74,.06);

  /* Type */
  --serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --script: 'Caveat', cursive;

  /* Layout */
  --container: 1240px;
  --container-narrow: 880px;
  --container-wide: 1400px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "ss01";
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; border-radius: 4px; }

/* ---------- Type ---------- */
.serif { font-family: var(--serif); }
.script { font-family: var(--script); color: var(--terracotta-deep); font-weight: 600; }
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-mute);
}
.eyebrow .dot { color: var(--terracotta); }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); margin: 0; font-weight: 500; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.6rem); line-height: 1.04; font-weight: 400; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.1; }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.2; }
h4 { font-size: 1.1rem; line-height: 1.3; }
p { margin: 0 0 1em; text-wrap: pretty; }
p.lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--ink-soft); line-height: 1.55; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { width: 100%; max-width: var(--container-narrow); margin: 0 auto; padding: 0 24px; }
.container-wide { width: 100%; max-width: var(--container-wide); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-tight { padding: clamp(48px, 6vw, 80px) 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { background: var(--terracotta-deep); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-accent { background: var(--terracotta); color: white; }
.btn-accent:hover { background: var(--terracotta-deep); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink-line); }
.btn-ghost:hover { background: var(--paper); border-color: var(--ink); }
.btn-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink); font-weight: 500;
  border-bottom: 1px solid var(--ink-line);
  padding-bottom: 2px;
}
.btn-link:hover { color: var(--terracotta-deep); border-color: var(--terracotta); }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-sm { padding: 10px 18px; font-size: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247,242,234,.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(224,213,194,.5);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
  gap: 32px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo-mark {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--mauve); color: var(--ink);
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 600; font-size: 17px;
  position: relative;
  box-shadow: 0 2px 0 var(--mauve-deep);
}
.nav-logo-mark::before {
  content: ''; position: absolute; left: 50%; top: -4px;
  width: 14px; height: 6px; transform: translateX(-50%);
  background: var(--mauve-deep); border-radius: 3px 3px 0 0;
}
.nav-logo-mark::after {
  content: ''; position: absolute; left: 0; top: 50%;
  width: 100%; height: 2px; transform: translateY(-50%);
  background: var(--mauve-deep); opacity: .4;
}
.nav-logo-text {
  display: flex; flex-direction: column; line-height: 1;
}
.nav-logo-text .brand {
  font-family: var(--serif); font-size: 20px; font-weight: 500; letter-spacing: -0.01em;
}
.nav-logo-text .tagline {
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-mute); margin-top: 3px;
}
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
  position: relative; padding: 4px 0;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--terracotta); border-radius: 2px;
}
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-cart {
  width: 40px; height: 40px; border-radius: 999px;
  display: grid; place-items: center;
  border: 1px solid var(--ink-line);
  position: relative;
  color: var(--ink);
}
.nav-cart:hover { border-color: var(--ink); }
.nav-cart-badge {
  position: absolute; top: -2px; right: -2px;
  background: var(--terracotta); color: white;
  font-size: 10px; font-weight: 600;
  min-width: 18px; height: 18px; border-radius: 999px;
  display: grid; place-items: center;
  padding: 0 5px;
}
.nav-burger {
  display: none;
  width: 40px; height: 40px; border-radius: 999px;
  border: 1px solid var(--ink-line); background: transparent;
  align-items: center; justify-content: center;
}
@media (max-width: 920px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
  .nav-actions .btn { display: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 80px 0 32px;
  margin-top: 80px;
}
.site-footer a { color: var(--cream); opacity: .75; }
.site-footer a:hover { opacity: 1; color: var(--mauve); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(247,242,234,.12);
}
.footer-brand .nav-logo-mark { background: var(--mauve); }
.footer-brand p { color: rgba(247,242,234,.7); max-width: 320px; margin-top: 20px; font-size: 14.5px; }
.footer-col h5 {
  font-family: var(--sans); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 600; color: var(--mauve); margin: 0 0 18px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px; font-size: 13px; color: rgba(247,242,234,.55);
  flex-wrap: wrap; gap: 16px;
}
.footer-socials { display: flex; gap: 12px; }
.footer-socials a {
  width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid rgba(247,242,234,.18);
  display: grid; place-items: center;
  opacity: .8;
}
.footer-socials a:hover { background: var(--mauve); color: var(--ink); opacity: 1; border-color: var(--mauve); }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- Cards / shared ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(216, 152, 122, .35); }

/* ---------- Image placeholders ---------- */
.img-ph {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      rgba(58,42,74,.04) 0 8px,
      rgba(58,42,74,.07) 8px 16px);
  display: grid; place-items: center;
  color: var(--ink-mute);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 0.06em;
  text-align: center;
  padding: 16px;
  overflow: hidden;
}
.img-ph::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(200,182,226,.18), transparent 60%),
              radial-gradient(ellipse at 80% 80%, rgba(217,133,107,.12), transparent 50%);
  pointer-events: none;
}
.img-ph .img-ph-label {
  position: relative; z-index: 1;
  background: rgba(247,242,234,.85);
  padding: 6px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  border: 1px solid rgba(58,42,74,.08);
  max-width: 80%;
}

/* ---------- Decorative dividers ---------- */
.divider-flourish {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  color: var(--mauve-deep); padding: 16px 0;
}
.divider-flourish::before, .divider-flourish::after {
  content: ''; height: 1px; flex: 1; max-width: 80px;
  background: linear-gradient(to right, transparent, var(--ink-line), transparent);
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.01em;
}
.badge-mauve { background: var(--mauve-wash); color: var(--mauve-deep); }
.badge-terracotta { background: var(--terracotta-wash); color: var(--terracotta-deep); }
.badge-sage { background: rgba(168,184,158,.2); color: var(--sage-deep); }
.badge-cream { background: var(--cream-2); color: var(--ink-soft); }
.badge-ink { background: var(--ink); color: var(--cream); }

/* ---------- Stars ---------- */
.stars { display: inline-flex; gap: 2px; color: var(--terracotta); }
.stars svg { width: 14px; height: 14px; }

/* ---------- Animations ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp .8s ease both; }
.fade-up.d1 { animation-delay: .1s; }
.fade-up.d2 { animation-delay: .2s; }
.fade-up.d3 { animation-delay: .3s; }
.fade-up.d4 { animation-delay: .4s; }

/* ---------- Utility ---------- */
.muted { color: var(--ink-mute); }
.soft { color: var(--ink-soft); }
.center { text-align: center; }
.no-mb { margin-bottom: 0; }
.mt-sm { margin-top: 12px; }
.mt-md { margin-top: 24px; }
.mt-lg { margin-top: 48px; }
.hidden { display: none; }

/* Underline accent (used for emphasized words) */
.u-accent {
  background-image: linear-gradient(transparent 65%, rgba(217,133,107,.35) 65%);
  background-repeat: no-repeat;
  padding: 0 2px;
}
.u-mauve {
  background-image: linear-gradient(transparent 65%, rgba(200,182,226,.55) 65%);
  background-repeat: no-repeat;
  padding: 0 2px;
}

/* ---------- Real images (replace .img-ph slots) ---------- */
.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
