/* ==========================================================================
   site.css — 095.jp 固有のデザイン（cms.css の上に重ねる）
   配色は theme.css のトークンのみ参照する。
   モチーフ: 長崎の夜景（港の藍）・ランタン（朱）・カステラ（金）・斜面にひろがる街並み
   ========================================================================== */

/* ── ヘッダー ───────────────────────────────────────────── */
.site-header {
  background: linear-gradient(90deg, var(--color-night-1), var(--color-night-2));
  border-bottom: 3px solid var(--color-signal);
}
.site-logo {
  display: inline-flex; align-items: center; gap: .5rem;
  color: #fff; font-size: 1.3rem; font-weight: 800; letter-spacing: .04em; flex-shrink: 0;
}
.site-logo:hover { color: var(--color-gold); text-decoration: none; }
.site-logo__mark { width: 30px; height: 30px; flex-shrink: 0; }
.site-logo__tld { color: var(--color-gold); }
.site-header__inner { gap: .75rem; }
.site-nav__item > a { color: #dbe7f5; font-size: .92rem; white-space: nowrap; padding-inline: .6rem; }
.site-nav__item > a:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.site-nav__item.is-active > a { color: var(--color-gold); }
.nav-toggle { border-color: rgba(255, 255, 255, .4); }
.nav-toggle__bar { background: #fff; }
.site-nav__submenu { background: var(--color-surface); width: max-content; min-width: 12rem; max-width: min(20rem, 90vw); }
.site-nav__submenu a { color: var(--color-text-muted); white-space: normal; overflow-wrap: anywhere; font-size: .88rem; line-height: 1.5; }
@media (max-width: 820px) {
  .site-nav { background: var(--color-night-1); }
  .site-nav__item > a { white-space: normal; }
  .site-nav__submenu { background: transparent; width: auto; max-width: none; border-left-color: rgba(255, 255, 255, .3); }
  .site-nav__submenu a { color: #b9cde6; }
}
@media (min-width: 821px) {
  .site-nav__list > .site-nav__item:nth-last-child(-n+2) > .site-nav__submenu { left: auto; right: 0; }
}

/* ── 見出し・本文 ───────────────────────────────────────── */
.page h1 { line-height: 1.4; }
.page__body h2 {
  border-bottom: 0; padding: .15rem 0 .15rem .9rem;
  border-left: 6px solid var(--color-signal);
  margin-top: 2.8rem; line-height: 1.5;
}
.page__body h3 { color: var(--color-accent-strong); border-bottom: 2px dotted var(--color-gold); padding-bottom: .15rem; }
.lede { font-size: 1.1rem; }
.page__body > p:first-of-type { font-size: 1.04rem; }
.toc { border-left: 4px solid var(--color-gold); background: var(--color-surface); max-width: 28rem; padding: .7rem 1rem; margin: 1.2rem 0; font-size: .85rem; border-radius: var(--radius-sm); }
.toc__title { font-size: .85rem; margin: 0 0 .35rem; }
.toc ol { padding-left: 1.1rem; }
.toc li { margin: .15rem 0; line-height: 1.5; }
.toc a { font-size: .82rem; }
table.data-table thead th { background: var(--color-night-2); color: #fff; }
.page__body strong { background: linear-gradient(transparent 62%, rgba(217, 154, 28, .28) 62%); }

/* ── ヒーロー（トップ）: 長崎の夜景 ──────────────────── */
.hero {
  position: relative; overflow: hidden; color: #fff; isolation: isolate;
  margin: 0 0 2.5rem; border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  background:
    radial-gradient(ellipse 60% 50% at 80% 100%, rgba(217, 154, 28, .35), transparent 70%),
    linear-gradient(175deg, var(--color-night-1) 0%, var(--color-night-2) 70%, #2b5a82 100%);
}
.hero__inner { position: relative; z-index: 2; padding: clamp(2.4rem, 6vw, 4.2rem) clamp(1.25rem, 5vw, 3rem) clamp(7rem, 16vw, 9.5rem); }
.hero__eyebrow { margin: 0 0 .6rem; color: var(--color-gold); font-weight: 800; letter-spacing: .16em; font-size: .85rem; }
.hero__title { font-size: clamp(1.7rem, 1rem + 3.2vw, 2.8rem); line-height: 1.4; margin: 0 0 1rem; color: #fff; font-weight: 800; }
.hero__lead { max-width: 37em; margin: 0 0 1.5rem; color: #d7e4f4; font-size: 1.04rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__btn { display: inline-block; padding: .7rem 1.4rem; border-radius: 999px; font-weight: 800; background: var(--color-signal); color: #fff; }
.hero__btn:hover { background: #e0463d; color: #fff; text-decoration: none; }
.hero__btn--ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .65); }
.hero__btn--ghost:hover { background: rgba(255, 255, 255, .14); }
.hero__sky { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero__lantern {
  position: absolute; width: 22px; height: 26px; border-radius: 50% / 46%;
  background: radial-gradient(circle at 40% 35%, #ff8c70, var(--color-signal) 70%);
  box-shadow: 0 0 22px 6px rgba(240, 90, 70, .55);
  animation: lantern 5.6s ease-in-out infinite;
}
.hero__lantern::before { content: ""; position: absolute; left: 50%; top: -9px; width: 1px; height: 9px; background: var(--color-gold); }
.hero__lantern::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: -4px; height: 4px; border-radius: 2px; background: var(--color-gold); }
@keyframes lantern { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(6px) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .hero__lantern { animation: none; } }
.hero__hills {
  position: absolute; left: 0; right: 0; bottom: 0; height: clamp(110px, 20vw, 170px); z-index: 1; pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 200' preserveAspectRatio='none'%3E%3Cpath d='M0 200V120L60 105 120 125 180 95 260 118 330 80 420 110 500 70 590 105 680 85 760 120 850 90 940 115 1030 75 1110 100 1200 85V200z' fill='%230a1626'/%3E%3Cpath d='M0 200V150L80 138 150 152 240 128 330 148 420 125 520 150 610 132 700 152 800 130 900 150 1000 128 1100 146 1200 136V200z' fill='%23060e1a'/%3E%3Cg fill='%23f6c66a'%3E%3Crect x='96' y='148' width='4' height='4'/%3E%3Crect x='132' y='156' width='4' height='4'/%3E%3Crect x='214' y='140' width='4' height='4'/%3E%3Crect x='270' y='150' width='4' height='4'/%3E%3Crect x='344' y='130' width='4' height='4'/%3E%3Crect x='402' y='146' width='4' height='4'/%3E%3Crect x='468' y='134' width='4' height='4'/%3E%3Crect x='540' y='152' width='4' height='4'/%3E%3Crect x='598' y='140' width='4' height='4'/%3E%3Crect x='664' y='156' width='4' height='4'/%3E%3Crect x='732' y='142' width='4' height='4'/%3E%3Crect x='806' y='150' width='4' height='4'/%3E%3Crect x='872' y='138' width='4' height='4'/%3E%3Crect x='936' y='154' width='4' height='4'/%3E%3Crect x='1012' y='140' width='4' height='4'/%3E%3Crect x='1080' y='152' width='4' height='4'/%3E%3Crect x='1148' y='144' width='4' height='4'/%3E%3C/g%3E%3Cg fill='%23f6c66a' opacity='.7'%3E%3Crect x='160' y='112' width='3' height='3'/%3E%3Crect x='312' y='96' width='3' height='3'/%3E%3Crect x='500' y='90' width='3' height='3'/%3E%3Crect x='700' y='100' width='3' height='3'/%3E%3Crect x='1040' y='92' width='3' height='3'/%3E%3C/g%3E%3C/svg%3E") no-repeat center bottom / 100% 100%;
}

/* ── 路線図風（:::route） ──────────────────────────────── */
.route { list-style: none; margin: 1.75rem 0; padding: .4rem 0 .4rem 1.6rem; position: relative; }
.route::before { content: ""; position: absolute; left: .55rem; top: 1.1rem; bottom: 1.1rem; width: 6px; border-radius: 3px; background: var(--color-signal); }
.route__stop { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .8rem; padding: .45rem 0 .45rem .8rem; }
.route__stop::before {
  content: ""; position: absolute; left: -1.5rem; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  border-radius: 50%; background: var(--color-bg); border: 3px solid var(--color-signal);
}
.route__name { font-weight: 800; font-size: 1.02rem; }
.route__note { color: var(--color-text-muted); font-size: .88rem; }

/* ── カード・一覧・ボタン ─────────────────────────────── */
.card { box-shadow: var(--shadow-sm); border-top: 4px solid var(--color-gold); border-radius: var(--radius-md); }
.card h3 { border-bottom: 0; }
.child-list a { box-shadow: var(--shadow-sm); }
.child-list a:hover { border-color: var(--color-signal); }
.cms-btn { background: var(--color-signal); border-radius: 999px; color: #fff; }
.cms-btn:hover { background: #e0463d; }

/* ── アイコン・要点ボックス ───────────────────────────── */
.page__icon { display: block; width: 2.4rem; height: 2.4rem; margin: 0 0 .5rem; color: var(--color-signal); }
.page__body h2 .icon { color: var(--color-signal); width: 1.05em; height: 1.05em; margin-right: .35em; vertical-align: -.12em; }
.page__body h3 .icon { color: var(--color-gold); margin-right: .3em; }
.glance { display: grid; gap: .75rem; margin: 1.5rem 0 2rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.glance__item {
  display: flex; gap: .7rem; align-items: flex-start;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-signal); border-radius: var(--radius-md);
  padding: .8rem .9rem; box-shadow: var(--shadow-sm);
}
.glance__item > .icon { flex-shrink: 0; width: 1.7rem; height: 1.7rem; margin: .1rem 0 0; color: var(--color-accent); }
.glance__label { margin: 0; font-size: .78rem; font-weight: 800; letter-spacing: .06em; color: var(--color-text-muted); }
.glance__text { margin: .1rem 0 0; font-size: .95rem; line-height: 1.55; }
.glance__text p { margin: 0; }

.callout { position: relative; padding-left: 3rem; }
.callout::before {
  content: ""; position: absolute; left: 1rem; top: 1rem; width: 1.3rem; height: 1.3rem;
  background-color: var(--c);
  -webkit-mask: var(--i-info) no-repeat center / contain; mask: var(--i-info) no-repeat center / contain;
}
.callout--tip::before { -webkit-mask-image: var(--i-sparkle); mask-image: var(--i-sparkle); }
.callout--important::before { -webkit-mask-image: var(--i-star); mask-image: var(--i-star); }
.callout--warning::before, .callout--caution::before { -webkit-mask-image: var(--i-warning); mask-image: var(--i-warning); }

/* ── フッター: 斜面の街並み ───────────────────────────── */
.site-footer { position: relative; overflow: hidden; padding: 2.5rem 0 1.5rem; background: var(--color-night-1); border-top: 4px solid var(--color-signal); color: #b9cde6; }
.site-footer::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 140px; pointer-events: none; opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 140' preserveAspectRatio='none'%3E%3Cpath d='M0 140V95l50-8 40 14 60-22 50 12 70-30 60 14 70-26 80 18 60-20 90 16 70-24 90 14 60-12 90 18 60-14 100 10 70-6V140z' fill='%23163a5f'/%3E%3C/svg%3E") no-repeat center bottom / 100% 100%;
}
.site-footer > .container { position: relative; }
.site-footer__logo, .site-footer__heading a { color: #fff; }
.site-footer__logo { font-size: 1.1rem; font-weight: 800; }
.site-footer__desc, .site-footer__col a, .site-footer__bottom p { color: #a9bfdb; }
.site-footer__col a:hover { color: var(--color-gold); }
.site-footer__bottom { margin-top: 1.25rem; padding-top: .9rem; border-top-color: rgba(255, 255, 255, .18); }
.site-footer__inner { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.25rem 1.5rem; }
.site-footer__brand { grid-column: 1 / -1; max-width: 40rem; }
@media (min-width: 821px) {
  .site-footer__brand { grid-column: auto; }
  .site-footer__inner { grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr)); }
}

/* ── 404 ────────────────────────────────────────────────── */
.stage404 { text-align: center; padding: 3rem 1rem 4rem; }
.stage404__code { display: flex; justify-content: center; align-items: center; gap: .12em; font-size: clamp(4rem, 18vw, 8rem); font-weight: 800; line-height: 1; margin: 0; color: var(--color-night-2); }
@media (prefers-color-scheme: dark) { .stage404__code { color: var(--color-text); } }
.stage404__lantern {
  display: inline-block; width: .6em; height: .72em; border-radius: 50% / 46%;
  background: radial-gradient(circle at 40% 35%, #ff8c70, var(--color-signal) 70%);
  box-shadow: 0 0 .25em .06em rgba(240, 90, 70, .5);
}
