/* tea.equipment — design tokens
   Mirrors the constellation design system (handoff-v3.10).
   Light + dark, type/spacing/radius scales, motion easing.
*/

:root {
  /* ── brand ──────────────────────────────────────────── */
  --steep:  #3a6b45;
  --cream:  #f5f1e8;
  --stone:  #9a958a;

  /* ── 7 tea categories ───────────────────────────────── */
  --green:  #4a7c59;
  --red:    #8b2500;
  --yellow: #c5a63d;
  --oolong: #b87333;
  --white:  #b0a18c;
  --dark:   #3e2723;
  --puerh:  #4e342e;

  /* ── light surface ──────────────────────────────────── */
  --bg:        #f5f1e8;
  --bg-raised: #fafaf3;
  --bg-sunk:   #ece6d7;
  --fg-1:      #1f1d18;
  --fg-2:      #5a554a;
  --fg-3:      #9a958a;
  --hairline:  rgba(31, 29, 24, 0.08);
  --hairline-strong: rgba(31, 29, 24, 0.16);

  /* ── type ───────────────────────────────────────────── */
  --font-sans: "IBM Plex Sans", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --font-serif-sc: "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* scale ×1.6 */
  --t-large-title: 26px;
  --t-title:       22px;
  --t-title2:      19px;
  --t-title3:      18px;
  --t-headline:    16px;
  --t-body:        14px;
  --t-footnote:    12px;
  --t-caption:     11px;

  /* ── spacing ×2 ─────────────────────────────────────── */
  --xs:   4px;
  --sm:   6px;
  --md:  10px;
  --lg:  12px;
  --xl:  18px;
  --xxl: 24px;
  --xxxl: 32px;

  /* ── radius ─────────────────────────────────────────── */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  /* ── motion ─────────────────────────────────────────── */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --d-1: 100ms;
  --d-2: 200ms;
  --d-3: 400ms;
  --d-4: 800ms;
}

[data-theme="dark"] {
  --bg:        #1a1814;
  --bg-raised: #252220;
  --bg-sunk:   #14120f;
  --fg-1:      #f0ebe0;
  --fg-2:      #9a958a;
  --fg-3:      #6b665c;
  --hairline:  rgba(240, 235, 224, 0.10);
  --hairline-strong: rgba(240, 235, 224, 0.18);
}

/* ── base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: 1.5;
  color: var(--fg-1);
  background: var(--bg);
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: default; }
img { display: block; max-width: 100%; }

/* ── primitives ───────────────────────────────────────── */

.hairline { border: 0; border-top: 1px solid var(--hairline); margin: 0; }

.mono { font-family: var(--font-mono); letter-spacing: 0.01em; }
.hanzi { font-family: var(--font-serif-sc); font-weight: 500; }
.pinyin { font-style: italic; letter-spacing: 0.005em; }

.eyebrow {
  font-size: var(--t-caption);
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
}

/* striped image placeholder */
.ph {
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      45deg,
      transparent 0,
      transparent 11px,
      var(--hairline) 11px,
      var(--hairline) 12px
    ),
    var(--bg-sunk);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
}
.ph .ph-cap {
  position: absolute;
  inset: auto auto var(--md) var(--md);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--fg-2);
  background: var(--bg-raised);
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid var(--hairline);
}
.ph.square { aspect-ratio: 1 / 1; }
.ph.portrait { aspect-ratio: 3 / 4; }
.ph.landscape { aspect-ratio: 4 / 3; }
.ph.wide { aspect-ratio: 16 / 9; }

/* small "chip" */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--xs);
  padding: 3px 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline-strong);
  font-size: var(--t-caption);
  color: var(--fg-2);
  background: var(--bg-raised);
  white-space: nowrap;
}
.chip[data-active="true"] {
  background: var(--fg-1);
  color: var(--bg-raised);
  border-color: var(--fg-1);
}

/* a tap target */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sm);
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline-strong);
  color: var(--fg-1);
  background: var(--bg-raised);
  font-size: var(--t-body);
  white-space: nowrap;
  text-decoration: none;
  transition: background var(--d-1) var(--ease), border-color var(--d-1) var(--ease);
}
.btn:hover { background: var(--bg-sunk); }
.btn--primary {
  background: var(--steep);
  color: #f5f1e8;
  border-color: var(--steep);
}
.btn--primary:hover { background: #2f5638; }
.btn--ghost { border-color: transparent; background: transparent; }

/* generic card */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
}

/* lucide-style icon wrapper */
.ic {
  display: inline-block;
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
