/* =========================================================
   Xalchilli · estilos (mobile first)
   Paleta tomada del logo (café espresso + dorado) y la
   etiqueta (rojo chile).
   ========================================================= */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-var.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope-var.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --espresso: #382111;     /* fondo del logo */
  --espresso-deep: #24150b;
  --gold: #fdc966;         /* brillo del dorado del logo */
  --gold-deep: #a97b2c;    /* dorado legible sobre crema */
  --chile: #b8321c;        /* rojo de la etiqueta */
  --cream: #f6efe4;
  --paper: #ece2d3;
  --ink: #2a1a0f;
  --ink-soft: #6b5848;
  --line: rgba(56, 33, 17, .14);
  --line-dark: rgba(253, 201, 102, .22);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 1.25rem;
  --max: 74rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --hex: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
picture { display: block; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "SOFT" 50, "opsz" 96;
  line-height: 1.05;
  letter-spacing: -.015em;
  margin: 0 0 .55em;
}
h1 { font-size: clamp(2.6rem, 10vw, 5.4rem); }
h2 { font-size: clamp(2rem, 6.5vw, 3.6rem); }
h3 { font-size: clamp(1.5rem, 4.8vw, 2.1rem); }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 42rem; }
.section { padding: clamp(4.5rem, 13vw, 9rem) 0; }

.eyebrow, .product__tag {
  display: block;
  font: 700 .72rem/1.4 var(--font-body);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--chile);
  margin: 0 0 1.1rem;
}
.eyebrow--gold { color: var(--gold); }
.lead { font-size: clamp(1.9rem, 6.5vw, 3.2rem); line-height: 1.12; }

/* Hexágono: el mismo trazo del logo y del frasco */
.hex {
  display: block; width: 34px; height: 30px; margin: 0 auto 1.75rem;
  background: var(--gold-deep); clip-path: var(--hex);
}
.hex--gold { background: var(--gold); }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--cream); padding: .75rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 1.7rem;
  background: var(--espresso); color: var(--cream);
  font: 700 .8rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; border: 1px solid var(--espresso);
  transition: transform .35s var(--ease), background-color .35s var(--ease), color .35s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--espresso-deep); }
.btn--gold:hover { background: #ffd788; }
.btn--line { background: transparent; color: var(--cream); border-color: rgba(246, 239, 228, .55); }
.btn--line:hover { border-color: var(--gold); color: var(--gold); }
.btn--small { min-height: 40px; padding: 0 1.1rem; font-size: .7rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem var(--gutter);
  transition: background-color .45s var(--ease), padding .45s var(--ease);
}
.site-header.is-solid { background: rgba(36, 21, 11, .94); backdrop-filter: blur(10px); padding-block: .45rem; }
.brand img { width: 74px; height: auto; transition: width .45s var(--ease); }
.is-solid .brand img { width: 60px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  background: var(--espresso-deep); color: var(--cream); overflow: hidden;
}
/* Móvil: foto arriba, texto abajo sobre café (el texto no tapa la etiqueta) */
.hero__media { position: relative; height: 62svh; min-height: 380px; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(36,21,11,.45) 0%, rgba(36,21,11,0) 22%, rgba(36,21,11,0) 70%, var(--espresso-deep) 100%);
}
.hero__content { position: relative; padding: .5rem var(--gutter) 3.5rem; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { max-width: 11ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* ---------- Marca ---------- */
.intro { text-align: center; }
.intro p:last-child { color: var(--ink-soft); max-width: 34rem; margin-inline: auto; }

/* ---------- Productos ---------- */
.products { background: var(--paper); }
.section-head { margin-bottom: clamp(2.5rem, 7vw, 4.5rem); }
.product { display: grid; gap: 2rem; }
.product + .product { margin-top: clamp(4.5rem, 12vw, 8rem); }
.product__media { aspect-ratio: 4 / 5; overflow: hidden; background: var(--espresso); }
.product__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.product:hover .product__media img { transform: scale(1.035); }
.specs { margin: 1.75rem 0 1.25rem; border-top: 1px solid var(--line); }
.specs div { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.specs dt { font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.specs dd { margin: .3rem 0 0; }
.allergen { font-size: .85rem; color: var(--ink-soft); }

/* ---------- Valores ---------- */
.values { background: var(--espresso); color: var(--cream); }
.values__grid { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 2.75rem; }
.values li { padding-top: 1.5rem; border-top: 1px solid var(--line-dark); }
.values__num {
  display: inline-grid; place-items: center; width: 44px; height: 38px; margin-bottom: 1.1rem;
  clip-path: var(--hex); background: var(--gold); color: var(--espresso-deep);
  font: 700 .75rem/1 var(--font-body); letter-spacing: .05em;
}
.values h3 { font-size: 1.55rem; margin-bottom: .35em; }
.values p { color: rgba(246, 239, 228, .72); margin: 0; }

/* ---------- Origen ---------- */
.origin__inner { display: grid; gap: 2.5rem; }
.origin__text { max-width: 40rem; }
.origin__text p:last-child { color: var(--ink-soft); }
.origin__video { margin: 0; width: 100%; max-width: 60rem; }
.origin__video video {
  display: block; width: 100%; height: auto; aspect-ratio: 640 / 308;
  background: var(--espresso-deep); object-fit: cover;
}
.origin__video figcaption { margin-top: .75rem; font-size: .8rem; color: var(--ink-soft); }

/* ---------- Galería ---------- */
.gallery { padding-top: 0; }
.gallery__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; }
.gallery__grid picture { aspect-ratio: 1; overflow: hidden; }
.gallery__grid picture:first-child { grid-column: span 2; }
.gallery__grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.gallery__grid picture:hover img { transform: scale(1.04); }

/* ---------- Contacto ---------- */
.contact { background: var(--espresso-deep); color: var(--cream); text-align: center; }
.contact p { color: rgba(246, 239, 228, .75); }
.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 2rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--espresso-deep); color: rgba(246, 239, 228, .55); padding: 0 0 3rem; font-size: .8rem; }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; text-align: center; padding-top: 3rem; border-top: 1px solid var(--line-dark); }
.footer__inner img { width: 96px; }
.footer__inner p { margin: 0; letter-spacing: .04em; }

/* ---------- Entrada discreta ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ================= Tablet ================= */
@media (min-width: 48rem) {
  :root { --gutter: 2.5rem; }
  .product { grid-template-columns: 1fr 1fr; align-items: center; gap: 5rem; }
  .product--alt .product__media { order: 2; }
  .values__grid { grid-template-columns: repeat(2, 1fr); gap: 3rem 4rem; }
  .origin__inner { justify-items: center; text-align: center; gap: 3rem; }
  .gallery__grid { grid-template-columns: repeat(4, 1fr); gap: .75rem; }
  .gallery__grid picture:first-child { grid-row: span 2; }
  .brand img { width: 88px; }
}

/* ================= Desktop ================= */
@media (min-width: 64rem) {
  .hero { grid-template-columns: 1fr 1fr; align-items: center; min-height: 100svh; }
  .hero__media { position: relative; grid-column: 2; height: 100svh; min-height: 640px; }
  .hero__media::after { background: linear-gradient(90deg, rgba(36,21,11,.55) 0%, rgba(36,21,11,0) 30%); }
  .hero__content { grid-column: 1; grid-row: 1; padding: 0 4rem 0 max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); }
  .values__grid { grid-template-columns: repeat(4, 1fr); gap: 3rem; }
}

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

/* Datos de contacto visibles bajo los botones */
.contact__details { margin: 1.75rem 0 0; font-size: .9rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.contact__details a { color: var(--gold); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .3s var(--ease); }
.contact__details a:hover, .contact__details a:focus-visible { border-bottom-color: var(--gold); }
.contact__details span { color: rgba(246, 239, 228, .4); }

/* Redes sociales */
.social { display: flex; gap: 1.75rem; }
.social a {
  color: var(--gold); text-decoration: none;
  font: 700 .72rem/1 var(--font-body); letter-spacing: .2em; text-transform: uppercase;
  padding: .75rem 0; border-bottom: 1px solid transparent; transition: border-color .3s var(--ease);
}
.social a:hover, .social a:focus-visible { border-bottom-color: var(--gold); }
