/* ============================================================
   Lost in Labyrinth — Landing Page Styles
   Monochrome newspaper-maze aesthetic matching the game
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --black: #000000;
  --white: #ffffff;
  --gray: #888888;
  --dark-gray: #444444;
  --light-gray: #aaaaaa;
  --dim: #555555;
  --gold: #ffd700;
  --copper: #b87333;
  --metallic: #aaaaaa;
  --lava: #ff4400;
  --poison: #00cc44;
  --water: #4488ff;
  --potion-green: #00cc66;
  --voracious: #9933cc;
  --pendant-gem: #aa44ff;
  --heart-pendant: #cc3344;
  --parchment: #f5e6c8;
  --elemental: #8899aa;
  --key-pendant: #dddddd;

  --font: 'Courier New', Courier, monospace;
  --border-margin: 20px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--white);
  text-decoration: none;
}

/* --- Maze Background Canvas --- */
#maze-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
}

/* --- Corner Ornaments (game-style L-shapes) --- */
.corner-ornament {
  position: fixed;
  z-index: 100;
  pointer-events: none;
}
.corner-ornament::before,
.corner-ornament::after {
  content: '';
  position: absolute;
  background: var(--white);
  opacity: 0.2;
}
.top-left { top: 15px; left: 15px; }
.top-left::before { width: 30px; height: 1px; top: 0; left: 0; }
.top-left::after { width: 1px; height: 30px; top: 0; left: 0; }

.top-right { top: 15px; right: 15px; }
.top-right::before { width: 30px; height: 1px; top: 0; right: 0; }
.top-right::after { width: 1px; height: 30px; top: 0; right: 0; }

.bottom-left { bottom: 15px; left: 15px; }
.bottom-left::before { width: 30px; height: 1px; bottom: 0; left: 0; }
.bottom-left::after { width: 1px; height: 30px; bottom: 0; left: 0; }

.bottom-right { bottom: 15px; right: 15px; }
.bottom-right::before { width: 30px; height: 1px; bottom: 0; right: 0; }
.bottom-right::after { width: 1px; height: 30px; bottom: 0; right: 0; }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}
.nav.visible {
  transform: translateY(0);
}
.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 16px;
  color: var(--parchment);
  letter-spacing: 2px;
  font-weight: bold;
  text-shadow: 0 0 6px rgba(245, 230, 200, 0.15);
}
.nav-links {
  display: flex;
  gap: 22px;
}
.nav-links a {
  font-size: 14px;
  color: var(--light-gray);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: color 0.25s, text-shadow 0.25s;
}
.nav-links a:hover {
  color: var(--white);
  text-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}
.hero-border {
  position: absolute;
  inset: var(--border-margin);
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.hero-content {
  position: relative;
}
.hero-subtitle {
  font-size: 14px;
  color: var(--gray);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 0;
}
.hero-title span {
  display: block;
  font-size: 28px;
  font-weight: normal;
  letter-spacing: 6px;
  text-transform: uppercase;
}
.hero-title-main {
  font-size: 44px !important;
  letter-spacing: 8px !important;
  animation: title-float 3s ease-in-out infinite;
}
@keyframes title-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.hero-line {
  width: 200px;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
  margin: 24px auto;
}
.hero-tagline {
  font-size: 16px;
  color: var(--light-gray);
  letter-spacing: 1px;
  margin-bottom: 40px;
}
.hero-soul {
  margin: 0 auto 36px;
  width: 80px;
  height: 80px;
}
#soul-canvas {
  display: block;
}
.hero-hint {
  font-size: 13px;
  color: var(--dim);
  margin-top: 16px;
}

/* --- About Section --- */
.section-about {
  padding: 80px 24px 60px;
}
.about-content {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.about-text {
  font-size: 15px;
  color: var(--light-gray);
  line-height: 1.8;
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}
.about-genre {
  font-size: 14px;
  color: var(--parchment);
  line-height: 1.7;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-style: italic;
  letter-spacing: 0.5px;
}

/* --- CTA Button --- */
.hero-buttons,
.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.cta-button {
  display: inline-block;
  font-family: var(--font);
  font-size: 16px;
  letter-spacing: 3px;
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 14px 40px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-transform: uppercase;
}
.cta-button:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--white);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.08);
}
.cta-button-download {
  border-color: rgba(180, 160, 120, 0.5);
  color: #d4b876;
}
.cta-button-download:hover {
  border-color: #d4b876;
  color: #f0e6c8;
  box-shadow: 0 0 20px rgba(212, 184, 118, 0.1);
}
.cta-button-large {
  font-size: 18px;
  padding: 18px 50px;
}

/* --- Sections --- */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
}
.section-alt {
  background: rgba(255, 255, 255, 0.015);
}
.section-inner {
  max-width: 900px;
  margin: 0 auto;
}
.section-title {
  text-align: center;
  font-size: 24px;
  font-weight: normal;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-line {
  width: 120px;
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
  margin: 0 auto 40px;
}
.section-desc {
  text-align: center;
  font-size: 15px;
  color: var(--gray);
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Features Grid --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 36px;
}
.feature-card {
  text-align: center;
  padding: 28px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.3s, background 0.3s;
}
.feature-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
}
.feature-icon {
  display: block;
  margin: 0 auto 16px;
}
.feature-card h3 {
  font-size: 15px;
  font-weight: normal;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.feature-card p {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.7;
}

/* --- Mechanics --- */
.mechanics-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.mechanic-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.3s, background 0.3s;
}
.mechanic-row:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.015);
}
.mechanic-icon-wrap {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.mechanic-icon {
  display: block;
}
.mechanic-info h3 {
  font-size: 15px;
  font-weight: normal;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.mechanic-info p {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.7;
}

/* --- Hazards --- */
.hazards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
}
.hazard-card {
  text-align: center;
  padding: 32px 20px 28px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.3s, background 0.3s;
  position: relative;
}
.hazard-card:hover {
  background: rgba(255, 255, 255, 0.02);
}
.hazard-card[data-hazard="water"]:hover { border-color: rgba(68, 136, 255, 0.3); }
.hazard-card[data-hazard="lava"]:hover { border-color: rgba(255, 68, 0, 0.3); }
.hazard-card[data-hazard="poison"]:hover { border-color: rgba(0, 204, 68, 0.3); }
.hazard-card[data-hazard="spikes"]:hover { border-color: rgba(136, 136, 136, 0.3); }
.hazard-card[data-hazard="bats"]:hover { border-color: rgba(255, 0, 0, 0.3); }

.hazard-icon {
  display: block;
  margin: 0 auto 14px;
}
.hazard-card h3 {
  font-size: 16px;
  font-weight: normal;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.hazard-level {
  display: inline-block;
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 1px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  margin-bottom: 12px;
}
.hazard-card p {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.7;
}

/* --- Shop --- */
.shop-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.shop-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: border-color 0.3s, background 0.3s;
}
.shop-item:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
}
.shop-icon {
  display: block;
  flex-shrink: 0;
}
.shop-item-info {
  flex: 1;
  min-width: 0;
}
.shop-item-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.shop-item-header h3 {
  font-size: 15px;
  font-weight: normal;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}
.shop-price {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  color: var(--light-gray);
  letter-spacing: 1px;
  white-space: nowrap;
  flex-shrink: 0;
}
.coin-tiny {
  display: inline-block;
  vertical-align: middle;
}
.shop-max {
  font-size: 12px;
  color: var(--dim);
}
.shop-item-info p {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.6;
}

/* --- Shop Item Badges --- */
.shop-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.shop-badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 1px 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.badge-durability {
  color: var(--light-gray);
  border-color: rgba(170, 170, 170, 0.3);
}
.badge-consumable {
  color: var(--potion-green);
  border-color: rgba(0, 204, 102, 0.3);
}
.badge-permanent {
  color: var(--gold);
  border-color: rgba(255, 215, 0, 0.25);
}
.shop-charges {
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.5px;
}

/* --- Manuscripts --- */
.manuscripts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}
.manuscript-card {
  text-align: center;
  padding: 28px 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.3s, background 0.3s;
}
.manuscript-card:hover {
  border-color: rgba(245, 230, 200, 0.2);
  background: rgba(255, 255, 255, 0.02);
}
.manuscript-icon {
  display: block;
  margin: 0 auto 16px;
}
.manuscript-card h3 {
  font-size: 15px;
  font-weight: normal;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.manuscript-card p {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.7;
}

/* --- Controls --- */
.controls-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
}
.control-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.key-cap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
  width: 72px;
}
.key-cap.single {
  width: auto;
}
.key-arrow, .key-cap.single, .esc-key {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s, background 0.2s;
}
.esc-key {
  width: auto;
  padding: 0 10px;
  font-size: 11px;
}
.control-item:hover .key-arrow,
.control-item:hover .key-cap.single,
.control-item:hover .esc-key {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
}
.control-label {
  font-size: 13px;
  color: var(--gray);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* --- CTA Section --- */
.section-cta {
  text-align: center;
  padding: 120px 24px;
  background: rgba(255, 255, 255, 0.02);
}
.cta-text {
  font-size: 22px;
  letter-spacing: 2px;
  margin-bottom: 32px;
  color: var(--light-gray);
}
.cta-sub {
  font-size: 14px;
  color: var(--dim);
  margin-top: 20px;
}

/* --- Footer --- */
.footer {
  position: relative;
  z-index: 1;
  padding: 40px 24px;
  text-align: center;
}
.footer-inner {
  max-width: 900px;
  margin: 0 auto;
}
.footer-line {
  width: 60px;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 auto 20px;
}
.footer-credit {
  font-size: 13px;
  color: var(--dim);
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.footer-tech {
  font-size: 12px;
  color: var(--dark-gray);
  letter-spacing: 1px;
}
.footer-link {
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}
.footer-link:hover {
  color: #d4b876;
}
.footer-cookie-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.2s;
}
.footer-cookie-link:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* --- Fade-in Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero-title span {
    font-size: 22px;
    letter-spacing: 4px;
  }
  .hero-title-main {
    font-size: 32px !important;
    letter-spacing: 5px !important;
  }
  .section {
    padding: 72px 16px;
  }
  .section-title {
    font-size: 20px;
    letter-spacing: 3px;
  }
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
  }
  .mechanic-row {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }
  .shop-item {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .shop-item-header {
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  .shop-item-meta {
    justify-content: center;
  }
  .nav-links {
    gap: 14px;
  }
  .nav-links a {
    font-size: 12px;
    letter-spacing: 1px;
  }
  .nav-logo {
    font-size: 14px;
    letter-spacing: 1px;
  }
  .controls-grid {
    gap: 20px;
  }
  .cta-button {
    font-size: 14px;
    padding: 12px 28px;
  }
  .cta-button-large {
    font-size: 16px;
    padding: 14px 32px;
  }
  .hero-buttons,
  .cta-buttons {
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .hero-title span {
    font-size: 18px;
  }
  .hero-title-main {
    font-size: 26px !important;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .hazards-grid {
    grid-template-columns: 1fr 1fr;
  }
  .manuscripts-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .hero-buttons,
  .cta-buttons {
    flex-direction: column;
    gap: 10px;
  }
  .cta-button {
    font-size: 13px;
    padding: 12px 24px;
    width: 100%;
    max-width: 280px;
    text-align: center;
  }
  .cta-button-large {
    font-size: 14px;
    padding: 14px 24px;
    max-width: 320px;
  }
}

/* --- Cookie Consent Banner --- */
.cookie-banner {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  justify-content: center;
  padding: 0 20px;
  pointer-events: none;
}
.cookie-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 820px;
  width: 100%;
  padding: 16px 24px;
  margin-bottom: 20px;
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.5);
  font-family: 'Courier New', Courier, monospace;
}
.cookie-text {
  flex: 1;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.5px;
  line-height: 1.5;
  margin: 0;
}
.cookie-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.cookie-btn {
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 8px 18px;
  border: 1px solid;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.cookie-btn-accept {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
}
.cookie-btn-accept:hover {
  background: #ffffff;
  color: #000000;
}
.cookie-btn-reject {
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.15);
}
.cookie-btn-reject:hover {
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 600px) {
  .cookie-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 14px 18px;
    margin-bottom: 12px;
  }
  .cookie-buttons {
    justify-content: center;
  }
}
