/* ============================================
   TRUESIGHT 5E LANDING — DESIGN SYSTEM
   ============================================ */

:root {
  /* Colors — match the app */
  --bg-base: #0a0a14;
  --bg-elevated: #151620;
  --accent-blue: #64B5F6;
  --accent-purple: #5754A8;
  --text: #FFFFFF;
  --text-muted: rgba(255, 255, 255, 0.7);
  --text-subtle: rgba(255, 255, 255, 0.4);
  --border-subtle: rgba(87, 84, 168, 0.3);
  --border-bright: rgba(100, 181, 246, 0.5);

  /* Typography */
  --font-heading: 'Cinzel', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  /* Sizes */
  --max-content: 1200px;
  --radius: 16px;

  /* Shadows / glows */
  --glow-blue: 0 0 40px rgba(100, 181, 246, 0.2);
  --glow-blue-strong: 0 0 60px rgba(100, 181, 246, 0.4);
}

/* ============================================
   RESETS
   ============================================ */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, picture, video { max-width: 100%; display: block; }

button, input { font: inherit; color: inherit; }

a { color: var(--accent-blue); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--space-sm);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); color: var(--accent-blue); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); color: var(--accent-blue); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p { margin: 0 0 var(--space-sm); }

.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); font-size: 0.875rem; }

/* ============================================
   LAYOUT PRIMITIVES
   ============================================ */

section {
  padding: var(--space-lg) var(--space-md);
  max-width: var(--max-content);
  margin: 0 auto;
}

.container {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ============================================
   REDUCED MOTION
   ============================================ */

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

/* ============================================
   §1 HERO
   ============================================ */

.hero {
  position: relative;
  min-height: min(700px, 90vh);
  padding: var(--space-xl) var(--space-md);
  max-width: none;
  margin: 0;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("assets/gm-dashboard.png");
  background-image: image-set(
    url("assets/gm-dashboard.webp") type("image/webp") 1x,
    url("assets/gm-dashboard.png") 1x
  );
  background-size: cover;
  background-position: center;
  z-index: -2;
  opacity: 0.4;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(10, 10, 20, 0.5) 0%,
    rgba(10, 10, 20, 0.8) 60%,
    var(--bg-base) 100%);
  z-index: -1;
}

.hero__content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.25rem, 6vw, 4rem);
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}

.hero__subhead {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.hero__footnote {
  margin-top: var(--space-md);
}

/* ============================================
   PRIMARY CTA + BUTTON GROUPS
   ============================================ */

.hero__ctas,
.final-cta__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  margin: 0 auto var(--space-sm);
}

.cta-primary {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  background: var(--accent-blue);
  color: #0a0a14;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
  white-space: nowrap;
}

.cta-primary:hover,
.cta-primary:focus-visible {
  filter: brightness(1.1);
  box-shadow: var(--glow-blue-strong);
  opacity: 1;
  outline: none;
}

.cta-primary:active { transform: translateY(1px); }

.cta-primary--large {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

/* ============================================
   SECONDARY CTA
   ============================================ */

.cta-secondary {
  display: inline-block;
  margin-top: var(--space-xs);
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}

.cta-secondary:hover,
.cta-secondary:focus-visible {
  border-color: var(--accent-blue);
  background: rgba(100, 181, 246, 0.08);
  opacity: 1;
  outline: none;
  box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.25);
}

/* ============================================
   SHARED: CONTENT SECTIONS
   ============================================ */

.wedge, .sheets, .depth {
  text-align: center;
}

.wedge h2, .sheets h2, .depth h2 {
  margin-bottom: var(--space-sm);
}

.wedge > p, .sheets > p, .depth > p {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.emphasis {
  color: var(--text) !important;
  font-weight: 600;
  font-size: 1.1rem !important;
  margin-top: var(--space-md) !important;
}

/* ============================================
   SCREENSHOT FRAMES
   ============================================ */

.screenshot {
  margin: var(--space-md) auto 0;
  max-width: 100%;
}

.screenshot img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--glow-blue), 0 20px 60px rgba(0, 0, 0, 0.5);
  display: block;
}

.screenshot a {
  display: block;
  cursor: zoom-in;
  transition: transform 0.2s, box-shadow 0.2s;
  border-radius: var(--radius);
}

.screenshot a:hover,
.screenshot a:focus-visible {
  transform: scale(1.01);
  box-shadow: var(--glow-blue-strong);
  outline: none;
  opacity: 1;
}

.screenshot a:hover img,
.screenshot a:focus-visible img {
  border-color: var(--border-bright);
}

/* ============================================
   §3 SHEETS GRID
   ============================================ */

.sheets__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  align-items: center;
  justify-items: center;
  margin-top: var(--space-md);
}

.screenshot--mobile {
  max-width: 280px;
}

.screenshot--desktop {
  max-width: 100%;
}

@media (min-width: 900px) {
  .sheets__grid {
    grid-template-columns: 2fr 1fr;
    gap: var(--space-lg);
  }
}

/* ============================================
   §4 DEPTH
   ============================================ */

.depth__bullets {
  list-style: none;
  padding: 0;
  margin: var(--space-md) auto;
  max-width: 720px;
  text-align: left;
  display: grid;
  gap: var(--space-sm);
}

.depth__bullets li {
  padding: var(--space-sm) var(--space-md);
  background: rgba(21, 22, 32, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}

.depth__bullets strong {
  color: var(--accent-blue);
  font-family: var(--font-heading);
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1.05rem;
}

.depth__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-md);
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   §5 PRICING
   ============================================ */

.pricing {
  text-align: center;
}

.pricing__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  max-width: 960px;
  margin: var(--space-md) auto 0;
}

@media (min-width: 820px) {
  .pricing__grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }
}

.tier {
  position: relative;
  padding: var(--space-md);
  background: rgba(21, 22, 32, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  text-align: left;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.tier:hover {
  transform: translateY(-2px);
  border-color: var(--border-bright);
}

.tier h3 {
  font-family: var(--font-heading);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

.tier ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.tier li {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding-left: 1.25rem;
  position: relative;
}

.tier li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-blue);
  font-weight: 700;
}

.tier strong {
  color: var(--accent-blue);
}

/* Master tier highlight */

.tier--highlight {
  border-color: var(--accent-blue);
  box-shadow: var(--glow-blue-strong);
  background: rgba(21, 22, 32, 0.9);
}

@media (min-width: 820px) {
  .tier--highlight {
    transform: scale(1.03);
  }
  .tier--highlight:hover {
    transform: scale(1.03) translateY(-2px);
  }
}

.tier__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-blue);
  color: #0a0a14;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing__footer {
  margin-top: var(--space-md);
}

/* ============================================
   §6 PLATFORMS
   ============================================ */

.platforms {
  text-align: center;
}

.platforms__list {
  list-style: none;
  padding: 0;
  margin: var(--space-md) auto;
  max-width: 520px;
  display: grid;
  gap: var(--space-xs);
  text-align: left;
}

.platforms__list li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  background: rgba(21, 22, 32, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}

.platforms__status {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

.platforms__live .platforms__status {
  background: rgba(143, 240, 164, 0.15);
  color: #8FF0A4;
  border: 1px solid rgba(143, 240, 164, 0.3);
}

.platforms__soon .platforms__status {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-subtle);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.platforms__soon { color: var(--text-muted); }

/* ============================================
   §7 FINAL CTA
   ============================================ */

.final-cta {
  position: relative;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  isolation: isolate;
}

.final-cta__glow {
  position: absolute;
  inset: 50% 50%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(100, 181, 246, 0.15) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: -1;
}

.final-cta h2 {
  font-size: clamp(2.5rem, 6vw, 4rem);
}

.final-cta > p {
  max-width: 480px;
  margin: 0 auto var(--space-md);
  color: var(--text-muted);
}

.final-cta .cta-secondary {
  margin-top: var(--space-md);
}

.final-cta > .subtle {
  margin-top: var(--space-md);
}

/* ============================================
   §8 FOOTER
   ============================================ */

.site-footer {
  max-width: var(--max-content);
  margin: var(--space-lg) auto 0;
  padding: var(--space-md);
  border-top: 1px solid var(--border-subtle);
}

.site-footer__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  align-items: center;
  margin-bottom: var(--space-md);
}

@media (min-width: 720px) {
  .site-footer__row {
    grid-template-columns: auto 1fr auto;
  }
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  color: var(--text);
}

.site-footer__brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.site-footer__links {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

.site-footer__made {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
}

@media (min-width: 720px) {
  .site-footer__made { text-align: right; }
}

.site-footer__privacy,
.site-footer__legal {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.6;
  max-width: 800px;
}

.site-footer__privacy strong { color: var(--text); }

.site-footer__legal {
  margin-top: var(--space-sm);
}

/* ============================================
   STARFIELD CANVAS
   ============================================ */

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.8;
}

body > :not(#starfield) {
  position: relative;
  z-index: 1;
}

/* ============================================
   RESPONSIVE POLISH
   ============================================ */

/* Flex/grid children safety: prevent overflow at narrow widths */
.hero, .wedge, .sheets, .depth, .pricing, .platforms, .final-cta { min-width: 0; }

/* Intermediate breakpoint: pricing cards feel tight between 820-1100px — loosen padding */
@media (min-width: 820px) and (max-width: 1100px) {
  .pricing__grid { gap: var(--space-sm); }
  .tier { padding: var(--space-sm); }
  .tier__price .num { font-size: 2rem; }
}

/* Mobile footer: stack rows with more breathing room */
@media (max-width: 720px) {
  .site-footer__row {
    text-align: center;
  }
  .site-footer__brand {
    justify-content: center;
  }
}
