/* Mysteries Revival Startup Website Style */
@font-face {
  font-family: 'Lora';
  src: url('assets/Lora-VF.ttf') format('truetype');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg-dark: #111312;
  --bg-surface: #1a1e1d;
  --bg-card: #222726;
  --text-main: #ddd5c3;
  --text-muted: #8e9695;
  --border-subtle: #333c3a;
  --border-highlight: #4a5452;
  --cinnabar: #873f46;
  --cinnabar-bright: #b84c56;
  --gold: #d8bd79;
  --silver: #cfd6de;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  overflow-wrap: anywhere;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  overflow-x: hidden;
}

body {
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  background-color: var(--bg-dark);
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--cinnabar);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 1000;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: bold;
}
.skip-link:focus {
  top: 1rem;
}

/* Scroll progress */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background-color: var(--cinnabar);
  z-index: 1001;
  transition: width 0.1s ease;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 999;
  background-color: #111312f2;
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  max-width: 100%;
}

.brand span {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--gold);
}

.nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
  padding: 0.25rem 0.1rem;
}

.nav a:hover, .nav a:focus-visible {
  color: var(--text-main);
  border-bottom: 2px solid var(--cinnabar);
}

.motion-btn {
  background: transparent;
  border: 1px solid var(--border-highlight);
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  font-family: inherit;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.motion-btn:hover {
  border-color: var(--text-main);
  color: var(--text-main);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: calc(100vh - 70px);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  max-width: 1320px;
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #111312cc;
  z-index: -1;
}

.hero-fog {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  opacity: 0.4;
  z-index: -1;
  pointer-events: none;
  animation: fogDrift 30s infinite alternate ease-in-out;
}

@keyframes fogDrift {
  0% { transform: translateX(0); }
  100% { transform: translateX(-40px); }
}

.hero-content {
  z-index: 1;
  min-width: 0;
  max-width: 100%;
}

.stage-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  border: 1px solid #d8bd7944;
  background-color: #d8bd7911;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  max-width: 100%;
}

.tag-status {
  color: #87e0b5;
  font-weight: 700;
}

.hero h1 img {
  max-width: 100%;
  width: min(480px, 100%);
  height: auto;
  display: block;
  margin-bottom: 1.5rem;
}

.hero-tagline {
  font-size: 1.5rem;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.hero-tagline em {
  color: var(--cinnabar-bright);
  font-style: normal;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 580px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--cinnabar);
  color: #fff;
  padding: 0.75rem 1.4rem;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background-color: var(--cinnabar-bright);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  background-color: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}

.btn-secondary:hover {
  border-color: var(--text-main);
}

.btn-ghost {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.75rem 0.5rem;
  transition: color 0.2s;
}

.btn-ghost:hover {
  color: var(--text-main);
}

.hero-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-aside img {
  max-width: 320px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px #000000bb);
}

.aside-caption {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* Generic Section Styles */
.section {
  max-width: 1320px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.section-header {
  max-width: 800px;
  margin-bottom: 3.5rem;
}

.chapter-num {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--cinnabar-bright);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-size: 2.25rem;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.section-header h2 em {
  font-style: italic;
  color: var(--gold);
}

.section-header .lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Overview Section */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}

.overview-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: transform 0.2s, border-color 0.2s;
}

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

.card-icon {
  margin-bottom: 1.25rem;
}

.overview-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.overview-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.scene-preview {
  margin: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #0b0d0c;
}

.scene-preview img {
  width: 100%;
  height: auto;
  display: block;
}

.scene-preview figcaption {
  padding: 0.85rem 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
}

/* Ink Divider */
.ink-divider-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.5rem;
  text-align: center;
}

.ink-divider {
  width: 100%;
  max-width: 480px;
  height: auto;
  opacity: 0.7;
}

/* Gameplay Section */
.video-container {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #000;
  margin-bottom: 3rem;
}

.video-container video {
  width: 100%;
  max-height: 720px;
  display: block;
  object-fit: cover;
}

.video-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}

.video-link {
  color: var(--gold);
  text-decoration: none;
}

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

.mechanics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.mech-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}

.mech-num {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.mech-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.65rem;
  color: var(--text-main);
}

.mech-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Characters Section */
.hero-selector {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero-tab {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.hero-tab img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background-color: #0b0d0c;
}

.hero-tab[aria-pressed="true"] {
  background-color: var(--bg-card);
  border-color: var(--cinnabar);
  color: var(--text-main);
}

.hero-tab:hover {
  border-color: var(--border-highlight);
}

.dossier-panel {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.dossier-portrait-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.dossier-portrait-box img {
  width: 100%;
  max-width: 256px;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 0.75rem;
  background-color: #0b0d0c;
}

.portrait-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.dossier-details {
  display: flex;
  flex-direction: column;
}

.dossier-header-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.seal-icon {
  width: 32px;
  height: 32px;
}

.rarity-badge {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  border: 1px solid #d8bd7955;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.dossier-details h3 {
  font-size: 1.85rem;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.char-summary {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.75rem;
}

.char-skill-box {
  background-color: var(--bg-surface);
  border-left: 3px solid var(--cinnabar);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1.5rem;
}

.skill-label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--cinnabar-bright);
  display: block;
  margin-bottom: 0.25rem;
}

.char-skill-box strong {
  font-size: 1.15rem;
  color: var(--text-main);
  display: block;
  margin-bottom: 0.25rem;
}

.char-skill-box p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.char-subskills details {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}

.char-subskills summary {
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-main);
}

.char-subskills details[open] summary {
  border-bottom: 1px solid var(--border-subtle);
}

.char-subskills details p {
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Tech Grid */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.tech-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}

.tech-card h4 {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.tech-val {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.tech-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Status Comparison */
.status-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.status-col {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
}

.completed-col {
  border-top: 4px solid #87e0b5;
}

.in-progress-col {
  border-top: 4px solid var(--gold);
}

.status-col h3 {
  font-size: 1.25rem;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

.status-col ul {
  list-style: none;
}

.status-col li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.9rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.completed-col li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #87e0b5;
  font-weight: bold;
}

.in-progress-col li::before {
  content: "⟳";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: bold;
}

/* FAQ */
.faq-accordion details {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.faq-accordion summary {
  padding: 1.15rem 1.5rem;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
}

.faq-accordion details[open] summary {
  border-bottom: 1px solid var(--border-subtle);
}

.faq-accordion p {
  padding: 1.25rem 1.5rem;
  color: var(--text-muted);
  line-height: 1.7;
}

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

/* Contact */
.contact-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.contact-card h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.contact-card p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.85rem 1.5rem;
  border-radius: 9999px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.contact-pill:hover {
  border-color: var(--cinnabar);
  transform: translateY(-2px);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-dark);
}

.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--text-main);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.noscript-notice {
  background-color: var(--cinnabar);
  color: #fff;
  text-align: center;
  padding: 0.75rem;
  font-size: 0.9rem;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 3rem;
  }
  .hero-aside {
    display: none;
  }
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .mechanics-grid, .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .status-comparison {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .nav {
    order: 3;
    width: 100%;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-bottom: 0.25rem;
  }
  .dossier-panel {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
  .mechanics-grid, .tech-grid {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 3.5rem 1rem;
  }
  .section-header h2 {
    font-size: 1.75rem;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-fog {
    animation: none;
  }
}
