@import url("heading-levels.css");

/* Phase 4 representative comps — shared foundation.
   DESIGN_SYSTEM.md v3.5 / NAVIGATION v3.5 / PAGES v1.1.
   Visual grammar: Brush / Splash / Splatter. Drip is not used in these comps. */
:root {
  --white: #FFFFFF;
  --navy: #0B1F33;
  --navy-deep: #061522;
  --gold: #D8B46A;
  --ink: #0B1F33;
  --body: #222222; /* 通常本文（上流：近黒#222、2026-11-03） */
  --muted: #5B6879;
  --line: #D6DCE4;
  --paper: #F4F6F8;
  --wrap: 1180px;
  --pad: 40px;
  --header-h: 76px;
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 14'%3E%3Cpath d='M0 7h19M13 1l6 6-6 6' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 16px); }
html, body { overflow-x: clip; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: "Noto Sans JP", sans-serif; font-size: 16px; font-weight: 500; line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
p, h1, h2, h3, h4, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
.u { display: inline-block; }
.ln { display: block; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Copy that has no approved source yet: visible, never mistaken for final text */
.pending {
  display: inline-block; padding: 6px 12px; border: 1px dashed currentColor; border-radius: 4px;
  font-size: 13px; font-weight: 500; line-height: 1.6; letter-spacing: .02em; opacity: .72;
}
.pending::before { content: "原稿待ち｜"; font-weight: 700; }

/* ============ Header / Global Navigation (NAVIGATION §11) ============ */
.gh { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.gh__inner { max-width: 1320px; margin-inline: auto; padding-inline: 32px; height: var(--header-h); display: flex; align-items: center; gap: 28px; }
.gh__logo img { width: 132px; }
.gnav { margin-left: auto; }
.gnav__list { display: flex; align-items: center; gap: 22px; }
.gnav__link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 700; line-height: 1.4; text-decoration: none; color: var(--ink); border-bottom: 2px solid transparent; }
.gnav__link:hover { border-bottom-color: var(--line); }
.gnav__link[aria-current="page"] { border-bottom-color: var(--gold); }
.gnav__link:focus-visible, .gh__menu-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.gh__cta { flex: none; }
.gh__menu-btn { display: none; }
.sp-menu { display: none; }

/* ============ Actions (NAVIGATION §1–§8) ============ */
/* Primary Action: largest, filled, Gold disc on the arrow end */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 68px; min-width: 340px; padding: 14px 16px 14px 30px; border-radius: 8px;
  background: var(--navy); color: var(--white); font-size: 17px; font-weight: 700; line-height: 1.35; text-decoration: none;
}
.btn-primary::after {
  content: ""; flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: var(--gold) center / 18px 12px no-repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 14'%3E%3Cpath d='M0 7h19M13 1l6 6-6 6' fill='none' stroke='%230B1F33' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  transition: transform .2s ease;
}
.btn-primary:hover { background: var(--navy-deep); }
.btn-primary:hover::after, .btn-primary:focus-visible::after { transform: translateX(3px); }
.btn-primary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn-primary--on-navy { background: var(--white); color: var(--navy); }
.btn-primary--on-navy:hover { background: #E9EDF2; }
.btn-primary--sm { min-height: 44px; min-width: 0; padding: 6px 8px 6px 18px; gap: 14px; font-size: 14px; border-radius: 6px; }
.btn-primary--sm::after { width: 30px; height: 30px; background-size: 14px 10px; }

/* Section Navigation: one continuous filled surface, Gold arrow */
.nav-button {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 28px;
  min-width: 300px; min-height: 60px; padding: 14px 22px; border-radius: 7px;
  font-size: 16px; font-weight: 700; line-height: 1.35; text-decoration: none;
}
.nav-button::after {
  content: ""; flex: none; width: 22px; height: 14px; background: var(--gold);
  -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat;
  transition: transform .2s ease;
}
.nav-button:hover::after, .nav-button:focus-visible::after { transform: translateX(3px); }
.nav-button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.nav-button--light { background: var(--navy); color: var(--white); }
.nav-button--light:hover { background: var(--navy-deep); }
.nav-button--dark { background: var(--white); color: var(--navy); }

/* Inline link / item-local action */
.inline-link {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font-size: 15px; font-weight: 700; color: var(--navy);
  text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px;
}
.inline-link::after {
  content: ""; width: 16px; height: 10px; background: currentColor;
  -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat;
}
.on-navy .inline-link { color: var(--white); }
.exits { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }

/* ============ Headings ============ */
.anchor { font-size: 14px; font-weight: 700; letter-spacing: .08em; line-height: 1.4; color: var(--navy); }
.on-navy .anchor, .anchor--on-navy { color: var(--white); }
.h-display { font-size: clamp(34px, 3.9vw, 56px); font-weight: var(--heading-weight); line-height: 1.32; letter-spacing: .01em; }
.h-section { font-size: var(--heading-h2-size); font-weight: var(--heading-h2-weight); line-height: 1.4; letter-spacing: .01em; }
h3.h-section, h3.h-display { font-size: var(--heading-h3-size); font-weight: var(--heading-h3-weight); }
.h-sub { font-size: 18px; font-weight: 700; line-height: 1.6; color: var(--muted); }
.on-navy .h-sub { color: rgba(255, 255, 255, .72); }
.lead { font-size: 17px; line-height: 2; color: var(--body); }
.on-navy { background: var(--navy); color: var(--white); }
.on-navy .lead { color: rgba(255, 255, 255, .84); }

/* ============ Brush / Splash layers ============ */
/* Splash (一筆 layer): one per screen, paint mass near / behind the lead, never over text */
.splash { position: absolute; z-index: 0; pointer-events: none; max-width: none; width: var(--w, 600px);
  left: var(--x, auto); right: var(--xr, auto); top: var(--y, auto); bottom: var(--yb, auto);
  transform: rotate(var(--r, 0deg)) scale(var(--sx, 1), var(--sy, 1)); }
/* 面: Navy edge. Stored with the painted edge on top and flat Navy below */
.edge { position: absolute; z-index: 0; left: 50%; width: max(100%, 1500px); max-width: none; pointer-events: none; }
.edge--top { bottom: calc(100% - 2px); transform: translateX(-50%); }
.edge--bottom { top: calc(100% - 2px); transform: translateX(-50%) scaleY(-1); }
.layer { position: relative; z-index: 2; }

/* ============ Page head (child pages) ============ */
.page-head { position: relative; padding: 112px 0 96px; overflow: clip; }
.page-head__title { margin: 22px 0 26px; }
.page-head .lead { max-width: 640px; }

/* Local navigation (NAVIGATION §11) */
.local-nav { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); position: relative; z-index: 3; }
.local-nav__list { display: flex; flex-wrap: wrap; gap: 4px 36px; }
.local-nav__list a { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; font-size: 14px; font-weight: 700; text-decoration: none; }
.local-nav__list a::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg) translateY(-3px); }

/* ============ Page-end Primary Action (PAGES §3): same label, composed per page ============ */
.cta-end { position: relative; overflow: clip; padding: 128px 0; }
.cta-end__q { font-size: clamp(24px, 2.4vw, 34px); font-weight: var(--heading-weight); line-height: 1.5; }
.cta-end__note { margin-top: 18px; }

/* ============ Footer ============ */
.gf { background: var(--navy-deep); color: var(--white); padding: 72px 0 40px; }
.gf__top { display: flex; justify-content: space-between; gap: 40px; align-items: flex-start; }
.gf__logo img { width: 140px; }
.gf__tag { margin-top: 18px; font-size: 13px; line-height: 1.8; color: rgba(255, 255, 255, .7); }
.gf__nav { display: grid; grid-template-columns: repeat(2, minmax(160px, auto)); gap: 2px 48px; }
.gf__nav a { display: inline-flex; align-items: center; min-height: 40px; font-size: 14px; font-weight: 700; text-decoration: none; }
.gf__nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 6px; }
.gf__copy { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 12px; color: rgba(255, 255, 255, .56); }

/* ============ SP ============ */
@media (max-width: 1080px) {
  .gnav, .gh__cta { display: none; }
  .gh__menu-btn {
    display: inline-flex; align-items: center; gap: 10px; margin-left: auto; min-height: 44px; min-width: 44px; padding: 0 4px;
    border: 0; background: none; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer;
  }
  .gh__menu-btn span[aria-hidden] { display: grid; gap: 5px; }
  .gh__menu-btn span[aria-hidden] i { display: block; width: 22px; height: 2px; background: currentColor; }
  .sp-menu[data-open="true"] { display: block; position: fixed; inset: var(--header-h) 0 0; z-index: 49; background: var(--white); padding: 24px 20px 40px; overflow: auto; }
  .sp-menu__list a { display: flex; align-items: center; min-height: 56px; border-bottom: 1px solid var(--line); font-size: 17px; font-weight: 700; text-decoration: none; }
  .sp-menu__list a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 6px; }
  .sp-menu .btn-primary { margin-top: 28px; width: 100%; min-width: 0; }
}
@media (max-width: 760px) {
  :root { --pad: 20px; --header-h: 64px; }
  body { font-size: 15px; }
  .gh__inner { padding-inline: 20px; }
  .gh__logo img { width: 112px; }
  .h-display { font-size: 31px; line-height: 1.4; }
  .h-section { font-size: var(--heading-h2-size); }
  .h-sub { font-size: 16px; }
  .lead { font-size: 15px; }
  .btn-primary, .nav-button { width: 100%; min-width: 0; }
  .edge { width: max(100%, 1080px); }
  .page-head { padding: 64px 0 64px; }
  .local-nav__list { gap: 0 22px; }
  .local-nav__list a { min-height: 48px; font-size: 13px; }
  .cta-end { padding: 88px 0; }
  .cta-end__q { font-size: 23px; }
  .gf__top { flex-direction: column; }
  .gf__nav { grid-template-columns: 1fr 1fr; gap: 0 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-primary::after, .nav-button::after { transition: none; }
}

/* Narrow layouts may stack Section Navigation, but alignment is decided by the
   explicit page-depth role or by a Section's own design—not by Button classes. */
@media (max-width: 900px) {
  main .exits {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-start;
  }
}

/* Page-level hierarchy navigation only (NAVIGATION §6).
   Unclassified links, external links and section CTAs retain their local composition. */
main a[data-page-nav="parent"],
main a[data-page-nav="deeper"] {
  display: flex;
  width: max-content;
  max-width: 100%;
}
main a[data-page-nav="parent"] {
  margin-inline-start: 0;
  margin-inline-end: auto;
  align-self: flex-start;
}
main a[data-page-nav="deeper"] {
  margin-inline-start: auto;
  margin-inline-end: 0;
  align-self: flex-end;
}
@media (max-width: 900px) {
  main a[data-page-nav="parent"],
  main a[data-page-nav="deeper"] { min-width: 0; }
}
