/* =========================================================
   Pendant's End — single-page site
   Font: Barlow Semi Condensed (the game's main-menu font)
   Palette pulled from the game's main-menu art:
   misty green-black, god-ray gold, warm-moon amber, night blue
   ========================================================= */

:root {
  --bg:        #0a110d;
  --bg-2:      #0e1712;
  --surface:   #14201a;
  --surface-2: #1a2922;
  --line:      rgba(180, 200, 170, 0.12);
  --line-strong: rgba(200, 215, 185, 0.22);

  --text:      #eef3ea;
  --muted:     #9fb0a0;
  --faint:     #74897a;

  --gold:      #e6b86a;   /* god-ray / moonlight */
  --gold-deep: #d29c45;
  --green:     #5f7d5a;
  --night:     #0c1626;   /* night-sky blue from the moon scene */
  --patreon:   #f96854;

  --maxw: 1120px;
  --radius: 14px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.65);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Barlow Semi Condensed", system-ui, -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.08; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.4rem; }
p  { margin: 0; }
a  { color: inherit; text-decoration: none; }

/* ---------- Buttons (minimalist: outlined, highlight on hover) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.82rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line-strong);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
}
.btn:hover,
.btn:focus-visible {
  background: rgba(230, 184, 106, 0.1);
  border-color: var(--gold);
  color: #f4e8cd;
  transform: translateY(-1px);
}
.btn__icon { width: 1.05em; height: 1.05em; }

/* Modifier classes kept for markup compatibility; all share the minimalist look.
   Primary CTAs read a touch stronger via a brighter resting border. */
.btn--gold,
.btn--patreon { border-color: rgba(238, 243, 234, 0.42); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(10, 17, 13, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.nav__links { display: flex; align-items: center; gap: 1.6rem; }
.nav__links a { color: var(--muted); font-weight: 600; transition: color 0.2s; }
.nav__links a:hover { color: var(--text); }
.nav__cta {
  color: var(--text) !important;
  border: 1px solid var(--line-strong);
  padding: 0.45rem 1rem;
  border-radius: 999px;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.nav__cta:hover {
  border-color: var(--gold);
  background: rgba(230, 184, 106, 0.1);
  color: #f4e8cd !important;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 5rem;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: -4%;
  background: url("assets/hero-bg.png") center/cover no-repeat;
  filter: saturate(1.05) brightness(0.92);
  transform: scale(1.05);
}
.hero__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 70% 10%, rgba(230, 184, 106, 0.18), transparent 55%),
    linear-gradient(180deg, rgba(8, 14, 10, 0.55) 0%, rgba(8, 14, 10, 0.4) 35%, rgba(8, 14, 10, 0.92) 92%);
}
.hero__content { position: relative; max-width: 760px; }
.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 1rem;
}
.hero__title {
  font-size: clamp(3rem, 9vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}
.hero__tag {
  margin: 1.25rem auto 0;
  max-width: 560px;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: #dbe5d8;
}
.hero__actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero__note {
  margin-top: 1.6rem;
  color: var(--faint);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.hero__scroll {
  position: absolute;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 1.5rem;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- Section shell ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 6rem 1.5rem;
}
.section--support {
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(230, 184, 106, 0.06), transparent 60%),
    var(--bg-2);
  max-width: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section--support .section__head,
.section--support .tiers,
.section--support .tiers__foot { max-width: var(--maxw); margin-left: auto; margin-right: auto; }

.section__head { max-width: 720px; margin: 0 auto 3.2rem; text-align: center; }
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.9rem;
}
.kicker--center { text-align: center; }
.lede { margin-top: 1.1rem; color: var(--muted); font-size: 1.12rem; }

/* ---------- Feature cards (real gameplay art) ---------- */
.features { display: flex; flex-direction: column; gap: 1.5rem; }

.feature {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.feature:hover { transform: translateY(-4px); border-color: var(--line-strong); }

.feature__media { position: relative; overflow: hidden; background: #0a0f0c; }
.feature__media img {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
  image-rendering: auto;
}
.feature__media--sm { aspect-ratio: 16 / 9; }

.feature__body { padding: 1.5rem 1.6rem 1.8rem; }
.feature__body h3 { margin-bottom: 0.5rem; }
.feature__body p { color: var(--muted); font-size: 1rem; }
.feature__tag {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.7rem;
}

/* Lead card: bigger, image beside text, gently emphasized */
.feature--lead {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: stretch;
  border-color: rgba(230, 184, 106, 0.32);
}
.feature--lead .feature__media { min-height: 320px; }
.feature--lead .feature__body { align-self: center; padding: 2.4rem; }
.feature--lead h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.feature--lead .feature__body p { font-size: 1.08rem; }

/* Two supporting cards */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.feature-row .feature { display: flex; flex-direction: column; }
.feature-row .feature__body { flex: 1; }

/* Icon cards: real pixel-art glyphs from the game's main menu */
.feature--icon .feature__icon {
  width: 64px; height: 64px;
  margin: 1.7rem 1.6rem 0;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(230, 184, 106, 0.08);
  border: 1px solid var(--line);
}
.feature--icon .feature__icon img {
  width: 38px; height: 38px;
  object-fit: contain;
  image-rendering: pixelated; /* keep the pixel art crisp */
}
.feature--icon .feature__body { padding-top: 1.1rem; }

/* ---------- Gameplay reel dividers ---------- */
.reel {
  position: relative;
  width: 100%;
  height: clamp(280px, 34vw, 440px);
  overflow: hidden;
  background-color: #0a0f0c;
  background-position: center 44%;
  background-size: cover;
  background-repeat: no-repeat;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
/* Per-divider poster (fallback + reduced-motion still) */
.reel--traverse { background-image: url("assets/traverse-poster.jpg"); }
.reel--skyline  { background-image: url("assets/skyline-poster.jpg"); }
.reel__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 44%;
}
.reel__veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg) 0%, transparent 9%, transparent 91%, var(--bg) 100%),
    linear-gradient(180deg, rgba(8, 14, 10, 0.28), rgba(8, 14, 10, 0.12) 40%, rgba(8, 14, 10, 0.28));
}

/* ---------- Tiers ---------- */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  align-items: stretch;
}
.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.7rem;
  box-shadow: var(--shadow);
}
.tier--featured {
  border-color: rgba(230, 184, 106, 0.5);
  background: linear-gradient(180deg, var(--surface-2), var(--bg-2));
  box-shadow: 0 22px 50px -20px rgba(230, 184, 106, 0.35);
}
.tier__flag {
  position: absolute;
  top: -0.8rem; left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  color: var(--gold);
  border: 1px solid rgba(230, 184, 106, 0.45);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
}
.tier__head { margin-bottom: 1rem; }
.tier__price { margin-top: 0.3rem; color: var(--muted); font-weight: 600; }
.tier__price span { color: var(--text); font-size: 2.1rem; font-weight: 800; }
.tier__blurb { color: var(--muted); font-size: 1rem; }
.tier__perks {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 1.8rem;
  display: grid;
  gap: 0.7rem;
  flex: 1;
}
.tier__perks li {
  position: relative;
  padding-left: 1.6rem;
  color: #d4ddcf;
  font-size: 0.98rem;
}
.tier__perks li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 0.6rem; height: 0.6rem;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  border-radius: 1px;
}
.tier .btn { width: 100%; }
.tiers__foot { text-align: center; margin-top: 2.4rem; color: var(--muted); }
.tiers__foot a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Waitlist ---------- */
.waitlist {
  position: relative;
  padding: 6.5rem 1.5rem;
  text-align: center;
  overflow: hidden;
}
.waitlist__bg {
  position: absolute;
  inset: 0;
  background: url("assets/area1.png") center/cover no-repeat;
  filter: brightness(0.7);
}
.waitlist__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 14, 26, 0.55), rgba(8, 12, 20, 0.85));
}
.waitlist__inner { position: relative; max-width: 620px; margin: 0 auto; }
.waitlist__lede { margin: 1rem auto 2rem; color: #c5d0df; }
.waitlist__form { margin: 0 auto; }
.field {
  display: flex;
  gap: 0.6rem;
  background: rgba(8, 14, 26, 0.5);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.4rem 0.4rem 0.4rem 0.4rem;
}
.field input[type="email"] {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 1.05rem;
  padding: 0.6rem 1rem;
  min-width: 0;
}
.field input::placeholder { color: var(--faint); }
.waitlist__fineprint { margin-top: 0.9rem; color: var(--muted); font-size: 0.88rem; }
.waitlist__success {
  position: relative;
  margin-top: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gold);
}
.hidden-field { position: absolute; left: -5000px; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
  padding: 2.6rem 1.5rem 2rem;
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer__brand { font-weight: 800; font-size: 1.15rem; }
.footer__by { color: var(--faint); font-size: 0.95rem; }
.footer__links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer__links a { color: var(--muted); font-weight: 600; }
.footer__links a:hover { color: var(--gold); }
.footer__copy {
  max-width: var(--maxw);
  margin: 1.6rem auto 0;
  color: var(--faint);
  font-size: 0.85rem;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .feature--lead { grid-template-columns: 1fr; }
  .feature--lead .feature__media { min-height: 0; aspect-ratio: 16 / 9; }
  .feature--lead .feature__body { padding: 1.6rem 1.6rem 1.9rem; }
  .feature-row { grid-template-columns: 1fr; }
  .tiers  { grid-template-columns: 1fr; max-width: 460px; }
  .tier--featured { order: -1; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .nav__links a:not(.nav__cta) { display: none; }
  .field { flex-direction: column; border-radius: 18px; padding: 0.6rem; }
  .field .btn { width: 100%; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .section { padding: 4.5rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; animation: none !important; transition: none !important; }
  /* Show the static poster instead of the looping clip. */
  .reel__video { display: none; }
}
