/* ============================================================
   Nether Tree Games — Prophecy Island
   Dark fantasy theme drawn from the game's key art:
   deep purples, glowing ember orange, parchment cream.
   ============================================================ */

:root {
  --bg: #14091d;
  --bg-2: #1e0e2b;
  --panel: #261238;
  --panel-2: #2f1745;
  --line: #3d2158;
  --ink: #f3ead8;
  --muted: #c3b2d4;
  --accent: #f59422;
  --accent-hot: #ff7847;
  --glow: rgba(245, 148, 34, 0.35);
  --font-display: "Cinzel Decorative", serif;
  --font-body: "Alegreya Sans", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.06rem;
  line-height: 1.65;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hot); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

.section { padding: 5rem 0; }

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  text-align: center;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.section-title::after {
  content: "";
  display: block;
  width: 90px;
  height: 3px;
  margin: 0.9rem auto 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 2px;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  max-width: 44rem;
  margin: 0 auto 3rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.7rem;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn svg { flex: none; }

.btn-primary {
  background: linear-gradient(180deg, var(--accent), #d97a10);
  color: #1c0f04;
  box-shadow: 0 4px 24px var(--glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--glow);
  color: #1c0f04;
}

.btn-ghost {
  background: rgba(20, 9, 29, 0.55);
  border-color: var(--accent);
  color: var(--ink);
  backdrop-filter: blur(4px);
}

.btn-ghost:hover { background: rgba(245, 148, 34, 0.15); color: var(--ink); }

.btn-discord {
  background: #5865f2;
  color: #fff;
}

.btn-discord:hover { background: #6b76ff; color: #fff; transform: translateY(-2px); }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.nav.scrolled {
  background: rgba(20, 9, 29, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.45);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.8rem 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--ink);
  white-space: nowrap;
}

.brand:hover { color: var(--accent); }

.brand svg { width: 30px; height: 30px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-left: auto;
  list-style: none;
}

.nav-links a { color: var(--ink); font-weight: 500; }
.nav-links a:hover { color: var(--accent); }

.nav-cta { padding: 0.5rem 1.1rem; font-size: 0.95rem; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  padding: 0.4rem;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(180deg, rgba(20, 9, 29, 0.25) 0%, rgba(20, 9, 29, 0.05) 35%, rgba(20, 9, 29, 0.55) 78%, var(--bg) 100%),
    url("../assets/img/key-art.jpg") center top / cover no-repeat;
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 0 1.25rem 9vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.3rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(20, 9, 29, 0.75);
  border: 1px solid var(--accent);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-weight: 600;
  font-size: 0.95rem;
  backdrop-filter: blur(4px);
}

.hero-badge .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-tag {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  color: var(--ink);
  max-width: 42rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
  text-wrap: balance;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%);
  color: var(--muted);
  animation: bob 2.2s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- Trailer ---------- */

.trailer-frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.55), 0 0 80px rgba(245, 148, 34, 0.07);
  background: #000;
}

.trailer-frame video { width: 100%; aspect-ratio: 16 / 9; }

/* ---------- Features ---------- */

.features {
  background:
    radial-gradient(1200px 500px at 50% 0%, rgba(139, 74, 190, 0.12), transparent 70%),
    var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pitch {
  max-width: 46rem;
  margin: 0 auto 3.2rem;
  text-align: center;
  font-size: 1.15rem;
  color: var(--ink);
}

.pitch strong { color: var(--accent); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.3rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.6rem 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.card-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(245, 148, 34, 0.12);
  border: 1px solid rgba(245, 148, 34, 0.4);
  margin-bottom: 1rem;
  color: var(--accent);
}

.card h3 { font-family: var(--font-body); font-size: 1.15rem; font-weight: 800; margin-bottom: 0.5rem; }

.card p { color: var(--muted); font-size: 0.98rem; }

/* ---------- Gallery ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.shot {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
  padding: 0;
  background: var(--panel);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.shot:hover { border-color: var(--accent); transform: translateY(-3px); }
.shot:hover img { transform: scale(1.04); }

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 4, 16, 0.92);
  padding: 2rem;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: min(1200px, 100%);
  max-height: 82vh;
  border-radius: 10px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8);
}

.lightbox-caption {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
  width: 90%;
}

.lightbox button {
  position: absolute;
  background: rgba(38, 18, 56, 0.8);
  border: 1px solid var(--line);
  color: var(--ink);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.lightbox button:hover { border-color: var(--accent); color: var(--accent); }

.lb-close { top: 1.2rem; right: 1.2rem; }
.lb-prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1.2rem; top: 50%; transform: translateY(-50%); }

/* ---------- Studio ---------- */

.studio {
  background:
    radial-gradient(900px 400px at 50% 100%, rgba(245, 148, 34, 0.07), transparent 70%),
    var(--bg-2);
  border-top: 1px solid var(--line);
}

.studio-box {
  display: flex;
  gap: 2.2rem;
  align-items: center;
  max-width: 56rem;
  margin: 0 auto;
}

.studio-tree { flex: none; width: 110px; height: 110px; }

.studio-text p { color: var(--muted); margin-bottom: 0.9rem; }
.studio-text p strong { color: var(--ink); }

/* ---------- CTA band ---------- */

.cta-band {
  text-align: center;
  padding: 5rem 1.25rem;
  background:
    linear-gradient(180deg, rgba(20, 9, 29, 0.88), rgba(20, 9, 29, 0.88)),
    url("../assets/screenshots/web/caves.jpg") center / cover no-repeat;
  border-top: 1px solid var(--line);
}

.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 0.7rem; }
.cta-band p { color: var(--muted); margin-bottom: 1.8rem; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */

.footer {
  padding: 2.8rem 1.25rem 2.2rem;
  border-top: 1px solid var(--line);
  background: #0f0716;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  text-align: center;
}

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

.socials a {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color 0.15s, border-color 0.15s, transform 0.15s;
}

.socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; font-size: 0.95rem; }

.footer small { color: var(--muted); font-size: 0.85rem; }

/* ---------- Press page ---------- */

.press-header {
  padding: 8rem 0 3rem;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(20, 9, 29, 0.8), var(--bg)),
    url("../assets/img/key-art.jpg") center 20% / cover no-repeat;
}

.press-header h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.press-header p { color: var(--muted); margin-top: 0.6rem; }

.press-section { padding: 2.6rem 0; border-bottom: 1px solid var(--line); }

.press-section h2 {
  font-size: 1.45rem;
  margin-bottom: 1.2rem;
  color: var(--accent);
}

.press-section h3 { font-family: var(--font-body); font-size: 1.1rem; margin: 1.4rem 0 0.5rem; }

.press-section p, .press-section li { color: var(--muted); }
.press-section ul { padding-left: 1.3rem; margin: 0.5rem 0 1rem; }

.factsheet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.4rem 2rem;
  list-style: none;
  padding: 0 !important;
}

.factsheet li { padding: 0.45rem 0; border-bottom: 1px dashed var(--line); }
.factsheet strong { color: var(--ink); display: inline-block; min-width: 7.5rem; }

.press-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.press-gallery figure { margin: 0; }

.press-gallery img { border-radius: 8px; border: 1px solid var(--line); aspect-ratio: 16/9; object-fit: cover; width: 100%; }

.press-gallery figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 0.35rem; }

.press-gallery figcaption a { font-weight: 600; }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue, .hero-badge .dot { animation: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .section { padding: 3.5rem 0; }

  .nav-toggle { display: block; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(20, 9, 29, 0.97);
    border-bottom: 1px solid var(--line);
    display: none;
    padding: 0.5rem 0;
  }

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

  .nav-links li { text-align: center; }
  .nav-links a { display: block; padding: 0.9rem; }
  .nav-links .nav-cta { margin: 0.6rem auto; display: inline-flex; }

  .studio-box { flex-direction: column; text-align: center; }

  .hero {
    background:
      linear-gradient(180deg, rgba(20, 9, 29, 0.2) 0%, rgba(20, 9, 29, 0.5) 70%, var(--bg) 100%),
      url("../assets/img/key-art.jpg") center 30% / cover no-repeat;
  }
}
