:root {
  --bg-color: #030408;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-laser: #ef4444; /* Red for lasers */
  --accent-shield: #06b6d4; /* Cyan for shield */
  --accent-scrap: #f59e0b; /* Amber for scrap */
  --card-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-glow: rgba(6, 182, 212, 0.1);
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'Space Grotesk', sans-serif;
}

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

img {
  -webkit-user-drag: none;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  position: relative;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Background Stars effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.3;
  background-image: 
    radial-gradient(white, rgba(255,255,255,.2) 1px, transparent 2px),
    radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 1px);
  background-size: 500px 500px, 300px 300px;
  background-position: 0 0, 50px 100px;
  animation: starTwinkle 180s linear infinite;
  z-index: -1;
}

@keyframes starTwinkle {
  from { background-position: 0 0, 50px 100px; }
  to { background-position: -500px -500px, -250px -200px; }
}

/* CRT Arcade Screen Overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.15) 50%), 
    linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.03)),
    radial-gradient(ellipse at center, transparent 60%, rgba(0, 0, 0, 0.6) 100%);
  background-size: 100% 3px, 3px 100%, 100% 100%;
  pointer-events: none;
  opacity: 0.8;
  z-index: 9999;
}

a {
  text-decoration: none;
  color: var(--text-main);
  transition: all 0.3s ease;
}

/* Header */
header {
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4rem;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(3, 4, 8, 0.7);
}

header .logo {
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  font-weight: 800;
  letter-spacing: 0px;
}

.brand-pinecone {
  color: #ffffff;
  font-size: 1.4rem;
}

.brand-arcade {
  background: linear-gradient(135deg, #00A3FF 0%, #A040FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-size: 1.4rem;
}

.logo-divider {
  color: rgba(255,255,255,0.15);
  margin: 0 0.5rem;
  font-weight: 400;
  font-size: 1.2rem;
}

.subtitle-game {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.5px;
}

.logo-defense {
  background: linear-gradient(135deg, var(--accent-shield) 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav a {
  margin-left: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

nav a:hover {
  color: var(--accent-shield);
}

/* Hero Section */
.hero {
  max-width: 1200px;
  margin: 3rem auto 6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  gap: 3rem;
  min-height: calc(85vh - 70px);
}

.hero-content {
  flex: 1.2;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  color: #ffffff;
}

.asteroid-text {
  background: url('../assets/images/orbital-defense/asteroid_texture.png') center/cover no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0px 0px 8px rgba(0,0,0,0.8));
  display: inline-block;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.4); /* subtle letters border limit trace */
}

.small-colon {
  font-size: 2.25rem; /* Approx half title height for nice offset accent */
  font-weight: 600;
  vertical-align: middle;
  position: relative;
  top: -2px; /* slight compensation for uppercase midline balance */
  color: rgba(255, 255, 255, 0.8);
  margin: 0 4px;
}

.tagline {
  display: block;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent-shield);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.hero-content p {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 520px;
}

.downloads {
  display: flex;
  gap: 1rem;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  background: #000000;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 7px 0 0 #12141c, 
    0 12px 20px rgba(0, 0, 0, 0.5),
    0 0 15px rgba(6, 182, 212, 0.12);
  transition: all 0.15s ease-out;
  transform: translateY(0);
}
.app-badge:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 
    0 9px 0 0 #12141c,
    0 15px 25px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(6, 182, 212, 0.25);
}

.app-badge:active {
  transform: translateY(4px) !important;
  box-shadow: 
    0 3px 0 0 #12141c,
    0 6px 10px rgba(0,0,0,0.4) !important;
}

.app-badge img {
  width: 26px;
  height: 26px;
}

.badge-text {
  text-align: left;
}

.badge-text span {
  display: block;
  font-size: 0.65rem;
  color: #94a3b8;
  text-transform: uppercase;
}

.badge-text strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  font-family: var(--font-display);
}

/* Floating Frame */
.hero-visual {
  flex: 0.8;
  display: flex;
  justify-content: center;
  position: relative;
}

.visual-container {
  position: relative;
  width: 310px;
  height: 640px;
  animation: float 6s ease-in-out infinite;
}

.visual-container.dual-devices {
  width: 460px;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* Default frame container defaults */
.ipad-frame {
  position: absolute;
  bottom: 0px;
  left: -40px;
  width: 360px;
  height: auto;
  aspect-ratio: 2264 / 2952;
  z-index: 1;
}

.ipad-frame > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ipad-screenshot {
  position: absolute;
  top: 3.4%;
  left: 4.4%;
  width: 91.2%;
  height: 93.2%;
  border-radius: 20px;
  overflow: hidden;
  z-index: 0;
}

.ipad-screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

.phone-frame.slanted {
  top: 80px;
  right: 140px;
  left: auto;
  width: 220px;
  height: auto;
  aspect-ratio: 1406 / 2822;
  z-index: 10;
  transform: rotate(30deg);
  box-shadow: -15px 15px 40px rgba(0,0,0,0.7);
  border-radius: 36px;
  pointer-events: auto; /* allow float animation container bounding */
}

.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.screenshot-content {
  position: absolute;
  top: 10px;
  left: 10px;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  border-radius: 36px;
  overflow: hidden;
  z-index: 1;
}

.phone-frame.slanted .screenshot-content {
  top: 3.5%;
  left: 7.1%;
  width: 85.8%;
  height: 93.3%;
}

.screenshot-content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.glow-backdrop {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110%;
  height: 110%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 60%);
  z-index: 0;
  border-radius: 50%;
}

/* Features Grid */
.features-grid {
  max-width: 1100px;
  margin: 0 auto 8rem;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-item {
  background: var(--card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-item::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 120%, rgba(255,255,255,0.03), transparent 70%);
  transition: opacity 0.3s ease;
}

.feature-item:hover {
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.feature-icon {
  margin-bottom: 1.25rem;
  display: inline-block;
}

.feature-icon img {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
}

.feature-item h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #fff;
}

.feature-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Highlight Section - alternating */
.highlight-section {
  max-width: 1200px;
  margin: 0 auto 8rem;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 4rem;
}

.highlight-section.reverse {
  flex-direction: row-reverse;
}

.highlight-content {
  flex: 1;
}

.highlight-content h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.highlight-content .accent {
  background: linear-gradient(135deg, var(--accent-laser), #f43f5e);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.highlight-content .accent-scrap {
  background: linear-gradient(135deg, var(--accent-scrap), #d97706);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.highlight-content p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.highlight-visual {
  flex: 1;
  display: flex;
  justify-content: center;
}

.highlight-image {
  max-width: 55%; /* reduced size for accented diagrams that aren't literal layout screens */
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.highlight-image img {
  width: 100%;
  display: block;
}

/* Abilities Grid */
.abilities-section {
  max-width: 1200px;
  margin: 0 auto 8rem;
  padding: 0 2rem;
  text-align: center;
}

.abilities-section h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 2.5rem;
  text-transform: uppercase;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.ability-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.ability-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.15);
  transform: scale(1.02);
}

.ability-card h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.ability-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Showcase carousel style */
.showcase-section {
  text-align: center;
  max-width: 1200px;
  margin: 0 auto 8rem;
  padding: 0 2rem;
}

.showcase-section h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 3rem;
  text-transform: uppercase;
}

.carousel-container {
  display: flex;
  overflow-x: auto;
  gap: 1.5rem;
  padding-bottom: 2rem;
  scrollbar-width: thin;
  scrollbar-color: var(--glass-border) transparent;
}

.carousel-container::-webkit-scrollbar {
  height: 6px;
}

.carousel-container::-webkit-scrollbar-thumb {
  background-color: var(--glass-border);
  border-radius: 3px;
}

.carousel-item {
  width: 260px;
  flex-shrink: 0;
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0,0,0,0.4);
  border: 1px solid var(--glass-border);
}

.carousel-item img {
  width: 100%;
  display: block;
}

/* Footer */
footer {
  text-align: center;
  padding: 5rem 2rem 3rem;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  background: rgba(0,0,0,0.2);
}

footer p {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

footer a {
  color: var(--text-main);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Responsive */
@media (max-width: 1000px) {
  .hero {
    flex-direction: column;
    text-align: center;
    margin-top: 1rem;
    gap: 2rem;
  }
  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero-content h1 {
    font-size: 3.5rem;
  }
  .downloads {
    justify-content: center;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .highlight-section {
    flex-direction: column !important;
    text-align: center;
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  header {
    padding: 0 2rem;
  }
}

@media (max-width: 600px) {
  .hero {
    min-height: auto;
    margin: 2rem auto 3rem;
  }
  .hero-content h1 {
    font-size: 2.75rem;
  }
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .brand-pinecone, .brand-arcade, .logo-divider {
    display: none;
  }
  .subtitle-game {
    font-size: 1.1rem;
    font-weight: 800;
  }
  .hero-visual {
    display: none;
  }
}
