/* Mars Directive landing page — built on the "Nocturne" dark design system:
   near-black blue-grey ground, Inter typeface, single blurple accent,
   8px radii, tonal ramps rather than saturation for contrast. */
@font-face {
  font-family: "Inter";
  src: url("assets/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --color-bg: #0a0b10; /* darker than the system default for a "space" feel */
  --color-text: #e9e9ed;
  --color-accent: #9184d9;
  --color-accent-2: #a7a1db;
  --color-accent-300: #d2cefd;
  --color-accent-800: #423a6a;
  --color-accent-900: #2b2741;
  --color-accent-100: #f5f4ff;
  --color-neutral-100: #f3f5fe;
  --color-divider: color-mix(in srgb, #e9e9ed 16%, transparent);

  --font-heading: "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --radius-md: 8px;
  --radius-lg: 14px;
}

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

html {
  scroll-snap-type: y mandatory;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  text-wrap: pretty;
}

h1, h2 { font-family: var(--font-heading); font-weight: 500; margin: 0; }
p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-2); }

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  padding: 10px 14px; border-radius: var(--radius-md);
  background: var(--color-accent); color: var(--color-bg); font-weight: 600;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); color: var(--color-bg); }

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none; white-space: nowrap; flex-shrink: 0;
  font-family: var(--font-heading); font-weight: 500;
  font-size: 15px; line-height: 1.2; color: var(--color-text);
  border: 1px solid transparent; border-radius: var(--radius-md);
  padding: 12px 24px;
}
.btn-primary { background: var(--color-accent); color: var(--color-bg); font-weight: 600; }
.btn-primary:hover { background: var(--color-accent-2); color: var(--color-bg); }
.btn-ghost { color: var(--color-accent); padding: 12px; }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); color: var(--color-accent); }

/* — tags — */
.tag {
  display: inline-flex; align-items: center; font-size: 12.5px;
  letter-spacing: 0.02em; padding: 6px 14px; border-radius: 6px;
}
.tag-accent { background: var(--color-accent-800); color: var(--color-accent-100); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); white-space: nowrap; }

.tag-row { display: flex; gap: 10px; flex-wrap: wrap; }

.eyebrow {
  display: block;
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-accent-300); font-weight: 500;
}

/* — layout — */
.section {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  box-sizing: border-box;
  scroll-snap-align: start;
}

/* — nav — */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  width: 100%; height: 64px; box-sizing: border-box;
  background: color-mix(in srgb, var(--color-bg) 85%, transparent);
  backdrop-filter: blur(10px);
  display: flex; align-items: center;
}
.nav {
  display: flex; align-items: center; gap: 22px;
  max-width: 1240px; width: 100%; margin: 0 auto; padding: 0 24px;
}
.nav-home { display: flex; align-items: center; flex: 0 0 auto; }
.nav-logo { height: 28px; width: auto; margin-right: 12px; }
.nav a { white-space: nowrap; flex-shrink: 0; font-size: 14px; }
.nav-cta { margin-left: auto; }

.nav-links { display: contents; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 36px; height: 36px; padding: 0;
  align-items: center; justify-content: center; gap: 5px; flex-direction: column;
  background: transparent; border: 1px solid var(--color-divider); border-radius: var(--radius-md);
  cursor: pointer;
}
.nav-toggle-bar {
  display: block; width: 16px; height: 1.5px; background: var(--color-text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: fixed; top: 64px; left: 0; right: 0; z-index: 9;
    max-height: 0; overflow: hidden; opacity: 0; visibility: hidden; pointer-events: none;
    background: color-mix(in srgb, var(--color-bg) 96%, transparent);
    backdrop-filter: blur(10px);
    transition: max-height 0.25s ease, opacity 0.2s ease, visibility 0s linear 0.25s;
  }
  .nav-links.open {
    max-height: calc(100vh - 64px); opacity: 1; overflow-y: auto;
    visibility: visible; pointer-events: auto;
    transition-delay: 0s;
  }
  .nav-links a { padding: 16px 24px; border-bottom: 1px solid var(--color-divider); }
  .nav-cta { margin: 16px 24px; }
}

/* — hero — */
.hero {
  display: flex; flex-direction: column; text-align: center;
  background:
    radial-gradient(1200px 700px at 82% -140px, color-mix(in srgb, var(--color-accent-900) 32%, transparent), transparent 60%),
    var(--color-bg);
}
.starfield { position: absolute; inset: 0; overflow: hidden; z-index: 1; pointer-events: none; }
.star {
  position: absolute; border-radius: 50%; background: #ffffff;
  opacity: var(--base-opacity, 0.15);
  animation: twinkle var(--dur, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes twinkle { 0%, 100% { opacity: var(--base-opacity, 0.15); } 50% { opacity: 1; } }

.hero-content-wrap {
  position: relative; z-index: 2; flex: 1 1 auto; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: visible; padding: 72px 24px 8px;
}
.hero-content { max-width: 680px; display: flex; flex-direction: column; align-items: center; }
.hero-logo { width: min(384px, 72vw); height: auto; }
.hero-tag { margin-top: 16px; animation: heroFadeUp 0.9s ease both; animation-delay: 0.15s; }
.hero-headline {
  width: 100%; font-size: clamp(22px, 3.6vw, 30px); font-weight: 500;
  line-height: 1.3; letter-spacing: -0.01em; margin-top: 14px;
  color: var(--color-neutral-100);
  animation: heroFadeUp 0.9s ease both; animation-delay: 0.28s;
}
.hero-copy {
  font-size: 15px; line-height: 1.55; max-width: 56ch;
  color: color-mix(in srgb, var(--color-text) 92%, transparent);
  margin-top: 12px;
  animation: heroFadeUp 0.9s ease both; animation-delay: 0.4s;
}
.hero-actions {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  margin-top: 20px;
  animation: heroFadeUp 0.9s ease both; animation-delay: 0.52s;
}
.hero-scroll-hint {
  position: relative; z-index: 2; flex: 0 0 auto; padding: 10px 0 14px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  text-align: center;
}
@keyframes heroFadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }

/* — full-bleed reveal sections (Story / The AI / World / Stakes) — */
.reveal-section { display: flex; align-items: flex-end; }
.reveal-bg { position: absolute; inset: 0; overflow: hidden; }
.reveal-image {
  width: 100%; height: 100%; object-fit: cover;
  backface-visibility: hidden;
}
.reveal-image--top { object-position: center 30%; }

.reveal-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--color-bg) 8%, color-mix(in srgb, var(--color-bg) 28%, transparent) 30%, transparent 52%),
    linear-gradient(to right, color-mix(in srgb, var(--color-bg) 45%, transparent) 0%, transparent 32%),
    linear-gradient(to bottom, var(--color-bg) 0%, transparent 10%);
}
.reveal-scrim--story {
  background:
    linear-gradient(to top, var(--color-bg) 8%, color-mix(in srgb, var(--color-bg) 25%, transparent) 28%, transparent 50%),
    linear-gradient(to right, color-mix(in srgb, var(--color-bg) 45%, transparent) 0%, transparent 32%),
    linear-gradient(to bottom, var(--color-bg) 0%, transparent 10%);
}
.reveal-content {
  position: relative; z-index: 2; max-width: 1240px; margin: 0 auto; width: 100%;
  padding: 24px 24px 72px;
}
.reveal-headline {
  font-size: clamp(30px, 4vw, 48px); font-weight: 500; line-height: 1.15;
  margin-top: 14px; max-width: 18ch; color: var(--color-neutral-100);
}
.reveal-headline--narrow { max-width: 16ch; }
.reveal-copy {
  font-size: 16.5px; line-height: 1.6; max-width: 54ch;
  color: color-mix(in srgb, var(--color-text) 92%, transparent);
  margin-top: 18px;
}
.reveal-section .tag-row { margin-top: 20px; }
#story .reveal-copy { max-width: 52ch; margin-bottom: 0; }

/* — studio — */
.studio-section { display: flex; align-items: center; justify-content: center; }
.studio-grid {
  position: relative; z-index: 1; max-width: 1100px; width: 100%; margin: 0 auto;
  padding: 24px; display: grid; grid-template-columns: minmax(240px, 380px) 1fr;
  gap: 56px; align-items: center;
}
.studio-logo { width: 100%; max-width: 340px; height: auto; }
.studio-headline { font-size: clamp(28px, 3vw, 38px); font-weight: 500; margin-top: 14px; }
.studio-copy {
  font-size: 16.5px; line-height: 1.7;
  color: color-mix(in srgb, var(--color-text) 90%, transparent);
  margin-top: 18px; max-width: 60ch;
}
.studio-tags { margin: 20px 0 24px; }
.studio-link { font-size: 15px; padding: 0; }

@media (max-width: 760px) {
  .studio-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
    padding: 24px;
  }
  .studio-logo { max-width: 220px; margin: 0 auto; }
  .studio-copy { margin-left: auto; margin-right: auto; }
  .studio-tags, .studio-section .tag-row { justify-content: center; }
}

/* — trailer — */
.trailer-section {
  display: flex; align-items: center; justify-content: center;
  padding: 96px 24px 48px;
  background:
    radial-gradient(900px 500px at 50% 50%, color-mix(in srgb, var(--color-accent-900) 26%, transparent), transparent 72%),
    #000;
}
.trailer-content { position: relative; width: min(1120px, 100%); text-align: center; }
.trailer-headline { margin-top: 10px; font-size: clamp(28px, 4vw, 42px); }
.trailer-frame-wrap {
  position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  margin-top: 28px; border: 1px solid var(--color-divider); border-radius: var(--radius-lg);
  background: #000; box-shadow: 0 28px 80px color-mix(in srgb, #000 70%, transparent);
}
.trailer-frame {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}

/* — closing + footer — */
.closing-section { display: flex; flex-direction: column; justify-content: space-between; }
.closing-content {
  position: relative; z-index: 1; max-width: 1240px; margin: auto; padding: 24px;
  text-align: center;
}
.closing-headline { font-size: 30px; margin-bottom: 16px; }
.closing-copy {
  font-size: 15px; color: color-mix(in srgb, var(--color-text) 88%, transparent);
  margin-bottom: 24px;
}
.site-footer { position: relative; z-index: 1; width: 100%; background: #0a0b12; }
.site-footer-inner {
  max-width: 1240px; margin: 0 auto; padding: 32px 24px 40px;
  font-size: 12.5px; line-height: 1.6;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.footer-disclosure { margin-bottom: 8px; }
.footer-credits { margin: 0; }

:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

@media (max-width: 760px) {
  .reveal-content { padding-bottom: 48px; }
  .trailer-section { padding: 88px 16px 32px; }
  .trailer-frame-wrap { margin-top: 20px; border-radius: var(--radius-md); }
}

@media (max-height: 700px) {
  .hero-content-wrap { padding-top: 80px; padding-bottom: 24px; }
  .hero-scroll-hint { display: none; }
  .studio-section { padding-top: 80px; padding-bottom: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-snap-type: none; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
