/* Maloa's Blood — Pyros Island Heritage Site
   Design language: volcanic obsidian, blood crimson, amber warnings */

:root {
  --black:      #08080a;
  --deep:       #0f0f13;
  --panel:      #161619;
  --border:     #2a2a30;
  --muted:      #3a3a42;
  --text:       #ddd6cc;
  --text-dim:   #a09890;
  --blood:      #9b1c1c;
  --blood-lt:   #c02828;
  --crimson:    #e11d1d;
  --amber:      #d97706;
  --amber-lt:   #f59e0b;
  --gold:       #92400e;
  --glass:      #8090a0;
  --glass-lt:   #b0c0cc;
  --white:      #f0ebe4;
  --serif:      Georgia, 'Times New Roman', serif;
  --sans:       'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono:       'Courier New', monospace;
  --radius:     4px;
  --max:        860px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--text);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.75;
}

/* === ALERT BANNER === */
.alert-banner {
  background: var(--blood);
  color: var(--white);
  text-align: center;
  padding: 8px 16px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* === SITE HEADER === */
.site-header {
  background: var(--deep);
  border-bottom: 2px solid var(--blood);
  padding: 0 24px;
}

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

.site-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.site-seal {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--blood);
  border: 2px solid var(--blood-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.site-title-block { line-height: 1.2; }

.site-title {
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.04em;
}

.site-subtitle {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* === NAV === */
.site-nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav a {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
}

.site-nav a:hover,
.site-nav a.active {
  background: var(--blood);
  color: var(--white);
}

/* === HERO === */
.hero {
  position: relative;
  background: var(--deep);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero img.hero-bg {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
  opacity: 0.6;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 20%, rgba(8,8,10,0.95) 100%);
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 24px;
  max-width: var(--max);
  margin: 0 auto;
}

.hero-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blood-lt);
  margin-bottom: 8px;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: normal;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 12px;
}

.hero-sub {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text-dim);
  max-width: 560px;
}

/* No-image hero */
.hero-text-only {
  background: var(--deep);
  border-bottom: 1px solid var(--border);
  padding: 48px 24px 40px;
}

.hero-text-only-inner {
  max-width: var(--max);
  margin: 0 auto;
}

/* === MAIN LAYOUT === */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* === TYPOGRAPHY === */
h2 {
  font-size: 26px;
  font-weight: normal;
  color: var(--white);
  margin: 48px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

h2:first-child { margin-top: 0; }

h3 {
  font-size: 19px;
  font-weight: 600;
  color: var(--glass-lt);
  margin: 32px 0 10px;
  font-family: var(--sans);
}

h4 {
  font-size: 15px;
  font-weight: 700;
  font-family: var(--sans);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 24px 0 8px;
}

p { margin-bottom: 18px; }

p:last-child { margin-bottom: 0; }

em { color: var(--glass-lt); font-style: italic; }

strong { color: var(--white); font-weight: 700; }

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

blockquote {
  border-left: 3px solid var(--blood);
  margin: 28px 0;
  padding: 16px 20px;
  background: var(--panel);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--glass-lt);
}

blockquote footer {
  margin-top: 10px;
  font-style: normal;
  font-size: 14px;
  color: var(--text-dim);
  font-family: var(--sans);
}

/* === BOXES === */
.box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
}

.box-warning {
  background: #1a1008;
  border-color: var(--amber);
  border-left: 4px solid var(--amber);
}

.box-danger {
  background: #180808;
  border-color: var(--blood);
  border-left: 4px solid var(--crimson);
}

.box-law {
  background: #100a14;
  border-color: #6b21a8;
  border-left: 4px solid #9333ea;
}

.box-fact {
  background: var(--panel);
  border-color: var(--glass);
  border-left: 4px solid var(--glass);
}

.box-title {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.box-warning .box-title { color: var(--amber-lt); }
.box-danger  .box-title { color: var(--crimson); }
.box-law     .box-title { color: #a855f7; }
.box-fact    .box-title { color: var(--glass-lt); }

/* === KEY FACTS GRID === */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 28px 0;
}

.fact-cell {
  background: var(--panel);
  padding: 18px 16px;
  text-align: center;
}

.fact-label {
  font-family: var(--sans);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.fact-value {
  font-size: 22px;
  color: var(--white);
  font-weight: 300;
  line-height: 1.2;
}

.fact-value.blood { color: var(--blood-lt); }
.fact-value.amber { color: var(--amber-lt); }

/* === DANGER RATING === */
.danger-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 12px;
}

.danger-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
}

.danger-dot.on { background: var(--crimson); }

.danger-label {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text-dim);
  margin-left: 4px;
}

/* === ROUTE MAP === */
.route-map {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 28px 0;
  overflow-x: auto;
}

.route-map pre {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--glass-lt);
  white-space: pre;
}

.route-map .highlight { color: var(--blood-lt); }

/* === TERRAIN ZONE === */
.terrain-zone {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0;
  margin: 28px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.terrain-badge {
  background: var(--blood);
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--white);
  padding: 16px 8px;
}

.terrain-content {
  background: var(--panel);
  padding: 20px 24px;
}

.terrain-content h3 {
  margin-top: 0;
  margin-bottom: 6px;
}

.terrain-content p { margin-bottom: 10px; }
.terrain-content p:last-child { margin-bottom: 0; }

/* === CHARACTER CARDS === */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 28px 0;
}

.char-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.char-name {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 16px;
  color: var(--white);
  margin-bottom: 2px;
}

.char-title {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--blood-lt);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.char-body {
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.6;
}

.char-card.survived { border-top: 3px solid #16a34a; }
.char-card.perished { border-top: 3px solid var(--blood); }
.char-card.guide    { border-top: 3px solid var(--glass); }

/* === LUME GAUGE === */
.lume-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-family: var(--sans);
  font-size: 14px;
}

.lume-table th {
  background: var(--muted);
  color: var(--glass-lt);
  text-align: left;
  padding: 10px 14px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lume-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

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

.lume-table tr:nth-child(odd) td { background: var(--panel); }
.lume-table tr:nth-child(even) td { background: var(--deep); }

.lume-val { font-weight: 700; }
.lume-safe  { color: #4ade80; }
.lume-warn  { color: var(--amber-lt); }
.lume-danger { color: var(--crimson); }

/* === TOHU SAYINGS === */
.saying {
  margin: 24px 0;
  padding: 20px 24px 20px 28px;
  background: var(--panel);
  border-left: 3px solid var(--glass);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.saying-text {
  font-style: italic;
  color: var(--glass-lt);
  font-size: 18px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.saying-context {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-dim);
}

/* === SECTION CARDS (home page) === */
.section-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.section-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-decoration: none;
  display: block;
  transition: border-color 0.15s, background 0.15s;
}

.section-card:hover {
  border-color: var(--blood-lt);
  background: #161012;
  text-decoration: none;
}

.section-card-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.section-card-title {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.section-card-desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* === IMAGES === */
.img-full {
  width: 100%;
  border-radius: var(--radius);
  display: block;
  margin: 24px 0;
}

.img-caption {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
  margin-top: -16px;
  margin-bottom: 24px;
  font-style: italic;
}

.img-float-right {
  float: right;
  width: 280px;
  margin: 0 0 24px 28px;
  border-radius: var(--radius);
}

/* === FOOTER === */
.site-footer {
  background: var(--deep);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.8;
}

.site-footer a { color: var(--text-dim); }
.site-footer a:hover { color: var(--blood-lt); }

.footer-divider {
  margin: 20px auto;
  border: none;
  border-top: 1px solid var(--border);
  max-width: 300px;
}

/* === BOOK CTA === */
.book-cta {
  background: linear-gradient(135deg, #1a0808 0%, #0f0a00 100%);
  border: 1px solid var(--blood-lt);
  border-radius: var(--radius);
  padding: 32px 28px;
  margin: 32px 0;
  text-align: center;
}

.book-cta-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--blood-lt);
  margin-bottom: 10px;
}

.book-cta-title {
  font-size: 22px;
  color: var(--white);
  margin-bottom: 8px;
  line-height: 1.3;
}

.book-cta-body {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--text-dim);
  margin-bottom: 20px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.book-cta-btn {
  display: inline-block;
  background: var(--blood);
  color: var(--white);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background 0.15s;
}

.book-cta-btn:hover {
  background: var(--blood-lt);
  color: var(--white);
  text-decoration: none;
}

.spoiler-notice {
  background: #0a0a00;
  border: 1px solid #4a4a00;
  border-left: 4px solid var(--amber);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 0 0 32px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
}

.spoiler-notice strong { color: var(--amber-lt); }

/* === UTILITY === */
.blood { color: var(--blood-lt); }
.amber { color: var(--amber-lt); }
.glass { color: var(--glass-lt); }
.dim   { color: var(--text-dim); }
.white { color: var(--white); }

.clearfix::after { content: ''; display: table; clear: both; }

hr.section-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  .site-header-inner { flex-direction: column; align-items: flex-start; }
  .terrain-zone { grid-template-columns: 1fr; }
  .terrain-badge { writing-mode: horizontal-tb; transform: none; padding: 10px 16px; }
  .img-float-right { float: none; width: 100%; margin: 0 0 24px; }
  .char-grid { grid-template-columns: 1fr; }
}
