/* ==========================================================================
   Food Coach — Base
   Tokens, reset, tipografía, navegación, botones, FAQ, CTA final y footer.
   Compartido por todas las páginas.
   ========================================================================== */

:root {
  /* Verdes */
  --bosque:    #2D4D3B;
  --musgo:     #3D5C45;
  --salvia:    #BFD6B9;
  --eucalipto: #DCE9D3;

  /* Neutros cálidos */
  --crema:   #F9F4E8;
  --hueso:   #F0EAD6;
  --arena:   #E0D7C0;
  --niebla:  #8F9286;
  --tinta:   #3A3D34;
  --carbon:  #1B1C18;

  /* Acentos */
  --mandarina: #F2843C;
  --sol:       #F2CA52;
  --durazno:   #F5C9A0;

  /* Layout */
  --maxw: 1280px;
  --gutter: 32px;

  /* Tipografía */
  --font-display: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--crema);
  color: var(--carbon);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }

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

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tinta);
}

.display { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.025em; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--bosque); color: var(--crema);
  padding: 12px 20px; border-radius: 0 0 8px 0;
  font-size: 14px; font-weight: 500; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* Eyebrow — la línea corta + label en mandarina que abre cada sección */
.eyebrow-h {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--mandarina);
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 18px;
}
.eyebrow-h::before { content: ''; width: 32px; height: 1px; background: var(--mandarina); flex: 0 0 32px; }
.eyebrow-h.centered { justify-content: center; }
.eyebrow-h.centered::after { content: ''; width: 32px; height: 1px; background: var(--mandarina); flex: 0 0 32px; }

/* ============== LOGO ============== */
.fc-logo {
  font-family: var(--font-display);
  font-weight: 500; line-height: 1; letter-spacing: -0.03em;
  text-decoration: none;
  display: inline-flex; align-items: center;
}
.fc-logo .dot {
  display: inline-block; margin: 0 0.28em;
  color: var(--mandarina); font-weight: 400;
  transform: translateY(-0.06em);
}
.fc-logo .leaf {
  display: inline-block;
  width: 0.45em; height: 0.9em;
  background: var(--mandarina);
  border-radius: 0 100% 0 100%;
  transform: rotate(-8deg) translateY(-2px);
  margin-left: 0.32em;
}

/* ============== NAV ============== */
nav.top {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(249, 244, 232, 0.85);
  border-bottom: 1px solid var(--arena);
}
nav.top .row {
  max-width: var(--maxw); margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
nav.top .logo { font-size: 22px; color: var(--bosque); }
nav.top .links { display: flex; gap: 32px; align-items: center; }
nav.top .links a {
  color: var(--tinta); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: color .15s;
}
nav.top .links a:hover { color: var(--bosque); }
nav.top .links a.active { color: var(--bosque); position: relative; }
nav.top .links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1.5px; background: var(--mandarina);
}
nav.top .cta {
  background: var(--bosque); color: var(--crema);
  padding: 10px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 500;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
  transition: background .15s;
}
nav.top .cta:hover { background: var(--carbon); }
nav.top .cta::after { content: '→'; font-family: var(--font-mono); }

/* Botón hamburguesa — sólo visible en mobile */
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--arena); border-radius: 999px;
  background: transparent; cursor: pointer;
  align-items: center; justify-content: center;
  flex: 0 0 42px;
}
.nav-toggle span {
  display: block; position: relative;
  width: 16px; height: 1.5px; background: var(--bosque);
  transition: background .15s;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: ''; position: absolute; left: 0;
  width: 16px; height: 1.5px; background: var(--bosque);
  transition: transform .2s;
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after  { top: 5px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-5px) rotate(-45deg); }

/* ============== BOTONES ============== */
.btn-primary {
  background: var(--bosque); color: var(--crema);
  padding: 16px 24px; border-radius: 999px;
  font-size: 15px; font-weight: 500;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 10px;
  transition: background .15s;
}
.btn-primary:hover { background: var(--carbon); }
.btn-primary::after { content: '→'; font-family: var(--font-mono); }

.btn-ghost {
  color: var(--bosque); padding: 16px 8px;
  font-size: 15px; font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--mandarina);
  text-underline-offset: 5px;
  text-decoration-thickness: 1.5px;
  display: inline-flex; align-items: center;
}

/* ============== FAQ ============== */
.qa { border-top: 1px solid var(--arena); padding: 26px 0; }
.qa:last-child { border-bottom: 1px solid var(--arena); }
.qa summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; gap: 24px; align-items: center;
  font-family: var(--font-display);
  font-weight: 500; font-size: 21px; line-height: 1.3; letter-spacing: -0.02em;
  color: var(--bosque);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary .ic {
  width: 28px; height: 28px;
  border: 1px solid var(--arena); border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 28px;
  color: var(--bosque); font-family: var(--font-mono); font-size: 14px;
  transition: transform .2s, background .15s;
}
.qa[open] summary .ic {
  background: var(--mandarina); border-color: var(--mandarina); color: var(--bosque);
  transform: rotate(45deg);
}
.qa p { font-size: 15.5px; color: var(--tinta); line-height: 1.55; margin-top: 14px; max-width: 62ch; }

/* ============== CTA FINAL ============== */
section.cta-final {
  padding: 140px 0;
  position: relative; overflow: hidden;
  text-align: center;
}
section.cta-final h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(56px, 8.5vw, 130px);
  line-height: 0.92; letter-spacing: -0.04em;
  color: var(--bosque);
  max-width: 14ch; margin: 0 auto 32px;
}
section.cta-final h2 .light { font-weight: 300; color: var(--mandarina); }
section.cta-final p { font-size: 19px; color: var(--tinta); max-width: 48ch; margin: 0 auto 40px; }
section.cta-final .ctas { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
section.cta-final .leaf-big {
  position: absolute; right: 7%; top: 60px;
  width: 56px; height: 112px;
  background: var(--mandarina);
  border-radius: 0 100% 0 100%;
  rotate: 14deg; opacity: 0.7;
}
section.cta-final .stamp {
  position: absolute; left: 8%; bottom: 80px;
  width: 120px; height: 120px;
  border: 1.5px solid var(--musgo); border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--musgo);
  rotate: -10deg; line-height: 1.3;
}

/* ============== FOOTER ============== */
footer {
  background: var(--bosque); color: var(--salvia);
  padding: 80px 0 40px;
}
footer .row {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 60px; border-bottom: 1px solid #1f3b2b;
}
footer .brand .logo { font-size: 30px; color: var(--crema); }
footer .brand p { color: var(--salvia); margin-top: 16px; max-width: 36ch; font-size: 14px; line-height: 1.5; }
footer .brand .social { display: flex; gap: 12px; margin-top: 24px; }
footer .brand .social a {
  width: 40px; height: 40px;
  border: 1px solid #2c4f3a; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  color: var(--salvia); text-decoration: none;
  font-family: var(--font-mono); font-size: 12px;
  transition: background .15s, color .15s, border-color .15s;
}
footer .brand .social a:hover { background: var(--mandarina); color: var(--bosque); border-color: var(--mandarina); }

footer .col h2 {
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--mandarina); margin-bottom: 18px; font-weight: 500;
}
footer .col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
footer .col ul li a { color: var(--eucalipto); text-decoration: none; font-size: 14px; transition: color .15s; }
footer .col ul li a:hover { color: var(--crema); }
footer .col ul li span { color: var(--eucalipto); font-size: 14px; }

footer .legal {
  padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em;
  color: #6b8474; text-transform: uppercase;
}
footer .legal .links { display: flex; gap: 28px; flex-wrap: wrap; }
footer .legal .links a { color: #6b8474; text-decoration: none; transition: color .15s; }
footer .legal .links a:hover { color: var(--crema); }

/* ============== BREADCRUMB ============== */
.breadcrumb {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--niebla);
  margin-bottom: 36px;
}
.breadcrumb a { color: var(--niebla); text-decoration: none; }
.breadcrumb a:hover { color: var(--bosque); }
.breadcrumb .sep { color: var(--arena); }
.breadcrumb .here { color: var(--bosque); }

/* ============== RESPONSIVE — NAV ============== */
@media (max-width: 980px) {
  :root { --gutter: 22px; }

  .nav-toggle { display: flex; }
  /* Logo + CTA + hamburguesa tienen que entrar en una sola fila a 360px de ancho. */
  nav.top .row { flex-wrap: wrap; gap: 12px; padding: 14px var(--gutter); }
  nav.top .logo { font-size: 20px; }
  nav.top .cta { order: 2; margin-left: auto; padding: 9px 14px; font-size: 13px; }
  nav.top .nav-toggle { order: 3; width: 40px; height: 40px; flex: 0 0 40px; }

  nav.top .links {
    order: 4;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 10px;
    border-top: 1px solid var(--arena);
    margin-top: 14px;
  }
  nav.top .links.open { display: flex; }
  nav.top .links a { padding: 14px 2px; font-size: 16px; border-bottom: 1px solid rgba(224, 215, 192, 0.5); }
  nav.top .links a:last-child { border-bottom: none; }
  nav.top .links a.active::after { display: none; }

  footer .row { grid-template-columns: 1fr 1fr; gap: 40px; }
  section.cta-final { padding: 100px 0; }
  section.cta-final .stamp, section.cta-final .leaf-big { display: none; }
}

@media (max-width: 580px) {
  footer .row { grid-template-columns: 1fr; gap: 36px; }
  footer .legal { flex-direction: column; align-items: flex-start; }
  .qa summary { font-size: 18px; }
}

/* Pantallas angostas (iPhone SE y similares): comprimir la barra para que
   logo + CTA + hamburguesa sigan entrando en una sola fila. */
@media (max-width: 430px) {
  :root { --gutter: 16px; }
  nav.top .row { gap: 10px; }
  nav.top .logo { font-size: 17px; }
  nav.top .cta { padding: 8px 12px; font-size: 12.5px; gap: 6px; }
  nav.top .nav-toggle { width: 38px; height: 38px; flex: 0 0 38px; }
}
