/* Tea Travel — design tokens, verbatim from THE TEA Global Brief v1
   Light is default; .theme-dark mirrors the surface.                */

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

  /* 7 tea categories — used as 4mm wayfinding swatches, not fills */
  --tea-green:  #4a7c59;
  --tea-red:    #8b2500;
  --tea-yellow: #c5a63d;
  --tea-oolong: #b87333;
  --tea-white:  #b0a18c;
  --tea-dark:   #3e2723;
  --tea-puerh:  #4e342e;

  /* Light surface */
  --bg:        #f5f1e8;
  --bg-raised: #fafaf3;
  --fg-1:      #1f1d18;
  --fg-2:      #5a554a;
  --hairline:  rgba(31, 29, 24, 0.08);
  --hairline-strong: rgba(31, 29, 24, 0.18);

  /* Type scale (×1.6 from brief baseline) */
  --t-cap:    11px;
  --t-foot:   12px;
  --t-body:   14px;
  --t-head:   16px;
  --t-title3: 18px;
  --t-title2: 19px;
  --t-title:  22px;
  --t-large:  26px;
  /* Editorial display additions for hero moments at 1280 */
  --t-d3: 36px;
  --t-d2: 48px;
  --t-d1: 64px;
  --t-d0: 88px;

  /* Spacing (×2) */
  --xs: 4px; --sm: 6px; --md: 10px; --lg: 12px;
  --xl: 18px; --xxl: 24px; --xxxl: 32px; --xxxxl: 48px;

  /* 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);
  --t-fast: 100ms; --t-base: 200ms; --t-slow: 400ms; --t-slowest: 800ms;

  /* Fonts */
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif-sc: "Noto Serif SC", "Songti SC", "Source Han Serif SC", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

.theme-dark {
  --bg:        #1a1814;
  --bg-raised: #252220;
  --fg-1:      #f0ebe0;
  --fg-2:      #9a958a;
  --hairline:  rgba(240, 235, 224, 0.10);
  --hairline-strong: rgba(240, 235, 224, 0.22);
  --cream:     #1a1814; /* swap so cream-as-page reads dark */
}

/* Page chrome inside each artboard */
.tt-root {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg-1);
  font-size: var(--t-body);
  line-height: 1.55;
  font-feature-settings: "ss01", "kern";
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}

.tt-root * { box-sizing: border-box; }

/* Hairspace em-dash helper */
.dash::before { content: "\2009\2014\2009"; }

/* Pinyin: always italic, kept inline */
.pinyin { font-style: italic; }

/* Mono numerics */
.mono { font-family: var(--font-mono); font-feature-settings: "tnum"; }

/* Chinese tea names */
.han { font-family: var(--font-serif-sc); font-weight: 500; }

/* Hairline rule */
.hair { border-top: 1px solid var(--hairline); }
.hair-b { border-bottom: 1px solid var(--hairline); }

/* Eyebrow label — uppercase mono caption above sections */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-cap);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-2);
}

/* Big editorial display — IBM Plex Sans set tight & near-black */
.display {
  font-family: var(--font-sans);
  font-weight: 300;
  letter-spacing: -0.022em;
  line-height: 0.98;
  color: var(--fg-1);
}

/* Headlines and titles */
.title { font-size: var(--t-title); font-weight: 500; letter-spacing: -0.012em; line-height: 1.2; }
.title2 { font-size: var(--t-title2); font-weight: 500; letter-spacing: -0.01em; line-height: 1.25; }
.title3 { font-size: var(--t-title3); font-weight: 500; line-height: 1.3; }
.headline { font-size: var(--t-head); font-weight: 500; line-height: 1.35; }
.body { font-size: var(--t-body); color: var(--fg-1); }
.foot { font-size: var(--t-foot); color: var(--fg-2); }
.cap { font-size: var(--t-cap); color: var(--fg-2); }

/* Tea-category swatch — 4mm dot beside region/tea name */
.swatch {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 999px;
  vertical-align: 1px;
  margin-right: 6px;
  flex: 0 0 8px;
}
.sw-green  { background: var(--tea-green); }
.sw-red    { background: var(--tea-red); }
.sw-yellow { background: var(--tea-yellow); }
.sw-oolong { background: var(--tea-oolong); }
.sw-white  { background: var(--tea-white); border: 1px solid var(--hairline-strong); }
.sw-dark   { background: var(--tea-dark); }
.sw-puerh  { background: var(--tea-puerh); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-radius: var(--r-pill);
  font-size: var(--t-body); font-weight: 500;
  font-family: inherit;
  border: 1px solid var(--hairline-strong);
  background: transparent; color: var(--fg-1);
  cursor: pointer; transition: all var(--t-base) var(--ease);
}
.btn:hover { background: var(--bg-raised); }
.btn-primary { background: var(--steep); color: var(--bg-raised); border-color: var(--steep); }
.btn-primary:hover { filter: brightness(1.05); background: var(--steep); }
.btn-sm { height: 32px; padding: 0 12px; font-size: var(--t-foot); }
.btn-ghost { border-color: transparent; }
.btn-ghost:hover { border-color: var(--hairline); }

/* Card */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  transition: border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.card.hover:hover { border-color: var(--hairline-strong); }

/* Contour-line page accent — subtle topographic motif, SVG repeating */
.contour-bg {
  background-image:
    radial-gradient(ellipse 800px 400px at 20% 30%, rgba(58, 107, 69, 0.025), transparent 60%),
    radial-gradient(ellipse 600px 600px at 90% 80%, rgba(184, 115, 51, 0.020), transparent 70%);
}

/* Chip — for region tags, tour difficulty, etc */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline-strong);
  font-size: var(--t-cap);
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-2);
}

/* Constellation bar dots */
.const-bar {
  display: flex; align-items: center; gap: 14px;
  height: 36px; padding: 0 24px;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg);
}
.const-dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--stone); opacity: 0.4;
  transition: opacity var(--t-base) var(--ease);
  cursor: pointer;
}
.const-dot.visited { opacity: 0.65; }
.const-dot.current {
  background: var(--steep); opacity: 1;
  width: 8px; height: 8px;
}
.const-bar:hover .const-dot { opacity: 0.55; }
.const-bar:hover .const-dot.current { opacity: 1; }

/* Header / top nav */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid var(--hairline);
}
.nav-links { display: flex; gap: 28px; }
.nav-link {
  font-size: var(--t-foot); color: var(--fg-2);
  text-decoration: none; transition: color var(--t-base) var(--ease);
  cursor: pointer;
}
.nav-link:hover, .nav-link.active { color: var(--fg-1); }

/* Wordmark */
.wordmark {
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: 16px;
  display: flex; align-items: baseline; gap: 8px;
}
.wordmark .glyph {
  width: 14px; height: 14px;
  border-radius: 999px;
  background: var(--steep);
  display: inline-block; transform: translateY(1px);
}

/* Image placeholder — striped SVG with mono label */
.imgph {
  position: relative;
  background: var(--bg-raised);
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0, transparent 14px,
    var(--hairline) 14px, var(--hairline) 15px
  );
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 16px;
}
.imgph .imgph-label { background: var(--bg); padding: 4px 10px; border-radius: 999px; }

/* Number column — coordinates, altitudes */
.specs {
  display: grid; gap: 2px;
  font-family: var(--font-mono);
  font-size: var(--t-cap);
  color: var(--fg-2);
  letter-spacing: 0.02em;
}
.specs b { color: var(--fg-1); font-weight: 500; }

/* Animations */
@keyframes ttFadeIn { from { opacity: 0; } to { opacity: 1; } }
.fade-in { animation: ttFadeIn var(--t-slow) var(--ease) both; }

/* Reset for buttons used as cards inside the app */
button.bare {
  background: none; border: 0; padding: 0; font: inherit; color: inherit;
  cursor: pointer; text-align: left;
}
