/* ============================================================
   base.css — Reset, design tokens, common typography
   ============================================================ */

/* ---------- Modern reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
ul, ol { padding: 0; }
li { list-style: none; }
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Design tokens ---------- */
:root {
  /* Color */
  --color-primary:        #8b168f;
  --color-primary-dark:   #6f1173;
  --color-primary-light:  #f7e8f8;
  --color-primary-soft:   #fbf3fc;
  --color-accent:         #f4a93a;
  --color-bg:             #f7f7f4;
  --color-bg-soft:        #fdfcfa;
  --color-surface:        #ffffff;
  --color-text:           #171717;
  --color-text-muted:     #5b6470;
  --color-text-soft:      #8b96a3;
  --color-border:         #e5e5e0;
  --color-border-strong:  #c8cad0;
  --color-success:        #2f7d3a;
  --color-warning:        #c9690e;
  --color-error:          #b3261e;
  --color-info:           #1f5fb5;

  /* Event tag colors */
  --tag-event:        #8b168f;
  --tag-exhibition:   #2f7d3a;
  --tag-workshop:     #d97706;
  --tag-academic:     #1f5fb5;
  --tag-maintenance:  #6b7280;

  /* Typography */
  --font-sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, -apple-system, sans-serif;
  --font-display: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --fs-hero:     clamp(2.5rem, 6.5vw, 4.75rem);
  --fs-h1:       clamp(2rem, 4vw, 3rem);
  --fs-h2:       clamp(1.5rem, 3vw, 2.25rem);
  --fs-h3:       1.25rem;
  --fs-body:     1rem;
  --fs-small:    0.9rem;
  --lh-tight:    1.2;
  --lh-body:     1.7;

  /* Radius */
  --radius-sm:  10px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-xl:  32px;
  --radius-pill: 999px;

  /* Shadow */
  --shadow-sm:    0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-card:  0 20px 60px rgba(20, 20, 30, 0.07);
  --shadow-pop:   0 12px 40px rgba(139, 22, 143, 0.18);
  --shadow-hover: 0 24px 70px rgba(20, 20, 30, 0.10);

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

  /* Container */
  --container-max:    1200px;
  --container-prose:  720px;
  --container-narrow: 920px;

  /* Header */
  --header-height: 72px;

  /* Animation */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: .15s;
  --dur-base: .25s;
  --dur-slow: .45s;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Body ---------- */
body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background: var(--color-bg);
  font-feature-settings: "palt";
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  font-weight: 700;
}
.t-display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.t-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--color-primary);
  text-transform: uppercase;
}
.t-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--color-primary);
}
.t-muted   { color: var(--color-text-muted); }
.t-center  { text-align: center; }
.t-lead    { font-size: 1.0625rem; color: var(--color-text-muted); line-height: 1.85; }

/* ---------- Links ---------- */
a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--color-primary-dark); }

/* ---------- Utilities ---------- */
.u-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.u-skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  padding: 8px 16px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  z-index: 10000;
}
.u-skip-link:focus-visible {
  left: 8px;
}
.u-stack > * + * { margin-top: var(--space-3); }
.u-stack-lg > * + * { margin-top: var(--space-5); }

/* Selection color */
::selection {
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
}
