:root {
    --sand: #9F9077;
    --brown: #37332E;
    --navy: #161E27;
    --navy-deep: #0d1219;
    --dark-green: #0B2D20;
    --alien: #31B56A;

    --milo: #77F3FF;
    --human: #D904FF;
    --hive: #ABFE2A;

    --text: #DDD8CC;
    --muted: #6E7A86;
    --border: #252F3A;

    --mono: 'DM Mono', monospace;
    --sans: 'DM Sans', sans-serif;
    --display: 'Bebas Neue', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
  background: var(--navy-deep);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
}

/* HERO CONTAINER */
.hero {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 70% 50%, rgba(119,243,255,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 30% 80%, rgba(171,254,42,0.04) 0%, transparent 50%),
    linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 50%, var(--dark-green) 100%);
}

/* SCANLINES OVERLAY */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.15) 0px,
    rgba(0,0,0,0.15) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 5;
  opacity: 0.5;
}

/* PIXEL GRID */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(119,243,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(119,243,255,0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 1;
}

/* NAV */
nav {
  position: relative;
  z-index: 50;
  padding: 28px 6vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 0.08em;
  color: var(--text);
}
.nav-logo span { color: var(--hive); }

.nav-links {
  display: flex;
  gap: 32px;
}
.nav-link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-link:hover { color: var(--milo); }

/* HERO LAYOUT */
.hero-grid {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 0 6vw;
  min-height: calc(100vh - 100px);
}

/* LEFT SIDE  Content */
.hero-content {
  position: relative;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--sand);
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--sand);
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(80px, 12vw, 180px);
  line-height: 0.86;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 32px;
  position: relative;
}

.hero-title .accent {
  color: var(--hive);
  position: relative;
}

.hero-pitch {
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.7;
  color: var(--text);
  max-width: 540px;
  margin-bottom: 12px;
  font-weight: 300;
}
.hero-pitch strong { color: var(--milo); font-weight: 500; }

.hero-sub {
  font-size: clamp(13px, 1.1vw, 15px);
  line-height: 1.7;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 40px;
  font-weight: 300;
}

/* CTA */
.cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 32px;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--hive);
  color: var(--navy-deep);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 16px 28px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.cta-primary::after {
  content: '>';
  font-size: 10px;
}

.cta-primary:hover {
  background: var(--milo);
  box-shadow: 0 0 30px rgba(119,243,255,0.4);
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 15px 26px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cta-secondary:hover {
  border-color: var(--milo);
  color: var(--milo);
}

/* NEWSLETTER MODAL */
body.newsletter-modal-open {
  overflow: hidden;
}

body.newsletter-modal-open .hero {
  filter: blur(3px) brightness(0.62);
  transform: scale(1.01);
}

.hero {
  transition: filter 0.24s ease, transform 0.24s ease;
}

.newsletter-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.newsletter-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.newsletter-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 68% 42%, rgba(119,243,255,0.12), transparent 42%),
    rgba(5, 8, 12, 0.7);
  backdrop-filter: blur(8px);
}

.newsletter-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  overflow: hidden;
  padding: 38px;
  border: 1px solid rgba(119,243,255,0.35);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(13,18,25,0.96), rgba(11,45,32,0.92)),
    radial-gradient(circle at 80% 10%, rgba(217,4,255,0.16), transparent 36%);
  box-shadow:
    0 28px 80px rgba(0,0,0,0.65),
    0 0 48px rgba(119,243,255,0.12);
}

.newsletter-dialog::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.18) 0px,
    rgba(0,0,0,0.18) 1px,
    transparent 1px,
    transparent 4px
  );
  pointer-events: none;
}

.newsletter-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.28);
  color: var(--milo);
  font-family: var(--mono);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.newsletter-dialog .corner-mark {
  pointer-events: none;
}

.newsletter-close:hover,
.newsletter-close:focus-visible {
  border-color: var(--milo);
  background: rgba(119,243,255,0.1);
  outline: none;
}

.newsletter-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--sand);
  text-transform: uppercase;
}

.newsletter-kicker .live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hive);
  animation: pulse 1.4s ease-in-out infinite;
}

.newsletter-dialog h2 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(54px, 9vw, 86px);
  line-height: 0.86;
  letter-spacing: 0.02em;
  color: var(--text);
}

.newsletter-dialog p {
  margin: 0 0 28px;
  max-width: 360px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  font-weight: 300;
}

.newsletter-form .ml-form-horizontalRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
}

.newsletter-form input[type="email"] {
  width: 100%;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: rgba(0,0,0,0.35);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 0 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.newsletter-form input[type="email"]::placeholder {
  color: var(--muted);
  text-transform: uppercase;
}

.newsletter-form input[type="email"]:focus {
  border-color: var(--milo);
  box-shadow: 0 0 24px rgba(119,243,255,0.16);
}

.newsletter-submit {
  min-width: 142px;
  height: 48px;
  border: 0;
  background: var(--hive);
  color: var(--navy-deep);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0 20px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.newsletter-submit:hover,
.newsletter-submit:focus-visible {
  background: var(--milo);
  box-shadow: 0 0 30px rgba(119,243,255,0.35);
  outline: none;
}

.newsletter-submit.loading {
  display: none;
  justify-content: center;
  align-items: center;
}

.ml-form-embedSubmitLoad {
  display: inline-block;
  width: 18px;
  height: 18px;
}

.ml-form-embedSubmitLoad::after {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border: 4px solid rgba(13,18,25,0.9);
  border-color: rgba(13,18,25,0.9) rgba(13,18,25,0.9) rgba(13,18,25,0.9) transparent;
  border-radius: 50%;
  animation: ml-form-embedSubmitLoad 1.2s linear infinite;
}

@keyframes ml-form-embedSubmitLoad {
  to { transform: rotate(360deg); }
}

.ml-form-successBody h2 {
  color: var(--hive);
}

.newsletter-frame {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.meta-row {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-value {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

/* RIGHT SIDE  Milo */
.milo-stage {
  position: relative;
  width: 100%;
  height: 80vh;
  max-height: 800px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Backdrop glow that follows the cursor */
.milo-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(119,243,255,0.18) 0%, rgba(119,243,255,0.05) 30%, transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

/* Milo wrapper for layered effects */
.milo-wrap {
  position: relative;
  z-index: 2;
  will-change: transform, filter;
  animation: milo-breathe 4.5s ease-in-out infinite;
}

@keyframes milo-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-12px) scale(1.01); }
}

.milo-img {
  width: auto;
  height: 75vh;
  max-height: 720px;
  display: block;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.6));
}

/* Glitch clones  chromatic shift on glitch trigger */
.milo-clone {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.milo-clone.cyan {
  filter: drop-shadow(0 0 0 #77F3FF);
}

.milo-clone.magenta {
  filter: drop-shadow(0 0 0 #D904FF);
}

/* GLITCH ANIMATION  Sporadic chromatic aberration */
.milo-wrap.glitching .milo-img {
  animation: glitch-main 0.4s steps(2, end);
}

.milo-wrap.glitching .milo-clone.cyan {
  animation: glitch-cyan 0.4s steps(2, end);
}

.milo-wrap.glitching .milo-clone.magenta {
  animation: glitch-magenta 0.4s steps(2, end);
}

@keyframes glitch-main {
  0% { transform: translate(0); filter: drop-shadow(0 20px 40px rgba(0,0,0,0.6)); }
  20% { transform: translate(-3px, 1px); filter: hue-rotate(15deg) drop-shadow(0 20px 40px rgba(0,0,0,0.6)); }
  40% { transform: translate(2px, -1px); }
  60% { transform: translate(-1px, 2px); filter: hue-rotate(-10deg) saturate(1.3) drop-shadow(0 20px 40px rgba(0,0,0,0.6)); }
  80% { transform: translate(1px, 0); }
  100% { transform: translate(0); filter: drop-shadow(0 20px 40px rgba(0,0,0,0.6)); }
}

@keyframes glitch-cyan {
  0% { opacity: 0; transform: translate(0); }
  20% { opacity: 0.6; transform: translate(8px, 0); }
  40% { opacity: 0.4; transform: translate(-6px, 2px); }
  60% { opacity: 0.7; transform: translate(10px, -1px); }
  80% { opacity: 0.3; transform: translate(-4px, 0); }
  100% { opacity: 0; transform: translate(0); }
}

@keyframes glitch-magenta {
  0% { opacity: 0; transform: translate(0); }
  20% { opacity: 0.5; transform: translate(-8px, -1px); }
  40% { opacity: 0.6; transform: translate(6px, 1px); }
  60% { opacity: 0.4; transform: translate(-10px, 2px); }
  80% { opacity: 0.5; transform: translate(4px, 0); }
  100% { opacity: 0; transform: translate(0); }
}

/* Distortion overlay during glitch */
.glitch-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 6;
  background-image: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(119,243,255,0.08) 2px,
    rgba(119,243,255,0.08) 3px
  );
  mix-blend-mode: screen;
}

.glitch-overlay.active {
  animation: overlay-flash 0.4s ease;
}

@keyframes overlay-flash {
  0% { opacity: 0; }
  20% { opacity: 0.7; transform: translateY(-2px); }
  40% { opacity: 0.4; transform: translateY(3px); }
  60% { opacity: 0.6; transform: translateY(-1px); }
  100% { opacity: 0; transform: translateY(0); }
}

/* CORNER MARKERS  Y2K UI feel */
.corner-mark {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 1px solid var(--milo);
  opacity: 0.4;
  z-index: 4;
}
.corner-mark.tl { top: 20px; left: 20px; border-right: none; border-bottom: none; }
.corner-mark.tr { top: 20px; right: 20px; border-left: none; border-bottom: none; }
.corner-mark.bl { bottom: 20px; left: 20px; border-right: none; border-top: none; }
.corner-mark.br { bottom: 20px; right: 20px; border-left: none; border-top: none; }

/* DATA READOUT  Mock UI element next to Milo */
.data-readout {
  position: absolute;
  bottom: 8%;
  right: 0;
  z-index: 8;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--milo);
  letter-spacing: 0.15em;
  line-height: 1.8;
  text-align: right;
  opacity: 0.7;
  pointer-events: none;
}

.data-readout .label {
  color: var(--muted);
  font-size: 9px;
}

.data-readout .live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--hive);
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* FOOTER STATUS BAR */
.status-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: rgba(0,0,0,0.4);
  border-top: 1px solid var(--border);
  z-index: 30;
  display: flex;
  align-items: center;
  padding: 0 6vw;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}

.status-bar .left { display: flex; gap: 24px; }
.status-bar .right { color: var(--milo); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 20px 6vw 60px;
  }
  .milo-stage {
    height: 60vh;
    order: -1;
  }
  .milo-img { height: 55vh; }
  .nav-links { display: none; }
  .data-readout { display: none; }
  .meta-row { gap: 20px; }
  .newsletter-modal { padding: 16px; }
  .newsletter-dialog {
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 34px 22px 26px;
  }
  .newsletter-form .ml-form-horizontalRow {
    grid-template-columns: 1fr;
  }
  .newsletter-submit {
    width: 100%;
  }

  .status-bar {
    position: relative;
    min-height: 58px;
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 12px 6vw calc(12px + env(safe-area-inset-bottom));
    letter-spacing: 0.1em;
  }

  .status-bar .left {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px 14px;
  }

  .status-bar .left span,
  .status-bar .right {
    white-space: nowrap;
  }
}
