/* ---------------------------------------------------------
   base.css — element-level base styles + layout helpers
--------------------------------------------------------- */

/* Numerals: keep digits in a plain system sans (not Cormorant
   Garamond), restricted to 0–9 via unicode-range. Listed first
   in the font stacks so only digits are overridden; every other
   glyph falls through to Cormorant / Klee One as before. */
@font-face {
  font-family: "NumSans";
  src: local("Helvetica Neue"), local("Arial"), local("Hiragino Kaku Gothic ProN"),
    local("Yu Gothic"), local("Noto Sans JP");
  unicode-range: U+0030-0039;
}

/* Profile / Session / School ページのみ、数字も他の文字と同じ Cormorant Garamond に揃える
   （NumSans を外し、テキストの序列を崩さないようにする） */
body[data-page="profile"],
body[data-page="session"],
body[data-page="school"] {
  --font-serif: "Cormorant Garamond", "Klee One", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-sans: "Cormorant Garamond", "Klee One", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-400);
  color: var(--color-text);
  background: var(--color-bg);
  font-feature-settings: "palt";
}

@media (min-width: 768px) {
  body {
    font-size: var(--fs-500);
  }
}

main {
  display: block;
}

/* --- Headings --- */
h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--color-text);
  line-break: strict; /* kinsoku in titles too — no line starts with 、。」 */
  word-break: auto-phrase; /* wrap headings at 文節 boundaries, not mid-word */
}

/* Balanced multi-line wrapping for the main content titles.
   Hero titles use manual <br> for art-directed breaks, so they are
   intentionally excluded here. */
.page-hero__title,
.section-head__title,
.cta-band__title {
  text-wrap: balance;
}

/* --- Body copy / paragraphs unified to serif (matches the hero message
   "自分を知り、自分を生きる。／あなたの選択に、“確信”を。").
   UI chrome (nav, buttons, eyebrows, accordion heads) keeps its own
   explicit sans declarations, so only reading text is affected. --- */
p,
.lead,
.flow li,
.rich li,
.press__items li {
  font-family: var(--font-serif);
}

/* small labels / meta stay in sans for contrast */
.footer-col__title,
.voice-card__meta {
  font-family: var(--font-sans);
}

/* --- Japanese line-break quality — applied to all reading text on
   every page. Mirrors breaks.js's block-text targets: strict kinsoku,
   文節-aware wrapping (auto-phrase), and orphan avoidance (pretty).
   Inline UI (nav, buttons, eyebrows) is single-line and unaffected;
   components may still override per-context. --- */
p,
li,
dd,
dt,
blockquote,
figcaption {
  line-break: strict;
  word-break: auto-phrase;
  text-wrap: pretty;
}

/* --- Links --- */
a {
  transition: color var(--transition), opacity var(--transition);
}

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

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

@media (min-width: 768px) {
  .container {
    padding-inline: var(--space-xl);
  }
}

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

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

@media (min-width: 768px) {
  .section {
    padding-block: var(--space-3xl);
  }
}

/* 前後セクションとの余白だけを半分に詰めたい箇所向け */
.section--tight-top {
  padding-top: calc(var(--space-2xl) / 2);
}
.section--tight-bottom {
  padding-bottom: calc(var(--space-2xl) / 2);
}
@media (min-width: 768px) {
  .section--tight-top {
    padding-top: calc(var(--space-3xl) / 2);
  }
  .section--tight-bottom {
    padding-bottom: calc(var(--space-3xl) / 2);
  }
}

.section--surface {
  background: var(--color-surface);
}

/* --- Section heading block --- */
.section-head {
  margin-bottom: var(--space-xl);
}

.section-head__eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--fs-300);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.section-head__title {
  font-size: var(--fs-700);
  line-height: 1.3;
}

.section-head__lead {
  margin-top: var(--space-md);
  color: var(--color-muted);
  max-width: 52ch;
}

.section-head--center {
  text-align: center;
}

.section-head--center .section-head__lead {
  margin-inline: auto;
}

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

.text-muted {
  color: var(--color-muted);
}

/* Interview lead headline */
.interview-headline {
  font-size: var(--fs-700);
  line-height: 1.4;
}

/* Inline notice (e.g. "申し込みは公式LINEから") */
.note-line {
  margin-bottom: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: var(--color-accent-soft);
  color: var(--color-ink);
  font-size: var(--fs-300);
  line-height: 1.7;
}

.note-line strong {
  color: var(--color-accent-dark);
}

.flow > * + * {
  margin-top: var(--space-md);
}

/* --- Skip link --- */
.skip-link {
  position: absolute;
  left: var(--space-md);
  top: -120px;
  z-index: 1000;
  background: var(--color-text);
  color: #fff;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  transition: top var(--transition);
}

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