/* CozyRozy — design tokens */
:root {
  /* Paper + ink */
  --paper:        #FAF8F5;   /* warm off-white, primary canvas */
  --paper-2:      #F2EEE7;   /* soft warm gray, secondary canvas */
  --paper-3:      #E8E2D6;   /* card edge / divider */
  --ink:          #1A1A1A;   /* near-black, primary text */
  --ink-2:        #4A463F;   /* warm gray, secondary text */
  --ink-3:        #8A8479;   /* tertiary / metadata */
  --hairline:     #D9D2C4;   /* 1px rules */

  /* Singular accent */
  --terracotta:   #C4622D;
  --terracotta-2: #A4521F;   /* hover / pressed */
  --terracotta-w: #F3E4D8;   /* tinted background wash */

  /* Supporting naturals (used as swatches, not UI) */
  --nat-natural:  #E8DDC9;
  --nat-stone:    #BEB5A4;
  --nat-moss:     #6E7357;
  --nat-charcoal: #2E2C28;
  --nat-rust:     #9E4620;

  /* Type */
  --serif:  'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans:   'Inter', system-ui, sans-serif;
  --mono:   'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Scale */
  --radius-sm: 6px;
  --radius:    18px;
  --radius-lg: 28px;

  /* Spacing (8pt) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;

  --container: 1120px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}

/* Editorial grain — extremely subtle */
.grain::before {
  content:""; position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.1  0 0 0 0 0.1  0 0 0 0.035 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply; opacity: .6;
}

/* Type scale — tight, editorial */
.h-display { font-family: var(--serif); font-weight: 400; font-variation-settings: "SOFT" 50, "WONK" 0, "opsz" 144;
  font-size: clamp(56px, 9vw, 144px); line-height: .92; letter-spacing: -0.03em; }
.h-1 { font-family: var(--serif); font-weight: 400; font-variation-settings: "opsz" 96;
  font-size: clamp(40px, 5.2vw, 76px); line-height: .98; letter-spacing: -0.025em; }
.h-2 { font-family: var(--serif); font-weight: 400; font-variation-settings: "opsz" 48;
  font-size: clamp(28px, 3.2vw, 44px); line-height: 1.05; letter-spacing: -0.02em; }
.h-3 { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2vw, 28px); line-height: 1.15; letter-spacing: -0.01em; }
.lead { font-family: var(--sans); font-size: clamp(17px, 1.3vw, 20px); line-height: 1.55; color: var(--ink-2); }
.body { font-family: var(--sans); font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.small { font-family: var(--sans); font-size: 13px; line-height: 1.55; color: var(--ink-3); }

.eyebrow {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--terracotta);
}
.meta {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--ink-3); text-transform: uppercase;
}
.pull {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(24px, 2.6vw, 36px); line-height: 1.3; color: var(--ink);
  letter-spacing: -0.01em;
}

/* Primitives */
.rule { height: 1px; background: var(--hairline); border: 0; }
.rule-dot { height: 1px; background-image: linear-gradient(to right, var(--ink-3) 1px, transparent 1px); background-size: 6px 1px; background-repeat: repeat-x; }

/* Container */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* Button */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: 0.01em;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--terracotta); }
.btn-accent { background: var(--terracotta); color: var(--paper); }
.btn-accent:hover { background: var(--terracotta-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--hairline); }
.btn-ghost:hover { border-color: var(--ink); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* Chip */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--hairline); background: transparent;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-2); cursor: pointer; transition: all .18s ease;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Card */
.card {
  background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius-lg);
  overflow: hidden; transition: transform .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--ink-3); }

/* Placeholder image — striped, labeled */
.ph {
  position: relative; width: 100%; background: var(--paper-2);
  border-radius: var(--radius); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.ph::before {
  content:""; position:absolute; inset:0;
  background-image: repeating-linear-gradient(135deg, transparent 0 18px, rgba(26,26,26,.035) 18px 19px);
}
.ph-label {
  position: relative; font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.14em; text-align: center; padding: 0 20px;
}
.ph-label b { display:block; color: var(--ink-2); font-weight: 500; margin-bottom: 4px; }

/* Swatch dot (color options) */
.swatch {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,.08); display: inline-block; cursor: pointer;
  transition: transform .15s ease, outline-offset .15s ease;
  outline: 1px solid transparent; outline-offset: 0;
}
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed="true"] { outline-color: var(--ink); outline-offset: 3px; }

/* Tag badge */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
}
.badge-new     { background: var(--ink); color: var(--paper); }
.badge-limited { background: var(--terracotta); color: var(--paper); }
.badge-ghost   { background: transparent; color: var(--ink-2); border: 1px solid var(--hairline); }

/* Pulse dot */
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--terracotta); position: relative; }
.dot::after {
  content:""; position: absolute; inset: -4px; border-radius: 50%;
  background: var(--terracotta); opacity: .35; animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(.6); opacity: .5; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Marginalia — editorial side notes */
.margin-note {
  font-family: var(--mono); font-size: 10px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.16em;
}

/* Section number */
.sect-num {
  font-family: var(--mono); font-size: 12px; color: var(--terracotta);
  letter-spacing: 0.14em;
}

/* Accordion */
details.acc { border-bottom: 1px solid var(--hairline); padding: 22px 0; }
details.acc > summary {
  list-style: none; cursor: pointer; display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  font-family: var(--serif); font-size: 22px; letter-spacing: -0.01em; color: var(--ink);
}
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after {
  content: "+"; font-family: var(--mono); color: var(--ink-3); font-size: 18px; transition: transform .25s ease;
}
details.acc[open] > summary::after { transform: rotate(45deg); color: var(--terracotta); }
details.acc .acc-body { padding-top: 14px; color: var(--ink-2); max-width: 640px; }

/* Seam divider — a tiny repeating glyph line */
.seam {
  display: flex; align-items: center; gap: 10px; color: var(--ink-3);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
}
.seam::before, .seam::after {
  content:""; flex: 1; height: 1px;
  background-image: linear-gradient(to right, var(--hairline) 1px, transparent 1px);
  background-size: 5px 1px;
}

/* Utility */
.warm-bg { background: var(--paper-2); }
.ink-bg  { background: var(--ink); color: var(--paper); }
.ink-bg .body, .ink-bg .lead { color: rgba(250,248,245,.72); }
.ink-bg .eyebrow { color: #E8A178; }

a { color: inherit; }

/* Selection */
::selection { background: var(--terracotta); color: var(--paper); }

/* Focus */
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; border-radius: 4px; }

/* Motifs (ritual alphabet) — sized at the usage site */
.motif { display: inline-block; flex-shrink: 0; vertical-align: middle;}
.motif--ember { width: 24px; height: 24px; color: var(--ink);}
.motif--moon  { width: 12px; height: 12px; color: currentColor;}
.motif--steam { width: 100%; max-width: 240px; height: 24px; color: var(--ink-3); opacity: .3; display: block; margin: 48px auto;}
.motif--hat   { width: 32px; height: 32px; color: var(--ink);}
.badge-limited .motif--moon { color: var(--paper);}
