/* ============================================================
   know-vance · Design Tokens + Element Styles
   Single source of truth for color, type, spacing, radius, shadow.
   ============================================================ */

/* --- Webfonts (CDN — replace with self-hosted woff2 when supplied) ---- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&family=Zen+Kaku+Gothic+New:wght@700;900&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  /* ========== COLORS ============================================== */

  /* Neutral / Primary (text + surfaces) */
  --ink:           #0A0E1A;   /* Primary 900 — body ink */
  --fg-1:          #1F2937;   /* Primary 700 — headings */
  --fg-2:          #4B5563;   /* Primary 500 — body */
  --fg-3:          #9CA3AF;   /* Primary 300 — auxiliary */
  --line:          #E5E7EB;   /* Hairline borders */
  --surface-2:     #F3F4F6;   /* Sub-surfaces, tag bg */
  --surface-1:     #FFFFFF;   /* Cards, modal */
  --bg:            #FAFAFA;   /* Page base */

  /* Accent (single brand accent — restraint by design) */
  --accent-700:    #1E40AF;   /* Pressed / hover-darker */
  --accent-500:    #3B82F6;   /* Links, primary CTA */
  --accent-100:    #DBEAFE;   /* Tag bg, soft emphasis */

  /* Semantic */
  --success:       #10B981;
  --success-50:    #ECFDF5;
  --warning:       #F59E0B;
  --warning-50:    #FFFBEB;
  --danger:        #EF4444;
  --danger-50:     #FEF2F2;
  --premium:       #D4AF37;   /* Editorial pick gold */
  --premium-50:    #FBF6E2;

  /* Gender tags */
  --tag-men:       #1E3A8A;
  --tag-women:     #BE185D;
  --tag-unisex:    #6B7280;

  /* ========== TYPOGRAPHY ========================================== */
  --font-jp:      'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', system-ui, sans-serif;
  --font-jp-display: 'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
  --font-latin:   'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', ui-monospace, monospace;

  /* Type scale — mobile default; desktop scales in media query */
  --t-h1:          30px;
  --t-h2:          23px;
  --t-h3:          19px;
  --t-h4:          17px;
  --t-body:        16px;
  --t-small:       14px;
  --t-caption:     12px;
  --t-price:       32px;
  --t-badge:       11px;

  /* Line height */
  --lh-display:    1.3;
  --lh-h:          1.4;
  --lh-sub:        1.5;
  --lh-body:       1.7;
  --lh-tight:      1.2;

  /* Letter spacing */
  --ls-tight:      -0.01em;
  --ls-normal:     0;
  --ls-loose:      0.04em;
  --ls-badge:      0.08em;

  /* ========== SPACING (8px base) ================================== */
  --sp-xs:         4px;
  --sp-sm:         8px;
  --sp-md:         16px;
  --sp-lg:         24px;
  --sp-xl:         32px;
  --sp-2xl:        48px;
  --sp-3xl:        64px;
  --sp-4xl:        96px;

  /* Container widths */
  --w-article:     720px;
  --w-content:     1080px;
  --w-wide:        1280px;
  --w-hero:        1440px;

  /* ========== RADIUS ============================================== */
  --r-img:         10px;
  --r-button:      9px;
  --r-card:        14px;
  --r-pill:        999px;

  /* ========== SHADOW ============================================== */
  --shadow-card:        0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-card-hover:  0 4px 12px rgba(0,0,0,.08);
  --shadow-modal:       0 16px 48px rgba(0,0,0,.12);
  --shadow-focus:       0 0 0 3px rgba(59,130,246,.30);

  /* ========== MOTION ============================================== */
  --ease-out:      cubic-bezier(.22, 1, .36, 1);
  --dur-fast:      150ms;
  --dur-base:      200ms;
  --dur-slow:      300ms;
}

/* Desktop scale */
@media (min-width: 1025px) {
  :root {
    --t-h1: 40px;
    --t-h2: 28px;
    --t-h3: 22px;
    --t-h4: 18px;
    --t-body: 17px;
    --t-price: 36px;
  }
}

/* ============================================================
   Element defaults
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg-2);
  font-family: var(--font-jp);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'palt' 1;
}

h1, h2, h3, h4, h5 {
  color: var(--fg-1);
  font-family: var(--font-jp-display);
  font-weight: 700;
  letter-spacing: var(--ls-tight);
  text-wrap: pretty;
  margin: 0;
}
h1 { font-size: var(--t-h1); line-height: var(--lh-display); }
h2 { font-size: var(--t-h2); line-height: var(--lh-h); }
h3 { font-size: var(--t-h3); line-height: var(--lh-sub); font-weight: 700; }
h4 { font-size: var(--t-h4); line-height: var(--lh-sub); font-weight: 600; }

p {
  margin: 0 0 var(--sp-md);
  color: var(--fg-2);
}

small, .small { font-size: var(--t-small); line-height: 1.6; }
.caption     { font-size: var(--t-caption); color: var(--fg-3); line-height: 1.5; }

a {
  color: var(--accent-500);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--accent-700); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: none; box-shadow: var(--shadow-focus); border-radius: 4px; }

::selection { background: var(--accent-100); color: var(--ink); }

/* Numeric emphasis */
.num, .price {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--fg-1);
}
.price-big {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--t-price);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}

/* Badge / tag */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--fg-2);
  font-family: var(--font-latin), var(--font-jp);
  font-size: var(--t-badge);
  font-weight: 600;
  letter-spacing: var(--ls-badge);
  text-transform: uppercase;
}
.badge--premium { background: var(--premium-50); color: var(--premium); }
.badge--success { background: var(--success-50); color: var(--success); }
.badge--warning { background: var(--warning-50); color: #B45309; }
.badge--danger  { background: var(--danger-50);  color: var(--danger); }
.badge--accent  { background: var(--accent-100); color: var(--accent-700); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: var(--r-button);
  font-family: var(--font-jp);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn--primary {
  background: var(--accent-500); color: #fff;
  box-shadow: 0 1px 2px rgba(30,64,175,.18);
}
.btn--primary:hover { background: var(--accent-700); color: #fff; text-decoration: none; box-shadow: 0 4px 12px rgba(30,64,175,.22); }
.btn--secondary {
  background: transparent; color: var(--fg-1); border-color: var(--line);
}
.btn--secondary:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.btn--ink {
  background: var(--ink); color: #fff;
}
.btn--ink:hover { background: #000; color: #fff; text-decoration: none; }
.btn--lg { height: 56px; padding: 0 28px; font-size: 16px; border-radius: 11px; }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 7px; }

/* Card */
.card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.card--hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }

/* Input */
.input {
  height: 48px;
  padding: 0 16px;
  border-radius: var(--r-button);
  border: 1px solid var(--line);
  background: var(--surface-1);
  color: var(--ink);
  font-family: var(--font-jp);
  font-size: 15px;
  width: 100%;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.input:focus { outline: none; border-color: var(--accent-500); box-shadow: var(--shadow-focus); }

/* Containers */
.container { max-width: var(--w-content); margin-inline: auto; padding-inline: var(--sp-md); }
.container--article { max-width: var(--w-article); }
.container--wide    { max-width: var(--w-wide); }
.container--hero    { max-width: var(--w-hero); }
@media (min-width: 769px) {
  .container { padding-inline: var(--sp-xl); }
}

/* Utility */
.stack > * + * { margin-top: var(--sp-md); }
.row { display: flex; align-items: center; gap: var(--sp-sm); }
.divider { height: 1px; background: var(--line); margin: var(--sp-xl) 0; border: 0; }

/* Reduce motion respect */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; }
}
