/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  color-scheme: light;
  --paper:       #F7F1E4;
  --paper-2:     #EFE4CD;
  --card:        #FFFDF8;
  --ink:         #241E18;
  --ink-soft:    #3A322A;
  --ink-mute:    #766B5C;
  --leather:     #9C5A2E;
  --leather-dark:#7C4423;
  --yerba:       #45573A;
  --yerba-soft:  #ECEEE3;
  --plata:       #9C9186;
  --line:        rgba(36,30,24,.14);
  --line-soft:   rgba(36,30,24,.08);

  --display: "Lora", "Iowan Old Style", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Fragment Mono", "IBM Plex Mono", ui-monospace, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --container: 1180px;
  --radius: 18px;
  --radius-sm: 10px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
ul { list-style: none; padding: 0; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.01em; font-family: var(--display); font-weight: 500; }
::selection { background: var(--leather); color: var(--paper); }
:focus-visible { outline: 2px solid var(--leather); outline-offset: 3px; border-radius: 4px; }

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .7rem 1.1rem; background: var(--ink); color: var(--paper);
  z-index: 9999; border-radius: 8px; font-weight: 500; font-family: var(--sans);
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: 1.5rem; }
@media (min-width: 960px) { .container { padding-inline: 2.5rem; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.kicker {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--leather);
  display: inline-flex; align-items: center; gap: .5em;
}
.kicker::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--yerba); flex-shrink: 0;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }
[data-reveal][data-split] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { transition-duration: .01s; }
}

/* =============================================================
   4. Typography
   ============================================================= */
.section-title {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  font-style: normal;
}
.section-lede {
  color: var(--ink-mute);
  font-size: 1.05rem;
  max-width: 46ch;
}

/* =============================================================
   5. Components
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .95rem 1.7rem;
  border-radius: 999px;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  transition: transform .35s var(--ease-out), background .35s var(--ease-out), box-shadow .35s var(--ease-out), color .35s var(--ease-out);
  white-space: nowrap;
}
.btn-primary {
  background: var(--leather); color: var(--paper);
  box-shadow: 0 10px 26px -12px rgba(124,68,35,.55);
}
.btn-primary:hover { background: var(--leather-dark); transform: translateY(-2px); box-shadow: 0 16px 32px -14px rgba(124,68,35,.6); }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--card); transform: translateY(-2px); }
.btn svg { width: 1.05em; height: 1.05em; flex-shrink: 0; }

.pill {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .4rem .9rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: .82rem;
  color: var(--ink-soft);
}
.pill svg { width: 1em; height: 1em; color: var(--yerba); flex-shrink: 0; }

/* =============================================================
   6. Nav
   ============================================================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding: 1.3rem 0;
  transition: background .4s var(--ease-out), padding .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .4s var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: rgba(247,241,228,.9);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  padding: .85rem 0;
  border-bottom-color: var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav-brand { display: flex; align-items: center; gap: .6rem; font-family: var(--display); font-size: 1.3rem; font-style: normal; font-weight: 500; letter-spacing: .01em; }
.nav-brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  object-fit: cover;
  flex-shrink: 0;
}
.nav-links { display: none; align-items: center; gap: 2.1rem; font-size: .92rem; }
.nav-links a { position: relative; padding-block: .2rem; transition: color .3s var(--ease-out); }
.nav-links a:hover { color: var(--leather); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1.5px;
  background: var(--leather); transition: right .35s var(--ease-out);
}
.nav-links a:hover::after { right: 0; }
.nav-cta { display: none; }
@media (min-width: 860px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
}
.nav-toggle {
  display: flex; flex-direction: column; gap: 5px; padding: .5rem; z-index: 5;
}
.nav-toggle span { width: 22px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease-out), opacity .3s var(--ease-out); }
@media (min-width: 860px) { .nav-toggle { display: none; } }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-menu {
  position: fixed; inset: 0; z-index: 4;
  background: var(--paper);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6rem;
  font-family: var(--display); font-size: 1.7rem; font-style: normal; font-weight: 500;
  opacity: 0; pointer-events: none; transform: translateY(-12px);
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out);
}
.nav-menu.is-open { opacity: 1; pointer-events: auto; transform: none; }
@media (min-width: 860px) { .nav-menu { display: none; } }

/* =============================================================
   7. Hero
   ============================================================= */
.hero {
  padding: 8.5rem 0 5rem;
  position: relative;
}
.hero-grid {
  display: grid; gap: 3rem;
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1fr .95fr; gap: 2rem; }
}
.hero-copy { max-width: 46ch; }
.hero-title {
  margin-top: 1.1rem;
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: .98;
}
.hero-title em { font-style: normal; color: var(--ink); }
.hero-sub {
  margin-top: 1.3rem;
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 42ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.1rem; }
.hero-facts { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2.2rem; }
.hero-note { margin-top: .9rem; font-family: var(--mono); font-size: .76rem; color: var(--ink-mute); letter-spacing: .01em; }

.hero-figure {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: 0 40px 70px -35px rgba(36,30,24,.35);
}
.hero-figure img {
  width: 100%; height: 100%; object-fit: cover; object-position: 72% 42%;
}
.hero-figure::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(36,30,24,0) 45%, rgba(36,30,24,.72) 100%);
}
.hero-figure-badge {
  position: absolute; left: 1.1rem; bottom: 1.1rem; z-index: 2;
  color: var(--paper);
  font-family: var(--mono); font-size: .78rem; letter-spacing: .04em;
  text-shadow: 0 1px 12px rgba(0,0,0,.35);
}
.hero-figure-badge strong { display: block; font-family: var(--display); font-style: normal; font-size: 1.15rem; font-weight: 500; }

/* =============================================================
   8. Marquee ticker
   ============================================================= */
.ticker {
  border-block: 1px solid var(--line);
  background: var(--paper-2);
  overflow: hidden;
  padding: 1.05rem 0;
}
.ticker-track {
  display: flex; align-items: center; gap: .9rem;
  width: max-content;
  animation: tickerMove 32s linear infinite;
  font-family: var(--mono);
  font-size: .92rem;
  letter-spacing: .01em;
  color: var(--ink-soft);
  white-space: nowrap;
}
.ticker-dot { color: var(--leather); }
@keyframes tickerMove {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker:hover .ticker-track { animation-play-state: paused; }

/* =============================================================
   9. About / story
   ============================================================= */
.about {
  padding: 6.5rem 0;
}
.about-grid {
  display: grid; gap: 3rem;
}
@media (min-width: 960px) {
  .about-grid { grid-template-columns: .85fr 1.15fr; gap: 4rem; align-items: center; }
}
.about-figure {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: 0 30px 55px -30px rgba(36,30,24,.3);
}
.about-figure img { width: 100%; height: 100%; object-fit: cover; }
.about-copy p { margin-top: 1.3rem; color: var(--ink-soft); font-size: 1.05rem; max-width: 52ch; }
.about-copy p:first-of-type { margin-top: 1.1rem; }
.about-list {
  margin-top: 2rem;
  display: grid; gap: .9rem;
}
.about-list li {
  display: flex; gap: .8rem; align-items: flex-start;
  font-size: .96rem; color: var(--ink-soft);
}
.about-list svg { width: 1.2em; height: 1.2em; color: var(--yerba); flex-shrink: 0; margin-top: .15em; }

/* =============================================================
   10. Catalog
   ============================================================= */
.catalog { padding: 6.5rem 0; background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.catalog-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.6rem; align-items: flex-end; margin-bottom: 3rem; }

.catalog-grid {
  display: grid; gap: 1.6rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.product-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  transform: perspective(900px) rotateX(var(--tiltX, 0deg)) rotateY(var(--tiltY, 0deg));
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out);
  --tiltX: 0deg; --tiltY: 0deg; --mx: 50%; --my: 50%;
}
.product-card:hover {
  box-shadow: 0 34px 60px -28px rgba(124,68,35,.38);
}
.product-media {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  background: linear-gradient(180deg, var(--card), var(--paper-2));
  padding: 1.6rem;
}
.product-media img {
  width: 100%; height: 100%; object-fit: contain; object-position: center;
  transition: transform .6s var(--ease-out), filter .6s var(--ease-out);
  filter: saturate(1.05);
}
.product-card:hover .product-media img { transform: scale(1.05); filter: saturate(1.15) brightness(1.03); }
.product-media::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(156,90,46,.22), transparent 60%);
  opacity: 0; transition: opacity .4s var(--ease-out);
}
.product-card:hover .product-media::after { opacity: 1; }

.product-body { padding: 1.2rem 1.3rem 1.4rem; }
.product-name { font-family: var(--display); font-style: normal; font-weight: 500; font-size: 1.2rem; }
.product-price { font-family: var(--mono); font-size: .88rem; color: var(--ink); margin-top: .4rem; }
.product-price .price-amount { color: var(--leather); font-weight: 500; }
.product-link {
  display: inline-flex; align-items: center; gap: .4em;
  margin-top: .9rem; font-size: .86rem; font-weight: 600;
  color: var(--ink);
}
.product-link svg { width: 1em; height: 1em; transition: transform .3s var(--ease-out); }
.product-link:hover svg { transform: translateX(3px); }

/* =============================================================
   11. Process ("Cómo comprar")
   ============================================================= */
.process {
  padding: 6.5rem 0;
  position: relative;
  background-image:
    linear-gradient(rgba(247,241,228,.94), rgba(247,241,228,.94)),
    var(--process-bg-img, none);
  background-size: cover;
  background-position: center;
}
.process-grid {
  margin-top: 3rem;
  display: grid; gap: 2.2rem;
}
@media (min-width: 720px) { .process-grid { grid-template-columns: repeat(3, 1fr); } }
.process-step { position: relative; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.process-num {
  font-family: var(--mono); font-size: .82rem; color: var(--leather);
  display: block; margin-bottom: .8rem;
}
.process-step h3 { font-size: 1.35rem; font-style: normal; margin-bottom: .6rem; }
.process-step p { color: var(--ink-mute); font-size: .96rem; max-width: 32ch; }

/* =============================================================
   12. Contact / info
   ============================================================= */
.contact {
  padding: 6.5rem 0;
}
.contact-panel {
  background: var(--ink);
  color: var(--paper);
  border-radius: 28px;
  padding: 3.4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
@media (min-width: 720px) { .contact-panel { padding: 4.5rem 4rem; } }
.contact-panel::before {
  content: "";
  position: absolute; inset: -40% -10% auto -10%; height: 90%;
  background: radial-gradient(50% 60% at 50% 0%, rgba(156,90,46,.35), transparent 72%);
  pointer-events: none;
}
.contact-panel .kicker { color: var(--plata); }
.contact-panel .kicker::before { background: var(--leather); }
.contact-title { font-size: clamp(2rem, 4.4vw, 3rem); font-style: normal; margin-top: 1rem; color: var(--paper); }
.contact-sub { color: rgba(247,241,228,.72); margin-top: 1rem; max-width: 44ch; margin-inline: auto; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2.2rem; position: relative; z-index: 1; }
.contact-panel .btn-ghost { color: var(--paper); border-color: rgba(247,241,228,.3); }
.contact-panel .btn-ghost:hover { background: rgba(247,241,228,.08); border-color: var(--paper); }
.contact-facts {
  margin-top: 2.6rem; padding-top: 2.2rem; border-top: 1px solid rgba(247,241,228,.15);
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1.8rem;
  font-size: .88rem; color: rgba(247,241,228,.78); position: relative; z-index: 1;
}
.contact-facts li { display: flex; align-items: center; gap: .5em; }
.contact-facts svg { width: 1.1em; height: 1.1em; color: var(--plata); }

/* =============================================================
   13. Product card as trigger
   ============================================================= */
.product-card { cursor: pointer; }
.product-card:focus-visible { outline: 2px solid var(--leather); outline-offset: 3px; }
.product-card .product-link:focus-visible { outline: 2px solid var(--leather); outline-offset: 3px; }

/* =============================================================
   14. Product modal
   ============================================================= */
body.modal-open { overflow: hidden; }
.product-modal {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 1.2rem;
  opacity: 0; pointer-events: none;
  transition: opacity .35s var(--ease-out);
}
.product-modal.is-open { opacity: 1; pointer-events: auto; }
.product-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(36,30,24,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.product-modal-panel {
  position: relative; z-index: 1;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden; overflow-y: auto;
  max-width: 900px; width: 100%; max-height: min(88vh, 780px);
  display: grid; grid-template-columns: 1fr;
  box-shadow: 0 40px 80px -24px rgba(36,30,24,.5);
  transform: translateY(18px) scale(.98);
  transition: transform .4s var(--ease-out);
}
.product-modal.is-open .product-modal-panel { transform: translateY(0) scale(1); }
@media (min-width: 720px) {
  .product-modal-panel { grid-template-columns: 1fr 1fr; max-height: min(88vh, 620px); }
}
.product-modal-close {
  position: absolute; top: .9rem; right: .9rem; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--line);
  color: var(--ink); transition: background .25s var(--ease-out), transform .25s var(--ease-out);
}
.product-modal-close:hover { background: var(--paper-2); transform: rotate(90deg); }
.product-modal-close svg { width: 18px; height: 18px; }
.product-modal-media {
  position: relative; aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, var(--card), var(--paper-2));
  padding: 2.4rem;
}
@media (min-width: 720px) { .product-modal-media { aspect-ratio: auto; height: 100%; } }
.product-modal-media img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.product-modal-body { padding: 1.8rem 1.8rem 2.2rem; display: flex; flex-direction: column; }
@media (min-width: 720px) { .product-modal-body { padding: 2.6rem 2.4rem; justify-content: center; } }
.product-modal-body h3 { font-family: var(--display); font-weight: 500; font-size: 1.6rem; }
.product-modal-price { font-family: var(--mono); font-size: .92rem; color: var(--ink); margin-top: .6rem; }
.product-modal-price .price-amount { color: var(--leather); font-weight: 500; }
.product-modal-desc { font-size: .95rem; color: var(--ink-soft); margin-top: 1rem; line-height: 1.6; }
.product-modal-buy { margin-top: 1.6rem; width: 100%; }
.product-modal-note { font-size: .85rem; color: var(--ink-mute); margin-top: 1rem; line-height: 1.55; }

/* =============================================================
   15. Footer
   ============================================================= */
.footer { padding: 3rem 0 2.4rem; }
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.2rem;
  padding-top: 2.2rem; border-top: 1px solid var(--line);
  font-size: .84rem; color: var(--ink-mute);
}
.footer-brand { display: flex; align-items: center; gap: .6rem; font-family: var(--display); font-style: normal; font-weight: 500; font-size: 1.1rem; color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer-links a:hover { color: var(--ink); }

/* =============================================================
   16. Responsive tune-ups
   ============================================================= */
@media (max-width: 599px) {
  .hero { padding-top: 7rem; }
  .contact-panel { border-radius: 20px; }
}

/* =============================================================
   17. Reduced motion — only truly intrusive
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}
