/* ==========================================================================
   WAYTA · Jardín Botánico — Hoja de estilos
   Orden: 1. Variables  2. Base  3. Utilidades  4. Componentes  5. Secciones
          6. Responsive (mobile-first: los @media amplían hacia pantallas grandes)
   Paleta y tipografía originales del sitio. Cambia los colores solo en :root.
   ========================================================================== */

/* 1. VARIABLES ------------------------------------------------------------ */
:root {
  /* Colores de marca */
  --paper: #f5f1e7;        /* fondo crema (etiqueta) */
  --paper-soft: #fbf9f3;   /* tarjetas */
  --ink: #493122;          /* texto principal, marrón */
  --green: #344735;        /* verde bosque, acciones */
  --green-dark: #233625;   /* hover de botones */
  --sage: #dfe3d6;         /* fondo de sección verde claro */
  --sage-line: #acb7a4;
  --line: #c8c2af;         /* líneas y bordes */
  --gold: #977347;         /* decoración (no usar para texto pequeño) */
  --gold-text: #7d5d36;    /* dorado accesible para texto (contraste AA) */
  --gold-light: #c4b394;   /* dorado sobre fondo oscuro */
  --terracotta: #8e4a33;   /* acento de la franja andina */
  --muted: #6b5f51;        /* texto secundario */
  --on-dark: #f5f1e7;
  --on-dark-muted: #d6cbbb;
  --dark-line: #806955;

  /* Tipografía (la misma del sitio original) */
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --font-sans: Arial, Helvetica, "Helvetica Neue", sans-serif;

  /* Espaciado y medidas */
  --gutter: clamp(16px, 5vw, 64px);
  --container: 1280px;
  --section-space: clamp(64px, 9vw, 120px);
  --radius: 4px;
  --radius-lg: 18px;
  --header-h: 72px;
  --shadow: 0 10px 30px rgba(73, 49, 34, .08);
}

/* 2. BASE ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Evita el parpadeo en inglés mientras se aplica el español (lo gestiona app.js) */
html.i18n-pending body { visibility: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--ink);
  text-wrap: balance;
}

h2 {
  font-size: clamp(2.1rem, 1.4rem + 3vw, 3.75rem);
  line-height: 1.1;
  letter-spacing: -.02em;
}

h3 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.75rem); line-height: 1.25; }

img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 2px;
}

main:focus { outline: none; }

::selection { background: var(--green); color: var(--paper); }

/* 3. UTILIDADES ----------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.15em; height: 1.15em;
  flex: none;
  fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.icon-lg { width: 28px; height: 28px; }

.illustration {
  width: 56px; height: 56px;
  fill: none; stroke: var(--green);
  stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 12px 18px;
  background: var(--green); color: var(--paper);
  border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: .75rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-text);
}
.eyebrow-num {
  font-family: var(--font-serif);
  font-weight: 400; letter-spacing: 0;
  font-size: .9rem;
  padding-right: 10px;
  border-right: 1px solid var(--line);
}

.lead { font-size: 1.0625rem; color: var(--muted); max-width: 34em; }

.footnote {
  margin-top: 40px; max-width: 46em;
  font-size: .8125rem; color: var(--muted);
  padding-left: 14px; border-left: 2px solid var(--line);
}

/* 4. COMPONENTES ---------------------------------------------------------- */

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 48px;                      /* área táctil cómoda */
  padding: 12px 24px;
  border: 1px solid transparent; border-radius: var(--radius);
  font-size: .875rem; font-weight: 700; letter-spacing: .04em;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn .icon { transition: transform .2s; }
.btn:hover .icon { transform: translateX(3px); }
.btn:hover .icon-down { transform: translateY(3px); }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: .8125rem; }

.btn-primary { background: var(--green); color: var(--paper); border-color: var(--green); }
.btn-primary:hover { background: var(--green-dark); border-color: var(--green-dark); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }

.btn-light { background: var(--paper); color: var(--green); border-color: var(--paper); }
.btn-light:hover { background: #fff; }

.btn-outline-light { background: transparent; color: var(--paper); border-color: var(--dark-line); }
.btn-outline-light:hover { border-color: var(--paper); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .875rem; font-weight: 700;
  color: var(--green);
  text-decoration: underline; text-decoration-color: var(--line);
  text-underline-offset: 5px;
  transition: text-decoration-color .2s;
}
.text-link:hover { text-decoration-color: currentColor; }

/* Logo de Jardín Botánico (assets/img/logo-jardin-botanico.svg) */
.logo { display: inline-flex; align-items: center; gap: 14px; }
.logo-img { width: auto; height: 40px; }
.logo-sub {
  display: none;
  padding-left: 14px; border-left: 1px solid var(--line);
  font-size: .625rem; font-weight: 700; line-height: 1.4;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted);
}
.caption-logo { width: auto; height: 30px; }
.brand-logo { width: clamp(140px, 18vw, 190px); height: auto; margin-bottom: 28px; }
.footer-logo { width: 150px; height: auto; }

/* Franja andina */
.ribbon {
  height: 24px;
  background: url("../assets/img/ribbon.svg") repeat-x left center / auto 24px;
}

/* 5. SECCIONES ------------------------------------------------------------ */

/* Cabecera */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 241, 231, .94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.header-bar {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.header-tools { display: flex; align-items: center; gap: 8px; }

.lang-switch {
  display: flex; padding: 3px; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px;
}
.lang-switch button {
  min-width: 40px; min-height: 34px;
  border: 0; border-radius: 999px;
  background: transparent;
  font-size: .75rem; font-weight: 700; letter-spacing: .06em;
  cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--green); color: var(--paper); }

.menu-toggle {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 50%;
  background: transparent; cursor: pointer;
}
.menu-toggle .icon { width: 22px; height: 22px; grid-area: 1 / 1; }
.menu-toggle .icon-close,
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Menú móvil: panel desplegable bajo la cabecera */
.main-nav {
  position: fixed; left: 0; right: 0; top: var(--header-h);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 8px var(--gutter) 24px;
  display: none;
}
.main-nav.is-open { display: block; }
.main-nav li a:not(.btn) {
  display: block; padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-serif); font-size: 1.375rem;
}
.nav-cta-item { margin-top: 20px; }
.nav-cta-item .btn { width: 100%; min-height: 48px; }

/* Portada */
.hero {
  display: grid; gap: 40px;
  padding-top: clamp(32px, 6vw, 72px);
  padding-bottom: clamp(48px, 6vw, 80px);
}
.hero-title {
  margin: 14px 0 8px;
  font-size: clamp(4.25rem, 2rem + 11vw, 9.5rem);
  line-height: .95;
  letter-spacing: -.045em;
  text-transform: uppercase;
}
.hero-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.6rem);
  line-height: 1.15; letter-spacing: -.01em;
  color: var(--green);
}
.hero-intro { margin: 22px 0 28px; max-width: 30em; color: var(--muted); }

.trust-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px;
  margin-top: 32px; padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: .8125rem; font-weight: 700;
}
.trust-list li { display: flex; align-items: center; gap: 10px; }
.trust-list .icon { width: 20px; height: 20px; color: var(--gold-text); }

.hero-media { position: relative; width: 100%; max-width: 460px; margin-inline: auto; }
.hero-arch {
  overflow: hidden;
  border-radius: 999px 999px var(--radius) var(--radius); /* arco característico */
  background: var(--sage);
  box-shadow: var(--shadow);
}
.hero-arch img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 62%; }

.seal {
  position: absolute; left: -12px; bottom: 56px;
  width: clamp(92px, 24vw, 128px); height: auto;
  animation: spin 40s linear infinite;
}
.seal circle { fill: var(--paper); stroke: var(--gold); stroke-width: 1; }
.seal text {
  fill: var(--gold-text);
  font: 700 9.5px var(--font-sans);
  letter-spacing: .14em;
}
.seal use { fill: none; stroke: var(--gold-text); stroke-width: 1.5; stroke-linecap: round; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-caption {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 14px;
  font-size: .6875rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}

.botanical-line {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 10px 18px; padding-block: 22px;
  font-family: var(--font-serif); font-size: clamp(1rem, .85rem + .8vw, 1.5rem);
  text-align: center;
}
.botanical-line .icon { width: 14px; height: 14px; color: var(--gold); }

/* Encabezado de sección */
.section { padding-block: var(--section-space); }
.section-head {
  display: grid; gap: 20px;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-head .eyebrow { margin-bottom: 18px; }

/* Ingredientes */
.card-grid { display: grid; gap: 20px; }
.ingredient-card {
  display: flex; flex-direction: column; gap: 10px;
  padding: clamp(24px, 3vw, 36px);
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform .25s, box-shadow .25s;
}
.ingredient-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.ingredient-card .illustration { margin-bottom: 10px; }
.card-kicker {
  font-size: .6875rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-text);
}
.latin { font-family: var(--font-serif); font-style: italic; color: var(--muted); margin-top: -4px; }
.ingredient-card > p:not(.card-kicker):not(.latin) { font-size: .9375rem; color: var(--muted); }
.ingredient-card .text-link { margin-top: auto; padding-top: 12px; }

/* Producto (estilo ficha de tienda) */
.product-section { background: var(--sage); padding-block: var(--section-space); }
.product { display: grid; gap: 40px; align-items: center; }
.product-media { position: relative; }
.product-media img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.product-badge {
  position: absolute; top: 16px; left: 16px;
  padding: 8px 14px;
  background: var(--paper); color: var(--green);
  border-radius: 999px;
  font-size: .6875rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.product-info { display: grid; gap: 20px; justify-items: start; }
.product-info .lead { color: #52604e; }

.spec-list { width: 100%; border-top: 1px solid var(--sage-line); }
.spec-list div {
  display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--sage-line);
  font-size: .9375rem;
}
.spec-list dt {
  font-size: .6875rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: #52604e; padding-top: 3px;
}

.benefit-grid {
  display: grid; gap: 32px;
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--sage-line);
}
.benefit { display: grid; gap: 12px; align-content: start; }
.benefit p { font-size: .9375rem; color: #52604e; max-width: 26em; }

/* Modo de uso */
.steps { display: grid; gap: 16px; counter-reset: step; }
.step {
  position: relative;
  display: grid; gap: 10px; align-content: start;
  padding: 28px 24px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.step .icon-lg { color: var(--green); }
.step-num {
  position: absolute; top: 22px; right: 24px;
  font-family: var(--font-serif); font-size: 1.75rem; color: var(--line);
}
.step p { color: var(--muted); font-size: .9375rem; }

/* Filosofía */
.philosophy-section { border-top: 1px solid var(--line); }
.philosophy { display: grid; gap: 40px; }
.philosophy h2 { margin-top: 18px; }
.quote {
  margin-top: 32px; padding-left: 22px;
  border-left: 2px solid var(--gold);
  font: italic 1.4rem/1.4 var(--font-serif);
  color: var(--green);
  max-width: 24em;
}
.philosophy-copy { display: grid; gap: 18px; align-content: start; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chips li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 999px;
  font-size: .8125rem; color: var(--ink);
}
.chips .icon { color: var(--gold-text); }

/* Contacto */
.contact-section { background: var(--ink); color: var(--on-dark); padding-block: var(--section-space); }
.contact-section h2, .contact-section h3 { color: var(--on-dark); }
.contact-section .eyebrow { color: var(--gold-light); }
.contact-section .eyebrow-num { border-color: var(--dark-line); }
.contact-section .lead { color: var(--on-dark-muted); margin-top: 20px; }
.contact-section :focus-visible { outline-color: var(--gold-light); }
.contact { display: grid; gap: 48px; align-items: center; }
.contact h2 { margin-top: 18px; }

.audience { display: grid; gap: 10px; margin-top: 28px; }
.audience li { display: flex; align-items: center; gap: 12px; color: var(--on-dark-muted); }
.audience .icon { color: var(--gold-light); }

.contact-card {
  display: grid; gap: 16px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--dark-line); border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .03);
}
.contact-card > p { color: var(--on-dark-muted); font-size: .9375rem; }
.contact-card > .contact-person {
  display: grid; gap: 4px;
  padding-top: 16px; border-top: 1px solid var(--dark-line);
  font-family: var(--font-serif); font-size: 1.5rem; color: var(--on-dark) !important;
}
.contact-role {
  font: 700 .6875rem var(--font-sans);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold-light);
}
.contact-actions { display: grid; gap: 10px; }
.contact-actions .btn { width: 100%; padding-inline: 16px; white-space: nowrap; }
.contact-address { font-size: .875rem; overflow-wrap: anywhere; }
.company-link {
  display: grid; gap: 4px;
  padding-top: 16px; border-top: 1px solid var(--dark-line);
  font-size: .8125rem; color: var(--on-dark-muted);
}
.contact-section .text-link { color: var(--gold-light); text-decoration-color: var(--dark-line); overflow-wrap: anywhere; }
.footer-links .footer-ext { display: inline-flex; align-items: center; gap: 4px; }
.contact-address a { text-decoration: underline; text-underline-offset: 4px; }

/* Pie */
.site-footer { padding-top: 48px; padding-bottom: 104px; font-size: .875rem; }
.footer-grid { display: grid; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.logo-footer { display: inline-block; }
.footer-tagline { margin-top: 14px; color: var(--muted); font-family: var(--font-serif); font-size: 1.05rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { display: inline-block; padding-block: 6px; color: var(--muted); }
.footer-links a:hover { color: var(--ink); }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 20px; color: var(--muted); font-size: .8125rem;
}

/* Botón flotante (solo móvil; app.js lo muestra tras la portada y lo oculta en contacto) */
.floating-cta {
  position: fixed; right: 16px; bottom: 16px; z-index: 40;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(35, 54, 37, .28);
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.floating-cta.is-visible { opacity: 1; transform: none; pointer-events: auto; }

/* 6. RESPONSIVE ----------------------------------------------------------- */

/* Tablets */
@media (min-width: 640px) {
  .trust-list { grid-template-columns: repeat(4, auto); justify-content: start; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid > :last-child { grid-column: 1 / -1; }
  .benefit-grid, .steps { grid-template-columns: repeat(3, 1fr); }
  .contact-actions { grid-template-columns: 1fr 1fr; }
  .logo-sub { display: block; }
}

/* Escritorio */
@media (min-width: 960px) {
  :root { --header-h: 84px; }
  .logo-img { height: 48px; }

  .menu-toggle { display: none; }
  .main-nav {
    position: static; display: block;
    max-height: none; overflow: visible;
    padding: 0; background: none; border: 0; box-shadow: none;
  }
  .main-nav ul { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 32px); }
  .main-nav li a:not(.btn) {
    padding: 6px 0; border: 0;
    font-family: var(--font-sans); font-size: .8125rem; font-weight: 700; letter-spacing: .04em;
    background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
    transition: background-size .25s;
  }
  .main-nav li a:not(.btn):hover { background-size: 100% 1px; }
  .nav-cta-item { margin-top: 0; }
  .nav-cta-item .btn { width: auto; min-height: 40px; }
  .main-nav { margin-left: auto; }

  .hero { grid-template-columns: 1.1fr .9fr; align-items: center; gap: 6%; }
  .hero-media { max-width: none; }
  .seal { left: -48px; bottom: 80px; }

  .section-head { grid-template-columns: 1fr 1fr; gap: 8%; align-items: end; }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .card-grid > :last-child { grid-column: auto; }

  .product { grid-template-columns: 1fr 1fr; gap: 8%; }
  .philosophy, .contact { grid-template-columns: 1.1fr 1fr; gap: 10%; }

  .footer-grid { grid-template-columns: 1fr auto; align-items: end; }
  .site-footer { padding-bottom: 40px; }
  .floating-cta { display: none; }
}

/* Pantallas grandes */
@media (min-width: 1600px) {
  :root { --container: 1440px; }
  body { font-size: 1.0625rem; }
}

/* Pantallas muy pequeñas (≤360 px) */
@media (max-width: 360px) {
  .logo-img { height: 34px; }
  .lang-switch button { min-width: 34px; }
  .trust-list { grid-template-columns: 1fr; }
  .btn-row .btn { width: 100%; }
  .spec-list div { grid-template-columns: 1fr; gap: 4px; }
}

/* Accesibilidad: respeta la preferencia de reducir animaciones */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Impresión */
@media print {
  .site-header, .floating-cta, .ribbon, .seal, .btn { display: none !important; }
  .contact-section { background: none; color: var(--ink); }
  .contact-section h2, .contact-section h3 { color: var(--ink); }
}

/* Páginas secundarias (privacy.html, 404.html) ------------------------------ */
.legal { max-width: 760px; padding-block: clamp(40px, 7vw, 88px); }
.legal h1 { font-size: clamp(2.4rem, 1.8rem + 3vw, 3.5rem); line-height: 1.1; margin: 24px 0 8px; }
.legal h2 { font-size: 1.5rem; margin: 40px 0 12px; letter-spacing: 0; }
.legal p { color: var(--muted); }
.legal-updated { font-size: .8125rem; }
.not-found { min-height: 70vh; display: grid; align-content: center; justify-items: start; gap: 16px; }
.not-found h1 { font-size: clamp(5rem, 4rem + 6vw, 9rem); margin: 0; line-height: 1; }
