/* ============================================================
   Drain Mansion — light "haunted manor dossier" theme
   Horror puzzle platformer · pixel art · succubi
   Unique design: parchment + aubergine + crimson, gothic serif
   ============================================================ */

:root {
  --bg: #f7f2e8;
  --bg-alt: #efe7d8;
  --card: #ffffff;
  --ink: #2a2133;
  --ink-soft: #5d5468;
  --violet: #43265e;
  --violet-deep: #2e1a44;
  --violet-mid: #6b4a8f;
  --crimson: #a1252f;
  --crimson-deep: #7c1c25;
  --gold: #c9a24b;
  --line: #d9cfbc;
  --shadow: 0 10px 30px rgba(46, 26, 68, 0.12);
  --serif: Georgia, "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --pixel: Consolas, "Courier New", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 17px;
}

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

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

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--violet-deep);
  color: #f3ecff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 18px rgba(46, 26, 68, 0.35);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f7f2e8;
}

.brand:hover { text-decoration: none; }

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 2px solid var(--gold);
  object-fit: cover;
}

.brand-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.brand-sub {
  display: block;
  font-family: var(--pixel);
  font-size: 0.66rem;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
}

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

.nav-links { display: flex; gap: 18px; list-style: none; }

.nav-links a {
  color: #e9e0f5;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover { color: #fff; text-decoration: none; border-bottom-color: var(--gold); }

.nav-links a.active {
  color: #fff;
  border-bottom-color: var(--crimson);
}

.btn {
  display: inline-block;
  font-weight: 700;
  padding: 11px 26px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 1rem;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-play {
  background: var(--crimson);
  color: #fff;
  border-color: var(--crimson);
}

.btn-play:hover { background: var(--crimson-deep); border-color: var(--crimson-deep); }

.btn-ghost {
  background: transparent;
  color: var(--violet);
  border-color: var(--violet-mid);
}

.btn-ghost:hover { background: var(--violet); color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--pixel);
  font-size: 0.8rem;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  background:
    repeating-linear-gradient(0deg, rgba(67, 38, 94, 0.045) 0 2px, transparent 2px 6px),
    linear-gradient(180deg, var(--bg-alt), var(--bg));
  padding: 64px 0 56px;
  border-bottom: 4px solid var(--violet);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  align-items: center;
}

.hero-copy { min-width: 0; }

.hero-eyebrow {
  font-family: var(--pixel);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.78rem;
  color: var(--crimson);
  margin-bottom: 14px;
}

.hero-title {
  font-family: var(--serif);
  font-size: 3.1rem;
  line-height: 1.08;
  color: var(--violet-deep);
  margin-bottom: 18px;
}

.hero-title em {
  font-style: italic;
  color: var(--crimson);
}

.hero-tagline {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 34em;
  margin-bottom: 26px;
}

.hero-cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-img-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 3px solid var(--violet-mid);
}

.hero-img { width: 100%; }

.hero-img-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent, rgba(46, 26, 68, 0.88));
  color: #f7f2e8;
  font-family: var(--pixel);
  font-size: 0.75rem;
  letter-spacing: 1px;
  padding: 26px 14px 10px;
  text-align: center;
}

/* ---------- Hero (sub-pages) ---------- */
.hero-subpage {
  background:
    repeating-linear-gradient(0deg, rgba(67, 38, 94, 0.045) 0 2px, transparent 2px 6px),
    linear-gradient(180deg, var(--bg-alt), var(--bg));
  padding: 44px 0 40px;
  border-bottom: 4px solid var(--violet);
}

.hero-subpage h1 {
  font-family: var(--serif);
  font-size: 2.5rem;
  color: var(--violet-deep);
  margin-bottom: 12px;
}

.hero-subpage .hero-tagline { margin-bottom: 0; max-width: 42em; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }

.section-alt { background: var(--bg-alt); }

.section-title {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--violet-deep);
  text-align: center;
  margin-bottom: 10px;
}

.section-kicker {
  font-family: var(--pixel);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.74rem;
  color: var(--crimson);
  text-align: center;
  margin-bottom: 8px;
}

.section-desc {
  text-align: center;
  color: var(--ink-soft);
  max-width: 46em;
  margin: 0 auto 40px;
}

.section-desc-left {
  text-align: left;
  margin: 0 0 24px;
  max-width: none;
}

/* ---------- Facts strip ---------- */
.facts-strip {
  background: var(--violet-deep);
  color: #efe8fa;
  padding: 34px 0;
}

.facts-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 22px;
  text-align: center;
}

.fact-item .fact-label {
  display: block;
  font-family: var(--pixel);
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.fact-item .fact-value {
  font-family: var(--serif);
  font-size: 1.08rem;
  color: #fff;
}

/* ---------- Feature cards ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 8px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--crimson);
  border-radius: 10px;
  padding: 26px 24px;
  box-shadow: 0 6px 18px rgba(46, 26, 68, 0.07);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.feature-card .feature-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--bg-alt);
  color: var(--crimson);
  font-family: var(--pixel);
  font-size: 1.15rem;
  margin-bottom: 14px;
  border: 1px solid var(--line);
}

.feature-card h3 {
  font-family: var(--serif);
  font-size: 1.22rem;
  color: var(--violet-deep);
  margin-bottom: 8px;
}

.feature-card p { font-size: 0.95rem; color: var(--ink-soft); }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.gallery-item {
  position: relative;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--line);
  background: var(--card);
}

.gallery-item:hover { text-decoration: none; border-color: var(--crimson); }

.gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:hover img { transform: scale(1.04); }

.gallery-item .gallery-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, transparent, rgba(46, 26, 68, 0.85));
  color: #f7f2e8;
  font-size: 0.82rem;
  padding: 22px 10px 8px;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 30, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.lightbox.open { display: flex; }

.lightbox-inner { position: relative; max-width: min(1080px, 92vw); }

.lightbox img {
  max-width: 92vw;
  max-height: 82vh;
  border-radius: 8px;
  border: 3px solid var(--gold);
  margin: 0 auto;
}

.lb-caption {
  color: #e9e0f5;
  text-align: center;
  font-size: 0.9rem;
  padding: 12px 4px 0;
}

.lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--violet);
  color: #fff;
  border: 2px solid var(--gold);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
}

.lb-btn:hover { background: var(--crimson); }

.lb-prev { left: -66px; }
.lb-next { right: -66px; }

.lb-close {
  position: absolute;
  top: -52px;
  right: 0;
  background: var(--crimson);
  color: #fff;
  border: 2px solid #fff;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
}

/* ---------- Quotes ---------- */
.quotes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

blockquote.quote {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 10px;
  padding: 22px 20px;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

cite.quote-author {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-family: var(--pixel);
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: var(--violet-mid);
  text-transform: uppercase;
}

/* ---------- Play banner ---------- */
.play-banner {
  background: linear-gradient(135deg, var(--violet-deep), var(--violet-mid));
  border-radius: 14px;
  padding: 44px 36px;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow);
}

.play-banner h2 {
  font-family: var(--serif);
  font-size: 1.9rem;
  margin-bottom: 10px;
}

.play-banner p { color: #e6dcf2; max-width: 40em; margin: 0 auto 22px; }

.play-banner .btn-play { font-size: 1.15rem; padding: 14px 38px; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.about-grid img {
  border-radius: 12px;
  border: 3px solid var(--violet-mid);
  box-shadow: var(--shadow);
}

.about-text { min-width: 0; }

.about-intro {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--violet-deep);
  margin-bottom: 16px;
  line-height: 1.5;
}

.about-mission p { margin-bottom: 14px; color: var(--ink-soft); }

/* ---------- Article / content pages ---------- */
.article { max-width: 760px; }

.article p { margin-bottom: 18px; }

.article h2 {
  font-family: var(--serif);
  font-size: 1.65rem;
  color: var(--violet-deep);
  margin: 38px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--line);
}

.article h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--violet-deep);
  margin: 26px 0 8px;
}

.article ul, .article ol { margin: 0 0 18px 1.4em; }
.article li { margin-bottom: 8px; }

.content-img {
  margin: 26px 0;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--line);
  background: var(--card);
}

.content-img img { width: 100%; }

.content-img figcaption {
  font-family: var(--pixel);
  font-size: 0.76rem;
  letter-spacing: 0.5px;
  color: var(--ink-soft);
  padding: 8px 12px;
  background: var(--bg-alt);
}

.figure-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
  margin: 30px 0;
}

.figure-side .content-img { margin: 0; }

/* ---------- Character cards ---------- */
.char-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 26px 0;
}

.char-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 20px;
  box-shadow: 0 6px 16px rgba(46, 26, 68, 0.06);
}

.char-card .char-glyph {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--violet);
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--pixel);
  font-weight: 700;
  margin-bottom: 12px;
}

.char-card h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--violet-deep);
  margin-bottom: 6px;
}

.char-card p { font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- Tables ---------- */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.info-table th, .info-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.info-table th {
  background: var(--violet-deep);
  color: #f3ecff;
  font-family: var(--pixel);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.info-table tr:last-child td { border-bottom: none; }

/* ---------- FAQ ---------- */
.faq-list { margin: 26px 0; }

.faq-list details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 14px;
  padding: 4px 20px;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--violet-deep);
  padding: 14px 0;
  font-family: var(--serif);
  font-size: 1.08rem;
}

.faq-list summary::-webkit-details-marker { color: var(--crimson); }

.faq-list details p {
  padding: 0 0 16px;
  color: var(--ink-soft);
  font-size: 0.97rem;
}

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

/* ---------- Page-end link ---------- */
.page-end {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px dashed var(--line);
}

/* ---------- Section divider ---------- */
.section-divider {
  width: 90px;
  height: 4px;
  background: var(--crimson);
  margin: 26px auto;
  border-radius: 2px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--violet-deep);
  color: #cfc3e2;
  padding: 30px 0 26px;
  margin-top: 30px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.copyright { font-size: 0.85rem; }

.lang-switch { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; list-style: none; }

.lang-switch a {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--violet-mid);
  border-radius: 20px;
  color: #e9e0f5;
  font-size: 0.85rem;
}

.lang-switch a:hover { border-color: var(--gold); color: #fff; text-decoration: none; }

.lang-switch a.active {
  background: var(--crimson);
  border-color: var(--crimson);
  color: #fff;
}

/* ---------- Responsive 768 ---------- */
@media (max-width: 768px) {
  body { font-size: 16px; }

  .nav-toggle { display: block; }

  .site-nav { position: relative; }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    flex-direction: column;
    background: var(--violet-deep);
    border: 1px solid var(--violet-mid);
    border-radius: 10px;
    padding: 14px 18px;
    gap: 10px;
    min-width: 190px;
    box-shadow: var(--shadow);
  }

  .nav-links.open { display: flex; }

  .header-inner .btn-play { font-size: 0.9rem; padding: 10px 18px; }

  .hero { padding: 44px 0 40px; }

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

  .hero-title { font-size: 2.4rem; }

  .hero-subpage h1 { font-size: 2rem; }

  .facts-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }

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

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

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

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

  .figure-side { grid-template-columns: 1fr; }

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

  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

/* ---------- Responsive 480 ---------- */
@media (max-width: 480px) {
  .brand-title { font-size: 1.1rem; }

  .brand-sub { font-size: 0.58rem; }

  .header-inner .btn-play { display: none; }

  .hero-title { font-size: 1.95rem; }

  .hero-subpage h1 { font-size: 1.7rem; }

  .section { padding: 40px 0; }

  .section-title { font-size: 1.6rem; }

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

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

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

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

  .play-banner { padding: 32px 20px; }

  .play-banner h2 { font-size: 1.5rem; }
}
