/* ==========================================================================
   Aeons Echo — celestial-divine light theme
   Futuristic fantasy hero-collection RPG (Nutaku, Aeons Studio)
   Unique design: "starlit temple" — lavender-white canvas, deep violet ink,
   gold accents, serif display headings, subtle constellation motifs.
   Mobile-first: base styles for small screens, 768px + 480px breakpoints.
   ========================================================================== */

:root {
  --bg: #f6f3fd;
  --bg-soft: #eeeafa;
  --surface: #ffffff;
  --surface-2: #fbfaff;
  --ink: #2a2252;
  --ink-soft: #443a6e;
  --muted: #6e6593;
  --brand: #4b2e9e;
  --brand-2: #6e50d8;
  --gold: #c08a1e;
  --gold-deep: #a06f10;
  --gold-soft: #f6e7c3;
  --line: #e2dbf3;
  --line-strong: #d4c9f0;
  --rose: #c8507f;
  --shadow-sm: 0 2px 10px rgba(75, 46, 158, 0.07);
  --shadow-md: 0 10px 30px rgba(75, 46, 158, 0.10);
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: Georgia, "Times New Roman", "Noto Serif JP", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans JP", "Hiragino Kaku Gothic ProN",
    Meiryo, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.brand:hover { text-decoration: none; }

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

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

.nav-list {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav-link:hover { color: var(--brand); text-decoration: none; border-bottom-color: var(--gold); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  cursor: pointer;
  border: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-play {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(75, 46, 158, 0.32);
}
.btn-play:hover { box-shadow: 0 8px 22px rgba(75, 46, 158, 0.42); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, #d9a53a 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(192, 138, 30, 0.35);
}
.btn-gold:hover { box-shadow: 0 8px 22px rgba(192, 138, 30, 0.45); }

.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--brand-2);
}
.btn-ghost:hover { background: rgba(110, 80, 216, 0.08); }

.btn-lg { padding: 14px 32px; font-size: 1.05rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--brand);
  font-size: 1.1rem;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(110, 80, 216, 0.18), transparent 60%),
    radial-gradient(900px 420px at 10% 10%, rgba(192, 138, 30, 0.10), transparent 55%),
    linear-gradient(180deg, #efeaff 0%, var(--bg) 100%);
  padding: 56px 0 40px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

.hero-copy { max-width: 640px; }

.hero h1 {
  font-family: var(--font-display);
  font-size: 2.1rem;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 14px;
  letter-spacing: 0.01em;
}

.hero h1 .accent {
  display: block;
  background: linear-gradient(90deg, var(--brand), var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin-bottom: 22px;
  max-width: 560px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-art {
  position: relative;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--line);
}
.hero-art img { width: 100%; }

.hero-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

.hero-subpage {
  padding: 44px 0 30px;
  background:
    radial-gradient(1000px 360px at 85% -20%, rgba(110, 80, 216, 0.16), transparent 60%),
    linear-gradient(180deg, #efeaff 0%, var(--bg) 100%);
}
.hero-subpage h1 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--ink);
  margin-bottom: 10px;
}
.hero-subpage p { color: var(--ink-soft); max-width: 720px; }

/* --------------------------------------------------------------------------
   Sections & typography
   -------------------------------------------------------------------------- */
.section { padding: 44px 0; }
.section-alt { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { text-align: center; max-width: 760px; margin: 0 auto 30px; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--ink);
  margin-bottom: 8px;
}
.section-head p { color: var(--muted); }

.section-left { text-align: left; margin: 0 0 26px; }
.section-left h2 { font-family: var(--font-display); font-size: 1.45rem; color: var(--ink); margin-bottom: 8px; }
.section-left p { color: var(--muted); }

.kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  background: var(--gold-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}

/* --------------------------------------------------------------------------
   Facts / info table
   -------------------------------------------------------------------------- */
.facts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  list-style: none;
}

.fact-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.fact-item dt { font-weight: 700; color: var(--ink-soft); font-size: 0.9rem; white-space: nowrap; }
.fact-item dd { color: var(--ink); text-align: right; font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   Feature cards
   -------------------------------------------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  opacity: 0.85;
}
.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  color: var(--ink);
  margin-bottom: 6px;
}
.feature-card p { color: var(--muted); font-size: 0.95rem; }

/* --------------------------------------------------------------------------
   Screenshot gallery + lightbox
   -------------------------------------------------------------------------- */
.screenshot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.gallery-item {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
  cursor: zoom-in;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gallery-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.gallery-item img { width: 100%; }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 14, 45, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 94vw;
  max-height: 86vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 1.3rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   Quotes
   -------------------------------------------------------------------------- */
.quotes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.quote-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.quote-card blockquote { color: var(--ink-soft); font-style: italic; font-size: 0.98rem; }
.quote-card cite { display: block; margin-top: 10px; color: var(--muted); font-size: 0.85rem; font-style: normal; font-weight: 600; }

/* --------------------------------------------------------------------------
   CTA banner
   -------------------------------------------------------------------------- */
.cta-banner {
  background:
    radial-gradient(700px 300px at 90% 0%, rgba(255, 255, 255, 0.14), transparent 60%),
    linear-gradient(120deg, var(--brand) 0%, var(--brand-2) 100%);
  border-radius: var(--radius);
  padding: 34px 26px;
  text-align: center;
  color: #fff;
}
.cta-banner h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: #fff;
}
.cta-banner p { color: rgba(255, 255, 255, 0.85); margin-bottom: 18px; }
.cta-wrapper { text-align: center; margin-top: 32px; }

/* --------------------------------------------------------------------------
   Articles / sub-pages
   -------------------------------------------------------------------------- */
.article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}
.article h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink);
  margin-bottom: 12px;
}
.article h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  color: var(--ink-soft);
  margin: 18px 0 8px;
}
.article p { color: var(--ink-soft); margin-bottom: 12px; }
.article ul, .article ol { margin: 0 0 14px 22px; color: var(--ink-soft); }
.article li { margin-bottom: 6px; }
.article strong { color: var(--ink); }

.prose { max-width: 820px; }
.prose p { margin-bottom: 14px; }

.img-frame {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  margin: 18px 0;
}
.img-frame img { width: 100%; }
.img-frame figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 8px 14px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
}

.section-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  margin: 26px 0;
}

/* --------------------------------------------------------------------------
   Characters page
   -------------------------------------------------------------------------- */
.character-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.character-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.character-card .card-img {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(180deg, #e9e2fb, #fbf6e9);
}
.character-card .card-img img { width: 100%; height: 100%; object-fit: cover; }
.character-card .card-body { padding: 16px 18px 18px; }
.character-card h3 { font-family: var(--font-display); font-size: 1.12rem; color: var(--ink); margin-bottom: 4px; }
.character-card .card-role { font-size: 0.78rem; font-weight: 700; color: var(--gold-deep); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.character-card p { color: var(--muted); font-size: 0.93rem; }

.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--brand);
  border: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  padding: 16px 20px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--brand-2);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 20px 18px; color: var(--ink-soft); }
.faq-item .faq-a p { margin-bottom: 10px; }
.faq-item .faq-a p:last-child { margin-bottom: 0; }

.faq-sysreq { margin-top: 0; }

.table-wrap { overflow-x: auto; margin: 14px 0; }
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  min-width: 420px;
}
.table-wrap th, .table-wrap td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--ink-soft);
}
.table-wrap th { background: var(--bg-soft); color: var(--ink); font-weight: 700; }
.table-wrap tr:last-child td { border-bottom: none; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--line);
  padding: 26px 0 30px;
  margin-top: 30px;
}
.footer-inner { text-align: center; }
.footer-copy { color: var(--muted); font-size: 0.85rem; margin-bottom: 14px; }

.lang-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  list-style: none;
}
.lang-switch a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  background: var(--surface-2);
}
.lang-switch a:hover { color: var(--brand); border-color: var(--brand-2); text-decoration: none; }
.lang-switch a.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* --------------------------------------------------------------------------
   Responsive: ≥768px
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  .hero { padding: 72px 0 56px; }
  .hero h1 { font-size: 2.7rem; }
  .hero-inner { grid-template-columns: 1.05fr 0.95fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .screenshot-grid { grid-template-columns: repeat(2, 1fr); }
  .quotes-grid { grid-template-columns: repeat(3, 1fr); }
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .character-grid { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1.15fr 0.85fr; }
  .article { padding: 32px 36px; }
  .section { padding: 56px 0; }
}

/* --------------------------------------------------------------------------
   Responsive: ≥1024px
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  .screenshot-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-subpage h1 { font-size: 2.3rem; }
}

/* --------------------------------------------------------------------------
   Responsive: ≤480px
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 16px;
    gap: 10px;
  }
  .nav-list.open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .header-inner .btn-play { padding: 9px 16px; font-size: 0.88rem; }
  .hero h1 { font-size: 1.75rem; }
  .cta-banner { padding: 28px 18px; }
  .article { padding: 20px 16px; }
  .fact-item { flex-direction: column; gap: 2px; }
  .fact-item dd { text-align: left; }
}
