/* Undergrow landing page. Palette from the game's UI (scripts/ui/ui_style.gd) and art bible. */

@font-face {
  font-family: "Big Shoulders Stencil Display";
  src: url("/fonts/BigShouldersStencilDisplay-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-Regular-Latin1.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-SemiBold-Latin1.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2013-2014, U+2018-201A, U+201C-201E, U+2020-2022, U+2026, U+2030, U+2039-203A, U+2044, U+20AC, U+2122, U+2212, U+FB01-FB02;
}

:root {
  --bg: #090806;        /* UiStyle.BG */
  --well: #0f0d0a;      /* UiStyle.WELL */
  --panel: #14110c;
  --amber: #ffc261;     /* UiStyle.AMBER */
  --head: #ffe6b3;      /* UiStyle.HEAD */
  --text: #eadcc2;
  --dim: #b39467;       /* UiStyle.DIM, lifted for contrast on near-black */
  --line: #8c662e;      /* UiStyle.LINE */
  --pink: #cd538b;      /* grow magenta */
  --pink-soft: #f08cba;
  --green: #4dc037;     /* terminal green */
  --display: "Big Shoulders Stencil Display", "Impact", "Arial Narrow", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: 16px;
  color-scheme: dark;
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--amber); text-underline-offset: 0.2em; }
a:hover { color: var(--head); }

:focus-visible {
  outline: 3px solid var(--head);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 0.5rem 0.9rem;
  background: var(--amber);
  color: #120e08;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: var(--gutter); }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

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

.hero {
  position: relative;
  isolation: isolate;
  min-height: min(100svh, 920px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--bg);
}

.hero__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
  z-index: -3;
}

/* Darkens the painting where the text sits: top for the edge, bottom for the wordmark. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(to bottom, rgba(9, 8, 6, 0.55) 0%, rgba(9, 8, 6, 0) 28%),
    linear-gradient(to top, var(--bg) 0%, rgba(9, 8, 6, 0.92) 26%, rgba(9, 8, 6, 0.35) 58%, rgba(9, 8, 6, 0) 80%);
}

/* The grow-lamp glow behind the wordmark. Breathes slowly; still when reduced motion is asked for. */
.hero__glow {
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: min(1100px, 140vw);
  height: 60%;
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 70%, rgba(205, 83, 139, 0.32) 0%, rgba(205, 83, 139, 0.1) 40%, rgba(205, 83, 139, 0) 70%);
  opacity: 0.85;
  animation: lamp 9s ease-in-out infinite alternate;
}

@keyframes lamp {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

.hero__inner {
  padding-top: 28vh;
  padding-bottom: clamp(2.5rem, 7vh, 4.5rem);
  text-align: center;
}

.kicker {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
  text-shadow: 0 1px 2px #000;
  text-wrap: balance;
}

.wordmark {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.6rem, 15.5vw, 10.5rem);
  line-height: 0.88;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  color: var(--amber);
  text-shadow:
    0 2px 0 #4a3216,
    0 0 18px rgba(255, 194, 97, 0.28),
    0 0 60px rgba(205, 83, 139, 0.55);
}

.hook {
  max-width: 40rem;
  margin: 1.1rem auto 0;
  font-size: clamp(1.02rem, 2.6vw, 1.22rem);
  line-height: 1.55;
  color: var(--head);
  text-shadow: 0 1px 3px #000;
  text-wrap: balance;
}

.cta {
  margin-top: 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.cta__meta {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  text-wrap: balance;
}

.button {
  display: inline-block;
  min-height: 48px;
  padding: 0.8rem 1.6rem;
  border: 1px solid var(--head);
  border-radius: 2px;
  background: var(--amber);
  color: #120e08;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 0 0 4px rgba(9, 8, 6, 0.6), 0 0 28px rgba(205, 83, 139, 0.45);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.button:hover {
  background: var(--head);
  color: #120e08;
  box-shadow: 0 0 0 4px rgba(9, 8, 6, 0.6), 0 0 36px rgba(205, 83, 139, 0.7);
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(3rem, 8vw, 5.5rem) 0; }

/* Panel header in the game's style: spaced capitals over a thin rule. */
.label {
  margin: 0 0 1.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--head);
}
.label::before {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-right: 0.8em;
  vertical-align: 0.08em;
  background: var(--pink);
  box-shadow: 0 0 10px var(--pink);
}

.premise {
  display: grid;
  grid-template-columns: minmax(0, 44rem) minmax(0, 1fr);
  column-gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.premise .label { grid-column: 1 / -1; }
.premise__text {
  font-size: 1.05rem;
}

.faces__title {
  margin: 0.2rem 0 0.8rem;
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
}
.faces ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.faces img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid rgba(140, 102, 46, 0.6);
  border-radius: 2px;
}
.faces li p {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
}
.faces strong {
  display: block;
  color: var(--head);
  font-weight: 600;
}
.faces span { color: var(--dim); }
.premise__text p { margin: 0 0 1.1rem; }
.premise__text p:first-child::first-line { color: var(--head); }

.note, .lede {
  margin: -0.6rem 0 1.4rem;
  color: var(--dim);
  font-size: 0.9rem;
}
.lede {
  max-width: 44rem;
  margin-top: 0;
  color: var(--text);
  font-size: 1rem;
}

/* Screenshot strip: a grid on wide screens, a sideways strip on phones. */
.shots {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.shots figure { margin: 0; }
.shots a {
  display: block;
  border: 1px solid rgba(140, 102, 46, 0.6);
  border-radius: 2px;
  background: var(--well);
  overflow: hidden;
}
.shots a:hover { border-color: var(--amber); }
.shots img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.shots figcaption {
  margin-top: 0.55rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--dim);
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.feature {
  padding: 1.4rem 1.4rem 1.2rem;
  background: var(--well);
  border: 1px solid rgba(140, 102, 46, 0.6);
  border-radius: 2px;
}
.feature h3 {
  margin: 0 0 0.6rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.7rem;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amber);
}
.feature__tag {
  display: inline-block;
  margin-right: 0.6rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  vertical-align: 0.35em;
  color: var(--green);
}
.feature p { margin: 0; }

/* Endings */
.endings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}
.ending img {
  width: 100%;
  border: 1px solid rgba(140, 102, 46, 0.6);
  border-radius: 2px;
}
.ending h3 {
  margin: 0.85rem 0 0.35rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.45rem;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--head);
}
.ending p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}

/* Closing call to action */
.closing {
  padding-bottom: clamp(3rem, 8vw, 5.5rem);
  text-align: center;
}
.closing__title {
  margin: 0 0 1.4rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amber);
  text-shadow: 0 0 40px rgba(205, 83, 139, 0.45);
}

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

.footer {
  border-top: 1px solid var(--line);
  background: var(--well);
  padding-block: 2.5rem 3rem;
  font-size: 0.875rem;
  line-height: 1.6;
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2.5rem;
}
.footer .label { font-size: 0.85rem; margin-bottom: 1rem; }
.footer p { margin: 0 0 0.8rem; }
.footer__statement {
  color: var(--head);
  font-size: 1rem;
}
.footer strong { color: var(--head); font-weight: 600; }
.footer__meta { color: var(--dim); }
.footer__meta p:first-child { color: var(--text); }

/* 404 page */
.lost {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* ---------- Narrower screens ---------- */

@media (max-width: 960px) {
  .endings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .premise { grid-template-columns: minmax(0, 1fr); }
  .premise__text { max-width: 44rem; }
  .faces { max-width: 30rem; margin-top: 1rem; }
  .footer__grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
}

@media (max-width: 700px) {
  .hero { min-height: 92svh; }
  .hero__art { object-position: 50% 50%; }
  .hero__inner { padding-top: 40vh; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .feature { padding: 1.15rem 1.1rem 1rem; }
  .feature h3 { font-size: 1.5rem; }

  /* Sideways strip, snapping to each shot. It scrolls inside its own box, never the page. */
  .shots {
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    margin-inline: calc(-1 * var(--gutter));
    padding: 0 var(--gutter) 0.8rem;
    scroll-padding-inline: var(--gutter);
    scrollbar-color: var(--line) transparent;
  }
  .shots li {
    flex: 0 0 85%;
    scroll-snap-align: start;
  }
}

@media (max-width: 560px) {
  .endings { grid-template-columns: minmax(0, 1fr); }
  .kicker { font-size: 0.7rem; letter-spacing: 0.16em; }
  .label { letter-spacing: 0.22em; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__glow { animation: none; opacity: 0.85; }
  .button { transition: none; }
}

/* ---------- Press kit (/press/) ---------- */

.hero--press { min-height: min(62svh, 560px); }
.hero--press .hero__inner { padding-top: 16vh; padding-bottom: clamp(2rem, 5vh, 3rem); }
.hero--press .wordmark { font-size: clamp(3.2rem, 12vw, 7.5rem); }
.hero--press .wordmark a { color: inherit; text-decoration: none; }
.hero--press .kicker a { color: inherit; text-decoration: none; }
.hero--press .kicker a:hover { text-decoration: underline; }
.press-cta .cta__meta a { color: var(--amber); }

.press-nav { padding-top: 1.5rem; }
.press-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.press-nav a {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(140, 102, 46, 0.6);
  border-radius: 2px;
  background: var(--well);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-decoration: none;
}
.press-nav a:hover { border-color: var(--amber); }

.press .section { scroll-margin-top: 1rem; }
.press-last { padding-bottom: clamp(3rem, 8vw, 5.5rem); }

/* Fields the owner still has to fill in: impossible to miss. */
.owner {
  padding: 0.05em 0.35em;
  border: 1px dashed var(--amber);
  border-radius: 2px;
  background: rgba(255, 194, 97, 0.12);
  color: var(--head);
}

.press code { font-family: var(--mono); color: var(--head); }

.facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2.5rem;
}
.facts > div {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(140, 102, 46, 0.35);
}
.facts dt {
  padding-top: 0.15rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts--short { grid-template-columns: minmax(0, 1fr); max-width: 52rem; }
.press-files { margin-top: 1.2rem; }

.press-text { max-width: 44rem; }
.press-text p { margin: 0 0 1.1rem; }
.press-text h3, .press-sub {
  margin: 1.6rem 0 0.6rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
}
.press-text h3:first-child { margin-top: 0; }
.press-sub { margin-top: 2.5rem; }
.press-sub + .note { margin-top: 0; }
.press-list { margin: 0 0 1.1rem; padding-left: 1.2rem; }
.press-list li { margin-bottom: 0.4rem; }
.press-list li::marker { color: var(--pink); }

.press-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.press-features li {
  padding: 1rem 1.2rem;
  background: var(--well);
  border: 1px solid rgba(140, 102, 46, 0.6);
  border-radius: 2px;
}
.press-features strong { display: block; margin-bottom: 0.25rem; color: var(--head); font-weight: 600; }

.press-empty {
  max-width: 44rem;
  padding: 1.2rem 1.4rem;
  border: 1px dashed var(--line);
  border-radius: 2px;
  background: var(--well);
}
.press-empty p { margin: 0 0 0.7rem; }
.press-empty p:last-child { margin-bottom: 0; }
.press-empty strong { color: var(--head); font-weight: 600; }

.press-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 1.25rem;
}
.press-grid figure { margin: 0; }
.press-grid a {
  display: block;
  border: 1px solid rgba(140, 102, 46, 0.6);
  border-radius: 2px;
  background: var(--well);
  overflow: hidden;
}
.press-grid a:hover { border-color: var(--amber); }
.press-grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.press-grid figcaption {
  margin-top: 0.55rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text);
}
.press-meta {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--dim);
}
.press-spoiler {
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pink-soft);
}

@media (max-width: 960px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .press-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .hero--press { min-height: 0; }
  .hero--press .hero__inner { padding-top: 22vh; }
  .press-features { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .press-grid { grid-template-columns: minmax(0, 1fr); }
  .facts > div { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
}
