/* ==========================================================================
   筆処 和灯〜watou〜  Design Tokens
   colors_and_type.css
   ========================================================================== */

/* Fonts (Google Fonts) ---------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho+B1:wght@400;500;600;700;800&family=Klee+One:wght@400;600&family=Noto+Sans+JP:wght@300;400;500;600;700&display=swap');

:root {
  /* ----- Color: Brand anchors ----- */
  --sumi: #1a1613;          /* 墨 — primary ink, body text */
  --washi: #f6f1e7;         /* 和紙 — page background */
  --shu: #c8453a;           /* 朱 — vermilion hanko seal accent */
  --tomoshi: #d49a3c;       /* 灯 — warm lamp honey */

  /* ----- Color: Neutrals (墨流し scale) ----- */
  --ink-900: #1a1613;
  --ink-800: #2d2723;
  --ink-700: #4a423b;
  --ink-600: #6b6258;
  --ink-500: #8c8378;
  --ink-400: #b0a89c;
  --ink-300: #d1c9bc;
  --ink-200: #e6dfd1;
  --ink-100: #f0e9da;
  --ink-50:  #faf5ea;

  /* ----- Color: Paper surfaces ----- */
  --paper:        #f6f1e7;  /* base washi */
  --paper-raised: #fffdf7;  /* cards, raised surfaces */
  --paper-sunk:   #ede5d2;  /* sunken / pressed states */
  --paper-edge:   rgba(26, 22, 19, 0.10);  /* hairline border */

  /* ----- Color: Semantic ----- */
  --fg-1: var(--ink-900);              /* primary text */
  --fg-2: var(--ink-700);              /* secondary text */
  --fg-3: var(--ink-500);              /* tertiary / captions */
  --fg-invert: var(--paper);
  --bg-1: var(--paper);
  --bg-2: var(--paper-raised);
  --bg-3: var(--paper-sunk);
  --border-1: var(--paper-edge);
  --border-2: rgba(26, 22, 19, 0.04);
  --accent: var(--shu);
  --accent-warm: var(--tomoshi);
  --success: #6b8e4e;
  --danger:  var(--shu);

  /* ----- Type families ----- */
  --font-display: 'Shippori Mincho B1', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --font-hand:    'Klee One', 'Hiragino Maru Gothic ProN', system-ui, sans-serif;
  --font-body:    'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* ----- Type scale ----- */
  --fs-xs:   12px;
  --fs-sm:   13px;
  --fs-base: 15px;
  --fs-md:   17px;
  --fs-lg:   20px;
  --fs-xl:   24px;
  --fs-2xl:  32px;
  --fs-3xl:  44px;
  --fs-4xl:  60px;
  --fs-5xl:  84px;

  --lh-tight: 1.15;
  --lh-snug:  1.35;
  --lh-base:  1.7;
  --lh-loose: 1.95;

  --ls-tight:  -0.02em;
  --ls-normal: 0;
  --ls-wide:   0.08em;
  --ls-widest: 0.22em;   /* used for romaji subtitles */

  /* ----- Spacing (8-pt rhythm) ----- */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  96px;
  --space-10: 128px;

  /* ----- Radii (small / square-ish) ----- */
  --radius-xs: 2px;       /* buttons, chips */
  --radius-sm: 4px;       /* inputs */
  --radius-md: 8px;       /* cards */
  --radius-lg: 12px;      /* large modules */
  --radius-pill: 999px;   /* tags */

  /* ----- Shadow (warm sumi-tinted) ----- */
  --shadow-sm: 0 1px 2px rgba(26, 22, 19, 0.06);
  --shadow-md: 0 4px 14px rgba(26, 22, 19, 0.08);
  --shadow-lg: 0 14px 40px rgba(26, 22, 19, 0.10);
  --shadow-xl: 0 28px 70px rgba(26, 22, 19, 0.14);

  /* ----- Motion ----- */
  --ease-ink: cubic-bezier(0.2, 0.6, 0.2, 1);
  --dur-fast: 140ms;
  --dur-base: 260ms;
  --dur-slow: 480ms;
  --dur-draw: 900ms;

  /* ----- Layout ----- */
  --container: 1180px;
  --reading:    640px;
  --nav-h:      64px;
}

/* ==========================================================================
   Semantic typography
   ========================================================================== */

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--fg-1);
  background: var(--bg-1);
  font-feature-settings: "palt" 1;  /* proportional kana spacing */
  text-wrap: pretty;
}

.h-display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-5xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--fg-1);
}

h1, .h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-4xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--fg-1);
  margin: 0 0 var(--space-5);
}

h2, .h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-3xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--fg-1);
  margin: 0 0 var(--space-5);
}

h3, .h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-2xl);
  line-height: var(--lh-snug);
  color: var(--fg-1);
  margin: 0 0 var(--space-4);
}

h4, .h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-xl);
  line-height: var(--lh-snug);
  color: var(--fg-1);
  margin: 0 0 var(--space-3);
}

p, .p {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--fg-1);
  margin: 0 0 var(--space-4);
}

.lead {
  font-size: var(--fs-md);
  line-height: var(--lh-loose);
  color: var(--fg-2);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--ls-widest);
  text-transform: lowercase;
  color: var(--fg-3);
}

.hand {
  font-family: var(--font-hand);
  font-weight: 400;
}

.signature {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: var(--fs-lg);
  color: var(--fg-2);
}

.caption {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  color: var(--fg-3);
  line-height: var(--lh-snug);
}

.romaji {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.7em;
  letter-spacing: var(--ls-widest);
  text-transform: lowercase;
  color: var(--fg-3);
}

a {
  color: var(--fg-1);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color var(--dur-base) var(--ease-ink),
              text-decoration-thickness var(--dur-fast) var(--ease-ink);
}
a:hover {
  color: var(--shu);
  text-decoration-thickness: 2px;
}

/* Vertical text utility */
.vertical {
  writing-mode: vertical-rl;
  text-orientation: upright;
}
.vertical-mixed {
  writing-mode: vertical-rl;
}

/* Hanko stamp utility (small red marker) */
.hanko-mark {
  display: inline-block;
  width: 28px;
  height: 28px;
  background: var(--shu);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  line-height: 28px;
  text-align: center;
  border-radius: var(--radius-xs);
  letter-spacing: -0.05em;
}
