/* ==========================================================================
   Txikitxurri — Chimichurri argentino artesanal
   Design system + components (HTML/CSS/JS puro, sin build)
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Marca */
  --green-900: #14301e;
  --green-800: #1e472b; /* verde corporativo principal */
  --green-700: #2f6b43;
  --green-600: #3d8155;
  --cream:     #f5f1e6;
  --cream-alt: #fbf8f0;
  --cream-200: #ece3cf;
  --gold:      #e9c46a;
  --gold-600:  #d9ad45;
  --terracotta:#c65b3c;
  --terracotta-700:#a8492e;
  --ink:       #1a2a1f;
  --ink-soft:  #4c574f;
  --white:     #ffffff;

  --bg:        var(--cream);
  --text:      var(--ink);
  --border:    rgba(20, 48, 30, .14);

  /* Tipografía */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Escala fluida */
  --step--1: clamp(.83rem, .79rem + .18vw, .94rem);
  --step-0:  clamp(1rem, .95rem + .25vw, 1.13rem);
  --step-1:  clamp(1.2rem, 1.1rem + .5vw, 1.5rem);
  --step-2:  clamp(1.45rem, 1.25rem + 1vw, 2.1rem);
  --step-3:  clamp(1.8rem, 1.45rem + 1.7vw, 2.95rem);
  --step-4:  clamp(2.2rem, 1.6rem + 3vw, 4rem);

  /* Espaciado */
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6.5rem;

  --container: 1180px;
  --container-narrow: 760px;

  --radius: 14px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(20, 48, 30, .08);
  --shadow-md: 0 12px 30px rgba(20, 48, 30, .12);
  --shadow-lg: 0 24px 60px rgba(20, 48, 30, .18);

  --header-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html:focus-within { scroll-padding-top: calc(var(--header-h) + 1rem); }

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul[class] { list-style: none; padding: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--green-900);
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { color: var(--ink-soft); }
strong { color: var(--text); }

/* ---------- A11y helpers ---------- */
.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--green-800); color: #fff;
  padding: .7rem 1.1rem; border-radius: 10px; z-index: 1000;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.container-narrow { width: min(100% - 2.5rem, var(--container-narrow)); margin-inline: auto; }
.section { padding-block: clamp(3rem, 2rem + 5vw, var(--space-9)); }
.section--green { background: var(--green-800); color: #eaf0ea; }
.section--green h2, .section--green h3 { color: #fff; }
.section--green p { color: #c8d6c9; }
.section--dark { background: var(--green-900); color: #dfe7e0; }
.section--cream-alt { background: var(--cream-alt); }
.section-head { max-width: 720px; margin-inline: auto; text-align: center; margin-bottom: clamp(2rem, 1.4rem + 2vw, 3.4rem); }
.section-head p { margin-top: var(--space-4); font-size: var(--step-1); }
.eyebrow {
  display: inline-block; font-family: var(--font-body); font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em; font-size: var(--step--1);
  color: var(--terracotta);
}
.section--green .eyebrow { color: var(--gold); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--terracotta); --btn-fg: #fff;
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-body); font-weight: 600; font-size: var(--step-0);
  padding: .85rem 1.6rem; border-radius: var(--radius-pill);
  border: 2px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn--primary { --btn-bg: var(--green-700); }
.btn--primary:hover { background: var(--green-600); }
.btn--accent { --btn-bg: var(--terracotta); }
.btn--accent:hover { background: var(--terracotta-700); }
.btn--gold { --btn-bg: var(--gold); --btn-fg: var(--green-900); }
.btn--gold:hover { background: var(--gold-600); }
.btn--ghost {
  background: transparent; color: currentColor; border-color: currentColor; box-shadow: none;
}
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--lg { padding: 1.05rem 2rem; font-size: var(--step-1); }
.btn--block { width: 100%; justify-content: center; }
.btn svg { width: 1.15em; height: 1.15em; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .45rem; font-weight: 600;
  color: var(--terracotta); border-bottom: 2px solid transparent; padding-bottom: 2px;
  white-space: nowrap; transition: gap .2s var(--ease), border-color .2s var(--ease);
}
.link-arrow svg { width: 1.15em; height: 1.15em; flex: none; }
.section--green .link-arrow { color: var(--gold); }
.section--dark .link-arrow { color: var(--gold); }
.link-arrow:hover { gap: .75rem; border-color: currentColor; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245, 241, 230, .9);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 46px; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(.5rem, 1.4vw, 1.6rem); }
.nav a {
  font-weight: 500; font-size: .98rem; color: var(--green-900);
  padding: .4rem 0; position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--terracotta); transition: width .25s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { width: 100%; }
.nav a[aria-current="page"] { color: var(--terracotta); }
.header-cta { display: inline-flex; align-items: center; gap: .9rem; }
.nav > .btn { display: none; }
.nav-toggle {
  display: none; background: var(--green-800); color: #fff; border: 0;
  width: 46px; height: 46px; border-radius: 12px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 920px) {
  .header-cta .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream-alt); border-bottom: 1px solid var(--border);
    padding: .5rem 1.25rem 1.25rem;
    box-shadow: var(--shadow-md);
    transform: translateY(-120%); transition: transform .35s var(--ease);
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  }
  .nav[data-open="true"] { transform: translateY(0); }
  .nav a { padding: .9rem .25rem; border-bottom: 1px solid var(--border); font-size: 1.05rem; }
  .nav .btn { display: inline-flex; margin-top: 1rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; }
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(13,28,18,.86) 0%, rgba(13,28,18,.6) 45%, rgba(13,28,18,.25) 100%);
}
.hero-inner { padding-block: clamp(4rem, 3rem + 9vw, 9rem); max-width: 640px; }
.hero h1 { color: #fff; margin-top: var(--space-3); }
.hero p { color: #e7eee8; font-size: var(--step-1); margin-top: var(--space-5); }
.hero .btn-row { margin-top: var(--space-6); }
.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; }

/* ---------- Feature grid (¿Por qué?) ---------- */
.features { display: grid; gap: clamp(1.4rem, 1rem + 2vw, 2.6rem); grid-template-columns: repeat(3, 1fr); }
.feature { text-align: center; }
.feature .check {
  width: 64px; height: 64px; margin: 0 auto var(--space-4);
  display: grid; place-items: center; border-radius: 50%;
  background: rgba(233, 196, 106, .16); color: var(--gold);
  border: 1px solid rgba(233, 196, 106, .4);
}
.feature .check svg { width: 30px; height: 30px; }
.feature h3 { color: #fff; margin-bottom: var(--space-3); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: clamp(1.2rem, .8rem + 1.8vw, 2.2rem); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--white); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

/* Producto */
.product-card .product-media { position: relative; aspect-ratio: 4/3; background: var(--cream-200); }
.product-card .product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-tag {
  position: absolute; top: 1rem; left: 1rem; background: var(--gold); color: var(--green-900);
  font-weight: 700; font-size: var(--step--1); padding: .3rem .8rem; border-radius: var(--radius-pill);
}
.product-tag--spicy { background: var(--terracotta); color: #fff; }
.product-body { padding: clamp(1.3rem, 1rem + 1vw, 1.9rem); display: flex; flex-direction: column; gap: .7rem; flex: 1; }
.product-body h3 { color: var(--green-900); }
.product-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-top: auto; }
.price { font-family: var(--font-display); font-size: var(--step-2); color: var(--green-800); font-weight: 600; }
.price small { font-size: .55em; color: var(--ink-soft); font-family: var(--font-body); font-weight: 500; }
.product-card .btn { margin-top: .4rem; }

/* Sugerencias / usos */
.use-card { text-align: center; padding: clamp(1.5rem, 1rem + 2vw, 2.4rem); border-radius: var(--radius-lg); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); }
.use-card .use-ico { width: 56px; height: 56px; margin: 0 auto 1rem; display: grid; place-items: center; border-radius: 16px; background: var(--gold); color: var(--green-900); }
.use-card .use-ico svg { width: 30px; height: 30px; }
.use-card h3 { color: #fff; margin-bottom: .5rem; }

/* ---------- Puntos de venta ---------- */
.zone { margin-bottom: var(--space-7); }
.zone-title {
  font-family: var(--font-display); color: var(--gold); font-size: var(--step-1);
  display: flex; align-items: center; gap: .8rem; margin-bottom: var(--space-5);
}
.zone-title::after { content: ""; flex: 1; height: 1px; background: rgba(233,196,106,.35); }
.stores { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.store {
  display: flex; gap: .9rem; padding: 1.2rem; border-radius: var(--radius);
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  transition: background .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
}
.store:hover { background: rgba(255,255,255,.1); border-color: rgba(233,196,106,.5); transform: translateY(-3px); }
.store .pin { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(233,196,106,.16); color: var(--gold); }
.store .pin svg { width: 22px; height: 22px; }
.store h3 { color: #fff; font-size: 1.06rem; margin-bottom: .15rem; }
.store .addr { color: var(--gold); font-size: var(--step--1); font-weight: 600; margin-bottom: .35rem; }
.store .desc { color: #c2d0c3; font-size: var(--step--1); line-height: 1.5; }
.store .sub { color: #9fb3a3; font-weight: 500; }

/* ---------- Mapa ---------- */
.map-wrap { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); border: 6px solid #fff; }
.map-wrap iframe, .map-placeholder { width: 100%; height: 520px; border: 0; display: block; }
.map-placeholder {
  background: var(--green-700) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M0 20h40M20 0v40' stroke='%23ffffff22' stroke-width='1'/%3E%3C/svg%3E");
  display: grid; place-items: center; color: #fff; cursor: pointer; text-align: center;
}
.map-placeholder .btn { pointer-events: none; }

/* ---------- Split (obrador / sobre) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 1rem + 3vw, 4rem); align-items: center; }
.split--reverse .split-media { order: 2; }
.split-media img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); aspect-ratio: 4/5; object-fit: cover; }
.split-body h2 { margin-bottom: var(--space-4); }
.split-body p + p { margin-top: var(--space-4); }
.tick-list { display: grid; gap: .8rem; margin-top: var(--space-5); }
.tick-list li { display: flex; gap: .7rem; align-items: flex-start; color: var(--text); }
.tick-list svg { flex: none; width: 24px; height: 24px; color: var(--green-700); margin-top: 2px; }

/* ---------- Stats / band ---------- */
.band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.band .num { font-family: var(--font-display); font-size: var(--step-3); color: var(--gold); }
.band .lbl { color: #c8d6c9; font-size: var(--step--1); text-transform: uppercase; letter-spacing: .1em; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #d8e2d9; max-width: 620px; margin: var(--space-4) auto 0; font-size: var(--step-1); }
.cta-band .btn-row { justify-content: center; margin-top: var(--space-6); }

/* ---------- Recetas ---------- */
.recipe-card .recipe-media { aspect-ratio: 16/10; background: var(--cream-200); overflow: hidden; }
.recipe-card .recipe-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.recipe-card:hover .recipe-media img { transform: scale(1.06); }
.recipe-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.recipe-tags { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip { font-size: var(--step--1); font-weight: 600; color: var(--green-800); background: rgba(47,107,67,.1); padding: .25rem .7rem; border-radius: var(--radius-pill); }
.recipe-body h3 { color: var(--green-900); }
.recipe-meta { display: flex; gap: 1.2rem; margin-top: auto; padding-top: .6rem; color: var(--ink-soft); font-size: var(--step--1); }
.recipe-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.recipe-meta svg { width: 17px; height: 17px; color: var(--terracotta); }

/* Receta detalle */
.recipe-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); align-items: start; }
.recipe-hero-img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); aspect-ratio: 16/11; object-fit: cover; width: 100%; }
.aside-box { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.6rem; box-shadow: var(--shadow-sm); position: sticky; top: calc(var(--header-h) + 1rem); }
.aside-box h3 { margin-bottom: 1rem; }
.steps { counter-reset: step; display: grid; gap: 1.1rem; margin-top: 1.2rem; }
.steps li { position: relative; padding-left: 3rem; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: -2px; width: 2.1rem; height: 2.1rem;
  background: var(--green-700); color: #fff; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600;
}
.prose > * + * { margin-top: 1rem; }
.prose h2 { margin-top: 2rem; }
.ingredients { display: grid; gap: .6rem; margin-top: 1rem; }
.ingredients li { display: flex; gap: .6rem; padding-bottom: .6rem; border-bottom: 1px dashed var(--border); }
.ingredients li::before { content: "•"; color: var(--terracotta); font-weight: 700; }

/* ---------- Breadcrumbs ---------- */
.breadcrumb { font-size: var(--step--1); color: var(--ink-soft); padding-top: 1.5rem; }
.breadcrumb a:hover { color: var(--terracotta); }
.breadcrumb span { margin-inline: .4rem; opacity: .5; }

/* ---------- Page hero (interior) ---------- */
.page-hero { background: var(--green-800); color: #fff; text-align: center; padding-block: clamp(2.75rem, 2rem + 2vw, 4rem); }
.page-hero h1 { color: #fff; }
.page-hero p { color: #cddacf; max-width: 640px; margin: var(--space-4) auto 0; font-size: var(--step-1); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 600; font-size: var(--step--1); color: var(--green-900); }
.field input, .field textarea {
  background: var(--white); border: 1px solid var(--border); border-radius: 12px;
  padding: .85rem 1rem; transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus, .field textarea:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(47,107,67,.15); outline: none; }
.field textarea { min-height: 140px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); align-items: start; }
.contact-list { display: grid; gap: 1.1rem; margin-top: 1.5rem; }
.contact-list a, .contact-list div { display: flex; gap: .9rem; align-items: center; }
.contact-list .ico { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--green-800); color: var(--gold); }
.contact-list .ico svg { width: 22px; height: 22px; }
.contact-list b { color: var(--green-900); display: block; }
.contact-list span { color: var(--ink-soft); font-size: var(--step--1); }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-900); color: #c6d2c8; padding-block: var(--space-8) var(--space-5); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2.5rem; }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: var(--step--1); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1.1rem; }
.site-footer a:hover { color: var(--gold); }
.footer-brand img { height: 52px; width: auto; margin-bottom: 1rem; }
.footer-links { display: grid; gap: .6rem; }
.socials { display: flex; gap: .7rem; margin-top: 1rem; }
.socials a { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.08); transition: background .25s var(--ease), transform .25s var(--ease); }
.socials a:hover { background: var(--gold); color: var(--green-900); transform: translateY(-3px); }
.socials svg { width: 20px; height: 20px; }
.footer-bottom { margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between; font-size: var(--step--1); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .features { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .split, .split--reverse .split-media, .recipe-layout, .contact-grid { grid-template-columns: 1fr; }
  .split--reverse .split-media { order: 0; }
  .aside-box { position: static; }
  .band { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 600px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .map-wrap iframe, .map-placeholder { height: 380px; }
  .btn-row .btn { width: 100%; justify-content: center; }
}

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