/* ==========================================================================
   Stellar Cafe — site styles
   Sections in this file follow the order of index.html:
     1. Design tokens     5. About
     2. Base / reset      6. Screenshots + lightbox
     3. Header + nav      7. Press
     4. Hero + buttons    8. Closing CTA + footer
   Change colours, fonts and spacing in the tokens below, not inline.
   ========================================================================== */

/* 1. Design tokens ------------------------------------------------------- */
:root {
  --color-bg: #111111;
  --color-surface: #1a1a22;
  --color-text: #f2f2f7;
  --color-text-muted: #b9b9c8;
  --color-accent: #3d67f3;        /* primary blue: headings, buttons, quote cards */
  --color-accent-hover: #5a7ef7;
  --color-brand-purple: #564ce3;  /* logo purple */
  --color-glow: rgba(61, 103, 243, 0.45);

  --font-heading: "Gugi", system-ui, sans-serif;    /* h1–h3 (single weight: 400) */
  --font-display: "Tektur", system-ui, sans-serif;  /* nav, trailer label, press quote sources */
  --font-body: "Poppins", system-ui, sans-serif;

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

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  -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.12;
  color: var(--color-accent);
  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; }

.starfield {
  position: fixed; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  pointer-events: none;
}

.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.5rem);
  margin-bottom: clamp(32px, 5vw, 56px);
}

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

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

.site-nav ul {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 28px;
  list-style: none; margin: 0; padding: 0;
}

.site-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  text-decoration: none;
  position: relative;
  padding: 4px 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-accent-hover); }
.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: 120px; }

  .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(26, 26, 34, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.08);
    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(32px, 6vw, 80px) var(--gutter) 0;
}

.hero__stage {
  position: relative;
  width: min(100%, 900px);
  margin-inline: auto;
}

.hero__robot {
  position: absolute; top: 50%;
  width: clamp(90px, 13vw, 170px);
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.6));
  animation: float 6s ease-in-out infinite;
  pointer-events: none;
}
.hero__robot--left  { right: calc(100% - 4%); translate: 0 -50%; }
.hero__robot--right { left: calc(100% - 4%); translate: 0 -50%; animation-delay: -3s; }

@keyframes float {
  0%, 100% { transform: translateY(-10px) rotate(-2deg); }
  50%      { transform: translateY(10px) rotate(2deg); }
}

.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(61, 103, 243, 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.7));
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  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: var(--radius);
  background: var(--color-accent); color: #fff; font-weight: 600; text-decoration: none;
}

/* No video ID configured yet: show the poster without the play affordance. */
.trailer.is-disabled .trailer__poster { cursor: default; }
.trailer.is-disabled .trailer__play,
.trailer.is-disabled .trailer__label { display: none; }
.trailer.is-disabled .trailer__poster:hover img { transform: none; filter: none; }

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

.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 280px; min-height: 64px;
  padding: 12px 32px;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(61, 103, 243, 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(61, 103, 243, 0.45);
}
.btn__main {
  font-weight: 700; font-size: 0.85rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  line-height: 1.4;
}
.btn__sub { font-size: 0.78rem; opacity: 0.85; line-height: 1.4; }

.btn--light { background: #fff; color: var(--color-brand-purple); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
.btn--light:hover { background: #ecebff; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4); }

@media (max-width: 760px) {
  .hero__robot { display: none; }
  .btn { width: 100%; min-width: 0; }
}

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

.about__body {
  display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: clamp(24px, 4vw, 56px);
  max-width: 900px; margin: clamp(32px, 5vw, 48px) auto 0;
}

.about__robot { width: 100%; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.6)); }

.about__text p { margin: 0 0 1em; color: var(--color-text-muted); font-size: 1.05rem; }
.about__text .about__lead { color: var(--color-text); font-weight: 600; font-size: 1.15rem; }

@media (max-width: 760px) {
  .about__body { grid-template-columns: 1fr; text-align: center; }
  .about__robot { width: 160px; margin-inline: auto; order: 2; }
}

/* 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(5, 5, 10, 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 --------------------------------------------------------------- */
.press__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 32px);
}

.quote {
  margin: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(28px, 3vw, 40px);
  background: var(--color-accent);
  border-radius: var(--radius);
  text-align: center;
  position: relative;
  box-shadow: 0 16px 40px rgba(61, 103, 243, 0.2);
}
.quote::before {
  content: "“";
  position: absolute; top: -6px; left: 18px;
  font-family: Georgia, serif; font-size: 6rem; line-height: 1;
  color: rgba(255, 255, 255, 0.18);
}

.quote blockquote {
  margin: 0;
  font-weight: 600; font-size: 1.05rem; line-height: 1.6;
}

.quote figcaption {
  margin-top: 20px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  letter-spacing: 0.04em;
}
.quote figcaption::before { content: "— "; }
.quote figcaption a { text-decoration-thickness: 1px; text-underline-offset: 4px; }
.quote figcaption a:hover { text-decoration-thickness: 2px; }

@media (max-width: 900px) { .press__grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; } }

/* Press kit: centred title + square button, ship flying up past the button's right side */
.presskit { text-align: center; }
.presskit__cta {
  position: relative;
  display: flex; justify-content: center;
  padding-bottom: clamp(90px, 9vw, 130px); /* room for the ship, which hangs below the button */
}
.presskit__cta .btn { position: relative; z-index: 1; }

.presskit__ship {
  position: absolute;
  top: -24px;
  left: calc(50% - 10px);
  width: clamp(260px, 34vw, 440px);
  pointer-events: none;
  animation: cruise 6s ease-in-out infinite;
}

@keyframes cruise {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(8px, -8px); }
}

@media (max-width: 760px) {
  .presskit__cta { flex-direction: column; align-items: center; padding-bottom: 0; }
  .presskit__ship { position: static; width: 240px; margin: 24px auto 0; }
}

/* 8. Closing CTA + footer ------------------------------------------------ */
.cta {
  position: relative;
  margin-top: var(--section-space);
  padding: clamp(64px, 9vw, 112px) var(--gutter);
  background: url("/images/banner-wide.webp") center / cover no-repeat, var(--color-brand-purple);
  text-align: center;
  overflow: hidden;
}

.cta__inner { position: relative; z-index: 1; }

.cta__title { color: #fff; font-size: clamp(2.25rem, 5vw, 3.5rem); }
.cta__text { margin: 12px 0 0; font-size: 1.15rem; color: rgba(255, 255, 255, 0.85); }
.cta .buy-buttons { margin-top: 32px; }


.cta__community { margin: 28px 0 0; color: rgba(255, 255, 255, 0.85); }
.cta__community a { color: #fff; font-weight: 600; text-underline-offset: 4px; white-space: nowrap; }
.cta__community a:hover { text-decoration-thickness: 2px; }

.site-footer {
  padding: 48px var(--gutter) 32px;
  background: #0b0b0e;
  font-size: 0.9rem;
}

.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; }
}

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