/* Tea Community — design tokens (light + dark)
   From handoff-v3.10 / 00_GLOBAL_BRIEF §2.1
   ─────────────────────────────────────────── */

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

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

  /* light surfaces */
  --bg:        #f5f1e8;
  --bg-raised: #fafaf3;
  --bg-sunk:   #ede8db;
  --fg-1:      #1f1d18;
  --fg-2:      #5a554a;
  --fg-3:      #8a8478;
  --hair:      rgba(31,29,24,0.08);
  --hair-2:    rgba(31,29,24,0.14);

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

  /* spacing */
  --s-xs:   4px;
  --s-sm:   6px;
  --s-md:  10px;
  --s-lg:  12px;
  --s-xl:  18px;
  --s-xxl: 24px;
  --s-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;

  /* type stacks */
  --ff-sans:   "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ff-serif:  "Noto Serif SC", "Songti SC", serif;
  --ff-mono:   "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

  --cream:     #252220;
  --stone:     #6b6760;
}

/* Surface — every screen sits on this. */
.tt-surface {
  background: var(--bg);
  color: var(--fg-1);
  font-family: var(--ff-sans);
  font-size: var(--t-body);
  line-height: 1.5;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.005em;
}

/* Density */
.tt-surface[data-density="compact"] {
  --s-md: 8px;
  --s-lg: 10px;
  --s-xl: 14px;
  --s-xxl: 18px;
  --s-xxxl: 24px;
}

/* Helpers */
.tt-hair { border: .5px solid var(--hair); }
.tt-hair-b { border-bottom: .5px solid var(--hair); }
.tt-hair-t { border-top: .5px solid var(--hair); }

.tt-mono { font-family: var(--ff-mono); font-feature-settings: "tnum"; }
.tt-serif { font-family: var(--ff-serif); }
.tt-pinyin { font-style: italic; font-family: var(--ff-sans); }

.tt-eyebrow {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* Tea-category swatch */
.tt-cat-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  vertical-align: 1px;
}

/* Reset within surfaces */
.tt-surface button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.tt-surface input, .tt-surface textarea {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
}
.tt-surface ::selection { background: rgba(58,107,69,0.20); }
.tt-surface * { box-sizing: border-box; }

/* Photo placeholder — striped SVG, monospace caption */
.tt-photo {
  position: relative;
  background:
    repeating-linear-gradient(
      135deg,
      transparent 0 6px,
      var(--hair) 6px 7px
    ),
    var(--bg-sunk);
  display: flex; align-items: flex-end;
  overflow: hidden;
  border-radius: var(--r-md);
}
.tt-photo > .cap {
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--fg-3);
  padding: 8px 10px;
  letter-spacing: 0.02em;
}

/* Tonal block (for category-tinted ambient images) */
.tt-tonal {
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
}
.tt-tonal::after {
  content: "";
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(
      135deg,
      transparent 0 8px,
      rgba(255,255,255,0.06) 8px 9px
    );
  pointer-events: none;
}
.tt-tonal > .cap {
  position: absolute; bottom: 8px; left: 10px;
  font-family: var(--ff-mono);
  font-size: 10px;
  color: rgba(255,255,255,0.78);
  letter-spacing: 0.02em;
  z-index: 1;
}
