/* ==========================================================================
   A Monk's Quest — site styles
   Layout modeled loosely on playstarbound.com: fixed dark nav, full-bleed
   hero that fades into a near-black page, and a narrow centered column of
   framed "panels".
   ========================================================================== */

:root {
  /* palette pulled from the game art */
  --bg:        #0a0c11;
  --bg-2:      #10141c;
  --panel:     #141924;
  --panel-2:   #1a2130;
  --border:    #2a3245;
  --border-hi: #3d4860;
  --sky:       #2c3549;

  --cream:     #f3dcb0;   /* logo colour */
  --cream-2:   #e6c896;
  --glow:      #f6b56c;   /* lantern orange used on banner captions */
  --text:      #d3cfc6;
  --muted:     #8e8a82;

  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-serif:   "Cormorant Garamond", Georgia, serif;
  --font-body:    "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --col: 900px;          /* main content column */
  --nav-h: 60px;
  --radius: 10px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cream); text-decoration: none; }
a:hover { color: #fff; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
strong { color: #efe9dc; font-weight: 700; }
em { font-style: italic; color: #e8e2d6; }

:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; border-radius: 3px; }

/* --------------------------------------------------------------------------
   Shared bits
   -------------------------------------------------------------------------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 20px 50px -20px rgba(0,0,0,.8);
}

.section-head { text-align: center; max-width: var(--col); margin: 0 auto 36px; padding: 0 20px; }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cream);
  margin: 0 0 14px;
  position: relative;
  display: inline-block;
  padding-bottom: 14px;
}
.section-title::after {
  content: "";
  position: absolute; left: 50%; bottom: 0;
  width: 56px; height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--cream-2), transparent);
}

.lede {
  font-size: 17px;
  color: var(--text);
  max-width: 720px;
  margin: 0 auto;
}

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  line-height: 1;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--steam {
  color: #0d0f14;
  background: linear-gradient(180deg, #f6dfb4 0%, #e5c690 100%);
  box-shadow: 0 0 0 1px rgba(0,0,0,.5), 0 6px 18px -6px rgba(246,181,108,.55);
}
.btn--steam:hover { color: #0d0f14; background: linear-gradient(180deg, #fbe8c4 0%, #edd0a0 100%); box-shadow: 0 0 0 1px rgba(0,0,0,.5), 0 10px 26px -8px rgba(246,181,108,.75); }

.btn--ghost {
  color: var(--cream);
  border: 1px solid rgba(243,220,176,.45);
  background: rgba(10,12,17,.35);
  backdrop-filter: blur(4px);
}
.btn--ghost:hover { border-color: var(--cream); background: rgba(243,220,176,.08); }

.btn--lg { padding: 16px 30px; font-size: 14px; }

.text-link { font-weight: 700; letter-spacing: .02em; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Nav
   -------------------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(8,10,14,.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.05);
  transition: background .3s ease;
}
.nav.is-scrolled { background: rgba(8,10,14,.94); }

.nav__inner {
  max-width: 1200px; height: 100%;
  margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}

.nav__brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--cream);
  white-space: nowrap;
}
.nav__brand img { image-rendering: pixelated; }

.nav__menu { display: flex; align-items: center; gap: 28px; }

.nav__links, .nav__social { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
.nav__links { gap: 4px; }
.nav__links a {
  display: block; padding: 8px 12px;
  font-family: var(--font-display); font-weight: 600; font-size: 12px;
  letter-spacing: .14em; text-transform: uppercase;
  color: #b9b3a6;
  position: relative;
  transition: color .15s ease;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--cream); }
.nav__links a.is-active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 1px; background: var(--cream-2);
}
.nav__links a.nav__cta {
  color: var(--glow);
}
.nav__links a.nav__cta:hover { color: #ffd9a8; }

.nav__social { gap: 2px; padding-left: 18px; border-left: 1px solid rgba(255,255,255,.1); }
.nav__social a { display: grid; place-items: center; width: 32px; height: 32px; color: #b9b3a6; border-radius: 4px; }
.nav__social a:hover { color: var(--cream); }
.nav__social svg { width: 16px; height: 16px; fill: currentColor; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav__toggle span { display: block; width: 22px; height: 2px; background: var(--cream); transition: transform .2s, opacity .2s; }

@media (max-width: 860px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(8,10,14,.97);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 20px;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform .2s ease, opacity .2s ease;
  }
  .nav.is-open .nav__menu { transform: none; opacity: 1; pointer-events: auto; }
  .nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav__links { flex-direction: column; align-items: stretch; }
  .nav__links a { padding: 12px 4px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.05); }
  .nav__links a.is-active::after { display: none; }
  .nav__social { padding: 14px 0 0; border-left: 0; justify-content: center; gap: 10px; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: clamp(560px, 78vh, 800px);
  display: grid; place-items: center;
  padding: calc(var(--nav-h) + 40px) 20px 120px;
  overflow: hidden;
  isolation: isolate;
}

.hero__art {
  position: absolute; inset: 0; z-index: -2;
  background: var(--sky) url("../assets/img/hero.webp") 42% 100% / cover no-repeat;
  image-rendering: auto;
  animation: hero-drift 40s ease-in-out infinite alternate;
}
@keyframes hero-drift {
  from { transform: scale(1.02) translateX(-0.6%); }
  to   { transform: scale(1.06) translateX(0.6%); }
}
@media (prefers-reduced-motion: reduce) { .hero__art { animation: none; } }

/* Feathered edges: the Starbound page's hero melts into black on every side */
.hero__art::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,12,17,.5) 0%, rgba(10,12,17,0) 20%, rgba(10,12,17,0) 68%, rgba(10,12,17,.6) 90%, var(--bg) 100%),
    radial-gradient(130% 100% at 50% 45%, rgba(10,12,17,0) 50%, rgba(10,12,17,.5) 88%, var(--bg) 100%);
}

.hero__content { text-align: center; max-width: 820px; }

.hero__logo {
  width: min(680px, 88vw);
  margin: 0 auto 22px;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,.6)) drop-shadow(0 0 40px rgba(243,220,176,.18));
}

.hero__tagline {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.45;
  color: #efe6d4;
  text-shadow: 0 2px 14px rgba(0,0,0,.8);
  margin: 0 0 28px;
}

.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero__release {
  margin: 22px 0 0;
  font-family: var(--font-display); font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--cream-2); opacity: .85;
  text-shadow: 0 1px 8px rgba(0,0,0,.8);
}

/* --------------------------------------------------------------------------
   Quick tiles
   -------------------------------------------------------------------------- */
.tiles { max-width: var(--col); margin: -40px auto 0; padding: 0 20px; position: relative; z-index: 2; }

.panel--tiles {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding: 8px;
  background: var(--panel-2);
}

.tile {
  position: relative; display: block;
  aspect-ratio: 4 / 3;
  border-radius: 6px; overflow: hidden;
  background: var(--panel);
  color: #fff; text-align: left;
  padding: 0;
  isolation: isolate;
  transition: transform .2s ease;
}
.tile__bg {
  /* box is 15% taller than the tile and shifted up so the in-game HUD is clipped off the top */
  position: absolute; top: -15%; left: 0; z-index: -1;
  width: 100%; height: 115%; object-fit: cover; object-position: center;
  transition: transform .35s ease;
}
.tile:hover .tile__bg { transform: scale(1.04); }
.tile::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.15) 45%, rgba(0,0,0,.85) 100%);
  transition: background .2s ease;
}
.tile::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  border: 1px solid rgba(255,255,255,.06); border-radius: 6px;
  pointer-events: none;
}
.tile:hover { transform: translateY(-2px); color: #fff; }
.tile:hover::before { background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.05) 45%, rgba(0,0,0,.8) 100%); }

.tile__label {
  position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(15px, 2vw, 20px); letter-spacing: .1em; text-transform: uppercase; line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0,0,0,.9);
  color: var(--cream);
}
.tile__label small {
  display: block; font-size: 10px; letter-spacing: .22em; font-weight: 600; color: #cdc6b7; margin-bottom: 4px;
}

.tile__play {
  position: absolute; left: 50%; top: 42%; z-index: 1;
  width: 60px; height: 60px; transform: translate(-50%, -50%);
  border-radius: 50%; border: 2px solid rgba(243,220,176,.8);
  background: rgba(10,12,17,.45);
  transition: transform .2s ease, background .2s ease;
}
.tile__play::after {
  content: ""; position: absolute; left: 55%; top: 50%; transform: translate(-50%, -50%);
  border-style: solid; border-width: 11px 0 11px 19px; border-color: transparent transparent transparent var(--cream);
}
.tile:hover .tile__play { transform: translate(-50%, -50%) scale(1.08); background: rgba(243,220,176,.18); }

@media (max-width: 640px) {
  .tiles { margin-top: -20px; }
  .panel--tiles { grid-template-columns: 1fr; }
  .tile { aspect-ratio: 16 / 7; }
  .tile__play { top: 50%; }
}

/* --------------------------------------------------------------------------
   About / features
   -------------------------------------------------------------------------- */
.about { padding: 90px 0 30px; }

.feature {
  max-width: var(--col);
  margin: 0 auto 34px;
  padding: 10px 10px 36px;
  text-align: center;
  overflow: hidden;
}
.feature__img { width: 100%; border-radius: 8px; }

.feature__body { max-width: 720px; margin: 0 auto; padding: 24px 18px 0; }

/* The banner art already carries the headline in glowing type, so the
   <h3> is kept for screen readers / SEO but hidden visually. */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.feature__body p { margin: 0; font-size: 17px; }

@media (max-width: 640px) {
  .about { padding-top: 64px; }
  .feature { padding: 8px 8px 28px; margin-left: 12px; margin-right: 12px; }
  .feature__body { padding: 20px 6px 0; }
}

/* --------------------------------------------------------------------------
   Media / gallery
   -------------------------------------------------------------------------- */
.media { padding: 60px 0 40px; }

.gallery {
  max-width: var(--col);
  margin: 0 auto;
  padding: 8px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 20px 50px -20px rgba(0,0,0,.8);
}
@media (max-width: 940px) { .gallery { margin-left: 20px; margin-right: 20px; } }
@media (max-width: 640px) { .gallery { grid-template-columns: repeat(2, 1fr); margin-left: 12px; margin-right: 12px; } }

.gallery__item {
  display: block; position: relative; overflow: hidden; border-radius: 5px;
  background: var(--panel);
  aspect-ratio: 16 / 9;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease, filter .35s ease; filter: brightness(.92); }
.gallery__item::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  border-radius: 5px; pointer-events: none;
}
.gallery__item:hover img { transform: scale(1.04); filter: brightness(1.05); }

/* --------------------------------------------------------------------------
   News
   -------------------------------------------------------------------------- */
.news { padding: 60px 0 40px; }
.news__panel { max-width: var(--col); margin: 0 auto; padding: 34px 40px; }
@media (max-width: 940px) { .news__panel { margin-left: 20px; margin-right: 20px; padding: 28px 24px; } }

.post time { display: block; font-family: var(--font-display); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.post h3 { font-family: var(--font-serif); font-weight: 600; font-size: 28px; line-height: 1.15; color: var(--cream); margin: 0 0 12px; }
.post p { margin: 0 0 14px; }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */
.cta {
  margin: 60px 0 0;
  padding: 90px 20px;
  position: relative; isolation: isolate;
  background: var(--sky) url("../assets/img/hero.webp") center 100% / cover no-repeat;
  text-align: center;
}
.cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(10,12,17,.55) 25%, rgba(10,12,17,.55) 75%, var(--bg) 100%),
    radial-gradient(60% 80% at 50% 50%, rgba(10,12,17,.2), rgba(10,12,17,.75));
}
.cta__inner { max-width: 640px; margin: 0 auto; }
.cta__icon { margin: 0 auto 16px; image-rendering: pixelated; opacity: .9; filter: drop-shadow(0 4px 10px rgba(0,0,0,.6)); }
.cta__title {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 4vw, 36px);
  letter-spacing: .14em; text-transform: uppercase; color: var(--cream);
  margin: 0 0 6px; text-shadow: 0 2px 16px rgba(0,0,0,.8);
}
.cta__sub { font-family: var(--font-serif); font-size: 22px; color: var(--cream-2); margin: 0 0 28px; text-shadow: 0 2px 10px rgba(0,0,0,.8); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer { padding: 60px 20px 40px; background: var(--bg); border-top: 1px solid rgba(255,255,255,.04); }
.footer__inner { max-width: var(--col); margin: 0 auto; text-align: center; }
.footer__logo { width: 220px; margin: 0 auto 22px; opacity: .8; }
.footer__links { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; }
.footer__links a { font-family: var(--font-display); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #a39d90; }
.footer__links a:hover { color: var(--cream); }
.footer__copy { margin: 0; font-size: 13px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Trailer modal
   -------------------------------------------------------------------------- */
.modal[hidden], .lightbox[hidden] { display: none; }

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(4,5,8,.9); }
.modal__dialog { position: relative; width: min(1100px, 100%); }
.modal__video { aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.8); }
.modal__video iframe, .modal__video video { width: 100%; height: 100%; border: 0; display: block; }
.modal__video .modal__placeholder {
  height: 100%; display: grid; place-items: center; text-align: center; padding: 30px;
  background: #0d1017 url("../assets/img/trailer-poster.webp") center / cover no-repeat;
}
.modal__placeholder p { margin: 0; font-family: var(--font-serif); font-size: 26px; color: var(--cream); text-shadow: 0 2px 12px rgba(0,0,0,.9); }
.modal__close, .lightbox__close {
  position: absolute; top: -44px; right: 0;
  width: 40px; height: 40px; font-size: 32px; line-height: 1; color: var(--cream);
}

/* --------------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------------- */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(4,5,8,.94); }
.lightbox__figure { position: relative; margin: 0; max-width: min(1400px, 100%); text-align: center; }
.lightbox__figure img {
  max-width: 100%; max-height: 82vh; width: auto; height: auto; margin: 0 auto;
  border-radius: 6px; box-shadow: 0 30px 80px rgba(0,0,0,.8);
  image-rendering: auto;
}
.lightbox__figure figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }
.lightbox__close { top: 16px; right: 16px; position: fixed; }
.lightbox__nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 52px; height: 80px; font-size: 56px; line-height: 1; color: var(--cream);
  opacity: .7; transition: opacity .15s;
}
.lightbox__nav:hover { opacity: 1; }
.lightbox__nav--prev { left: 8px; }
.lightbox__nav--next { right: 8px; }
@media (max-width: 640px) { .lightbox__nav { width: 40px; font-size: 44px; } }

body.no-scroll { overflow: hidden; }
