/* ==========================================================================
   CRIMEA ANGEL — base.css
   Design tokens / reset / typography / header / footer / buttons
   ========================================================================== */

:root {
  --navy: #1b2a44;
  --navy-800: #22334f;
  --navy-600: #3b4c6a;
  --ink: #232a36;
  --muted: #5d6675;
  --muted-2: #7b8494;

  --line: #e7e1d4;
  --line-soft: #f0ebe0;

  --bg: #fcfaf6;
  --bg-alt: #f6f2ea;
  --white: #ffffff;

  --gold: #ae8b3c;
  --gold-deep: #8c6e28;
  --gold-soft: #e8d9b0;
  --gold-tint: #fbf6e9;

  --pink: #e9c9d1;
  --pink-soft: #faf0f2;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 2px rgba(27, 42, 68, 0.05), 0 2px 8px rgba(27, 42, 68, 0.04);
  --shadow: 0 6px 24px rgba(27, 42, 68, 0.07);
  --shadow-lg: 0 18px 50px rgba(27, 42, 68, 0.1);

  --serif: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
  --sans: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;

  --maxw: 1120px;
  --maxw-narrow: 860px;
  --gutter: 24px;
  --header-h: 76px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.95;
  letter-spacing: 0.02em;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* 日本語の折り返し: 文節（語のまとまり）を保って折り返し、単語の途中で
     不自然に割れるのを防ぐ（Chrome 119+ / Safari 17.4+）。
     未対応環境は word-break: normal にフォールバックする。 */
  line-break: strict;
  word-break: auto-phrase;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--navy-600);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--gold-deep);
}

ul,
ol {
  margin: 0;
  padding: 0;
}

p {
  margin: 0 0 1.1em;
}

p:last-child {
  margin-bottom: 0;
}

strong,
b {
  font-weight: 700;
  color: var(--navy);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.section {
  padding: clamp(56px, 8vw, 104px) 0;
  position: relative;
}

.section--alt {
  background: var(--bg-alt);
}

.section--white {
  background: var(--white);
}

.section--navy {
  background: var(--navy);
  color: #e9edf4;
}

.section--navy .sec-title,
.section--navy h2,
.section--navy h3 {
  color: #fff;
}

.section--tight {
  padding: clamp(40px, 5vw, 64px) 0;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--sans);
  color: var(--navy);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.01em;
  margin: 0;
  /* balance は日本語の複合語を途中で割る原因になるため pretty を使用 */
  text-wrap: pretty;
  /* 文節（語のまとまり）を保って折り返す（Chrome 119+）。未対応環境は通常の折り返しにフォールバック */
  word-break: auto-phrase;
  line-break: strict;
}

/* 見出し以外の主要テキストも文節単位で折り返す */
.split-fig__foot,
.split-fig__foot strong,
.rel-fig__hub-title,
.rel-fig__hub-sub,
.rel-fig__note,
.price-card__policy,
.price-card__value,
.pain-item__body strong,
.change__col strong,
.value-chip b,
.obligation__sub,
.obligation__sites,
.plan__price {
  word-break: auto-phrase;
  line-break: strict;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--gold-deep);
  margin: 0 0 18px;
}

.eyebrow .num {
  font-family: var(--sans);
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--gold);
  flex: 0 0 auto;
}

.sec-title {
  font-size: clamp(24px, 3.4vw, 38px);
  line-height: 1.45;
  margin: 0 0 20px;
}

.sec-title--sm {
  font-size: clamp(21px, 2.6vw, 28px);
}

.sec-head {
  max-width: 760px;
  margin-bottom: clamp(34px, 5vw, 56px);
}

.sec-head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.sec-head--center .eyebrow {
  justify-content: center;
}

.sec-head--center .eyebrow::after {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--gold);
}

.lead {
  font-size: clamp(15.5px, 1.6vw, 17px);
  color: var(--muted);
  line-height: 2.05;
  margin: 0;
}

.sub-title {
  font-size: clamp(19px, 2.2vw, 24px);
  margin: 0 0 14px;
}

.text-gold {
  color: var(--gold-deep);
}

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

.small {
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--muted);
}

.note {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted-2);
}

/* ---------- Gold divider with diamond (echoes the 社是 artwork) ---------- */
.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 26px 0;
  color: var(--gold);
}

.rule::before,
.rule::after {
  content: "";
  height: 1px;
  width: clamp(40px, 12vw, 110px);
  background: linear-gradient(90deg, transparent, var(--gold-soft), var(--gold));
}

.rule::after {
  background: linear-gradient(90deg, var(--gold), var(--gold-soft), transparent);
}

.rule span {
  font-size: 9px;
  transform: rotate(45deg);
  display: inline-block;
  color: var(--gold);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.btn--primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 10px 26px rgba(27, 42, 68, 0.22);
}

.btn--primary:hover {
  background: #14203a;
  color: #fff;
}

.btn--gold {
  background: linear-gradient(135deg, #c39f4c, #a37f2f);
  color: #fff;
  box-shadow: 0 10px 26px rgba(174, 139, 60, 0.28);
}

.btn--gold:hover {
  color: #fff;
  background: linear-gradient(135deg, #b8923f, #8c6e28);
}

.btn--outline {
  background: #fff;
  color: var(--navy);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.btn--outline:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
}

.btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: rgba(27, 42, 68, 0.25);
}

.btn--ghost:hover {
  border-color: var(--navy);
  background: rgba(27, 42, 68, 0.04);
  color: var(--navy);
}

.btn--sm {
  padding: 12px 22px;
  font-size: 14px;
}

.btn--block {
  width: 100%;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252, 250, 246, 0.9);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand__mark {
  width: 46px;
  height: 46px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__name {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: 0.08em;
}

.brand__sub {
  font-size: 9.5px;
  letter-spacing: 0.24em;
  color: var(--gold-deep);
  font-weight: 700;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link {
  display: block;
  padding: 10px 13px;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy-800);
  border-radius: 8px;
  white-space: nowrap;
}

.nav__link:hover {
  background: rgba(174, 139, 60, 0.09);
  color: var(--gold-deep);
}

.nav__link.is-active {
  color: var(--gold-deep);
  font-weight: 700;
}

.nav__cta {
  margin-left: 10px;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  position: relative;
  transition: background 0.2s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--navy);
  transition: transform 0.25s ease, top 0.25s ease;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #c7d0de;
  padding: clamp(48px, 6vw, 72px) 0 30px;
  font-size: 14px;
}

.site-footer a {
  color: #c7d0de;
}

.site-footer a:hover {
  color: var(--gold-soft);
}

.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer__brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 4px;
}

.footer__brand strong {
  font-family: var(--sans);
  font-size: 17px;
  color: #fff;
  letter-spacing: 0.08em;
  font-weight: 600;
  display: block;
}

.footer__brand small {
  font-size: 9.5px;
  letter-spacing: 0.24em;
  color: var(--gold-soft);
}

.footer__shashi {
  font-family: var(--sans);
  color: #eef2f8;
  font-size: 14.5px;
  line-height: 1.9;
  margin: 0 0 14px;
}

.footer__col h4 {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--gold-soft);
  margin: 0 0 14px;
  font-weight: 700;
}

.footer__col ul {
  list-style: none;
}

.footer__col li {
  margin-bottom: 9px;
}

.footer__col li a {
  font-size: 13.5px;
}

.footer__meta {
  padding-top: 22px;
  font-size: 12.5px;
  line-height: 1.9;
  color: #93a0b4;
}

.footer__meta p {
  margin: 0 0 6px;
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #8593a8;
}

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

.stack-sm > * + * {
  margin-top: 14px;
}

.stack > * + * {
  margin-top: 22px;
}

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 10px !important; }
.mt-2 { margin-top: 20px !important; }
.mt-3 { margin-top: 32px !important; }
.mt-4 { margin-top: 46px !important; }

/* ==========================================================================
   Responsive — header / footer
   ========================================================================== */
@media (max-width: 1024px) {
  .nav__link {
    padding: 10px 9px;
    font-size: 13.5px;
  }
}

@media (max-width: 1080px) {
  :root {
    --header-h: 66px;
  }

  .brand__mark {
    width: 40px;
    height: 40px;
  }

  .brand__name {
    font-size: 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 10px 20px 22px;
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav__link {
    padding: 15px 6px;
    font-size: 15.5px;
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
  }

  .nav__cta {
    margin: 18px 0 0;
  }

  .nav__cta .btn {
    width: 100%;
  }

  .footer__top {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15.5px;
    line-height: 1.9;
  }

  :root {
    --gutter: 18px;
  }

  .btn {
    padding: 15px 22px;
    font-size: 15px;
    white-space: normal;
    text-align: center;
  }

  .btn-group {
    gap: 10px;
  }

  .btn-group .btn {
    width: 100%;
  }
}
