:root {
  --bg: #05060a;
  --bg-soft: #070914;
  --card: #0b0e1b;
  --border: rgba(255, 255, 255, 0.08);
  --text-main: #f5f5f8;
  --text-muted: #a2a7b6;
  --accent: #f5993d;      /* orange */
  --accent-soft: rgba(245, 153, 61, 0.12);
  --accent-cyan: #00ffff; /* for tiny highlights */
  --radius: 18px;
  --radius-soft: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  min-height: 100vh;

  background-color: #05060a; /* solid fallback */
  position: relative;
  color: var(--text-main);
}

/* Fixed background stack (WORM / HOLE / spacebg) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;

  background-image:
    url("assets/img/worm_neon_tube.png"),
    url("assets/img/hole_neon_tube.png"),
    url("assets/img/spacebg.png");

  background-repeat:
    no-repeat,
    no-repeat,
    no-repeat;

  background-size:
    512px auto,   /* WORM tube */
    512px auto,   /* HOLE tube */
    auto 1024px;  /* spacebg */

  background-position:
    60% 10%,                /* WORM tube */
    60% calc(10% + 96px),   /* HOLE tube */
    center top;             /* spacebg */

  background-blend-mode:
    screen,  /* WORM tube */
    screen,  /* HOLE tube */
    normal;  /* spacebg */
}

main {
  width: 100%;
  padding-top: 0;
}

/* Generic layout */

.section {
  padding: 48px 20px;
  background: var(--bg);
}

.hero {
  padding: 48px 20px;
}

@media (min-width: 768px) {
  .section {
    padding: 64px 40px;
  }

  .hero {
    padding: 64px 40px;
  }
}

.section-inner {
  max-width: 960px;
  margin: 0 auto;
}

/* Hero */

.hero {
  padding-top: 256px;
  padding-bottom: 56px;
  position: relative;
  isolation: isolate; /* keep pseudo behind content */
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    url("assets/img/neon-wave.png"),
    url("assets/img/wave-bottom.png");
  background-repeat:
    no-repeat,
    no-repeat;
  background-size:
    auto 1024px,
    auto 1024px;
  background-position:
    center -200px,
    center -200px;
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
  z-index: 1;
}

@media (min-width: 900px) {
  .hero-inner {
    flex-direction: row;
    align-items: center;
    gap: 48px;
  }
}

.hero-copy {
  flex: 1;
}

.hero-media {
  flex: 1;
  display: flex;
  justify-content: center;
}

.hero-media img {
  width: 100%;
  max-width: 420px;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  object-fit: cover;
}

/* Hero content */

.hero-logo {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  overflow: hidden;
}

.hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-title {
  font-size: 32px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 4px;
}

.hero-tagline {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.hero-blurb {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 460px;
  margin: 0 0 18px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

@media (min-width: 640px) {
  .hero-actions {
    flex-direction: row;
    align-items: center;
  }
}

.hero-platform-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #05060a;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

/* Social badges (matching remgrandt.dev style) */

.social-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px dashed var(--border);
  text-decoration: none;
}

.social-badge:hover {
  border-style: solid;
}

.social-badge-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Handle both img and inline SVG */
.social-badge-icon img,
.social-badge-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Sections */

.section-about {
  background: var(--bg-soft);
}

.section-title {
  font-size: 16px;
  margin: 0 0 8px;
}

.section-body {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 14px;
}

.section-body.note {
  font-size: 13px;
}

/* Privacy / legal */

.section-privacy {
  background: var(--bg-soft);
}

.policy-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

@media (min-width: 768px) {
  .policy-card {
    padding: 32px;
  }
}

.policy-card p,
.policy-card li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}

.policy-lede {
  font-size: 15px;
  color: var(--text-main);
  margin-top: 0;
}

.policy-card h2 {
  margin: 28px 0 8px;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.policy-card h3 {
  margin: 18px 0 6px;
  font-size: 13px;
  color: var(--text-main);
}

.policy-card ul {
  padding-left: 18px;
  margin: 6px 0 14px;
  display: grid;
  gap: 4px;
}

.policy-card a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.policy-card a:hover {
  text-decoration: underline;
}

/* Features */

.feature-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  gap: 6px;
}

.feature-list li {
  font-size: 14px;
  color: var(--text-muted);
}

/* Trailer */

.section-trailer {
  background: var(--bg);
}

.section-trailer .video-frame {
  margin-top: 16px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: radial-gradient(circle at top, #11152a 0, #05060a 50%);
  padding: 10px;
}

.section-trailer video {
  width: 100%;
  display: block;
  border-radius: 18px;
  background: #000;
}

/* Make the YouTube embed fill the card at 16:9 */
.section-trailer .video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;      /* keeps it 16:9 on all screens */
  border-radius: 18px;
  overflow: hidden;
  background: #000;
}

/* Size the iframe to fully fill the wrapper */
.section-trailer .video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.section-trailer .video-wrapper video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
}

.section-trailer .video-frame {
  margin: 16px auto 0; /* instead of just margin-top */
  max-width: 960px;
}


/* Screenshots */

.section-screenshots {
  background: var(--bg);
}

.screenshot-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 900px) {
  .screenshot-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.screenshot {
  margin: 0;
  border-radius: var(--radius-soft);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #05060a;
  cursor: zoom-in;
}

.screenshot img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  cursor: zoom-in;
}

.screenshot:focus {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Screenshot modal */

.screenshot-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
}

.screenshot-modal.is-open {
  display: flex;
}

.screenshot-modal-dialog {
  position: relative;
  max-width: 1100px;
  width: 100%;
}

.screenshot-modal-image {
  width: 100%;
  display: block;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75);
  background: #000;
}

.screenshot-modal-caption {
  margin: 10px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.screenshot-modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.screenshot-modal-close:hover {
  background: var(--bg);
  border-color: var(--accent);
}

/* TestFlight */

.section-testflight {
  background: var(--bg-soft);
}

.section-testflight .btn-primary {
  margin-top: 8px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 18px 20px 28px;
  background: #05060a;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-inner a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.footer-inner a:hover {
  text-decoration: underline;
}

/* Small screens tweaks */

@media (max-width: 639px) {
  .hero-copy {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "title title"
      "tagline tagline"
      "blurb blurb"
      "logo actions"
      "note note";
    column-gap: 12px;
  }

  .hero-logo {
    grid-area: logo;
    margin: 0;
    align-self: start;
  }

  .hero-title {
    grid-area: title;
  }

  .hero-tagline {
    grid-area: tagline;
  }

  .hero-blurb {
    grid-area: blurb;
  }

  .hero-actions {
    grid-area: actions;
    align-self: start;
  }

  .hero-platform-note {
    grid-area: note;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 26px;
  }

  .hero-logo {
    width: 68px;
    height: 68px;
  }
}

/* Mobile: fit the entire banner stack to viewport width */
@media (max-width: 768px) {
  .hero::before {
    background-image:
      url("assets/img/neon-wave.png"),
      url("assets/img/wave-bottom.png"),
      linear-gradient(var(--bg), var(--bg));
    background-repeat:
      no-repeat,
      no-repeat,
      no-repeat;
    background-size:
      110% auto,
      110% auto,
      100% 500px; /* height of bg-colored backer */
    background-position:
      center top,
      center top,
      center 220px; /* vertical start of backer */
  }

  body::before {
    background-size:
      50% auto,  /* WORM tube */
      50% auto,  /* HOLE tube */
      100% auto; /* spacebg */
    background-position:
      60% top,
      60% 5%,
      center top;
  }

  .hero {
    padding-top: 256px;
  }

  main {
    padding-top: 0;
  }
}

/* Tablet portrait (iPad-ish): add extra top padding */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
  .hero {
    padding-top: calc(256px + 120px);
  }
}
