/* Web pública de MealSay (mealsay.com). Mismo sistema visual que la app:
   DESIGN.md, dirección "Lima de precisión". Tokens copiados de
   public/styles.css; si cambian allí, cambiarlos aquí. */

/* Geist y Geist Mono (SIL OFL 1.1), servidas desde la propia web. */
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/geist-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/geist-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/geist-mono-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/geist-mono-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f5f7f0;
  --surface: #ffffff;
  --surface-2: #edf0e4;
  --text: #13160d;
  --text-dim: #5f6652;
  --accent: #c6ec5c;
  --accent-ink: #1a220c;
  --accent-soft: #e9f6c4;
  --accent-text: #24300c;
  --border: #d8dec9;
  --protein: #3e7cb8;
  --carbs: #d98a2a;
  --fat: #8c5fb0;
  --protein-soft: #dceaf5;
  --carbs-soft: #f8e8d2;
  --fat-soft: #ece2f3;
  --protein-ink: #2c6299;
  --carbs-ink: #8f520a;
  --fat-ink: #6e4592;
  --shadow-sm: 0 1px 2px rgba(19, 22, 13, 0.05), 0 2px 6px rgba(19, 22, 13, 0.06);
  --shadow-md: 0 2px 4px rgba(19, 22, 13, 0.06), 0 8px 24px rgba(19, 22, 13, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1080px;
  --gutter: 20px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101208;
    --surface: #191c12;
    --surface-2: #24281a;
    --text: #eef0e6;
    --text-dim: #9aa08a;
    --accent: #d6f17a;
    --accent-ink: #15180c;
    --accent-soft: #2a3418;
    --accent-text: #d6f17a;
    --border: #2b3020;
    --protein: #6fa8dd;
    --carbs: #e7a94e;
    --fat: #b089d6;
    --protein-soft: #263241;
    --carbs-soft: #3d2f1a;
    --fat-soft: #332a3d;
    --protein-ink: #6fa8dd;
    --carbs-ink: #e7a94e;
    --fat-ink: #b089d6;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.03);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
html { accent-color: var(--accent); caret-color: var(--text); }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.mono, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: var(--radius-sm); z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 4px; }

/* Cabecera */
.site-header { padding: 14px 0; }
.header-row { display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.brand-icon { border-radius: 7px; }
.header-link { font-weight: 600; font-size: 15px; text-decoration: none; padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; border-radius: var(--radius-md); }
.header-link:hover { background: var(--surface-2); }

/* Bloques */
.band { padding: 72px 0; }
.band h2 { font-size: clamp(28px, 5vw, 40px); font-weight: 700; max-width: 22ch; }
.band .intro { color: var(--text-dim); font-size: 17px; margin-top: 12px; max-width: 56ch; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 13px 22px; border-radius: var(--radius-md);
  font: 600 16px/1.2 var(--font); text-decoration: none; border: 1px solid transparent;
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(0.97); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }

/* Primera pantalla */
.hero { padding: 40px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(36px, 6.4vw, 60px); font-weight: 750; letter-spacing: -0.035em; max-width: 13ch; }
.hero-lead { font-size: 18px; color: var(--text-dim); margin-top: 18px; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero-note { font-size: 14px; color: var(--text-dim); margin-top: 14px; }

.compare { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.compare-col { border-radius: var(--radius-lg); padding: 16px; }
.compare-old { border: 1px dashed var(--border); }
.compare-new { background: var(--surface); box-shadow: var(--shadow-md); }
.compare-label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.compare-label .num { color: var(--text-dim); font-weight: 500; font-size: 12px; }
.search-list { list-style: none; margin: 0; padding: 0; }
.search-step { display: flex; justify-content: space-between; gap: 8px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-dim); }
.search-step:first-child { border-top: 0; padding-top: 0; }
.search-q::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 7px; border: 1.6px solid currentColor; border-radius: 50%; vertical-align: -1px; }
.say-bubble { background: var(--accent-soft); color: var(--accent-text); border-radius: var(--radius-md); padding: 12px; font-size: 15px; line-height: 1.4; }
.result-card { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.result-kcal { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.result-kcal .num { font-family: var(--font); }
.macro-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag { display: inline-flex; gap: 4px; align-items: baseline; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: var(--radius-pill); }
.tag-carbs { background: var(--carbs-soft); color: var(--carbs-ink); }
.tag-protein { background: var(--protein-soft); color: var(--protein-ink); }
.tag-fat { background: var(--fat-soft); color: var(--fat-ink); }

/* Precisión: tres columnas */
.versus { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 36px; }
.versus-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.versus-col h3 { font-size: 20px; }
.versus-sub { font-size: 14px; color: var(--text-dim); margin-top: 2px; }
.versus-us { border: 2px solid var(--text); }
.meter-list { margin: 18px 0 0; display: grid; gap: 14px; }
.meter-list dt { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.meter-list dd { margin: 6px 0 0; font-size: 15px; }
.meter { display: flex; gap: 4px; margin-bottom: 6px; }
.meter i { flex: 1; height: 6px; border-radius: var(--radius-pill); background: var(--surface-2); }
.meter[data-level="1"] i:nth-child(-n+1),
.meter[data-level="2"] i:nth-child(-n+2),
.meter[data-level="3"] i:nth-child(-n+3) { background: var(--text); }
.versus-us .meter i { background: var(--accent); }

/* Cómo funciona */
.band-alt { background: var(--surface-2); }
.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step-n { display: block; font-size: 13px; font-weight: 600; color: var(--text-dim); padding-bottom: 12px; margin-bottom: 14px; border-bottom: 2px solid var(--text); }
.steps h3 { font-size: 22px; }
.steps p { color: var(--text-dim); margin-top: 8px; }

/* Funciones */
.features { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); }
.features li { padding: 20px 20px 22px 0; border-bottom: 1px solid var(--border); }
.features h3 { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; }
.features p { font-size: 15px; color: var(--text-dim); margin-top: 4px; }

/* Precios */
.interval-switch { display: inline-flex; gap: 4px; padding: 4px; margin-top: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-pill); }
.interval-switch[hidden] { display: none; }
.interval-switch button { font: 600 15px/1 var(--font); color: var(--text-dim); background: transparent; border: 0; border-radius: var(--radius-pill); padding: 10px 16px; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.interval-switch button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.save-badge { font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: var(--radius-pill); background: var(--accent); color: var(--accent-ink); }
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 24px; max-width: 760px; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.plan-pro { border: 2px solid var(--text); }
.plan-badge { position: absolute; top: -12px; left: 22px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--accent); color: var(--accent-ink); }
.plan h3 { font-size: 20px; }
.plan-prices { margin-top: 12px; min-height: 64px; }
.price { display: flex; align-items: baseline; gap: 2px; }
.price + .price { margin-top: 2px; }
.price .num { font-family: var(--font); font-size: 34px; font-weight: 750; letter-spacing: -0.03em; }
.price .per { color: var(--text-dim); font-size: 15px; }
.price-equiv { font-size: 14px; color: var(--text-dim); margin-top: 2px; }
.js #precios[data-interval="month"] .only-year,
.js #precios[data-interval="year"] .only-month { display: none; }
.plan-features { list-style: none; margin: 18px 0 24px; padding: 0; display: grid; gap: 10px; flex: 1; }
.plan-features li { position: relative; padding-left: 26px; font-size: 15px; }
.plan-features li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 12px; height: 7px; border-left: 2px solid var(--text); border-bottom: 2px solid var(--text); transform: rotate(-45deg); }
.loyalty { font-size: 14px; color: var(--text-dim); margin-top: 20px; max-width: 60ch; }

/* Instalar */
.install { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 32px; max-width: 760px; }
.install-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; }
.install-card h3 { font-size: 20px; }
.install-card ol { margin: 14px 0 0; padding-left: 22px; display: grid; gap: 8px; }
.install-card li::marker { font-family: var(--font-mono); font-weight: 600; color: var(--text-dim); }
.install-cta { margin-top: 28px; }

/* Preguntas frecuentes */
.faq-wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; min-height: 44px; font-weight: 600; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 14px; height: 14px; margin-top: 5px; background: linear-gradient(var(--text-dim), var(--text-dim)) center / 14px 2px no-repeat, linear-gradient(var(--text-dim), var(--text-dim)) center / 2px 14px no-repeat; transition: transform 200ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 18px; color: var(--text-dim); max-width: 60ch; }
.faq a, .intro a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .faq-wrap { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 640px) {
  .band { padding: 56px 0; }
  .compare { grid-template-columns: 1fr; }
  .versus { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .features { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .install { grid-template-columns: 1fr; }
  .install-cta { width: 100%; }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* Pie */
.site-footer { padding: 40px 0 56px; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 14px; }
.site-footer .brand { color: var(--text); font-size: 16px; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: start; }
.footer-tagline { margin-top: 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a, .footer-credit a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.footer-links a:hover, .footer-credit a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.footer-credit { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
