/* ── Foodiex Design Tokens ── */
:root {
  --bg1: #0a0a18;
  --bg2: #141428;
  --bg3: #1a1a35;
  --gold: #F7C948;
  --gold-dark: #d4a933;
  --gold-10: rgba(247, 201, 72, 0.1);
  --gold-20: rgba(247, 201, 72, 0.2);
  --gold-30: rgba(247, 201, 72, 0.3);
  --text-primary: #f0f0f0;
  --text-secondary: #b0b0b0;
  --text-muted: #8a8a8a;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --max-width: 1100px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 50%, var(--bg3) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Background Glow Effects ── */
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.bg-glow .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: pulse-soft 6s ease-in-out infinite;
}

.bg-glow .orb-1 {
  top: 5%;
  right: 5%;
  width: 300px;
  height: 300px;
  background: rgba(247, 201, 72, 0.06);
}

.bg-glow .orb-2 {
  bottom: 20%;
  left: 5%;
  width: 400px;
  height: 400px;
  background: rgba(247, 201, 72, 0.04);
  animation-delay: 2s;
}

.bg-glow .orb-3 {
  top: 40%;
  right: 20%;
  width: 250px;
  height: 250px;
  background: rgba(200, 160, 60, 0.05);
  animation-delay: 4s;
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.1); }
}

/* ── Header / Nav ── */
.nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo {
  height: 40px;
  filter: brightness(0) invert(1) opacity(0.9);
}

.nav-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--gold);
}

.lang-toggle {
  background: var(--gold-10);
  border: 1px solid var(--gold-20);
  color: var(--gold);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.lang-toggle:hover {
  background: var(--gold-20);
}

/* ── Hero Section (Side-by-Side) ── */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px 80px;
}

.hero-text {
  flex: 1;
  max-width: 480px;
}

.hero-logo {
  height: 80px;
  filter: brightness(0) invert(1) opacity(0.9);
  margin-bottom: 24px;
}

.hero h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 44px;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero h1 .line-white {
  color: var(--text-primary);
}

.hero h1 .line-gold {
  color: var(--gold);
}

.hero .subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.6;
}

.hero .subtitle-es {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 32px;
}

/* ── Store Buttons ── */
.store-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--text-primary);
  color: var(--bg1);
  padding: 12px 24px;
  border-radius: 14px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.store-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.store-btn svg {
  width: 24px;
  height: 24px;
  fill: var(--bg1);
}

.store-btn-text {
  text-align: left;
}

.store-btn-label {
  font-size: 10px;
  opacity: 0.7;
  line-height: 1;
}

.store-btn-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

/* ── Phone Mockup ── */
.hero-phone {
  position: relative;
  flex-shrink: 0;
}

.phone-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse at center, var(--gold-20) 0%, transparent 70%);
  border-radius: 3rem;
  filter: blur(30px);
  animation: glow 4s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.phone-frame {
  position: relative;
  width: 280px;
  height: 580px;
  background: #1a1a2e;
  border-radius: 2.5rem;
  padding: 8px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  animation: phone-float 6s ease-in-out infinite;
}

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

.phone-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #0f0f24 0%, #161632 100%);
  border-radius: 2rem;
  overflow: hidden;
  position: relative;
}

/* Phone Status Bar */
.phone-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.phone-statusbar-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.phone-battery {
  width: 22px;
  height: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 2px;
  position: relative;
  margin-left: 4px;
}

.phone-battery::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 14px;
  height: 4px;
  background: #4ade80;
  border-radius: 1px;
}

.phone-battery::before {
  content: '';
  position: absolute;
  right: -4px;
  top: 2px;
  width: 2px;
  height: 4px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0 1px 1px 0;
}

/* Phone App Header */
.phone-header {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.phone-greeting {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.phone-greeting span {
  font-size: 20px;
}

.phone-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--bg1);
}

/* Phone Stats Row */
.phone-stats {
  display: flex;
  gap: 10px;
  padding: 0 20px;
  margin-bottom: 16px;
}

.phone-stat {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.phone-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.phone-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Phone Entry Cards */
.phone-entries {
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phone-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 10px 12px;
}

.phone-entry-emoji {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.phone-entry-emoji.ramen { background: linear-gradient(135deg, #f43f5e, #f97316); }
.phone-entry-emoji.taco { background: linear-gradient(135deg, #f59e0b, #eab308); }
.phone-entry-emoji.salad { background: linear-gradient(135deg, #22c55e, #10b981); }

.phone-entry-info {
  flex: 1;
  min-width: 0;
}

.phone-entry-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.phone-entry-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 2px;
}

.star {
  width: 10px;
  height: 10px;
}

.star.filled { color: #f59e0b; }
.star.empty { color: #444; }

.phone-entry-rating {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 4px;
}

/* Phone Bottom Nav */
.phone-nav {
  position: absolute;
  bottom: 16px;
  left: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 8px 4px;
  display: flex;
  justify-content: space-around;
}

.phone-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 8px;
}

.phone-nav-icon {
  font-size: 18px;
}

.phone-nav-label {
  font-size: 9px;
  font-weight: 500;
}

.phone-nav-item.active .phone-nav-label {
  color: var(--gold);
}

.phone-nav-item:not(.active) .phone-nav-label {
  color: var(--text-muted);
}

/* ── Features Section ── */
.features {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 24px 80px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 20px;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  border-color: var(--gold-20);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.feature-icon.diary { background: linear-gradient(135deg, #f97316, #f59e0b); }
.feature-icon.stats { background: linear-gradient(135deg, #f43f5e, #ec4899); }
.feature-icon.trending { background: linear-gradient(135deg, #ef4444, #f97316); }
.feature-icon.wrapped { background: linear-gradient(135deg, #f59e0b, #eab308); }

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.feature-card .title-es {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.feature-card .desc-es {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 8px;
  line-height: 1.4;
}

/* ── Footer ── */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-logo {
  height: 28px;
  filter: brightness(0) invert(1) opacity(0.7);
}

.footer-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 15px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-copy {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 20px;
  text-align: center;
}

/* ── Legal Pages ── */
.legal {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.legal h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 32px;
  margin-bottom: 8px;
}

.legal .last-updated {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 40px;
}

.legal h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--gold);
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal p, .legal li {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 12px;
}

.legal ul {
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal li {
  margin-bottom: 6px;
}

.legal a {
  color: var(--gold);
  text-decoration: none;
}

.legal a:hover {
  text-decoration: underline;
}

/* ── Bilingual toggle ── */
[lang="en"] .es-only { display: none; }
[lang="es"] .en-only { display: none; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
    gap: 40px;
    padding: 40px 24px 60px;
  }

  .hero-text { max-width: 100%; }

  .store-buttons { justify-content: center; }

  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    flex-direction: column;
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 32px; }
  .hero .subtitle { font-size: 15px; }

  .phone-frame {
    width: 240px;
    height: 500px;
  }

  .store-buttons { flex-direction: column; align-items: center; }

  .features {
    grid-template-columns: 1fr;
  }

  .nav-links a { font-size: 13px; }
  .nav-links { gap: 12px; }

  .footer-links { gap: 16px; }
}
