/* =========================================================
   宇宙戦艦ヤマト 総合情報サイト — style.css
   ダークテーマ / 宇宙的な雰囲気 / レスポンシブ対応
   ========================================================= */

:root {
  --bg-void: #05070f;
  --bg-panel: #0b1020;
  --bg-panel-alt: #10162b;
  --bg-card: #131a33;
  --border-soft: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(212, 175, 55, 0.35);
  --text-main: #eef1fb;
  --text-sub: #aab2cf;
  --text-faint: #6f7797;
  --gold: #d4af37;
  --gold-bright: #f2cd5c;
  --red: #c0392b;
  --red-bright: #e74c3c;
  --blue-glow: #3a5bd0;
  --max-width: 1120px;
  --radius: 14px;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", "Meiryo", sans-serif;
  background:
    radial-gradient(ellipse 900px 500px at 12% -10%, rgba(58, 91, 208, 0.25), transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 0%, rgba(192, 57, 43, 0.15), transparent 55%),
    var(--bg-void);
  color: var(--text-main);
  line-height: 1.8;
  overflow-x: hidden;
}

img, svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
}

p {
  margin: 0 0 1em;
  color: var(--text-sub);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- starfield backdrop ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.7), transparent 60%),
    radial-gradient(1.5px 1.5px at 70% 60%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(2px 2px at 40% 80%, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 85% 20%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 55% 45%, rgba(255,255,255,0.4), transparent 60%),
    radial-gradient(2px 2px at 10% 90%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 95% 75%, rgba(255,255,255,0.45), transparent 60%);
  background-repeat: repeat;
  background-size: 340px 340px;
  opacity: 0.7;
}

/* ---------- header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 7, 15, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-main {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold-bright);
  letter-spacing: 0.05em;
}

.logo-sub {
  font-size: 0.62rem;
  color: var(--text-faint);
  letter-spacing: 0.12em;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-soft);
  color: var(--text-main);
  font-size: 1.3rem;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  cursor: pointer;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  justify-content: flex-end;
}

.site-nav a {
  font-size: 0.83rem;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text-sub);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--gold-bright);
  background: rgba(212, 175, 55, 0.1);
}

.site-nav a.nav-external {
  color: var(--gold);
  border: 1px solid var(--border-strong);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 90px 20px 70px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 800px 400px at 50% 0%, rgba(58, 91, 208, 0.35), transparent 65%),
    linear-gradient(180deg, #070a17 0%, #0b1020 100%);
  border-bottom: 1px solid var(--border-soft);
}

.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -160px;
  transform: translateX(-50%);
  width: 640px;
  height: 320px;
  background: radial-gradient(ellipse, rgba(212, 175, 55, 0.18), transparent 70%);
  pointer-events: none;
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--gold);
  border: 1px solid var(--border-strong);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  background: linear-gradient(120deg, #fff 20%, var(--gold-bright) 55%, #fff 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 18px;
}

.hero .lead {
  max-width: 640px;
  margin: 0 auto 28px;
  color: var(--text-sub);
  font-size: 1.02rem;
}

.hero-note {
  margin-top: 26px;
  font-size: 0.72rem;
  color: var(--text-faint);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 14px;
}

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: linear-gradient(120deg, var(--gold), var(--gold-bright));
  color: #1a1200;
}

.btn-outline {
  border: 1px solid var(--border-strong);
  color: var(--gold-bright);
}

.btn-blog {
  border: 1px solid var(--border-strong);
  color: var(--gold-bright);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

/* ---------- sections ---------- */
section {
  padding: 70px 0;
  border-bottom: 1px solid var(--border-soft);
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}

.section-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin-bottom: 14px;
}

.section-head p {
  color: var(--text-sub);
}

.image-note {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-top: 8px;
}

/* ---------- grid / cards ---------- */
.grid {
  display: grid;
  gap: 20px;
}

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

.card {
  background: linear-gradient(160deg, var(--bg-card), var(--bg-panel));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--text-main);
}

.card .card-icon {
  font-size: 1.6rem;
  margin-bottom: 14px;
}

.card-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--gold);
}

/* stat row */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin: 34px 0;
}

.stat {
  text-align: center;
}

.stat .num {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--gold-bright);
}

.stat .label {
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* tag pill */
.tag {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--text-sub);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 3px 10px;
  margin: 3px 4px 0 0;
}

.badge {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: #1a1200;
  background: var(--gold);
  border-radius: 999px;
  padding: 3px 10px;
  margin-right: 8px;
}

.badge-outline {
  background: none;
  color: var(--gold);
  border: 1px solid var(--border-strong);
}

.badge-red {
  background: var(--red);
  color: #fff;
}

/* ---------- timeline ---------- */
.timeline {
  position: relative;
  margin: 0 auto;
  max-width: 820px;
  padding-left: 26px;
  border-left: 2px solid var(--border-strong);
}

.timeline-item {
  position: relative;
  padding: 0 0 34px 20px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -33px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.18);
}

.timeline-year {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gold-bright);
}

.timeline-item h3 {
  margin: 4px 0 8px;
  font-size: 1.05rem;
}

/* ---------- episode / blog list ---------- */
.ep-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.ep-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 18px;
}

.ep-num {
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.ep-title {
  font-size: 0.92rem;
  color: var(--text-main);
  margin-bottom: 12px;
  min-height: 3.2em;
}

.ep-link {
  font-size: 0.78rem;
  color: var(--gold-bright);
}

.ep-link:hover {
  text-decoration: underline;
}

/* ---------- tabs ---------- */
.tabbar {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 34px;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  color: var(--text-sub);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
}

.tab-btn.active {
  color: #1a1200;
  background: var(--gold);
  border-color: var(--gold);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ---------- character card ---------- */
.char-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 24px;
}

.char-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  color: #1a1200;
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  margin-bottom: 14px;
}

.char-name-en {
  font-size: 0.72rem;
  color: var(--text-faint);
}

.char-meta {
  font-size: 0.78rem;
  color: var(--gold);
  margin: 6px 0 12px;
}

/* enemy variant */
.char-card.enemy .char-avatar {
  background: linear-gradient(135deg, var(--red), var(--red-bright));
  color: #fff;
}

.char-card.enemy .char-meta {
  color: var(--red-bright);
}

/* ---------- spec table ---------- */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.spec-item {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 18px 10px;
}

.spec-icon {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.spec-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gold-bright);
}

.spec-label {
  font-size: 0.72rem;
  color: var(--text-faint);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

table.data-table th,
table.data-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-sub);
}

table.data-table th {
  color: var(--gold);
  font-weight: 700;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}

/* ---------- link list (links page) ---------- */
.link-group {
  margin-bottom: 40px;
}

.link-group h3 {
  font-size: 1rem;
  color: var(--gold-bright);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 10px;
  transition: border-color 0.2s;
}

.link-list a:hover {
  border-color: var(--border-strong);
}

.link-list .link-title {
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.92rem;
}

.link-list .link-desc {
  color: var(--text-faint);
  font-size: 0.78rem;
  font-weight: 400;
}

.link-list .link-arrow {
  color: var(--gold);
  flex-shrink: 0;
}

.notice-box {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 24px;
  font-size: 0.84rem;
  color: var(--text-faint);
}

.notice-box p {
  margin-bottom: 8px;
  color: var(--text-faint);
}

/* ---------- misc content blocks ---------- */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 28px;
}

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.quote-block {
  border-left: 3px solid var(--gold);
  padding-left: 18px;
  font-style: italic;
  color: var(--text-sub);
  margin: 20px 0;
}

.chapter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}

.chapter-card.current {
  border-color: var(--border-strong);
  background: linear-gradient(160deg, rgba(212, 175, 55, 0.08), var(--bg-card));
}

.chapter-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.chapter-num {
  font-weight: 800;
  color: var(--gold-bright);
}

.status-pill {
  font-size: 0.68rem;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  color: var(--text-faint);
}

.status-pill.done {
  color: var(--gold);
  border-color: var(--border-strong);
}

.status-pill.wip {
  color: var(--text-faint);
}

/* ---------- blog CTA section ---------- */
.blog-cta {
  text-align: center;
  background: linear-gradient(160deg, rgba(212, 175, 55, 0.08), var(--bg-panel));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 40px 24px;
}

/* ---------- footer ---------- */
.site-footer {
  background: #050710;
  padding: 60px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border-soft);
}

.footer-brand h2 {
  color: var(--gold-bright);
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.footer-brand p {
  font-size: 0.8rem;
}

.footer-col h3 {
  font-size: 0.82rem;
  color: var(--gold);
  margin-bottom: 14px;
  letter-spacing: 0.05em;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  font-size: 0.82rem;
  color: var(--text-sub);
}

.footer-col a:hover {
  color: var(--gold-bright);
}

.footer-info li {
  font-size: 0.78rem;
  color: var(--text-faint);
}

.footer-bottom {
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-faint);
}

.footer-bottom a {
  color: var(--gold);
}

/* ---------- utility ---------- */
.mt-0 { margin-top: 0; }
.center { text-align: center; }
.small { font-size: 0.78rem; color: var(--text-faint); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .ep-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(5, 7, 15, 0.98);
    border-bottom: 1px solid var(--border-soft);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px 20px;
    gap: 2px;
  }

  .site-header.nav-open .site-nav {
    display: flex;
  }

  .site-nav a {
    padding: 12px 10px;
  }

  .hero { padding: 60px 16px 50px; }

  section { padding: 50px 0; }

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

  .ep-grid { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr; }

  .spec-grid { grid-template-columns: repeat(2, 1fr); }

  .stat-row { gap: 24px; }

  .link-list a {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .logo-main { font-size: 1rem; }
  .hero h1 { font-size: 1.8rem; }
}
