/* Page shell for market_intelligence.html: tokens, topbar and page
   head (originally taken from the DBEI dashboard). The Market Intelligence
   module itself is styled by mi.css. */

@font-face {
  font-family: "China Digital Outfit";
  src: url("fonts/watermark/outfit.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: block;
}

:root {
  /* Responsive size factor: text, spacing and the topbar height are
     multiplied by --ui. 1440–2099px wide keeps the base sizes; narrower
     screens (e.g. a laptop at 150% Windows scaling, ~1280px) get a little
     smaller, very wide ones a little bigger. Card columns are set in mi.css. */
  --ui: 1;
  --bar-h: calc(64px * var(--ui));
  --brand-adidas: #2e4589;
  --brand-nike: #308eda;
  --brand-anta: #e3536b;
  --brand-fila: #a78042;
  --brand-lululemon: #d23230;
  --brand-arcteryx: #e9b610;
  --brand-mlb: #0558b7;
  --brand-the-north-face: #8E24AA;
  --brand-descente: #688793;
  --brand-skechers: #79d85c;
  --brand-jordan: #26C6DA;
  --brand-new-balance: #e36804;
  --brand-kolon: #1e7244;
  --brand-alo: #2f2f2f;
  --brand-puma: #e87932;
  --brand-new-era: #4169e1;
  --brand-salomon: #515e70;
  --brand-default: #4267a9;

  --bg: #F6F7FA;
  --surface: #ffffff;
  --text: #111318;
  --muted: #667085;
  --border: #e7eaf0;
  --accent: #0b6bcb;
  --accent-strong: #0a58a8;

  --white: #fff;
  --surf: #F7F8FB;
  --rule: #ECEEF3;
  --rule-soft: #F2F4F8;
  --ink: #1A1A2E;
  --ink-2: #4A4A68;
  --ink-3: #7B7B96;
  --ink-4: #A0A0BC;
  --ink-5: #C9C9DC;
  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;
  --r-xs: 8px;
  --sh-card: 0 1px 3px rgba(28, 32, 48, .04), 0 6px 18px rgba(28, 32, 48, .05);
  --sh-hover: 0 6px 16px rgba(28, 32, 48, .08), 0 16px 36px rgba(28, 32, 48, .09);
  --sh-lift: 0 3px 9px rgba(28, 32, 48, .06), 0 10px 26px rgba(28, 32, 48, .07);
}

body {
  margin: 0;
  font-family: "Source Han Sans CN", "PingFang SC", "Microsoft YaHei", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.is-hidden { display: none !important; }

.topbar-global {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 120;
  min-height: var(--bar-h);
  padding: calc(10px * var(--ui)) calc(24px * var(--ui));
  box-sizing: border-box;
  background: rgba(15, 15, 15, 0.98);
  border-bottom: 1px solid #282828;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.topbar-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.topbar-watermark {
  margin-right: calc(12px * var(--ui));
  color: rgba(255, 255, 255, .45);
  font-family: "China Digital Outfit", sans-serif;
  font-size: calc(14px * var(--ui));
  font-weight: 500;
  letter-spacing: .04em;
  white-space: nowrap;
  user-select: none;
}

/* Brand lockup: solid sparkle mark in a domed white tile, then the title (with a
   light sweeping across it without pause) and an outlined tag. */
.brand { display: flex; align-items: center; gap: calc(16px * var(--ui)); }

.brand-tile {
  width: calc(40px * var(--ui)); height: calc(40px * var(--ui));
  box-sizing: border-box;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: calc(11px * var(--ui));
  border: 1px solid rgba(255, 255, 255, .9);
  background: radial-gradient(120% 90% at 30% 15%, #ffffff 0%, #f1f3f7 55%, #dfe3ea 100%);
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .08), 0 6px 14px rgba(0, 0, 0, .5);
}

.brand-mark { width: calc(28px * var(--ui)); height: calc(28px * var(--ui)); display: block; color: #111318; }
/* the big star is drawn as an outline in the markup; fill it solid */
.brand-mark path:first-child { fill: currentColor; }

.brand-name {
  margin: 0;
  font: 900 calc(20px * var(--ui))/1 Inter, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
  /* One highlight per 200%-wide tile, repeated, so moving by exactly one tile
     loops with no jump and no pause. */
  background: linear-gradient(100deg, #fff 0%, #fff 35%, #8fc0ff 50%, #fff 65%, #fff 100%) 0 0 / 200% 100% repeat-x;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: brand-sweep 5s linear infinite;
  position: relative;
}

/* Short gradient underline under the title, in a bright blue so it reads on
   the dark bar. */
.brand-name::after {
  content: '';
  position: absolute;
  left: 0; bottom: -7px;
  width: 30px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #3b8cff, transparent);
}

.brand-sub {
  font: 700 calc(11.5px * var(--ui))/1 Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #9a9a9a;
  border: 1px solid #333;
  border-radius: 999px;
  padding: calc(5px * var(--ui)) calc(10px * var(--ui));
  white-space: nowrap;
}

@keyframes brand-sweep {
  from { background-position: 200% 0; }
  to { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-name { animation: none; }
}

.month-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #b8b8b8;
  font-size: calc(12px * var(--ui));
  padding: 5px 8px;
}

.month-picker select {
  border: 1px solid #d8d8e4;
  background: #fff;
  color: #1a1a2e;
  border-radius: 999px;
  padding: calc(7px * var(--ui)) calc(12px * var(--ui));
  min-width: 82px;
  outline: none;
  font-size: calc(12px * var(--ui));
  font-weight: 700;
  cursor: pointer;
}

.lang-switch {
  position: relative;
  height: 30px;
  box-sizing: border-box;
  border: 1px solid #383838;
  border-radius: 999px;
  background: #202020;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  user-select: none;
}

.lang-switch-track {
  position: absolute;
  top: 3px; left: 3px;
  width: 42px; height: 22px;
  border-radius: 999px;
  background: #fff;
  transition: transform .2s ease;
  z-index: 1;
}

/* Three options, 42px each: the white track slides under the active one. */
.lang-switch[data-lang="en"] .lang-switch-track { transform: translateX(42px); }
.lang-switch[data-lang="ko"] .lang-switch-track { transform: translateX(84px); }

.lang-switch-label {
  position: relative;
  z-index: 2;
  width: 42px; height: 22px;
  border: 0;
  background: transparent;
  color: #a0a0bc;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
}

.lang-switch[data-lang="zh"] .lang-switch-label.zh,
.lang-switch[data-lang="en"] .lang-switch-label.en,
.lang-switch[data-lang="ko"] .lang-switch-label.ko { color: #111; }

.app {
  min-height: calc(100vh - var(--bar-h));
  margin-top: var(--bar-h);
}

.main { padding: calc(24px * var(--ui)) clamp(16px, 2vw, 64px) calc(60px * var(--ui)); min-width: 0; }

.section-divider { display: flex; align-items: center; gap: 12px; margin: calc(30px * var(--ui)) 0 calc(16px * var(--ui)); }
.page > .section-divider:first-child { margin-top: 0; }
.section-divider-line { flex: 1; height: 1px; }

.section-divider-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: calc(18px * var(--ui));
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.section-divider-note { font-size: calc(11px * var(--ui)); color: #a0a0bc; font-weight: 600; white-space: nowrap; }

.section-divider-num {
  width: calc(26px * var(--ui)); height: calc(26px * var(--ui));
  border-radius: 9px;
  background: color-mix(in oklab, var(--accent) 14%, var(--surface) 86%);
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.section-divider-icon { width: calc(15px * var(--ui)); height: calc(15px * var(--ui)); display: block; }

@media (max-width: 1439px) { :root { --ui: .8; } }
@media (min-width: 1760px) and (max-width: 2099px) { :root { --ui: .98; } }
@media (min-width: 2100px) { :root { --ui: 1.12; } }
@media (min-width: 2500px) { :root { --ui: 1.22; } }

@media (max-width: 900px) {
  .main { padding: 20px 16px 48px; }
  .brand-sub { display: none; }
}
