/* ============================================================
   Echoes of Heian Wiki — Shared Design System v2
   Fonts: Cinzel (display) + Crimson Pro (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Crimson+Pro:ital,wght@0,300;0,400;0,600;1,400&family=JetBrains+Mono:wght@400;700&display=swap');

/* ── Container ─────────────────────────────────────────── */
.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.notice .container {
  padding: 10px 0;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-wrap: wrap;
}

/* ── Header / Nav ──────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 10, 20, 0.85);
  backdrop-filter: blur(22px) saturate(160%);
  border-bottom: 1px solid var(--line);
}

.nav {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #f5c15d 0%, #c8860a 100%);
  color: #0a0d18;
  font-size: 19px;
  font-weight: 900;
  box-shadow: 0 0 0 1px rgba(245,193,93,0.35), 0 8px 28px rgba(245,193,93,0.22);
  font-family: var(--font-display);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-family: var(--font-display);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.nav-links a {
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--muted);
  transition: color 0.18s, background 0.18s;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.07);
}

.nav-cta {
  padding: 9px 16px !important;
  border: 1px solid rgba(245,193,93,0.40) !important;
  border-radius: 999px !important;
  color: #ffe7b0 !important;
  background: rgba(245,193,93,0.10) !important;
}

.nav-cta:hover {
  background: rgba(245,193,93,0.20) !important;
  border-color: rgba(245,193,93,0.65) !important;
  color: #fff !important;
}

.mobile-menu {
  display: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 12px;
  padding: 9px 13px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ── Hero actions ──────────────────────────────────────── */
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.btn-secondary {
  color: var(--text);
  background: rgba(255,255,255,0.07);
  border-color: var(--line);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.28);
}

/* ── Section headings ──────────────────────────────────── */
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 38px);
  letter-spacing: 0.03em;
  font-weight: 700;
  line-height: 1.1;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--soft);
  max-width: 680px;
  font-size: 16px;
}

/* ── Panels ────────────────────────────────────────────── */
.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ── Pills ─────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.07em;
  white-space: nowrap;
  background: rgba(110,231,183,0.12);
  color: var(--green);
  border: 1px solid rgba(110,231,183,0.25);
  text-transform: uppercase;
}

.pill.gold {
  background: var(--gold-soft);
  color: #ffe7b0;
  border-color: rgba(245,193,93,0.32);
}

.pill.red {
  background: rgba(249,115,115,0.12);
  color: var(--red);
  border-color: rgba(249,115,115,0.28);
}

/* ── Grids ─────────────────────────────────────────────── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── Cards ─────────────────────────────────────────────── */
.card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-sm);
  padding: 22px;
  transition: transform 0.22s cubic-bezier(.22,.68,0,1.2), background 0.18s, border-color 0.18s, box-shadow 0.22s;
  position: relative;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245,193,93,0), transparent);
  transition: background 0.3s;
}

.card:hover {
  transform: translateY(-3px);
  background: var(--panel-strong);
  border-color: rgba(245,193,93,0.32);
  box-shadow: 0 16px 48px rgba(0,0,0,0.35), 0 0 0 1px rgba(245,193,93,0.10);
}

.card:hover::after {
  background: linear-gradient(90deg, transparent, rgba(245,193,93,0.6), transparent);
}

.card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  font-size: 17px;
  font-weight: 700;
}

.card p {
  margin: 0;
  color: var(--soft);
  font-size: 15px;
  line-height: 1.6;
}

.card-meta {
  display: inline-flex;
  margin-top: 18px;
  color: #ffe7b0;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Table ─────────────────────────────────────────────── */
th {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(255,255,255,0.04);
  font-weight: 700;
}

td {
  color: var(--muted);
  font-size: 15px;
}

/* ── FAQ ───────────────────────────────────────────────── */
.faq {
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  transition: border-color 0.2s, background 0.2s;
}

details[open] {
  border-color: rgba(245,193,93,0.30);
  background: var(--panel-strong);
}

summary {
  cursor: pointer;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.02em;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

summary::after {
  content: '+';
  color: var(--gold);
  font-size: 22px;
  font-weight: 400;
  transition: transform 0.2s;
  flex-shrink: 0;
  line-height: 1;
}

details[open] summary::after {
  transform: rotate(45deg);
}

summary::-webkit-details-marker { display: none; }

details p {
  color: var(--soft);
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.65;
}

/* ── Footer ────────────────────────────────────────────── */
footer {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,0.22);
  color: var(--soft);
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,193,93,0.45), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 36px;
  padding: 52px 0 40px;
}

footer h3,
footer h4 {
  margin: 0 0 14px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.07em;
  font-size: 11px;
  text-transform: uppercase;
}

footer p,
footer a {
  color: var(--soft);
  font-size: 14px;
  line-height: 1.7;
}

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

.footer-links {
  display: grid;
  gap: 7px;
}

.copyright {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  font-size: 13px;
  color: #49556a;
}

/* ── Breadcrumb ────────────────────────────────────────── */
.breadcrumb {
  padding: 18px 0 0;
  font-size: 12px;
  color: var(--soft);
  display: flex;
  gap: 8px;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.breadcrumb a:hover {
  color: #fff;
}

/* ── Link more ─────────────────────────────────────────── */
.link-more {
  color: #ffe7b0;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.18s;
}

.link-more:hover {
  color: #fff;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 920px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .nav-links {
    display: none;
  }

  .mobile-menu {
    display: inline-flex;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(var(--max), calc(100% - 24px));
  }

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

  .section-head {
    display: block;
  }

  .link-more {
    display: inline-block;
    margin-top: 12px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 36px 0 28px;
  }
}
