/* ================================================
   夜凪舎 - Base Styles
   ベーススタイル（html, body, タイポグラフィ）
   ================================================ */

/* HTML & Body */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-ja-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-navy-deep);
  overflow-x: hidden;
}

/* Typography Base */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-ja-display);
  color: var(--color-cream);
  font-weight: 300;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-wide);
}

h1 {
  font-size: var(--text-5xl);
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

h5 {
  font-size: var(--text-lg);
}

h6 {
  font-size: var(--text-base);
}

/* Paragraphs */
p {
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

/* Links */
a {
  color: var(--color-wave-light);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out-quart);
}

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

a:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 4px;
}

/* Strong & Em */
strong {
  font-weight: 500;
  color: var(--color-cream);
}

em {
  font-style: italic;
}

/* Code */
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.125rem 0.25rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

/* Selection */
::selection {
  background-color: var(--color-gold);
  color: var(--color-navy-deep);
}

::-moz-selection {
  background-color: var(--color-gold);
  color: var(--color-navy-deep);
}

/* Focus Visible */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 4px;
}

/* Reduced Motion */
@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;
  }
}

/* レスポンシブタイポグラフィ */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  h1 {
    font-size: var(--text-4xl);
  }

  h2 {
    font-size: var(--text-2xl);
  }

  h3 {
    font-size: var(--text-xl);
  }
}
