/* ==========================================================================
   Robo Detective — site styles
   Sections in this file follow the order of index.html:
     1. Design tokens     5. About (polaroids)
     2. Base / reset      6. Screenshots + lightbox
     3. Header + nav      7. Press kit
     4. Hero + buttons    8. Discord skyline band + footer
   Change colours, fonts and spacing in the tokens below, not inline.
   ========================================================================== */

/* 1. Design tokens ------------------------------------------------------- */
:root {
  --color-bg: #000000;
  --color-hero-top: #06306a;      /* navy at the top of the page, fades to black */
  --color-text: #f2f2f2;
  --color-text-muted: #b8c2d0;
  --color-accent: #0a72c4;        /* buttons, headings */
  --color-accent-hover: #2389da;
  --color-heading: #1677d0;
  --color-label: #7cc0ff;         /* "Voice-First Gameplay" style labels */
  --color-glow: rgba(10, 114, 196, 0.45);

  --font-heading: "Gugi", system-ui, sans-serif;               /* h1–h3 (single weight: 400) */
  --font-body: "Courier Prime", "Courier New", monospace;       /* typewriter detective feel */
  --font-button: "Poppins", system-ui, sans-serif;

  --content-width: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-space: clamp(64px, 10vw, 128px);
  --radius: 8px;
}

/* 2. Base / reset -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    linear-gradient(180deg, var(--color-hero-top) 0, #041f47 520px, #000 1300px) top / 100% 1300px no-repeat,
    var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1.08rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-heading);
  margin: 0;
  text-wrap: balance;
}

:focus-visible { outline: 3px solid var(--color-accent-hover); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 8px 16px; background: var(--color-accent); color: #fff; border-radius: var(--radius);
}
.skip-link:focus { top: 16px; }

.section {
  width: min(100% - 2 * var(--gutter), var(--content-width));
  margin-inline: auto;
  padding-block: var(--section-space) 0;
  scroll-margin-top: 24px;
}

.section__title {
  text-align: center;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  margin-bottom: clamp(32px, 5vw, 56px);
}

/* Hand-drawn style underline, like the old site's "Screenshots" heading */
.section__title--underline::after {
  content: "";
  display: block;
  width: min(320px, 70%);
  height: 12px;
  margin: 6px auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 12' preserveAspectRatio='none'%3E%3Cpath d='M3 9 C 80 4, 200 3, 317 6' fill='none' stroke='%231677d0' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* 3. Header + nav -------------------------------------------------------- */
.site-header {
  position: relative; z-index: 20;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  padding: 32px var(--gutter) 0;
}

.site-header__logo img { width: clamp(220px, 28vw, 400px); }

.site-nav ul {
  display: flex; flex-wrap: nowrap; justify-content: center; gap: clamp(14px, 2vw, 28px);
  white-space: nowrap;
  list-style: none; margin: 0; padding: 0;
}

.site-nav a {
  font-family: var(--font-body);
  font-size: clamp(0.92rem, 1.25vw, 1.08rem);
  text-decoration: none;
  position: relative;
  padding: 2px 0;
  transition: color 0.2s;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--color-accent);
  transform: scaleX(0); transition: transform 0.25s;
}
.site-nav a:hover { color: var(--color-label); }
.site-nav a:hover::after { transform: scaleX(1); }

.nav-toggle { display: none; }

@media (max-width: 760px) {
  .site-header { flex-direction: row; justify-content: space-between; padding-top: 16px; }
  .site-header__logo img { width: 150px; }

  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 44px; height: 44px; padding: 10px;
    background: none; border: 0; cursor: pointer;
  }
  .nav-toggle span {
    display: block; height: 2px; background: var(--color-text); border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .site-nav {
    position: absolute; top: 100%; left: var(--gutter); right: var(--gutter);
    background: rgba(4, 22, 50, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 12px 0;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: 12px 24px; }
  .site-nav a::after { display: none; }
}

/* 4. Hero + buttons ------------------------------------------------------ */
.hero { padding: clamp(40px, 7vw, 96px) var(--gutter) 0; }

.hero__stage {
  position: relative;
  width: min(900px, 70vw); /* leaves room for the robots on each side at every screen size */
  margin-inline: auto;
}

/* Robots beside the trailer (like the old site): static, about 80% of the
   trailer's height, partly tucked behind it. Shown on all screen sizes. */
.hero__robot {
  position: absolute; top: 50%; translate: 0 -50%;
  height: 78%; width: auto; max-width: none;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.6));
  pointer-events: none;
}
.hero__robot--left  { right: 94.5%; } /* about a quarter of each robot tucked behind the trailer, like the old site */
.hero__robot--right { left: 94.5%; }

.trailer {
  position: relative; z-index: 1;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 80px var(--color-glow);
}

.trailer__poster { all: unset; cursor: pointer; position: absolute; inset: 0; display: block; }
.trailer__poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s, filter 0.3s; }
.trailer__poster:hover img { transform: scale(1.03); filter: brightness(0.85); }
.trailer__poster:focus-visible { outline: 3px solid var(--color-accent-hover); outline-offset: -3px; }

.trailer__play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  display: grid; place-items: center;
  width: clamp(64px, 9vw, 92px); aspect-ratio: 1;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 8px rgba(10, 114, 196, 0.3), 0 8px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s, background 0.2s;
}
.trailer__play svg { width: 45%; fill: #fff; margin-left: 6%; }
.trailer__poster:hover .trailer__play { transform: scale(1.08); background: var(--color-accent-hover); }

.trailer__label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 20px 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  font-family: var(--font-button); font-weight: 600; font-size: 1rem;
  text-align: center;
}

.trailer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Shown only when JavaScript is off (inside <noscript>): plain link to the video. */
.trailer__fallback {
  position: absolute; left: 50%; bottom: 20px; translate: -50% 0; z-index: 2;
  padding: 10px 18px; border-radius: 999px;
  background: var(--color-accent); color: #fff; font-family: var(--font-button); font-weight: 600; text-decoration: none;
}

.trailer.is-disabled .trailer__poster { cursor: default; }
.trailer.is-disabled .trailer__play,
.trailer.is-disabled .trailer__label { display: none; }

.buy-buttons {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 24px;
  margin-top: clamp(32px, 5vw, 56px);
}

/* Pill buttons, like the old site */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 58px;
  padding: 14px 36px;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  text-align: center;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(10, 114, 196, 0.3);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(10, 114, 196, 0.45);
}
.btn__main { font-family: var(--font-button); font-weight: 700; font-size: 1rem; line-height: 1.35; }

@media (max-width: 760px) {
  .hero__robot { filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6)); }
  .trailer__play { width: 52px; box-shadow: 0 0 0 5px rgba(10, 114, 196, 0.3), 0 6px 20px rgba(0, 0, 0, 0.5); }
  .trailer__label { display: none; }
  .btn { width: 100%; }
}

/* 5. About (polaroids) --------------------------------------------------- */
.about__title {
  max-width: 820px; margin-inline: auto;
  text-align: center;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
}

.about__body {
  display: grid; grid-template-columns: 1fr minmax(0, 640px) 1fr; align-items: center;
  gap: clamp(24px, 3vw, 48px);
  margin-top: clamp(36px, 5vw, 64px);
}

.about__polaroid { width: 100%; max-width: 260px; justify-self: center; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.6)); }
.about__polaroid--left { justify-self: end; }
.about__polaroid--right { justify-self: start; margin-top: -40px; }

.about__text { font-size: 1.15rem; line-height: 1.7; }
.about__text p { margin: 0 0 1.1em; }
.about__text p:last-child { margin-bottom: 0; }
.about__label { color: var(--color-label); font-style: italic; font-weight: 700; margin-right: 0.35em; }

@media (max-width: 900px) {
  .about__text { font-size: 1.05rem; }
  .about__body { grid-template-columns: 1fr 1fr; }
  .about__text { grid-column: 1 / -1; grid-row: 1; }
  .about__polaroid { max-width: 220px; }
  .about__polaroid--left { justify-self: end; }
  .about__polaroid--right { justify-self: start; margin-top: 0; }
}

/* 6. Screenshots + lightbox ---------------------------------------------- */
.gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.6vw, 20px);
  list-style: none; margin: 0; padding: 0;
}

.gallery button {
  all: unset; cursor: zoom-in; display: block;
  border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16 / 9;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.25s, transform 0.25s;
}
.gallery button:hover,
.gallery button:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 0 0 2px var(--color-accent), 0 12px 32px var(--color-glow);
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.gallery button:hover img { transform: scale(1.04); }

/* Tablet + phone: two columns. */
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: transparent;
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(0, 4, 12, 0.92); backdrop-filter: blur(4px); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox__img {
  max-width: min(100vw - 160px, 1600px); max-height: 86vh;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}
.lightbox__btn {
  position: fixed;
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1); color: #fff;
  font-size: 2rem; line-height: 1; cursor: pointer;
  transition: background 0.2s;
}
.lightbox__btn:hover { background: var(--color-accent); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev { left: 20px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 20px; top: 50%; translate: 0 -50%; }

@media (max-width: 760px) {
  .lightbox__img { max-width: 94vw; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 24px; translate: none; }
}

/* 7. Press kit ----------------------------------------------------------- */
.presskit { text-align: center; }
.presskit .section__title { margin-bottom: 0; }
.presskit .buy-buttons { margin-top: 28px; }

/* 8. Discord skyline band + footer --------------------------------------- */
/* Night-city skyline (like the old site) with the Discord invite over it. */
.discord {
  margin-top: var(--section-space);
  padding: clamp(96px, 11vw, 150px) var(--gutter) clamp(96px, 11vw, 150px);
  background:
    radial-gradient(ellipse 42% 32% at 50% 52%, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0) 100%), /* softens the windows behind the text */
    linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 80%, #06080c 100%),
    url("/images/skyline.webp") center bottom / cover no-repeat,
    #000;
}

.discord__inner {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(20px, 3vw, 40px);
  max-width: 1000px; margin-inline: auto;
}

.discord__logo { width: clamp(64px, 6vw, 88px); flex: none; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.7)); }

/* Plain white heading; a soft shadow keeps it readable over the lit windows. */
.discord__title {
  color: #fff;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  white-space: nowrap;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 0 24px rgba(0, 0, 0, 0.85);
}

.discord .btn { flex: none; min-width: 190px; }

@media (max-width: 760px) {
  .discord__inner { flex-direction: column; gap: 18px; text-align: center; }
  .discord__title { white-space: normal; }
  .discord .btn { width: 100%; }
}

.site-footer {
  padding: 48px var(--gutter) 32px;
  background: #06080c;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.95rem;
}

.site-footer__top,
.site-footer__bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px;
  max-width: var(--content-width); margin-inline: auto;
}

.site-footer__bottom {
  margin-top: 32px; padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__brand p { margin: 12px 0 0; color: var(--color-text-muted); }
.site-footer__brand p a { color: var(--color-text); text-underline-offset: 3px; }
.site-footer__brand p a:hover { color: var(--color-accent-hover); }

.site-footer__studio { display: inline-block; }
.site-footer__studio img { width: 180px; opacity: 0.9; transition: opacity 0.2s; }
.site-footer__studio:hover img { opacity: 1; }

.socials { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.socials a {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text);
  transition: background 0.2s, transform 0.2s;
}
.socials a:hover { background: var(--color-accent); transform: translateY(-2px); }
.socials svg { width: 20px; height: 20px; fill: currentColor; }

.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer__links a { color: var(--color-text-muted); text-decoration: none; transition: color 0.2s; }
.site-footer__links a:hover { color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; }

.site-footer__legal { margin: 0; color: var(--color-text-muted); }

@media (max-width: 760px) {
  .site-footer__top,
  .site-footer__bottom { flex-direction: column; text-align: center; }
  .site-footer__links { justify-content: center; }
  .socials { justify-content: center; }
  .site-footer__legal, .site-footer__links { font-size: 0.85rem; }
}

/* Reduced motion: stop decorative transitions. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
