/* ============================================================
   GLOBAL — Reset, base typography, layout
   ============================================================ */

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: var(--leading-normal);
  min-height: 100vh;
  animation: page-enter 0.6s ease-out both;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  background: var(--color-matcha);
  color: var(--color-cream);
  font-family: var(--font-accent);
  font-size: var(--text-sm);
  padding: var(--space-xs) var(--space-sm);
  text-decoration: none;
  z-index: 9999;
}

.skip-link:focus {
  top: var(--space-sm);
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--leading-tight);
  color: var(--color-ink);
}

p {
  font-size: var(--text-base);
  line-height: var(--leading-loose);
  color: var(--color-ink-light);
}

p + p {
  margin-top: var(--space-md);
}

a {
  color: var(--color-matcha-deep);
  text-decoration: none;
}

a:hover {
  color: var(--color-matcha);
}

a:focus-visible {
  outline: 2px solid var(--color-matcha);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Japanese text */
.ja {
  font-family: var(--font-ja);
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--prose {
  max-width: var(--content-width);
}

.container--wide {
  max-width: var(--wide-width);
}

/* Main content */
main {
  padding-top: 5rem; /* nav height offset */
}

/* Section spacing */
.section {
  padding-block: var(--space-2xl);
}

.section--sm {
  padding-block: var(--space-xl);
}

/* Horizontal rule / divider */
hr.divider {
  border: none;
  border-top: 1px solid var(--color-fog);
  margin-block: var(--space-lg);
}

/* Page header */
.page-header {
  padding-block: var(--space-2xl) var(--space-xl);
  text-align: center;
}

.page-header__subtitle-label {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-stone);
  margin-bottom: var(--space-sm);
}

.page-header__title-ja {
  display: block;
  font-family: var(--font-ja);
  font-size: var(--text-xl);
  color: var(--color-stone);
  margin-bottom: var(--space-xs);
}

.page-header__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
}

.page-header__intro {
  font-size: var(--text-lg);
  max-width: 52ch;
  margin-inline: auto;
  color: var(--color-ink-light);
}

/* Utility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Focus visible for interactive elements */
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-matcha);
  outline-offset: 3px;
}
