:root {
  --bg-color: #0f172a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-primary: #22c55e; /* Green for fresh groceries */
  --accent-secondary: #f59e0b; /* Amber/Orange for warmth */
  --accent-tertiary: #ef4444; /* Red for high scores/apples */
  --card-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-glow: rgba(34, 197, 94, 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 Image Overlay */
.bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('grocery-aisle-background.png');
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  filter: blur(5px);
  z-index: -1;
}

/* Glassmorphism effect for background */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at center, transparent 40%, rgba(15, 23, 42, 0.8) 100%);
  z-index: -1;
  pointer-events: none;
}

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(15, 23, 42, 0.7);
}

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

header .logo img {
  display: block;
  width: clamp(210px, 22vw, 270px);
  height: auto;
}

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

.brand-arcade {
  background: linear-gradient(135deg, #22c55e 0%, #3b82f6 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-stack {
  background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-tertiary) 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-primary);
}

/* 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 .main-logo-hero {
  max-width: 480px;
  width: 100%;
  height: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 15px 30px rgba(0,0,0,0.3));
}

.tagline {
  display: block;
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent-primary);
  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;
}

.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(34, 197, 94, 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(34, 197, 94, 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);
}

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

.visual-container {
  position: relative;
  width: 450px;
  perspective: 1000px;
}

.cart-stack-container {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 400px;
}

.cart-display {
  width: 320px;
  height: auto;
  z-index: 10; /* Put cart frame in front of items */
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
}

.stacked-item {
  position: absolute;
  width: 60px;
  height: auto;
  filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2));
  z-index: 5; /* Put items behind cart frame */
  transform-origin: center bottom;
}

.item-apple {
  bottom: 160px;
  left: 160px;
}

.item-banana {
  bottom: 180px;
  left: 210px;
  width: 90px;
  transform: rotate(15deg);
}

.item-pasta {
  bottom: 155px;
  left: 240px;
  width: 70px;
  transform: rotate(-5deg);
}

.item-watermelon {
  bottom: 140px;
  left: 175px;
  width: 100px;
  z-index: 4; /* even further back */
}

/* Cereal Stack Visual */
.cereal-stack-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: -20px; /* Overlap them slightly */
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.cereal-box {
  width: 180px;
  height: auto;
  filter: drop-shadow(0 15px 30px rgba(0,0,0,0.3));
}

.cereal-top {
  transform: translateY(20px) rotate(3deg);
  z-index: 2;
}

.cereal-bottom {
  transform: rotate(-2deg);
  z-index: 1;
}

/* 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: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: contain;
  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 */
.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 {
  color: var(--accent-primary);
}

.highlight-content .accent-tertiary {
  color: var(--accent-tertiary);
}

.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: 70%;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  background: rgba(255,255,255,0.05);
  padding: 1rem;
}

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

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

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

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

.item-card:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--accent-primary);
  transform: scale(1.05);
}

.item-card img {
  width: 60px;
  height: 60px;
  margin-bottom: 1rem;
  object-fit: contain;
}

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

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

/* 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;
  }
  .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) {
  header .logo {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  header .logo img {
    width: 210px;
  }

  .logo-divider {
    display: none;
  }

  .hero-content h1 {
    font-size: 2.75rem;
  }
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    width: 100%;
  }
  .visual-container {
    width: 280px;
  }
}
