/* =========================================================
   DXO 公式HP 共通スタイル
   設計書「案B モダン×明快」準拠
   ========================================================= */

:root {
  /* Color — Main */
  --main: #C4302B;
  --main-dark: #9E231F;

  /* Color — Background */
  --bg: #FFFFFF;
  --bg-alt: #F5F5F5;
  --border: #E4E4E4;

  /* Color — Text */
  --ink: #111111;
  --ink-sub: #6B6B6B;

  /* Color — 4 Cores */
  --dojyo: #7A5232;
  --budou: #6C4F9E;
  --ringo: #B73328;
  --mikan: #D9A83F;

  /* Color — Semantic */
  --error: #E85D5D;
  --success: #3AA676;
  --warn: #E89A2E;

  /* Accent: page-specific */
  --accent-yellow: #D9A83F;
  --accent-yellow-soft: #FBEFD2;
  --accent-navy: #1B365D;
  --accent-navy-soft: #EEF2FA;

  /* Typography */
  --font-jp: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
  --font-en: 'Work Sans', sans-serif;

  /* Layout */
  --container-max: 1200px;
  --container-text: 760px;

  /* Spacing scale (8px base) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;
  --space-7: 96px;
  --space-8: 120px;
  --space-9: 160px;

  /* 6 Cores — extended */
  --jyoro: #2EA9A2;
  --mori:  #5B7A4F;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 200ms;
  --dur-base: 400ms;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-jp);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.8;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--dur-fast) var(--ease); }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.4; letter-spacing: 0.02em; font-weight: 900; }

/* =========================================================
   HEADER / NAV
   ========================================================= */
header.site {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.site-inner {
  padding: 18px 40px;
  display: flex; align-items: center; gap: 48px;
  max-width: 100%;
}
.logo {
  display: inline-flex; align-items: center; color: var(--ink);
  font-family: var(--font-jp);
  font-weight: 900; font-size: 22px; letter-spacing: -0.02em;
}
nav.site-nav {
  display: flex; gap: 32px; margin-left: auto;
  font-size: 14px; font-weight: 500;
}
nav.site-nav a {
  padding: 4px 0; border-bottom: 2px solid transparent;
  transition: all var(--dur-fast) var(--ease);
}
nav.site-nav a:hover,
nav.site-nav a.is-active {
  border-bottom-color: var(--main); color: var(--main);
}
.header-cta { margin-left: 0; }

/* Mobile menu button */
.menu-toggle {
  display: none;
  background: none; border: none; margin-left: auto;
  width: 32px; height: 32px; position: relative;
}
.menu-toggle span {
  display: block; width: 24px; height: 2px; background: var(--ink);
  position: absolute; left: 4px; transition: all var(--dur-fast) var(--ease);
}
.menu-toggle span:nth-child(1) { top: 10px; }
.menu-toggle span:nth-child(2) { top: 16px; }
.menu-toggle span:nth-child(3) { top: 22px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 16px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { top: 16px; transform: rotate(-45deg); }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px;
  font-weight: 700; font-size: 14px; letter-spacing: 0.05em;
  transition: all var(--dur-fast) var(--ease);
  cursor: pointer; border: none;
  text-align: center;
}
.btn-primary { background: var(--main); color: #fff; }
.btn-primary:hover { background: var(--main-dark); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-yellow {
  background: var(--accent-yellow); color: var(--ink);
}
.btn-yellow:hover { background: #C49330; color: var(--ink); }
.btn-lg { padding: 18px 40px; font-size: 15px; }
.btn-block { display: flex; width: 100%; }

/* =========================================================
   SECTION / CONTAINER
   ========================================================= */
section { padding: 120px 32px; }
.container { max-width: var(--container-max); margin: 0 auto; }

.section-head { margin-bottom: 72px; max-width: 820px; }
.section-title {
  font-size: 44px; font-weight: 900; line-height: 1.3; margin-bottom: 20px;
  letter-spacing: -0.01em;
}
.section-desc { font-size: 17px; color: var(--ink-sub); line-height: 1.9; }

.eyebrow {
  display: inline-block; font-family: var(--font-en);
  font-size: 13px; font-weight: 600; letter-spacing: 0.25em;
  color: var(--main); margin-bottom: 20px; text-transform: uppercase;
  padding-bottom: 8px; border-bottom: 2px solid var(--main);
}

/* =========================================================
   IMAGE PLACEHOLDER（画像差し込み枠）
   ========================================================= */
.img-placeholder {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-sub);
  font-family: var(--font-en);
  font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  min-height: 120px;
}
.img-placeholder::before,
.img-placeholder::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
}
.img-placeholder::before {
  background:
    linear-gradient(to bottom right, transparent calc(50% - 1px), var(--border) 50%, transparent calc(50% + 1px)),
    linear-gradient(to bottom left, transparent calc(50% - 1px), var(--border) 50%, transparent calc(50% + 1px));
}
.img-placeholder span {
  position: relative; z-index: 1;
  background: var(--bg-alt); padding: 6px 14px;
  border: 1px solid var(--border);
}
.img-placeholder.ratio-square { aspect-ratio: 1; }
.img-placeholder.ratio-portrait { aspect-ratio: 3 / 4; }
.img-placeholder.ratio-circle { aspect-ratio: 1; border-radius: 50%; }
.img-placeholder.ratio-banner { aspect-ratio: 21 / 9; }
.img-placeholder.ratio-card { aspect-ratio: 4 / 3; }

/* =========================================================
   UNIFIED HERO — 全ページ共通の構造
   各ページは：背景・色・コンテンツのみ差し替え。寸法・配置は共通。
   ========================================================= */
.hero {
  padding: 96px 32px 112px;
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.hero-inner {
  max-width: var(--container-max); margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative; z-index: 1;
}
.hero h1 {
  font-size: 48px; font-weight: 900; line-height: 1.35; margin-bottom: 20px;
  letter-spacing: -0.01em;
}
.hero h1 span.accent { color: var(--main); }
.hero-sub {
  font-size: 15px; color: var(--ink); margin-bottom: 28px;
  max-width: 540px; line-height: 1.95;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.hero-ctas.vertical { flex-direction: column; align-items: flex-start; gap: 12px; }

/* Hero Visual — 全ページ共通サイズ */
.hero-visual {
  border: 1px solid var(--border);
  padding: 40px;
  background: var(--bg-alt);
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 440px;
  justify-self: end;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
}
.hv-label {
  font-family: var(--font-en); font-size: 11px;
  letter-spacing: 0.25em; color: var(--ink-sub); font-weight: 600;
}
.hero-mark {
  font-family: var(--font-jp); font-weight: 900;
  font-size: 140px; color: var(--main);
  letter-spacing: -0.06em; line-height: 1; text-align: center;
}
.hv-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  font-size: 12px; color: var(--ink-sub);
}
.hv-meta strong {
  display: block; color: var(--ink);
  font-size: 20px; font-weight: 900; margin-bottom: 4px;
}

/* Hero responsive — 全ページ共通 */
@media (max-width: 1023px) {
  .hero { padding: 64px 24px 80px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 38px; }
  .hero-visual { justify-self: center; max-width: 420px; }
}
@media (max-width: 720px) {
  .hero { padding: 56px 20px 64px; }
  .hero h1 { font-size: 28px; }
  .hero-sub { font-size: 14px; }
  .hero-visual { padding: 28px; }
}

/* =========================================================
   CARDS
   ========================================================= */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 32px;
  transition: box-shadow var(--dur-fast) var(--ease);
}
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* =========================================================
   FORM（お問い合わせ）
   ========================================================= */
.form {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 48px;
  max-width: 780px; margin: 0 auto;
}
.form-row { margin-bottom: 24px; }
.form-row label {
  display: block; font-size: 14px; font-weight: 700;
  margin-bottom: 8px; color: var(--ink);
}
.form-row .required {
  color: var(--main); font-size: 12px; margin-left: 6px; font-weight: 700;
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row textarea {
  width: 100%; padding: 12px 16px;
  font-family: inherit; font-size: 15px;
  background: var(--bg); border: 1.5px solid var(--border);
  color: var(--ink);
  transition: border-color var(--dur-fast) var(--ease);
}
.form-row input::placeholder,
.form-row textarea::placeholder { color: var(--ink-sub); }
.form-row input:focus,
.form-row textarea:focus {
  outline: none; border-color: var(--ink);
}
.form-row textarea { resize: vertical; min-height: 120px; }
.form-radio-group { display: flex; flex-direction: column; gap: 10px; }
.form-radio-group label {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 400; color: var(--ink);
  padding: 10px 14px; border: 1px solid var(--border); cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
  margin-bottom: 0;
}
.form-radio-group label:hover { border-color: var(--ink); }
.form-radio-group input[type="radio"] { accent-color: var(--main); }
.form-submit { margin-top: 32px; text-align: center; }

/* =========================================================
   FOOTER
   ========================================================= */
footer.site {
  background: var(--ink); color: #fff;
  padding: 72px 32px 32px;
}
.footer-inner { max-width: var(--container-max); margin: 0 auto; }
.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.footer-brand { font-size: 14px; opacity: 0.75; line-height: 1.8; }
.footer-brand .logo {
  color: #fff; font-size: 24px; margin-bottom: 16px; display: inline-block;
}
.footer-col h4 {
  font-family: var(--font-en); font-size: 12px;
  letter-spacing: 0.2em; margin-bottom: 16px; opacity: 0.5;
  text-transform: uppercase; font-weight: 700;
}
.footer-col a {
  display: block; padding: 6px 0; font-size: 14px; opacity: 0.85;
  transition: opacity var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.footer-col a:hover { opacity: 1; color: var(--main); }
.footer-bottom {
  padding-top: 24px; font-size: 12px; opacity: 0.5;
  display: flex; justify-content: space-between; gap: 16px;
}
.footer-bottom a { margin-left: 8px; }

/* =========================================================
   FADE-IN (Scroll reveal)
   ========================================================= */
.fade-in {
  opacity: 0; transform: translateY(8px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}
.fade-in.is-visible { opacity: 1; transform: translateY(0); }

/* =========================================================
   SCROLL PROGRESS BAR（画面上端・赤）
   ========================================================= */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  z-index: 100; pointer-events: none;
  background: transparent;
}
.scroll-progress::after {
  content: ''; display: block; height: 100%;
  background: var(--page-accent, var(--main)); transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
  transition: transform 80ms linear;
}

/* =========================================================
   HEADLINE REVEAL（見出し下からスライド）
   単語ごとに <span class="word"><span class="word-inner">word</span></span> に変換
   ========================================================= */
.headline-reveal .word {
  display: inline-block; overflow: hidden; vertical-align: bottom;
  line-height: 1.25em; padding: 0 0.02em;
}
.headline-reveal > .accent,
.headline-reveal > span:not(.word) {
  display: inline-block; vertical-align: bottom;
  line-height: 1.25em;
}
.headline-reveal .word-inner {
  display: inline-block; transform: translateY(105%);
  transition: transform 700ms var(--ease);
  will-change: transform;
}
.headline-reveal.is-visible .word-inner { transform: translateY(0); }
.headline-reveal.is-visible .word:nth-child(2) .word-inner { transition-delay: 60ms; }
.headline-reveal.is-visible .word:nth-child(3) .word-inner { transition-delay: 120ms; }
.headline-reveal.is-visible .word:nth-child(4) .word-inner { transition-delay: 180ms; }
.headline-reveal.is-visible .word:nth-child(5) .word-inner { transition-delay: 240ms; }
.headline-reveal.is-visible .word:nth-child(6) .word-inner { transition-delay: 300ms; }
.headline-reveal.is-visible .word:nth-child(7) .word-inner { transition-delay: 360ms; }
.headline-reveal.is-visible .word:nth-child(8) .word-inner { transition-delay: 420ms; }
.headline-reveal.is-visible .word:nth-child(9) .word-inner { transition-delay: 480ms; }
.headline-reveal.is-visible .word:nth-child(10) .word-inner { transition-delay: 540ms; }

/* Accent underline swipe under hero eyebrow */
.eyebrow-swipe {
  position: relative; display: inline-block;
  font-family: var(--font-en); font-size: 13px; font-weight: 600;
  letter-spacing: 0.25em; color: var(--main); text-transform: uppercase;
  padding: 0 0 8px 0; margin-bottom: 24px;
  overflow: hidden;
}
.eyebrow-swipe::after {
  content: ''; position: absolute; left: -100%; bottom: 0; width: 100%; height: 2px;
  background: var(--main); transition: left 600ms var(--ease) 300ms;
}
.eyebrow-swipe.is-visible::after { left: 0; }

/* =========================================================
   MARQUEE（キーワードの横流れ帯）
   ========================================================= */
.marquee {
  background: var(--ink); color: #fff; overflow: hidden;
  padding: 20px 0; border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  white-space: nowrap; position: relative;
}
.marquee-track {
  display: inline-flex; gap: 40px; align-items: center;
  animation: marquee 50s linear infinite;
  will-change: transform; padding-left: 40px;
}
.marquee-track > span {
  display: inline-flex; align-items: center;
  font-family: var(--font-en); font-weight: 700;
  font-size: 22px; letter-spacing: 0.08em; text-transform: uppercase;
  white-space: nowrap;
}
.marquee-track .dot {
  display: inline-block; width: 8px; height: 8px; background: var(--main);
  border-radius: 50%; flex-shrink: 0;
}
.marquee-track .accent { color: var(--main); }
.marquee-track:hover { animation-play-state: paused; }
.marquee.inverted { background: var(--bg-alt); color: var(--ink); }
.marquee.inverted { border-color: var(--border); }

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* =========================================================
   BUTTON — Arrow slide on hover
   ========================================================= */
.btn { position: relative; overflow: hidden; }
.btn .arrow {
  display: inline-block; margin-left: 8px;
  transition: transform var(--dur-fast) var(--ease);
}
.btn:hover .arrow { transform: translateX(4px); }
/* Black sweep fill on ghost button */
.btn-ghost { isolation: isolate; }
.btn-ghost::before {
  content: ''; position: absolute; inset: 0; background: var(--ink);
  transform: translateX(-101%); transition: transform 360ms var(--ease);
  z-index: -1;
}
.btn-ghost:hover::before { transform: translateX(0); }

/* =========================================================
   CARD — hover accent sweep
   ========================================================= */
.card-hover {
  position: relative; overflow: hidden;
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}
.card-hover::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: 0;
  background: var(--main); transition: width 360ms var(--ease);
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.08);
  border-color: var(--ink);
}
.card-hover:hover::after { width: 100%; }

/* =========================================================
   GIANT NUMERIC（editorial 級の巨大ナンバリング）
   ========================================================= */
.giant-num {
  font-family: var(--font-en); font-weight: 900;
  font-size: 160px; line-height: 0.9; letter-spacing: -0.04em;
  color: var(--main);
  display: block;
}
.giant-num.outline {
  -webkit-text-stroke: 1.5px var(--main); color: transparent;
}
.giant-num.ink { color: var(--ink); }
.giant-num.ink-outline { -webkit-text-stroke: 1.5px var(--ink); color: transparent; }

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
  .scroll-progress::after { transition: none; transform: scaleX(0); }
  .headline-reveal .word-inner { transform: none; transition: none; }
  .eyebrow-swipe::after { left: 0; transition: none; }
  .marquee-track { animation: none; }
  .btn-ghost::before { transition: none; }
  .card-hover { transition: none; }
  .card-hover:hover { transform: none; box-shadow: none; }
  .card-hover::after { transition: none; }
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */
:focus-visible {
  outline: 2px solid var(--main); outline-offset: 2px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1023px) {
  .site-inner { padding: 14px 24px; gap: 24px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 44px; }
}

/* =========================================================
   SECTION NUMBER（editorial 章番号）
   ========================================================= */
.section-num {
  display: flex; align-items: baseline; gap: 16px;
  margin-bottom: 24px; font-family: var(--font-en);
}
.section-num .num {
  font-size: 56px; font-weight: 900; line-height: 1;
  color: var(--main); letter-spacing: -0.04em;
}
.section-num .slash {
  color: var(--border); font-weight: 300; font-size: 36px;
  line-height: 1;
}
.section-num .label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--ink); padding-bottom: 4px;
}
@media (max-width: 720px) {
  .section-num .num { font-size: 40px; }
  .section-num .slash { font-size: 28px; }
}

/* =========================================================
   TOP HERO — 余白・大きさを統一した編集的レイアウト
   ========================================================= */
.hero--top {
  padding: var(--space-8) var(--space-4) var(--space-9);
  border-bottom: 1px solid var(--border);
  background: var(--bg); position: relative; overflow: hidden;
}
.hero--top .hero-inner {
  max-width: var(--container-max); margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: var(--space-7); align-items: center;
}
.hero--top .hero-vlabel {
  display: inline-block;
  font-family: var(--font-en); font-weight: 700;
  font-size: 11px; letter-spacing: 0.4em;
  color: var(--ink-sub); text-transform: uppercase;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-1);
  border-bottom: 2px solid var(--main);
}
.hero--top h1 {
  font-size: 64px; line-height: 1.2; font-weight: 900;
  letter-spacing: -0.02em; margin-bottom: var(--space-4);
  color: var(--ink);
}
.hero--top h1 .em { color: var(--main); }
.hero--top .hero-sub {
  font-size: 16px; line-height: 2; color: var(--ink);
  max-width: 520px; margin-bottom: var(--space-5);
}
.hero--top .hero-actions {
  display: flex; align-items: center; gap: var(--space-3);
  flex-wrap: wrap;
}
.hero--top .hero-dl-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--ink);
  border-bottom: 1px solid var(--ink); padding-bottom: 4px;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.hero--top .hero-dl-link::before {
  content: '↓'; display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; background: var(--main); color: #fff;
  font-size: 12px; font-weight: 700;
}
.hero--top .hero-dl-link:hover { color: var(--main); border-color: var(--main); }
.hero--top .hero-stats {
  display: flex; gap: var(--space-6);
  border-top: 1px solid var(--border);
  padding-top: var(--space-3); margin-top: var(--space-6);
}
.hero--top .hero-stats > div { display: flex; align-items: baseline; gap: var(--space-1); }
.hero--top .hero-stats strong {
  font-family: var(--font-en); font-size: 28px; font-weight: 900;
  color: var(--ink); letter-spacing: -0.02em; line-height: 1;
}
.hero--top .hero-stats span {
  font-size: 11px; letter-spacing: 0.2em;
  color: var(--ink-sub); text-transform: uppercase;
  font-family: var(--font-en); font-weight: 600;
}

/* Hero visual — large iD mark */
.hero--top .hero-visual {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  aspect-ratio: 1 / 1.15;
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-5);
}
.hero--top .hero-visual img {
  width: 62%; max-width: 320px; height: auto;
}
.hero--top .hero-visual .corner {
  position: absolute; font-family: var(--font-en);
  font-size: 10px; letter-spacing: 0.3em; font-weight: 700;
  color: var(--ink-sub); text-transform: uppercase;
}
.hero--top .hero-visual .corner.tl { top: 20px; left: 20px; }
.hero--top .hero-visual .corner.br { bottom: 20px; right: 20px; color: var(--main); }

@media (max-width: 1023px) {
  .hero--top { padding: var(--space-7) var(--space-3) var(--space-7); }
  .hero--top .hero-inner { grid-template-columns: 1fr; gap: var(--space-6); }
  .hero--top h1 { font-size: 44px; }
  .hero--top .hero-visual { max-width: 480px; margin: 0 auto; }
  .hero--top .hero-stats { gap: var(--space-4); flex-wrap: wrap; margin-top: var(--space-4); }
}
@media (max-width: 720px) {
  .hero--top { padding: var(--space-6) 20px var(--space-7); }
  .hero--top h1 { font-size: 32px; }
  .hero--top .hero-stats strong { font-size: 22px; }
}

/* =========================================================
   6-CORE SHOWCASE
   ========================================================= */
.cores { background: var(--bg); }
.cores-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--border); background: var(--bg);
}
.core-chip {
  position: relative; display: block; padding: var(--space-5) var(--space-3) var(--space-4);
  border-right: 1px solid var(--border);
  transition: background var(--dur-fast) var(--ease);
  background: var(--bg);
}
.core-chip:last-child { border-right: none; }
.core-chip::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px;
  background: var(--core-color, var(--main));
  transition: height var(--dur-fast) var(--ease);
}
.core-chip:hover { background: var(--bg-alt); }
.core-chip:hover::before { height: 14px; }
.core-chip .core-en {
  font-family: var(--font-en); font-size: 11px; font-weight: 700;
  letter-spacing: 0.2em; color: var(--core-color, var(--main));
  margin-bottom: var(--space-2); text-transform: uppercase; line-height: 1.4;
}
.core-chip .core-jp {
  font-size: 17px; font-weight: 900; line-height: 1.5;
  margin-bottom: 10px; color: var(--ink);
}
.core-chip .core-desc {
  font-size: 13px; color: var(--ink-sub); line-height: 1.85;
}
.core-ringo { --core-color: var(--ringo); }
.core-dojyo { --core-color: var(--dojyo); }
.core-budou { --core-color: var(--budou); }
.core-mikan { --core-color: var(--mikan); }
.core-jyoro { --core-color: var(--jyoro); }
.core-mori  { --core-color: var(--mori);  }

@media (max-width: 1023px) {
  .cores-grid { grid-template-columns: repeat(3, 1fr); }
  .core-chip:nth-child(3) { border-right: none; }
  .core-chip:nth-child(-n+3) { border-bottom: 1px solid var(--border); }
}
@media (max-width: 720px) {
  .cores-grid { grid-template-columns: 1fr; }
  .core-chip { border-right: none; border-bottom: 1px solid var(--border); }
  .core-chip:last-child { border-bottom: none; }
}

/* =========================================================
   RECOMMEND — editorial 不均等グリッド
   ========================================================= */
.recommend-grid-feature {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-3); align-items: stretch;
}
.recommend-grid-feature .recommend-card.featured {
  background: var(--ink); color: #fff; padding: var(--space-5);
}
.recommend-grid-feature .recommend-card.featured .rec-profile h4 { color: #fff; }
.recommend-grid-feature .recommend-card.featured .rec-profile small { color: rgba(255,255,255,0.6); }
.recommend-grid-feature .recommend-card.featured blockquote {
  color: rgba(255,255,255,0.92); font-size: 15px;
  border-left-color: var(--main);
}
@media (max-width: 1023px) {
  .recommend-grid-feature { grid-template-columns: 1fr 1fr; }
  .recommend-grid-feature .recommend-card.featured { grid-column: span 2; }
}
@media (max-width: 720px) {
  .recommend-grid-feature { grid-template-columns: 1fr; }
  .recommend-grid-feature .recommend-card.featured { grid-column: auto; padding: var(--space-4); }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .site-inner { padding: 14px 20px; gap: 16px; }

  /* -------------------------------------------------------
     MOBILE NAV (drawer) — IMPORTANT
     -------------------------------------------------------
     `header.site` uses `backdrop-filter: blur(...)`, which
     per CSS spec creates a containing block for `position: fixed`
     descendants. If `nav.site-nav` stays inside the header,
     its `position: fixed` is contained by the header box
     (~60px tall), so the drawer renders as a thin sliver.
     Fix: JS relocates `nav.site-nav` to be a direct child of
     <body> on mobile, then these styles position it against
     the viewport correctly.
     ------------------------------------------------------- */
  nav.site-nav {
    /* Drawer panel: from below header to bottom of viewport.
       --header-h is set by common.js to the live header height. */
    position: fixed;
    top: var(--header-h, 60px);
    left: 0; right: 0; bottom: 0;
    width: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 32px;
    margin: 0;
    border-top: 1px solid var(--border);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Animate via opacity + translateX. We also gate display
       via visibility so the panel is non-interactive when closed. */
    transform: translateX(100%);
    transition: transform 320ms var(--ease),
                visibility 0s linear 320ms;
    visibility: hidden;
    z-index: 9500;        /* above sticky CTA (9000), below custom cursor (9999) */
  }
  nav.site-nav.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 320ms var(--ease),
                visibility 0s linear 0s;
  }
  nav.site-nav a {
    display: flex; align-items: center;
    padding: 18px 4px; font-size: 17px; font-weight: 700;
    color: var(--ink);
    border-bottom: 1px solid var(--border);
    min-height: 56px;     /* tap target >= 44px */
    border-left: none;    /* defensive against later resets */
  }
  nav.site-nav a:last-child { border-bottom: none; }
  nav.site-nav a:hover,
  nav.site-nav a.is-active {
    color: var(--main); border-bottom-color: var(--border);
  }

  /* Dim backdrop behind the drawer */
  .menu-backdrop {
    position: fixed;
    top: var(--header-h, 60px);
    left: 0; right: 0; bottom: 0;
    background: rgba(17, 17, 17, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 240ms var(--ease),
                visibility 0s linear 240ms;
    z-index: 9400;       /* below nav (9500), above sticky CTA (9000) */
  }
  .menu-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 240ms var(--ease),
                visibility 0s linear 0s;
  }

  .header-cta { display: none; }
  .menu-toggle {
    display: block;
    position: relative;
    z-index: 9600;        /* above drawer so the X icon stays clickable */
  }
  /* Hide the sticky-cta bottom bar while the menu is open so the menu fully covers */
  body.menu-open .sticky-cta { display: none; }
  body.menu-open { overflow: hidden; }  /* prevent background scroll */

  section { padding: 72px 20px; }
  .section-head { margin-bottom: 48px; }
  .section-title { font-size: 28px; line-height: 1.45; }
  .section-desc { font-size: 15px; line-height: 1.9; }

  .hero { padding: 64px 20px 80px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero h1 { font-size: 32px; }
  .hero-visual { aspect-ratio: auto; padding: 32px; }
  .hero-mark { font-size: 96px; }

  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; gap: 16px; }

  .form { padding: 28px 20px; }

  footer.site { padding: 56px 20px 24px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; }

  .btn-lg { padding: 16px 28px; font-size: 14px; }
}

/* ========== PC/SP 表示切替ヘルパー ========== */
.sp-only { display: none; }
@media (max-width: 720px) {
  .pc-only { display: none; }
  .sp-only { display: inline; }
}

/* ========== 日本語の改行位置（意味の塊ごとに折り返す） ========== */
/* 文節を <span class="phrase"> で囲むと、語の途中で改行されない */
.phrase { display: inline-block; }

/* ========== Coming Soon（準備中カード） ========== */
.is-coming-soon {
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 10px,
    rgba(196, 48, 43, 0.07) 10px,
    rgba(196, 48, 43, 0.07) 20px
  ) !important;
  cursor: default !important;
  pointer-events: none;
}
.is-coming-soon:hover {
  border-color: var(--border) !important;
  transform: none !important;
}
.coming-soon-label {
  display: inline-block;
  margin-bottom: 12px;
  font-family: var(--font-en);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--main);
  border: 1px solid var(--main);
  padding: 3px 10px;
  text-transform: uppercase;
}
.as-card.is-coming-soon .coming-soon-label { margin-left: 18px; }
.is-coming-soon .as-cta {
  background: transparent !important;
  color: var(--ink-sub) !important;
  border: 1px dashed var(--ink-sub) !important;
}
.is-coming-soon .more {
  color: var(--ink-sub) !important;
  border-bottom: 1px dashed var(--ink-sub) !important;
}
