/*
  Design tokens — single source of truth for color, type, spacing, and breakpoints.
  Palette and hierarchy sourced from DESIGN.md (Lih Yan Teh brand direction).
  Never hardcode these values directly in components — reference the variable.
*/

:root {
  /*
    Palette sourced from the ink-wash reference image (woman in a red robe under a
    cherry blossom tree, black mountain linework, red sun, on textured cream paper).
  */

  /* Color: primary */
  --color-paper: #f3efe6;       /* primary background — the warm textured page, not stark white */
  --color-white: #ffffff;       /* card fills; icon/avatar text on Blossom, where Paper isn't light enough */
  --color-blush: #e8d9d2;       /* secondary section background — pale dusty pink, the only other section color allowed */
  --color-ink: #3a322b;         /* primary text everywhere, never pure black; button backgrounds; ink linework */
  --color-ink-hover: #2a241f;   /* button/outline hover fill */

  /* Color: secondary */
  --color-bark: #766454;        /* secondary/muted text + eyebrow labels — Paper backgrounds ONLY (fails on Blush) */
  --color-blossom: #c97a72;     /* decorative accent — icon badges, avatars, title-rules, gradient stops.
                                    NOT text-safe (2.8:1 on Paper) — background/graphic use only, paired with White */
  --color-seal: #b8362a;        /* the one red moment per page — currently the header wordmark. Never a button
                                    color, never repeated elsewhere on the same view. */
  --color-pastel-gold: #d6bd8e; /* portrait frame border (Ink read too harsh/black against a face at that size),
                                    and the hairline outline on Paper filter-tag pills */

  /*
    Only two section backgrounds exist: Paper and Blush. Ink is the only
    text color used on Blush (Bark drops well below 3:1 there). Ink as a
    BACKGROUND is reserved for buttons and small floating UI chrome, not full sections.
  */

  /* Typography */
  --font-display: 'Yuji Syuku', 'Zen Old Mincho', serif; /* wordmark / brush accents — single words only */
  --font-heading: 'Zen Old Mincho', Georgia, 'Times New Roman', serif;
  --font-body: 'Zen Kaku Gothic New', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-body: 17px;
  --line-height-body: 1.7;
  --line-height-heading: 1.25;

  /* Fluid type scale — mobile-first, scales continuously instead of jumping at breakpoints */
  --fs-eyebrow: 0.8125rem;
  --fs-body: 1.0625rem;
  --fs-h3: clamp(1.25rem, 1.05rem + 0.8vw, 1.625rem);
  --fs-h2: clamp(1.75rem, 1.35rem + 1.8vw, 2.5rem);
  --fs-h1: clamp(2.25rem, 1.6rem + 2.8vw, 3.75rem);

  /* Spacing — 8px base grid */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 80px;

  /* Shape */
  --radius-pill: 999px;
  --radius-card: 14px;

  /* Elevation — ink-tinted shadow rather than generic gray */
  --shadow-card: 0 8px 24px rgba(58, 50, 43, 0.10);
  --shadow-card-hover: 0 14px 32px rgba(58, 50, 43, 0.16);

  /* Layout */
  --container-max: 1200px;
  --nav-height: 72px;
}

/*
  Breakpoints (documented here since custom properties can't drive @media queries):
    mobile:  up to 767px  — single column, full-width buttons
    tablet:  768px–1024px — two-column where appropriate
    desktop: 1025px+      — three-column, container capped at --container-max
*/

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  color: var(--color-ink);
  background: var(--color-paper);
}

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: var(--line-height-heading);
  margin: 0 0 var(--space-2);
  font-weight: 600;
}

a {
  color: inherit;
}

img, svg {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Visible, brand-colored focus ring on every interactive element — DESIGN.md §Accessibility */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-ink);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
