/* ==========================================================================
   Greenlite Technologies — site styles
   ========================================================================== */

:root {
  --bg:          #0b0d0a;
  --bg-2:        #10130e;
  --surface:     #161a13;
  --surface-2:   #1d2219;
  --line:        #272d20;
  --line-soft:   #1e2418;
  --text:        #e9ebe3;
  --text-dim:    #b9bfab;
  --muted:       #8e9682;
  --accent:      #a8b484;
  --accent-2:    #c9d89e;
  --accent-dim:  rgba(168, 180, 132, 0.14);
  --steam:       #66c0f4;

  --font-display: "Space Grotesk", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body:    ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
                  "Helvetica Neue", Arial, sans-serif;

  --wrap: 1180px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 18px 50px -18px rgba(0,0,0,.85);
  --ease: cubic-bezier(.22,.61,.36,1);
}

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

/* The hidden attribute must win over any display rule we set on an element
   (e.g. .form { display: grid }), otherwise toggling el.hidden does nothing. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

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

/* height:auto is required, not cosmetic: these elements carry width/height
   attributes, so without it a width-constrained image keeps its attribute
   height and gets stretched. Rules that set an explicit height (.brand img,
   .shot img, the hero media) are more specific and still win. */
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #fff; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p  { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

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

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 760px); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #10130e; padding: .7rem 1.1rem;
  font-weight: 600; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- eyebrow / small caps ---------- */
.eyebrow {
  font-family: var(--font-display);
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .9rem;
  font-weight: 600;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 13, 10, .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 68px;
}
.brand { display: flex; align-items: center; gap: .7rem; margin-right: auto; }
.brand img { height: 26px; width: auto; }
.brand span { position: absolute; left: -9999px; }

.nav { display: flex; align-items: center; gap: .35rem; }
.nav a {
  color: var(--text-dim);
  font-size: .95rem;
  font-weight: 500;
  padding: .5rem .8rem;
  border-radius: 8px;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav a:hover { color: var(--text); background: var(--accent-dim); }
.nav a[aria-current="page"] { color: var(--accent-2); }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line);
  color: var(--text); border-radius: 9px;
  padding: .45rem .7rem; font-size: 1rem; cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    padding: .6rem 1.25rem 1.1rem;
    gap: 0;
  }
  .nav[hidden] { display: none; }
  .nav a { padding: .75rem .25rem; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .nav .btn { margin-top: .8rem; text-align: center; border-bottom: 0; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-display);
  font-weight: 600; font-size: .97rem;
  padding: .78rem 1.4rem;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease),
              border-color .18s var(--ease), color .18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #0d1009; }
.btn--primary:hover { background: var(--accent-2); color: #0d1009; }
.btn--ghost { border-color: var(--line); color: var(--text); background: rgba(255,255,255,.02); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-2); background: var(--accent-dim); }
.btn--steam { background: #1b2838; color: #dfe3e6; border-color: #2a3f5a; }
.btn--steam:hover { background: #223349; color: #fff; }
.btn--apple { background: #17191c; color: #e9ebe3; border-color: #33373c; }
.btn--apple:hover { background: #202429; color: #fff; border-color: #4a5057; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }

/* ==========================================================================
   Home hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: min(78vh, 680px);
  display: flex; align-items: flex-end;
  padding: 5rem 0 3.5rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; opacity: .78; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--bg) 2%, rgba(11,13,10,.62) 48%, rgba(11,13,10,.3) 100%),
    linear-gradient(to right, rgba(11,13,10,.92) 0%, rgba(11,13,10,.45) 55%, rgba(11,13,10,.15) 100%);
}
.hero__inner { position: relative; z-index: 1; max-width: 720px; }
.hero h1 { margin-bottom: .35em; }
.hero__lede { font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--text-dim); max-width: 34em; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line-soft); }
.section__head { max-width: 46em; margin-bottom: 2.6rem; }
.section__head p { color: var(--muted); }

/* ==========================================================================
   Game cards (home)
   ========================================================================== */
.games { display: grid; gap: 2rem; }
@media (min-width: 900px) { .games { grid-template-columns: 1fr 1fr; } }

.game-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.game-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.game-card__art { position: relative; aspect-ratio: 460 / 215; overflow: hidden; background: #0d1009; }
.game-card__art img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.game-card:hover .game-card__art img { transform: scale(1.045); }
.game-card__body { padding: 1.6rem 1.7rem 1.8rem; display: flex; flex-direction: column; flex: 1; }
.game-card__body h3 { margin-bottom: .35rem; font-size: 1.5rem; }
.game-card__meta {
  font-size: .8rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1rem; font-family: var(--font-display);
}
.game-card__body p { color: var(--text-dim); font-size: .97rem; }
.game-card .btn-row { margin-top: auto; padding-top: 1.4rem; }

/* ==========================================================================
   Game page hero
   ========================================================================== */
.game-hero {
  position: relative;
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}
.game-hero__media { position: absolute; inset: 0; z-index: 0; }
.game-hero__media img { width: 100%; height: 100%; object-fit: cover; opacity: .72; }
.game-hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--bg) 1%, rgba(11,13,10,.66) 52%, rgba(11,13,10,.3) 100%),
    linear-gradient(to right, rgba(11,13,10,.9) 0%, rgba(11,13,10,.42) 55%, rgba(11,13,10,.1) 100%);
}
.game-hero__inner { position: relative; z-index: 1; max-width: 660px; }
.game-hero__logo { width: min(420px, 78%); height: auto; margin-bottom: 1.4rem; filter: drop-shadow(0 8px 28px rgba(0,0,0,.7)); }
.game-hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); }
.game-hero__lede { font-size: clamp(1.02rem, 1.8vw, 1.2rem); color: var(--text-dim); margin-bottom: 1.8rem; }

.factbar {
  display: flex; flex-wrap: wrap; gap: 1.6rem 2.4rem;
  margin-top: 2.2rem; padding-top: 1.6rem;
  border-top: 1px solid rgba(255,255,255,.09);
}
.factbar div { min-width: 0; }
.factbar dt {
  font-family: var(--font-display);
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .28rem;
}
.factbar dd { margin: 0; font-size: .96rem; color: var(--text); }

/* ==========================================================================
   Prose
   ========================================================================== */
.prose { max-width: 68ch; color: var(--text-dim); }
.prose h2 { color: var(--text); margin-top: 2.4em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { color: var(--text); margin-top: 2em; font-size: 1.22rem; }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.25em; margin: 0 0 1.15em; }
.prose li { margin-bottom: .45em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }

.lede-note {
  border-left: 3px solid var(--accent);
  background: var(--accent-dim);
  padding: 1rem 1.3rem;
  border-radius: 0 10px 10px 0;
  color: var(--text);
  font-size: .96rem;
}

/* ==========================================================================
   Stage cards (Bardo four stages / feature grids)
   ========================================================================== */
.grid-cards { display: grid; gap: 1.3rem; }
@media (min-width: 700px)  { .grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .grid-cards--4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1040px) { .grid-cards--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.6rem;
  transition: border-color .22s var(--ease), transform .22s var(--ease);
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card__num {
  font-family: var(--font-display); font-size: .74rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .7rem;
}
.card h3 { font-size: 1.12rem; margin-bottom: .5rem; }
.card p { color: var(--muted); font-size: .93rem; margin: 0; }

/* Monsters */
.monster { border-left: 2px solid var(--line); padding-left: 1.4rem; }
.monster h3 { color: var(--accent-2); }

/* ==========================================================================
   Feature pills
   ========================================================================== */
.pills { display: flex; flex-wrap: wrap; gap: .55rem; list-style: none; padding: 0; margin: 0; }
.pills li {
  font-size: .87rem;
  padding: .42rem .95rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--text-dim);
  background: var(--surface);
}

/* ==========================================================================
   Trailer
   ========================================================================== */
.trailer {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: var(--shadow);
}
.trailer video { width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }

/* ==========================================================================
   Screenshot gallery
   ========================================================================== */
.shots { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .shots { grid-template-columns: repeat(3, 1fr); } }
.shot {
  position: relative; display: block; padding: 0; border: 1px solid var(--line);
  background: var(--surface); border-radius: 12px; overflow: hidden; cursor: zoom-in;
  aspect-ratio: 16 / 9;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.shot:hover { border-color: var(--accent); transform: translateY(-3px); }
.shot img { width: 100%; height: 100%; object-fit: cover; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(6, 8, 5, .94);
  display: grid; place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 10px; box-shadow: var(--shadow); }
.lightbox__cap {
  margin-top: 1rem; text-align: center; color: var(--muted); font-size: .9rem;
}
.lightbox__close, .lightbox__nav {
  position: absolute; background: rgba(255,255,255,.07); border: 1px solid var(--line);
  color: var(--text); width: 46px; height: 46px; border-radius: 50%;
  font-size: 1.2rem; cursor: pointer; display: grid; place-items: center;
  transition: background .18s var(--ease);
}
.lightbox__close:hover, .lightbox__nav:hover { background: var(--accent); color: #0d1009; }
.lightbox__close { top: 1.2rem; right: 1.2rem; }
.lightbox__nav--prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 1.2rem; top: 50%; transform: translateY(-50%); }

/* ==========================================================================
   System requirements
   ========================================================================== */
.reqs { display: grid; gap: 1.3rem; }
@media (min-width: 780px)  { .reqs { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1060px) { .reqs { grid-template-columns: repeat(3, 1fr); } }
.reqs__col {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem 1.6rem;
}
.reqs__col h3 { font-size: 1.02rem; margin-bottom: 1rem; color: var(--accent-2); }
.reqs__col dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .55rem 1.2rem; font-size: .92rem; }
.reqs__col dt { color: var(--muted); }
.reqs__col dd { margin: 0; color: var(--text-dim); }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta {
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.2rem);
  text-align: center;
}
.cta h2 { margin-bottom: .5rem; }
.cta p { color: var(--muted); max-width: 44ch; margin-inline: auto; margin-bottom: 1.8rem; }
.cta .btn-row { justify-content: center; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line-soft);
  background: var(--bg-2);
  padding: 3.2rem 0 2.4rem;
  margin-top: 0;
  font-size: .93rem;
}
.site-footer__grid { display: grid; gap: 2.2rem; }
@media (min-width: 760px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer img.brand-mark { height: 24px; width: auto; margin-bottom: 1rem; }
.site-footer p { color: var(--muted); margin: 0; }
.site-footer h4 {
  font-family: var(--font-display); font-size: .74rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 .9rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; }
.site-footer li a { color: var(--text-dim); }
.site-footer li a:hover { color: var(--accent-2); }
.site-footer__base {
  margin-top: 2.6rem; padding-top: 1.5rem; border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between;
  color: var(--muted); font-size: .87rem;
}

/* ==========================================================================
   Page header (privacy / contact)
   ========================================================================== */
.page-head {
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-2);
}
.page-head p.meta { color: var(--muted); font-size: .93rem; margin: 0; }

.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent-2); }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(1.8rem, 4vw, 2.6rem);
}
.contact-card .email {
  font-family: var(--font-display); font-size: clamp(1.2rem, 3vw, 1.7rem);
  color: var(--accent-2); word-break: break-all;
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.stack > * + * { margin-top: 1.5rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ==========================================================================
   Split layout — text beside key art
   ========================================================================== */
.split { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
@media (min-width: 940px) {
  .split { grid-template-columns: minmax(0, 1.5fr) minmax(0, .9fr); }
  /* landscape artwork earns a wider column than the portrait key art */
  .split--wide { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
}
.split__art { position: relative; }
.split__art img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  width: auto;
  max-width: 100%;
  max-height: 440px;
  margin-inline: auto;
}
@media (max-width: 939px) { .split__art { max-width: 340px; } }

/* ==========================================================================
   Contact form
   ========================================================================== */
.form { display: grid; gap: 1.3rem; }

.field { display: grid; gap: .45rem; }
.field label {
  font-family: var(--font-display);
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
}
.field .hint { font-size: .84rem; color: var(--muted); }

.field input,
.field textarea,
.field select {
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .8rem 1rem;
  width: 100%;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.field textarea { min-height: 170px; resize: vertical; line-height: 1.6; }
.field input::placeholder,
.field textarea::placeholder { color: #6d7563; }
.field input:hover,
.field textarea:hover { border-color: #333b2a; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* invalid state — only after a submit attempt or blur */
.field[data-invalid="true"] input,
.field[data-invalid="true"] textarea { border-color: #c76a5c; }
.field .error {
  font-size: .84rem;
  color: #e2907f;
  min-height: 0;
}
.field .error:empty { display: none; }

/* honeypot — must stay visually hidden but reachable by bots */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: .3rem;
}
.form__note { font-size: .84rem; color: var(--muted); margin: 0; }

.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.form-status {
  border-radius: 10px;
  padding: .95rem 1.2rem;
  font-size: .95rem;
  border: 1px solid var(--line);
}
.form-status:empty { display: none; }
.form-status[data-state="error"] {
  border-color: #7a4034;
  background: rgba(199, 106, 92, .12);
  color: #eaa899;
}
.form-status[data-state="working"] { color: var(--muted); }

.form-success {
  border: 1px solid var(--accent);
  background: var(--accent-dim);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 4vw, 2.4rem);
}
.form-success h3 { color: var(--accent-2); margin-bottom: .5rem; }
.form-success p { color: var(--text-dim); margin: 0; }

/* ── In-development tag ───────────────────────────────────────── */
.tag-wip {
  display: inline-block;
  margin: 0 0 1rem;
  padding: .3rem .8rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent-2);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.game-card__meta .tag-wip { margin: 0 0 0 .5rem; padding: .15rem .55rem; font-size: .66rem; }
