/* =========================================================
   NEKA · Espirulina Artesanal — Sistema de diseño 2026
   Bricolage Grotesque · Instrument Serif · Hanken Grotesque
   ========================================================= */

/* ---------- TOKENS ---------- */
:root {
  /* Marca — verde espirulina vivo */
  --emerald-900: #06180f;
  --emerald-800: #0a2417;
  --emerald-700: #0f3a24;
  --emerald-600: #155d39;
  --emerald-500: #1c7d4c;
  --living-500:  #1faf63;   /* verde vivo principal */
  --living-400:  #34c47a;
  --living-300:  #6fdca0;
  --living-200:  #b6efce;
  --lime:        #b8e986;
  --gold:        #d6a94a;
  --gold-soft:   #ecd9a8;

  --font-display: "Bricolage Grotesque", "Hanken Grotesque", sans-serif;
  --font-serif:   "Instrument Serif", Georgia, serif;
  --font-body:    "Hanken Grotesque", system-ui, sans-serif;

  --maxw: 1240px;
  --pad: clamp(20px, 5vw, 64px);
  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 32px;
  --r-xl: 44px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);

  --shadow-sm: 0 2px 10px rgba(6,24,15,.06);
  --shadow-md: 0 18px 50px -18px rgba(6,24,15,.22);
  --shadow-lg: 0 40px 90px -30px rgba(6,24,15,.34);
}

/* ---------- TEMA CLARO (default) ---------- */
:root, [data-theme="light"] {
  --bg: #f5f3ea;
  --bg-warm: #efe9d9;
  --surface: #fffdf7;
  --surface-2: #faf7ee;
  --ink: #0c1f15;
  --ink-soft: #2f4338;
  --ink-mute: #5d6f64;
  --line: rgba(12,31,21,.10);
  --line-strong: rgba(12,31,21,.16);
  --brand: var(--emerald-600);
  --brand-bright: var(--living-500);
  --on-brand: #f4fff8;
  --grain-opacity: .035;
  --glow-1: rgba(31,175,99,.30);
  --glow-2: rgba(214,169,74,.22);
  --nav-bg: rgba(245,243,234,.72);
  --card: #fffdf7;
  --card-border: rgba(12,31,21,.08);
}

/* ---------- TEMA OSCURO ---------- */
[data-theme="dark"] {
  --bg: #06140d;
  --bg-warm: #081b11;
  --surface: #0c2417;
  --surface-2: #0a1f14;
  --ink: #f3f7f2;
  --ink-soft: rgba(243,247,242,.80);
  --ink-mute: rgba(243,247,242,.58);
  --line: rgba(255,255,255,.10);
  --line-strong: rgba(255,255,255,.18);
  --brand: var(--living-400);
  --brand-bright: var(--living-400);
  --on-brand: #06140d;
  --grain-opacity: .05;
  --glow-1: rgba(31,175,99,.28);
  --glow-2: rgba(214,169,74,.16);
  --nav-bg: rgba(6,20,13,.66);
  --card: #0d2517;
  --card-border: rgba(255,255,255,.09);
  --shadow-md: 0 18px 50px -18px rgba(0,0,0,.5);
  --shadow-lg: 0 40px 90px -30px rgba(0,0,0,.6);
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .5s var(--ease), color .5s var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
::selection { background: var(--living-300); color: var(--emerald-900); }

/* Grain overlay */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
[data-theme="dark"] body::before { mix-blend-mode: screen; }

/* ---------- TIPOGRAFÍA ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.04; letter-spacing: -0.025em; color: var(--ink); }
h1 { font-size: clamp(2.7rem, 6.4vw, 5.2rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
p { color: var(--ink-soft); text-wrap: pretty; }
em, .serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-body); font-weight: 700;
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 18px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand-bright), transparent);
}
.eyebrow.center { justify-content: center; }

.grad-text {
  background: linear-gradient(108deg, var(--brand) 0%, var(--living-500) 45%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- LAYOUT ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
section { position: relative; }
.section-pad { padding-block: clamp(64px, 9vw, 130px); }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.32rem); color: var(--ink-soft); line-height: 1.55; }

/* ---------- BOTONES ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 28px; border-radius: 999px;
  font-family: var(--font-body); font-weight: 700; font-size: .98rem; letter-spacing: -0.01em;
  cursor: pointer; transition: transform .35s var(--ease-out), box-shadow .35s var(--ease), background .3s, color .3s;
  white-space: nowrap; position: relative; overflow: hidden;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--brand-bright); color: var(--on-brand); box-shadow: 0 14px 30px -10px var(--glow-1); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 22px 44px -12px var(--glow-1); }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { transform: translateY(-3px); }
.btn-outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn-outline:hover { box-shadow: inset 0 0 0 1.5px var(--brand-bright); color: var(--brand); transform: translateY(-3px); }
.btn-light { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-light:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.btn-lg { padding: 18px 36px; font-size: 1.05rem; }

/* WhatsApp icon button float */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 200;
  width: 60px; height: 60px; border-radius: 50%;
  background: #25d366; color: #fff; display: grid; place-items: center;
  box-shadow: 0 14px 36px -8px rgba(37,211,102,.6);
  transition: transform .4s var(--ease-out);
}
.wa-float:hover { transform: scale(1.08) rotate(-6deg); }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- SCROLL PROGRESS ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--living-500), var(--gold));
  z-index: 1000; transition: width .1s linear;
}

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 500;
  background: var(--nav-bg); backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid transparent; transition: border-color .4s, background .4s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 76px; }
.nav-logo { display: flex; align-items: center; height: 64px; }
.nav-logo img { height: 100%; width: auto; object-fit: contain; transition: opacity .3s var(--ease); }
.nav-logo .logo-dark-theme { display: none; }
[data-theme="dark"] .nav-logo .logo-light-theme { display: none; }
[data-theme="dark"] .nav-logo .logo-dark-theme { display: block; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { padding: 9px 14px; border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--ink-soft); transition: background .25s, color .25s; }
.nav-links a:hover { background: color-mix(in srgb, var(--brand-bright) 12%, transparent); color: var(--brand); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--ink-soft);
  transition: transform .4s var(--ease-out), color .25s, box-shadow .25s;
}
.theme-toggle:hover { color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand-bright); transform: rotate(18deg); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

.nav-burger { display: none; width: 44px; height: 44px; border-radius: 12px; flex-direction: column; gap: 5px; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.nav-burger span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s, opacity .3s; }

/* Mobile drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(6,20,13,.5); backdrop-filter: blur(4px); z-index: 600; opacity: 0; visibility: hidden; transition: opacity .35s; }
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(86vw, 360px); z-index: 700;
  background: var(--surface); padding: 24px; display: flex; flex-direction: column; gap: 6px;
  transform: translateX(110%); transition: transform .42s var(--ease-out); box-shadow: var(--shadow-lg);
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.drawer-head .nav-logo { font-size: 1.3rem; }
.drawer-close { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.6rem; color: var(--ink-soft); box-shadow: inset 0 0 0 1.5px var(--line); }
.drawer a.drawer-link { display: flex; align-items: center; gap: 12px; padding: 15px 16px; border-radius: 14px; font-weight: 600; font-size: 1.05rem; color: var(--ink); transition: background .25s; }
.drawer a.drawer-link:hover { background: var(--surface-2); }
.drawer a.drawer-link .ic { font-size: 1.2rem; }
.drawer .btn { margin-top: 14px; }

/* ---------- REVEAL ANIMATIONS ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }
.reveal-d4 { transition-delay: .32s; }

/* ---------- FOOTER ---------- */
.footer { background: var(--emerald-900); color: #e9f3ec; padding-block: clamp(56px, 7vw, 90px) 30px; position: relative; overflow: hidden; }
.footer::before { content: ""; position: absolute; top: -30%; left: -10%; width: 60%; height: 80%; background: radial-gradient(circle, var(--glow-1), transparent 70%); opacity: .5; pointer-events: none; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; position: relative; }
.footer-brand p { color: rgba(233,243,236,.62); max-width: 320px; margin-top: 16px; font-size: .98rem; }
.footer-mark { display: flex; align-items: center; height: 72px; }
.footer-mark img { height: 100%; width: auto; object-fit: contain; }
.footer-badges { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; }
.footer-badges span { padding: 7px 14px; border-radius: 999px; font-size: .76rem; font-weight: 700; letter-spacing: .04em; background: rgba(255,255,255,.07); color: rgba(233,243,236,.85); }
.footer-col h4 { font-family: var(--font-body); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--living-300); margin-bottom: 18px; font-weight: 700; }
.footer-col a, .footer-col span { display: block; color: rgba(233,243,236,.7); padding: 7px 0; font-size: .96rem; transition: color .25s, padding-left .25s; }
.footer-col a:hover { color: #fff; padding-left: 6px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; margin-top: 56px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; color: rgba(233,243,236,.5); }

/* ---------- UTIL ---------- */
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.maxw-680 { max-width: 680px; }
.maxw-760 { max-width: 760px; }
.mt-s { margin-top: 18px; } .mt-m { margin-top: 30px; } .mt-l { margin-top: 48px; }
.pill-tag { display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px; border-radius: 999px; background: color-mix(in srgb, var(--brand-bright) 12%, transparent); color: var(--brand); font-weight: 700; font-size: .8rem; letter-spacing: .02em; }

@media (max-width: 920px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .header-order-btn { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}
