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

/* Keep every numeral at the same regular weight. The bundled Arimo
   subset matches the neutral sans-serif numerals in the reference.
   The ASCII hyphen uses the corresponding system sans-serif glyph so
   date separators stay horizontal. */
@font-face {
  font-family: "NumeralSans";
  src: url("/assets/fonts/arimo-digits-400.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0030-0039;
}

@font-face {
  font-family: "NumeralSans";
  src: local("Helvetica Neue"), local("Arial");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+002D;
}

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);
}

/* Mobile reading: keep the original copy and let each screen width
   determine wrapping, with Japanese punctuation kept on the same line. */
@media (max-width: 767px) {
  :root {
    --fs-300: 0.875rem;
    --fs-400: 1rem;
    --fs-600: clamp(1.2rem, 0.95rem + 1.2vw, 1.45rem);
    --fs-700: clamp(1.375rem, 1rem + 1.8vw, 1.75rem);
    --fs-800: clamp(1.5rem, 1rem + 2.5vw, 1.875rem);
  }

  body {
    line-height: 1.85;
  }

  .container {
    padding-inline: clamp(1rem, 5vw, 1.5rem);
  }

  p,
  li,
  dd,
  dt,
  blockquote,
  figcaption {
    word-break: normal;
    overflow-wrap: anywhere;
  }

  h1,
  h2,
  h3,
  h4 {
    overflow-wrap: anywhere;
    line-height: 1.55;
  }

  .section-head__lead {
    line-height: 1.9;
  }

  .note-line {
    line-height: 1.85;
  }
}
