/* ==================================================================
   EZFood — Design System
   Paleta extraída del logo oficial (icon-ezfood.png)
   ================================================================== */

:root {
  /* Backgrounds — #0A0B0F es el oficial (app.json adaptiveIcon) */
  --bg-0: #0a0b0f;
  --bg-1: #0e1117;
  --bg-2: #131720;
  --bg-3: #191e29;

  /* Brand — mint → teal → sky, sacado del aro del plato */
  --mint: #00d4aa;
  --mint-dim: #00b894;
  --teal: #2ec5c4;
  --sky: #50b8d2;
  --grad: linear-gradient(135deg, #00d4aa 0%, #2ec5c4 55%, #50b8d2 100%);
  --grad-soft: linear-gradient(120deg, #ffffff 0%, #b8f5e6 40%, #a8e4f0 100%);
  --mint-glow: rgba(0, 212, 170, 0.35);
  --mint-subtle: rgba(0, 212, 170, 0.08);

  /* Glass surfaces */
  --glass: rgba(255, 255, 255, 0.035);
  --glass-strong: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-strong: rgba(255, 255, 255, 0.14);

  /* Text */
  --text: #f0f2f4;
  --text-muted: #98a1b2;
  --text-dim: #626c7e;

  /* Semantic */
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --info: #60a5fa;

  /* Geometry — hereda la escala de tokens.css de ezfood2 */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-full: 9999px;
  --max-w: 1240px;

  /* Motion — mismas curvas que la app */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);

  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 8px 40px -12px var(--mint-glow);
}

/* ================================================================
   RESET
   ================================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-0);
  color: var(--text);
  line-height: 1.6;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient aurora + grid — capas de fondo */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 18% 8%,  rgba(0, 212, 170, 0.10) 0%, transparent 62%),
    radial-gradient(ellipse 45% 38% at 82% 14%, rgba(80, 184, 210, 0.08) 0%, transparent 62%),
    radial-gradient(ellipse 50% 35% at 50% 95%, rgba(46, 197, 196, 0.06) 0%, transparent 62%);
}
body::after {
  content: '';
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.016) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 85%);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: rgba(0, 212, 170, 0.28); color: #fff; }

:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 4px; }

/* ================================================================
   TYPOGRAPHY
   ================================================================ */
h1, h2, h3, h4, h5 {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.75rem); }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h3 { font-size: clamp(1.2rem, 2.1vw, 1.45rem); letter-spacing: -0.022em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--text-dim); margin-bottom: 16px;
}
.eyebrow::before {
  content: ''; width: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--mint));
}
.eyebrow.centered { justify-content: center; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.grad-text-soft {
  background: var(--grad-soft);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lead { font-size: 1.06rem; line-height: 1.68; color: var(--text-muted); }
.mono { font-variant-numeric: tabular-nums; }

/* ================================================================
   LAYOUT
   ================================================================ */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 860px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 7rem 0; position: relative; }

.glow-divider {
  height: 1px; position: relative;
  background: linear-gradient(90deg, transparent, var(--glass-border) 25%, var(--glass-border) 75%, transparent);
}
.glow-divider::after {
  content: ''; position: absolute; left: 50%; top: -1px;
  transform: translateX(-50%);
  width: 160px; height: 3px; border-radius: 3px;
  background: var(--grad); opacity: 0.55; filter: blur(2px);
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0.78rem 1.35rem; border-radius: var(--r-md);
  font-weight: 600; font-size: 0.92rem; white-space: nowrap;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-out),
              border-color 0.25s, color 0.25s, filter 0.25s;
  will-change: transform;
}
.btn-primary {
  background: var(--grad); color: #04231c; font-weight: 700;
  box-shadow: 0 8px 28px -10px var(--mint-glow);
}
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 14px 40px -10px var(--mint-glow); }
.btn-primary::after {
  content: ''; position: absolute; top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.45), transparent);
  transition: left 0.7s var(--ease-out);
}
.btn-primary:hover::after { left: 140%; }

.btn-ghost {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover { border-color: rgba(0,212,170,0.4); color: var(--mint); background: var(--glass-strong); }
.btn-lg { padding: 0.95rem 1.7rem; font-size: 1rem; }
.btn-full { width: 100%; }

/* ================================================================
   GLASS CARDS
   ================================================================ */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012));
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: transform 0.45s var(--ease-out), border-color 0.35s, box-shadow 0.45s var(--ease-out);
  overflow: hidden;
}
/* Spotlight que sigue el cursor */
.card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%),
              rgba(0,212,170,0.10), transparent 65%);
}
.card:hover::before { opacity: 1; }
.card:hover {
  border-color: rgba(0,212,170,0.28);
  box-shadow: var(--shadow-glow), var(--shadow-glass);
}
.card-lift:hover { transform: translateY(-5px); }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0.32rem 0.78rem; border-radius: var(--r-full);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 0.72rem; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--text-muted);
}
.dot-live {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--mint); box-shadow: 0 0 0 0 var(--mint-glow);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0,212,170,0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(0,212,170,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,212,170,0); }
}

/* ================================================================
   CUSTOM CURSOR
   ================================================================ */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 9999;
  pointer-events: none; border-radius: 50%;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}
.cursor-dot { width: 6px; height: 6px; background: #fff; }
.cursor-ring {
  width: 32px; height: 32px;
  border: 1px solid rgba(255,255,255,0.55);
  transition: width 0.28s var(--ease-out), height 0.28s var(--ease-out),
              border-color 0.28s, opacity 0.28s;
}
.cursor-ring.hot { width: 54px; height: 54px; border-color: var(--mint); }
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ================================================================
   SCROLL PROGRESS
   ================================================================ */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 300;
  background: var(--grad);
  transform: scaleX(0); transform-origin: left;
}

/* ================================================================
   NAV
   ================================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  border-bottom: 1px solid transparent;
  transition: background 0.35s, border-color 0.35s, backdrop-filter 0.35s;
}
.nav.scrolled {
  background: rgba(10, 11, 15, 0.72);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom-color: var(--glass-border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 38px; height: 38px; border-radius: 11px; }
.brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 1.08rem; letter-spacing: -0.02em; line-height: 1;
}
.brand-sub {
  display: block; font-family: 'Inter', sans-serif;
  font-size: 0.62rem; font-weight: 400; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--text-dim); margin-top: 3px;
}
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links > a {
  position: relative; font-size: 0.875rem; font-weight: 500;
  color: var(--text-muted); transition: color 0.22s;
}
.nav-links > a:not(.btn)::after {
  content: ''; position: absolute; left: 0; bottom: -6px;
  width: 100%; height: 1px; background: var(--mint);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.nav-links > a:not(.btn):hover { color: var(--text); }
.nav-links > a:not(.btn):hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { font-size: 0.85rem !important; padding: 0.55rem 1.1rem !important; }
.mobile-btn { display: none; width: 42px; height: 42px; align-items: center; justify-content: center; }

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  margin-top: 5rem; border-top: 1px solid var(--glass-border);
  background: linear-gradient(180deg, transparent, rgba(0,212,170,0.02));
  padding: 4rem 0 1.75rem;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand p { color: var(--text-dim); font-size: 0.9rem; margin-top: 0.9rem; line-height: 1.65; max-width: 300px; }
.footer-col h4 {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--text-dim); margin-bottom: 1.1rem;
}
.footer-col a { display: block; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.65rem; transition: color 0.22s, transform 0.22s; }
.footer-col a:hover { color: var(--mint); transform: translateX(3px); }
.footer-bottom {
  border-top: 1px solid var(--glass-border); padding-top: 1.75rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-size: 0.78rem; color: var(--text-dim); flex-wrap: wrap;
}

/* ================================================================
   REVEAL ANIMATIONS
   ================================================================ */
/* El estado oculto solo aplica si JS corre: sin JS el contenido se ve igual. */
.js .reveal {
  opacity: 0; transform: translateY(34px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}
.js .reveal.visible { opacity: 1; transform: none; }

/* Stagger de hijos */
.js .stagger > * {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.js .stagger.visible > * { opacity: 1; transform: none; }
.stagger.visible > *:nth-child(1) { transition-delay: 0.00s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.07s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.14s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.21s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.28s; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.35s; }
.stagger.visible > *:nth-child(7) { transition-delay: 0.42s; }
.stagger.visible > *:nth-child(8) { transition-delay: 0.49s; }
.stagger.visible > *:nth-child(9) { transition-delay: 0.56s; }
.stagger.visible > *:nth-child(10){ transition-delay: 0.63s; }
.stagger.visible > *:nth-child(11){ transition-delay: 0.70s; }
.stagger.visible > *:nth-child(12){ transition-delay: 0.77s; }

/* Split text del hero */
.split-word { display: inline-block; overflow: hidden; vertical-align: top; }
.js .split-word > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.95s var(--ease-spring);
}
.js .split-ready .split-word > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; }
  .split-word > span { transform: none !important; }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 960px) {
  .nav-links { display: none !important; }
  .mobile-btn { display: flex !important; }
  .section { padding: 5rem 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 600px) {
  .section { padding: 4rem 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  body::after { background-size: 40px 40px; }
}
