/* ============================================================
   Base : reset + typography + accessibility
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

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

@media (max-width: 480px) {
  html { font-size: 16px; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--color-ink);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "palt";
  overflow-x: hidden;
}

img, svg, video, canvas, picture {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent-d);
  text-decoration-color: rgba(79, 138, 77, 0.4);
  text-underline-offset: 0.2em;
}
a:hover { color: var(--color-accent); }

button { font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: var(--lh-tight);
  letter-spacing: 0.02em;
  margin: 0 0 var(--sp-4);
  color: var(--color-ink);
  /* 日本語の見出しを文節で折り返す（「か／ら、」のような割れを防ぐ） */
  word-break: auto-phrase;
  line-break: strict;
  text-wrap: balance;
}

p, li, dd, td, summary { line-break: strict; text-wrap: pretty; }

/* 短い導入文も文節で折り返す */
.section-head__lead, .page-hero__lead, .hero-album__lead, .cta-block__lead { word-break: auto-phrase; }

/* 句のまとまりで折り返す（入りきらない時だけ中で折れる） */
.nw { display: inline-block; }

[hidden] { display: none !important; }

h1 { font-size: var(--fs-3xl); font-weight: 700; }
h2 { font-size: var(--fs-2xl); font-weight: 700; }
h3 { font-size: var(--fs-lg); font-weight: 700; }
h4 { font-size: var(--fs-md); font-weight: 700; }

p { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.4em; }

hr {
  border: 0;
  border-top: 1px solid var(--color-line);
  margin: var(--sp-7) 0;
}

/* Skip link --------------------------------------------------- */
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: var(--z-skip);
  background: var(--color-ink);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 700;
  transition: top var(--duration-2) var(--ease);
}
.skip-link:focus {
  top: 1rem;
}

/* Focus ring -------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Selection --------------------------------------------------- */
::selection {
  background: var(--color-warm-50);
  color: var(--color-ink);
}

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

/* Visually hidden -------------------------------------------- */
.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;
}

/* Container --------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--container-pad);
}
.container-narrow {
  max-width: var(--container-narrow);
}

/* Section ----------------------------------------------------- */
.section {
  padding-block: clamp(3rem, 8vw, 6rem);
}
.section--soft   { background: var(--color-bg-soft); }
.section--warm   { background: var(--color-bg-warm); }
.section--cool   { background: var(--color-bg-cool); }
.section--ink    { background: var(--color-ink); color: #fff; }
.section--ink h2, .section--ink h3 { color: #fff; }

.section-head {
  text-align: center;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
.section-head__eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  letter-spacing: 0.16em;
  color: var(--color-accent-d);
  margin-bottom: var(--sp-2);
  padding: 0.25rem 0.85rem;
  background: var(--color-accent-50);
  border-radius: var(--radius-pill);
  max-width: 100%;
  line-height: 1.6;
  text-align: center;
}
.section-head__title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  margin-bottom: var(--sp-3);
}
.section-head__lead {
  color: var(--color-ink-soft);
  max-width: 42em;
  margin: 0 auto;
}

/* Utilities --------------------------------------------------- */
.u-center        { text-align: center; }
.u-mt-0          { margin-top: 0; }
.u-mb-0          { margin-bottom: 0; }
.u-tnum          { font-variant-numeric: tabular-nums; }
.u-no-wrap       { white-space: nowrap; }
.u-mute          { color: var(--color-ink-soft); }
.u-small         { font-size: var(--fs-sm); }
.u-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  letter-spacing: 0.16em;
  color: var(--color-accent-d);
}

/* Anchors with offset (sticky header) ------------------------ */
[id] {
  scroll-margin-top: 84px;
}

/* Print ------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .mobile-bottom-bar, .cta-block { display: none !important; }
  body { background: #fff; color: #000; }
}
