/* Outcast landing page: the pitch deck's look (dark textured ground, thin white frames, Goldman + Oxanium)
   over the game's own art. The OUTCAST wordmark uses the Blade Runner font when fonts/BladeRunner.* exists. */

@font-face {
  font-family: "BladeRunner";
  src: url("fonts/BladeRunner.woff2") format("woff2"),
       url("fonts/BladeRunner.ttf") format("truetype");
  font-display: swap;
}

:root {
  --ink: #0d0b10;
  --paper: #f4eefb;
  --muted: #b7aec4;
  --lilac: #c7b0ee;
  --rose: #d59bb8;
  --amber: #f2a24a;
  --line: rgba(244, 238, 251, 0.85);
  --heading: "Goldman", "Oxanium", system-ui, sans-serif;
  --body: "Oxanium", system-ui, sans-serif;
  --logo: "BladeRunner", "Goldman", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
  /* grainy dark ground, like the deck */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, video { display: block; max-width: 100%; }
/* Art shouldn't be grabbed or highlighted when clicked */
img, video, .hero, .planet, .stress, .cards { -webkit-user-select: none; user-select: none; -webkit-user-drag: none; }
.hero img, .planet img, .stress img { pointer-events: none; }
a { color: inherit; }

.layer { will-change: transform; }

/* Hex tile field (tiles.js) sits behind everything; page content stacks above it */
#tiles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.hero, main, .footer { position: relative; z-index: 1; }
.premise, .cta { background: rgba(13, 11, 16, .78); backdrop-filter: blur(2px); }
.copy, .crew .heading, .mind .heading, .mind .sub { text-shadow: 0 2px 12px rgba(13, 11, 16, .9); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(#b9a2e6, #d7c8ee);
}
.layers, .layers > * { position: absolute; inset: 0; }
.layers img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.12);
}
.hero::after { /* dark frame around the art, like the title slide */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 4;
  box-shadow: inset 0 0 0 clamp(6px, 1.2vw, 16px) var(--ink), inset 0 -180px 160px -120px rgba(13, 11, 16, .85);
}
.hero .fg {
  position: absolute; left: -6%; right: -6%; bottom: -8%;
  width: 112%; max-width: none; height: auto;
  z-index: 2; opacity: .9; pointer-events: none;
  filter: saturate(.9) brightness(.85);
}

.title {
  position: absolute; z-index: 3;
  left: clamp(16px, 6vw, 96px); right: var(--gutter);
  bottom: clamp(56px, 11vh, 120px);
}
.logo {
  display: inline-flex; align-items: center; gap: clamp(16px, 3vw, 48px);
  margin: 0;
  padding: clamp(6px, 1vw, 14px) clamp(16px, 2.5vw, 36px);
  background: var(--ink);
  font-family: var(--logo);
  font-weight: 400;
  font-size: clamp(44px, 10vw, 150px);
  line-height: 1;
  letter-spacing: .02em;
  color: var(--paper);
}
.slashes { display: inline-flex; gap: .16em; }
.slashes i {
  display: block; width: .62em; height: .72em;
  background: var(--paper);
  transform: skewX(-32deg);
  animation: blink 4.5s infinite;
}
.slashes i:nth-child(2) { animation-delay: .25s; }
.slashes i:nth-child(3) { animation-delay: .5s; }
@keyframes blink { 0%, 86%, 100% { opacity: 1; } 90% { opacity: .2; } 94% { opacity: 1; } }

.steps { display: flex; margin: 12px 0 0 clamp(10px, 1.4vw, 20px); }
.steps i { display: block; height: 7px; width: clamp(64px, 10vw, 150px); border: 2px solid var(--ink); background: var(--ink); }
.steps i:nth-child(2) { transform: translateY(7px); }
.steps i:nth-child(3) { background: transparent; border-color: var(--ink); }
.byline {
  margin: 12px 0 0 clamp(10px, 1.4vw, 20px);
  font-size: clamp(14px, 1.6vw, 22px); letter-spacing: .08em; color: var(--ink);
}
.byline span { opacity: .6; }

.spores { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.layers .spores { z-index: auto; } /* the back field stays in layer order, behind the outcast and mushrooms */
.spores b {
  position: absolute; bottom: -10px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.95), rgba(255,255,255,0) 70%);
  animation: rise linear infinite;
}
@keyframes rise {
  from { transform: translate3d(0, 0, 0); opacity: 0; }
  10% { opacity: .9; }
  to { transform: translate3d(var(--drift, 40px), -110vh, 0); opacity: 0; }
}

.scroll-cue {
  position: absolute; z-index: 5; left: 50%; bottom: 22px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--line); border-radius: 14px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: var(--paper); animation: cue 1.8s infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- Shared ---------- */
main > section { position: relative; margin: 0 auto; padding: clamp(72px, 12vh, 140px) var(--gutter); max-width: 1200px; }
.frame {
  position: relative;
  border: 1.5px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
}
.heading {
  margin: 0 0 .5em;
  font-family: var(--heading); font-weight: 700; text-transform: uppercase;
  font-size: clamp(28px, 4.2vw, 52px); line-height: 1.05; letter-spacing: .02em;
}
.heading.big { font-size: clamp(34px, 6vw, 80px); text-align: center; }
.sub { color: var(--muted); font-size: clamp(17px, 1.6vw, 21px); }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Premise ---------- */
.premise { margin-top: clamp(64px, 10vh, 120px) !important; padding: clamp(28px, 6vw, 72px) !important; width: min(980px, calc(100% - 2 * var(--gutter))); text-align: center; }
.lede { margin: 0; font-family: var(--heading); font-size: clamp(24px, 3.2vw, 40px); line-height: 1.25; }
.premise .sub { margin: 1em 0 0; }

/* ---------- Crew ---------- */
.crew .heading { text-align: center; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 3vw, 40px); margin-top: 32px; perspective: 900px; }
.card { margin: 0; transition: transform .2s ease-out; transform-style: preserve-3d; }
.card img { width: 100%; border-radius: 6px; box-shadow: 0 24px 50px rgba(0,0,0,.55); }
.card figcaption {
  margin-top: 14px; text-align: center; font-family: var(--heading); text-transform: uppercase;
  letter-spacing: .12em; font-size: clamp(14px, 1.6vw, 20px); color: var(--muted);
}

/* ---------- Pillars ---------- */
.pillars { display: grid; gap: clamp(64px, 10vh, 120px); }
.pillar { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.pillar.flip .media { order: 2; }
.media { background: #000; padding: 8px; }
.media video { width: 100%; height: auto; }
.copy p { margin: 0; color: var(--muted); font-size: clamp(17px, 1.6vw, 21px); }

/* ---------- Mind ---------- */
.mind { text-align: center; }
.stress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; margin: 24px auto 16px; max-width: 980px; }
.stress img { filter: drop-shadow(0 18px 30px rgba(0,0,0,.6)); }
.mind .sub { max-width: 640px; margin: 0 auto; }

/* ---------- Planet band ---------- */
.planet {
  max-width: none !important; padding: 0 !important;
  height: clamp(420px, 80vh, 820px); overflow: hidden;
  background: linear-gradient(#cfc0e9 0%, #e9c9c4 60%, #c49a8d 100%);
}
.planet .layer {
  position: absolute; left: 50%; bottom: -4%;
  width: max(130%, 1100px); max-width: none; translate: -50% 0;
}
.planet .enemy { width: clamp(140px, 18vw, 260px); bottom: 14%; translate: -50% 0; }
.planet::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 90px 80px -40px var(--ink), inset 0 -90px 80px -40px var(--ink); pointer-events: none; }
.planet-copy { position: absolute; z-index: 2; top: 14%; left: 0; right: 0; text-align: center; color: var(--ink); }
.count { margin: 0; font-family: var(--logo); font-size: clamp(90px, 16vw, 220px); line-height: .9; }
.count-label { margin: 0; font-family: var(--heading); text-transform: uppercase; letter-spacing: .2em; font-size: clamp(16px, 2vw, 26px); }

/* ---------- CTA ---------- */
.cta { margin: clamp(80px, 12vh, 140px) auto !important; width: min(760px, calc(100% - 2 * var(--gutter))); padding: clamp(32px, 6vw, 72px) !important; text-align: center; }
.cta .ship { width: clamp(90px, 12vw, 140px); margin: 0 auto 16px; animation: hover 4s ease-in-out infinite; }
@keyframes hover { 50% { transform: translateY(-10px); } }
.cta .sub { margin: 0; }

.footer { padding: 32px var(--gutter) 240px; /* room for the ocean */ text-align: center; color: var(--muted); font-size: 14px; letter-spacing: .06em; }

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  body { font-size: 17px; }
  .pillar, .pillar.flip { grid-template-columns: 1fr; gap: 18px; }
  .pillar.flip .media { order: 0; }
  .pillars { gap: 72px; }
  .steps i { width: 64px; }
  .stress { margin-inline: calc(-1 * var(--gutter)); gap: 0; } /* portraits run to the screen edges */
  .hero .scroll-cue { display: none; }
}

/* Phones: wordmark sized to fit 320-430 px screens; crew cards become a swipeable row */
@media (max-width: 560px) {
  .title { left: var(--gutter); }
  .logo { font-size: clamp(30px, 10.5vw, 60px); gap: 10px; padding: 6px 14px; }
  .slashes i { width: .5em; height: .62em; }
  .byline { font-size: 13px; }
  .cards {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px;
    margin: 24px calc(-1 * var(--gutter)) 0; padding: 8px var(--gutter) 16px;
    scrollbar-width: none; perspective: none;
  }
  .cards::-webkit-scrollbar { display: none; }
  .card { flex: 0 0 70%; scroll-snap-align: center; }
  .count { font-size: 30vw; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
