/* =========================================================================
   RAÚL MARTÍNEZ — CAFÉ DE ESPECIALIDAD
   Sistema de diseño. Editorial ilustrado con capa técnica de "laboratorio".
   ========================================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Marca — claro (parchment de saco de café) */
  --bg:        #efe8da;
  --bg-2:      #e7dccb;
  --surface:   #f8f3ea;
  --surface-2: #f1e9db;
  --ink:       #2a211a;   /* espresso */
  --ink-soft:  #5c4f42;
  --ink-faint: #8a7a68;
  --line:      #d9ccb5;
  --line-soft: #e5d9c4;

  --accent:    #b23a20;   /* brasa / cereza / tueste */
  --accent-2:  #8f2c16;   /* accent para texto/enlaces */
  --honey:     #a9741f;   /* proceso honey */
  --leaf:      #556b2f;   /* agronomía / finca */
  --leaf-ink:  #445626;

  --on-accent: #fbf3ea;

  /* Tipografía */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Escala */
  --step--1: clamp(0.80rem, 0.77rem + 0.15vw, 0.88rem);
  --step-0:  clamp(1.00rem, 0.96rem + 0.20vw, 1.13rem);
  --step-1:  clamp(1.20rem, 1.10rem + 0.50vw, 1.55rem);
  --step-2:  clamp(1.55rem, 1.35rem + 1.00vw, 2.25rem);
  --step-3:  clamp(2.00rem, 1.60rem + 2.00vw, 3.30rem);
  --step-4:  clamp(2.70rem, 1.90rem + 4.00vw, 5.60rem);

  --maxw: 1200px;
  --gutter: clamp(1.15rem, 4vw, 3rem);
  --radius: 4px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(42,33,26,.06), 0 12px 30px -14px rgba(42,33,26,.22);
  --ease: cubic-bezier(.22,.61,.36,1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #1c1611;
    --bg-2:      #221a13;
    --surface:   #26201a;
    --surface-2: #2d251d;
    --ink:       #f1e8d9;
    --ink-soft:  #c3b39c;
    --ink-faint: #8f7f6b;
    --line:      #3a3129;
    --line-soft: #33291f;

    --accent:    #e07a54;
    --accent-2:  #eb8b66;
    --honey:     #d9a441;
    --leaf:      #9fb06a;
    --leaf-ink:  #b6c586;

    --on-accent: #221109;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 18px 40px -18px rgba(0,0,0,.7);
  }
}

/* Overrides por toggle explícito (ganan sobre la media query) */
:root[data-theme="light"] {
  --bg:#efe8da; --bg-2:#e7dccb; --surface:#f8f3ea; --surface-2:#f1e9db;
  --ink:#2a211a; --ink-soft:#5c4f42; --ink-faint:#8a7a68; --line:#d9ccb5; --line-soft:#e5d9c4;
  --accent:#b23a20; --accent-2:#8f2c16; --honey:#a9741f; --leaf:#556b2f; --leaf-ink:#445626;
  --on-accent:#fbf3ea; --shadow:0 1px 2px rgba(42,33,26,.06), 0 12px 30px -14px rgba(42,33,26,.22);
}
:root[data-theme="dark"] {
  --bg:#1c1611; --bg-2:#221a13; --surface:#26201a; --surface-2:#2d251d;
  --ink:#f1e8d9; --ink-soft:#c3b39c; --ink-faint:#8f7f6b; --line:#3a3129; --line-soft:#33291f;
  --accent:#e07a54; --accent-2:#eb8b66; --honey:#d9a441; --leaf:#9fb06a; --leaf-ink:#b6c586;
  --on-accent:#221109; --shadow:0 1px 2px rgba(0,0,0,.4), 0 18px 40px -18px rgba(0,0,0,.7);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

img, svg { max-width: 100%; display: block; }
a { color: var(--accent-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.05; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; max-width: 65ch; }

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

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

/* Franja/eyebrow mono técnico */
.eyebrow {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 .9rem;
  display: flex; align-items: center; gap: .6rem;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--accent); flex: none;
}
.eyebrow--leaf::before { background: var(--leaf); }

/* ---------- Botones ---------- */
.btn {
  --_bg: var(--accent); --_fg: var(--on-accent);
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--sans); font-weight: 600; font-size: var(--step--1);
  letter-spacing: .01em;
  padding: .8rem 1.3rem; min-height: 44px;
  background: var(--_bg); color: var(--_fg);
  border: 1px solid transparent; border-radius: 100px;
  cursor: pointer; text-decoration: none;
  transition: transform .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(178,58,32,.7); }
.btn:active { transform: translateY(0); }
.btn .ico { width: 18px; height: 18px; }
.btn--ghost {
  --_bg: transparent; --_fg: var(--ink);
  border-color: var(--line); backdrop-filter: none;
}
.btn--ghost:hover { border-color: var(--ink); box-shadow: none; background: var(--surface-2); }
.btn--leaf { --_bg: var(--leaf); --_fg: #fff; }
.btn--leaf:hover { box-shadow: 0 10px 22px -12px rgba(85,107,47,.7); }
.btn--sm { padding: .55rem 1rem; }
.btn--block { width: 100%; justify-content: center; }

.link-arrow {
  font-family: var(--sans); font-weight: 600; color: var(--accent-2);
  text-decoration: none; display: inline-flex; align-items: center; gap: .4rem;
}
.link-arrow svg { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.is-stuck { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand__mark { width: 34px; height: 34px; color: var(--accent); flex: none; }
.brand__name { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; line-height: 1; letter-spacing: -.01em; }
.brand__tag { display: block; font-family: var(--mono); font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); margin-top: 3px; }

.nav__links { display: flex; align-items: center; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav__links a { color: var(--ink-soft); text-decoration: none; font-size: .93rem; font-weight: 500; transition: color .15s; }
.nav__links a:hover { color: var(--ink); }
.nav__actions { display: flex; align-items: center; gap: .6rem; }

.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); border-radius: 100px;
  color: var(--ink); cursor: pointer; transition: background .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}

.nav__toggle { display: none; }

/* Menú móvil */
.mobile-menu {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg); padding: var(--gutter);
  display: flex; flex-direction: column; gap: .2rem;
  transform: translateX(100%); transition: transform .35s var(--ease);
  visibility: hidden;
}
.mobile-menu.open { transform: translateX(0); visibility: visible; }
.mobile-menu__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.mobile-menu a {
  font-family: var(--serif); font-size: 1.9rem; color: var(--ink); text-decoration: none;
  padding: .5rem 0; border-bottom: 1px solid var(--line-soft);
}
.mobile-menu a:last-of-type { border-bottom: none; }
.mobile-menu .btn { margin-top: 1.5rem; }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 7rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-head h2 { font-size: var(--step-3); margin-bottom: .9rem; }
.section-head p { color: var(--ink-soft); font-size: var(--step-1); }
.section--alt { background: var(--bg-2); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(2rem, 5vw, 4rem); padding-bottom: clamp(3rem, 7vw, 6rem); overflow: hidden; }
.hero__grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
}
.hero h1 { font-size: var(--step-4); font-weight: 600; }
.hero h1 em { font-style: italic; color: var(--accent); font-variation-settings: "SOFT" 40; }
.hero__lead { font-size: var(--step-1); color: var(--ink-soft); margin-top: 1.4rem; max-width: 44ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero__art { position: relative; aspect-ratio: 1 / 1.08; }

/* Ilustración compuesta del hero (taza + montaña + cereza) */
.art-card {
  position: relative; height: 100%; border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 90% at 70% 10%, color-mix(in srgb, var(--honey) 22%, var(--surface)) 0%, transparent 55%),
    linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden;
  display: grid; place-items: center;
}
.art-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(42,33,26,.05) 1px, transparent 1px);
  background-size: 5px 5px; opacity: .5; mix-blend-mode: multiply;
}
.art-card svg { width: 82%; height: auto; color: var(--ink); }
.art-badge {
  position: absolute; font-family: var(--mono); font-size: .66rem; letter-spacing: .12em;
  text-transform: uppercase; background: var(--ink); color: var(--bg);
  padding: .4rem .7rem; border-radius: 100px; z-index: 2;
}
.art-badge--tl { top: 1rem; left: 1rem; }
.art-badge--br { bottom: 1rem; right: 1rem; background: var(--accent); color: var(--on-accent); }

/* ---------- Tira de credenciales ---------- */
.creds {
  border-block: 1px solid var(--line);
  background: var(--surface);
}
.creds__row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: clamp(1rem, 4vw, 3rem); padding-block: 1.4rem;
}
.cred {
  display: flex; align-items: center; gap: .55rem;
  font-family: var(--mono); font-size: var(--step--1); letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-soft); white-space: nowrap;
}
.cred svg { width: 20px; height: 20px; color: var(--accent); flex: none; }

/* ---------- Grillas de tarjetas ---------- */
.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.6rem); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.5rem; display: flex; flex-direction: column; gap: .9rem;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line); }

/* Tarjeta de café (producto) */
.coffee { padding: 0; overflow: hidden; }
.coffee__top {
  aspect-ratio: 4 / 3; display: grid; place-items: center; position: relative;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(155deg, var(--surface-2), var(--bg-2));
}
.coffee__bag { width: 44%; color: var(--ink); }
.coffee__proc {
  position: absolute; top: .8rem; left: .8rem;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .3rem .6rem; border-radius: 100px; background: var(--ink); color: var(--bg);
}
.coffee__proc[data-p="honey"] { background: var(--honey); color: #241a06; }
.coffee__proc[data-p="natural"] { background: var(--accent); color: var(--on-accent); }
.coffee__proc[data-p="lavado"] { background: var(--leaf); color: #fff; }
.coffee__body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .85rem; flex: 1; }
.coffee__name { font-family: var(--serif); font-size: 1.35rem; }
.coffee__notes { font-family: var(--mono); font-size: .82rem; color: var(--accent-2); line-height: 1.5; letter-spacing: .01em; }
.coffee__spec { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-family: var(--mono); font-size: .72rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; }
.coffee__spec span { display: inline-flex; align-items: center; gap: .3rem; }
.coffee__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding-top: .4rem; }
.coffee__price { font-family: var(--mono); font-weight: 600; font-size: 1rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.coffee__price small { color: var(--ink-faint); font-weight: 400; }

/* Tarjeta de curso */
.course__level { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--honey); }
.course h3 { font-size: 1.4rem; }
.course__meta { display: flex; flex-wrap: wrap; gap: .4rem .8rem; font-size: .84rem; color: var(--ink-soft); }
.course__meta span { display: inline-flex; gap: .35rem; align-items: center; }
.course__meta svg { width: 15px; height: 15px; color: var(--ink-faint); }

/* Tarjeta de servicio/asesoría */
.service { position: relative; overflow: hidden; }
.service__ico { width: 46px; height: 46px; color: var(--accent); }
.service--leaf .service__ico { color: var(--leaf); }
.service h3 { font-size: 1.45rem; }
.service ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.service li { position: relative; padding-left: 1.4rem; font-size: .93rem; color: var(--ink-soft); }
.service li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.service--leaf li::before { background: var(--leaf); }

/* B2B split */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.split__panel {
  background: var(--ink); color: var(--bg); border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 4vw, 2.8rem); position: relative; overflow: hidden;
}
.split__panel .eyebrow { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.split__panel .eyebrow::before { background: var(--accent); }
.split__panel h2 { color: var(--bg); font-size: var(--step-2); margin-bottom: 1rem; }
.split__panel p { color: color-mix(in srgb, var(--bg) 78%, transparent); }
.split__list { list-style: none; margin: 1.4rem 0 1.8rem; padding: 0; display: grid; gap: .8rem; }
.split__list li { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; color: var(--ink-soft); }
.split__panel .split__list li { color: color-mix(in srgb, var(--bg) 85%, transparent); }
.split__list svg { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 2px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stat { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.3rem; background: var(--surface); }
.stat__n { font-family: var(--serif); font-size: clamp(2rem, 5vw, 3rem); color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.stat__l { font-size: .86rem; color: var(--ink-soft); margin-top: .5rem; }

/* Proceso (cómo trabajamos) */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2.5vw, 1.6rem); counter-reset: step; }
.step { position: relative; padding-top: 2.6rem; }
.step__n { position: absolute; top: 0; left: 0; font-family: var(--mono); font-size: .8rem; color: var(--accent); letter-spacing: .1em; }
.step::after { content: ""; position: absolute; top: .55em; left: 2.4rem; right: 0; height: 1px; background: var(--line); }
.step:last-child::after { display: none; }
.step h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.step p { font-size: .9rem; color: var(--ink-soft); margin: 0; }

/* Historia */
.story { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.story__art { aspect-ratio: 3 / 4; border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow);
  background: linear-gradient(160deg, var(--surface), var(--surface-2)); display: grid; place-items: center; overflow: hidden; position: relative; }
.story__art svg { width: 70%; color: var(--ink); }
.story__art .art-badge { bottom: 1rem; left: 1rem; top: auto; right: auto; }
.story blockquote { margin: 0 0 1.5rem; font-family: var(--serif); font-size: var(--step-2); font-style: italic; line-height: 1.25; color: var(--ink); }
.story p { color: var(--ink-soft); }
.story__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.tag { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 100px; color: var(--ink-soft); }

/* CTA band */
.cta-band { background: var(--accent); color: var(--on-accent); border-radius: var(--radius-lg); padding: clamp(2rem, 6vw, 4rem); text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { color: var(--on-accent); font-size: var(--step-3); margin-bottom: 1rem; }
.cta-band p { color: color-mix(in srgb, var(--on-accent) 88%, transparent); margin-inline: auto; margin-bottom: 2rem; font-size: var(--step-1); }
.cta-band .btn { --_bg: var(--ink); --_fg: var(--bg); }
.cta-band .btn:hover { box-shadow: 0 12px 26px -12px rgba(0,0,0,.5); }
.cta-band__deco { position: absolute; inset: 0; opacity: .12; pointer-events: none; color: var(--on-accent); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: color-mix(in srgb, var(--bg) 82%, transparent); padding-block: clamp(2.5rem, 5vw, 4rem) 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 3rem; }
.site-footer .brand__name, .site-footer h4 { color: var(--bg); }
.site-footer h4 { font-family: var(--sans); font-weight: 600; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1rem; color: color-mix(in srgb, var(--bg) 65%, transparent); }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.footer-links a { color: color-mix(in srgb, var(--bg) 80%, transparent); text-decoration: none; font-size: .92rem; }
.footer-links a:hover { color: var(--bg); }
.site-footer .brand__mark { color: var(--accent); }
.footer-about { max-width: 34ch; font-size: .92rem; margin-top: 1rem; color: color-mix(in srgb, var(--bg) 70%, transparent); }
.footer-bottom { border-top: 1px solid color-mix(in srgb, var(--bg) 18%, transparent); padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; font-size: .82rem; color: color-mix(in srgb, var(--bg) 55%, transparent); font-family: var(--mono); }

/* ---------- Slots de imagen (foto real con respaldo ilustrado) ---------- */
.media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; opacity: 0; transition: opacity .5s var(--ease); background: transparent; border: 0; }
.media.loaded { opacity: 1; }
.art-card .art-badge, .story__art .art-badge, .coffee__proc { z-index: 3; }
.scrim { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .5s; }
.media.loaded ~ .scrim { opacity: 1; background: linear-gradient(180deg, transparent 40%, rgba(20,14,10,.35) 100%); }

/* ---------- Barra de anuncio ---------- */
.topbar { background: var(--ink); color: color-mix(in srgb, var(--bg) 82%, transparent); font-family: var(--mono); }
.topbar__row { display: flex; align-items: center; justify-content: center; gap: 1.4rem; padding: .5rem 0; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; text-align: center; }
.topbar__row span { display: inline-flex; align-items: center; gap: 1.4rem; }
.topbar__row b { color: var(--bg); font-weight: 500; }
.topbar__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); flex: none; }
@media (max-width: 640px) { .topbar__row .hide-sm { display: none; } }

/* ---------- Banda editorial a sangre ---------- */
.editorial { position: relative; min-height: min(58vh, 540px); display: grid; place-items: center; overflow: hidden; background: linear-gradient(150deg, var(--ink), #120c08); isolation: isolate; }
.editorial .media { opacity: .55; }
.editorial .media.loaded { opacity: .55; }
.editorial::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, rgba(15,10,7,.55), rgba(15,10,7,.35)); }
.editorial__inner { position: relative; z-index: 4; text-align: center; padding: clamp(3rem, 8vw, 6rem) var(--gutter); max-width: 900px; }
.editorial .eyebrow { justify-content: center; color: color-mix(in srgb, #fff 55%, transparent); }
.editorial h2 { color: #fdf6ec; font-size: var(--step-3); font-style: italic; }
.editorial p { color: color-mix(in srgb, #fff 82%, transparent); margin: 1.2rem auto 0; font-size: var(--step-1); }
.editorial .attrib { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: color-mix(in srgb, #fff 55%, transparent); margin-top: 1.6rem; }

/* ========================================================================
   HERO DE VIDEO (home2) — carrusel a pantalla completa
   ======================================================================== */
.vhero {
  position: relative; width: 100%;
  height: min(94vh, 980px);
  margin-top: -101px; /* sube el video detrás del topbar + header */
  overflow: hidden; isolation: isolate;
  display: grid; place-items: center; text-align: center;
  background: #120c08 center/cover no-repeat;
  color: #fff;
}
/* topbar por encima del video */
.home2 .topbar { position: relative; z-index: 101; }
.vhero__media { position: absolute; inset: 0; z-index: 1; }
.vhero__media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.4s ease; transform: scale(1.06);
  animation: vhero-zoom 18s ease-out infinite alternate;
}
.vhero__media video.active { opacity: 1; }
@keyframes vhero-zoom { from { transform: scale(1.02); } to { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .vhero__media video { animation: none; transform: none; } }

.vhero__scrim {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(18,12,8,.55) 0%, rgba(18,12,8,.15) 35%, rgba(18,12,8,.55) 80%, rgba(18,12,8,.85) 100%),
    radial-gradient(120% 80% at 50% 40%, transparent 40%, rgba(18,12,8,.4) 100%);
}
.vhero__inner { position: relative; z-index: 4; max-width: 900px; padding: 2rem clamp(1.15rem,5vw,3rem); }
.vhero .eyebrow { justify-content: center; color: color-mix(in srgb, #fff 65%, transparent); }
.vhero .eyebrow::before { background: var(--accent); }
.vhero h1 {
  font-family: var(--serif); font-weight: 600; color: #fdf7ee;
  font-size: clamp(2.6rem, 1.6rem + 4.5vw, 5.8rem); line-height: 1.02;
  text-shadow: 0 2px 30px rgba(0,0,0,.35);
}
.vhero h1 em { font-style: italic; color: #f0a884; }
.vhero__lead {
  font-size: var(--step-1); color: color-mix(in srgb, #fff 88%, transparent);
  max-width: 46ch; margin: 1.3rem auto 0; text-shadow: 0 1px 16px rgba(0,0,0,.4);
}
.vhero__cta { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 2rem; }
.vhero__cta .btn--ghost { color: #fff; border-color: color-mix(in srgb, #fff 45%, transparent); }
.vhero__cta .btn--ghost:hover { border-color: #fff; background: color-mix(in srgb, #fff 12%, transparent); }

/* Puntos del carrusel */
.vhero__dots { position: absolute; z-index: 4; bottom: clamp(4.5rem, 8vh, 6rem); left: 0; right: 0; display: flex; gap: .55rem; justify-content: center; }
.vhero__dots button { width: 32px; height: 4px; border-radius: 100px; border: 0; cursor: pointer; padding: 0;
  background: color-mix(in srgb, #fff 40%, transparent); transition: background .3s, width .3s; }
.vhero__dots button.active { background: var(--accent); width: 46px; }

/* Indicador de scroll */
.vhero__scroll { position: absolute; z-index: 4; bottom: 1.6rem; left: 50%; transform: translateX(-50%);
  color: color-mix(in srgb, #fff 70%, transparent); font-family: var(--mono); font-size: .62rem; letter-spacing: .2em;
  text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: .5rem; text-decoration: none; }
.vhero__scroll svg { width: 20px; height: 20px; animation: vhero-bounce 1.8s ease-in-out infinite; }
@keyframes vhero-bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .vhero__scroll svg { animation: none; } }

/* Header transparente sobre el video (solo home2, arriba del todo) */
.home2 .site-header:not(.is-stuck) { background: transparent; backdrop-filter: none; }
.home2 .site-header:not(.is-stuck) .brand__name,
.home2 .site-header:not(.is-stuck) .nav__links a { color: #fff; }
.home2 .site-header:not(.is-stuck) .brand__tag { color: color-mix(in srgb, #fff 70%, transparent); }
.home2 .site-header:not(.is-stuck) .brand__mark { color: #f0a884; }
.home2 .site-header:not(.is-stuck) .icon-btn { border-color: color-mix(in srgb, #fff 40%, transparent); color: #fff; }
.home2 .site-header:not(.is-stuck) .nav__links a::after { background: #fff; }

/* ---------- Anclas con offset por header sticky ---------- */
section[id], div[id="top"] { scroll-margin-top: 96px; }

/* ---------- Nav activo (scroll-spy) ---------- */
.nav__links a { position: relative; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px; background: var(--accent); transition: right .25s var(--ease); }
.nav__links a:hover::after, .nav__links a.active::after { right: 0; }
.nav__links a.active { color: var(--ink); }

/* ---------- Botón flotante WhatsApp ---------- */
.wa-float {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 90;
  display: inline-flex; align-items: center; gap: .6rem;
  background: #1f8a4c; color: #fff; padding: .8rem 1.2rem; border-radius: 100px;
  font-family: var(--sans); font-weight: 600; font-size: .92rem; text-decoration: none;
  box-shadow: 0 10px 30px -8px rgba(0,0,0,.4); transform: translateY(0);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.wa-float:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -10px rgba(0,0,0,.5); color:#fff; }
.wa-float svg { width: 22px; height: 22px; }
.wa-float__txt { display: inline; }
@media (max-width: 560px) { .wa-float { padding: .85rem; } .wa-float__txt { display: none; } }

/* ---------- Volver arriba ---------- */
.to-top { position: fixed; left: clamp(1rem,3vw,2rem); bottom: clamp(1rem,3vw,2rem); z-index: 90;
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 100px;
  background: var(--ink); color: var(--bg); border: none; cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .25s, transform .25s, visibility .25s; box-shadow: var(--shadow); }
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top svg { width: 20px; height: 20px; }

/* ---------- Galería "del grano a la taza" ---------- */
.gallery { display: grid; grid-template-columns: 1.4fr 1fr 1fr; grid-auto-rows: 1fr; gap: clamp(.6rem, 1.5vw, 1rem); }
.gallery figure { position: relative; margin: 0; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 1; background: var(--surface-2); }
.gallery figure:first-child { grid-row: span 2; aspect-ratio: auto; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption { position: absolute; left: 0; bottom: 0; padding: .7rem .9rem; font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: #fff; background: linear-gradient(0deg, rgba(15,10,7,.75), transparent); width: 100%; }
@media (max-width: 640px) { .gallery { grid-template-columns: 1fr 1fr; } .gallery figure:first-child { grid-row: span 1; } }

/* ---------- Testimonios ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 1.6rem); }
.quote { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem; display: flex; flex-direction: column; gap: 1rem; }
.quote__mark { font-family: var(--serif); font-size: 2.6rem; line-height: .5; color: var(--accent); height: 1rem; }
.quote p { font-size: 1.02rem; color: var(--ink); margin: 0; font-style: italic; }
.quote__who { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); margin-top: auto; }
@media (max-width: 800px) { .quotes { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .6rem; max-width: 780px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 1.1rem 1.3rem; font-family: var(--serif); font-size: 1.12rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); font-size: 1.5rem; color: var(--accent); transition: transform .2s; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 1.3rem 1.2rem; margin: 0; color: var(--ink-soft); font-size: .96rem; }

/* ---------- Comunidad / contacto ---------- */
.community { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.community__stats { display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 1.5rem; }
.community__stat b { font-family: var(--serif); font-size: 2rem; color: var(--accent); display: block; line-height: 1; }
.community__stat span { font-size: .85rem; color: var(--ink-soft); }
.contact-card { background: var(--ink); color: var(--bg); border-radius: var(--radius-lg); padding: clamp(1.6rem, 4vw, 2.4rem); display: flex; flex-direction: column; gap: 1rem; }
.contact-card h3 { color: var(--bg); font-size: var(--step-2); }
.contact-card p { color: color-mix(in srgb, var(--bg) 78%, transparent); }
.contact-row { display: flex; align-items: center; gap: .8rem; color: color-mix(in srgb, var(--bg) 88%, transparent); text-decoration: none; padding: .7rem 0; border-top: 1px solid color-mix(in srgb, var(--bg) 16%, transparent); }
.contact-row:hover { color: var(--bg); }
.contact-row svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
@media (max-width: 800px) { .community { grid-template-columns: 1fr; } }

/* Firma manuscrita */
.signature { font-family: "Fraunces", serif; font-style: italic; font-weight: 500; font-size: 1.8rem; color: var(--accent); margin-top: 1.2rem; transform: rotate(-3deg); display: inline-block; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { max-width: 440px; margin-inline: auto; width: 100%; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .split, .story { grid-template-columns: 1fr; }
  .story__art { max-width: 380px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step::after { display: none; }
  .nav__links, .nav__actions .btn { display: none; }
  .nav__toggle { display: grid; }
}
@media (max-width: 560px) {
  .grid--3, .grid--4, .grid--2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .creds__row { justify-content: flex-start; }
}
