/* =========================================================
   Ranchers Reserve — salsa poster hero
   Layers: motif → wordmark → orbit (back) → molcajete → orbit (front) → stamp → UI
   Brand tokens match the Ranchers Reserve site (style.css › Tokens).
   ========================================================= */

@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/fraunces-latin.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 400 600; font-display: swap; src: url("../fonts/fraunces-italic-latin.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/manrope-latin.woff2") format("woff2"); }

:root {
  --cream: #F8F3E8;
  --cream-2: #F1E8D6;
  --charcoal: #24251F;
  --red: #A82D26;
  --red-hover: #8C231D;
  --green: #263E2E;
  --green-deep: #1C2F22;
  --terracotta: #C96F4B;
  --sage: #DCE3D4;
  --on-dark: #F6F0E3;
  --on-dark-2: #C9D0C0;
  --accent-on-dark: #EBB08F;

  /* paprika red background (brand green stays on the stamp, logo and loader) */
  --bg: #A8261B;
  --bg-hi: #C43C27;
  --bg-deep: #7A1910;
  --accent: #F5B841;
  --f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 55px);
  --ease-out: cubic-bezier(.22, 1, .36, 1);

  /* green halo that keeps cream text legible where it crosses the cream letters */
  --halo: 0 0 1px var(--bg), 2px 0 0 var(--bg), -2px 0 0 var(--bg), 0 2px 0 var(--bg), 0 -2px 0 var(--bg),
          2px 2px 0 var(--bg), -2px -2px 0 var(--bg), 2px -2px 0 var(--bg), -2px 2px 0 var(--bg),
          0 0 14px var(--bg);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--on-dark);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.intro-pending [data-intro],
.intro-pending [data-reveal] { opacity: 0; }

/* =========================================================
   Loader
   ========================================================= */
.loader { display: none; }
.is-loading .loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; }
.is-loading body { overflow: hidden; }
.loader__stripes { position: absolute; inset: 0; display: flex; }
.loader__stripes i { flex: 1; }
.loader__stripes i:nth-child(1) { background: var(--bg); }
.loader__stripes i:nth-child(2) { background: var(--green); }
.loader__stripes i:nth-child(3) { background: var(--terracotta); }
.loader__stripes i:nth-child(4) { background: #E4A93F; }
.loader__stripes i:nth-child(5) { background: var(--green-deep); }
.loader__center { position: relative; display: grid; justify-items: center; gap: 18px; }
.loader__icon { width: 104px; height: 104px; animation: bob 1.2s ease-in-out infinite; }
.loader__quip {
  margin: 0;
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(122, 25, 16, .92);
  font: 700 16px/1 var(--f-body);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .2);
}
.loader__bar { width: 190px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 0; background: var(--cream); }
.loader__shout { position: absolute; left: var(--gutter); bottom: 30px; margin: 0; font: italic 600 22px/1 var(--f-display); }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-4deg); } }

/* =========================================================
   Fixed top bar
   ========================================================= */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 76px;
  padding: 0 var(--gutter);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 8px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--green);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.brand__emblem { width: 40px; height: 40px; }
.brand__text { display: grid; }
.brand__name { font: 700 17px/1.05 var(--f-display); }
.brand__tag { font: 700 10px/1.3 var(--f-body); text-transform: uppercase; letter-spacing: .16em; color: var(--red); }

.topnav {
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 1.5px solid rgba(246, 240, 227, .5);
  border-radius: 999px;
  background: var(--bg);
}
.topnav a {
  padding: 8px 14px;
  border-radius: 999px;
  font: 700 14px/1 var(--f-body);
  text-decoration: none;
  transition: background .25s, color .25s;
}
.topnav a:hover { background: var(--cream); color: var(--bg); }

.topbar__cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--red);
  font: 700 15px/1 var(--f-body);
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  transition: background .25s, transform .3s var(--ease-out);
}
.topbar__cta svg { width: 16px; height: 16px; transition: transform .3s var(--ease-out); }
.topbar__cta:hover { background: var(--accent); color: var(--charcoal); }
.topbar__cta:hover svg { transform: translateX(3px); }

/* =========================================================
   Hero shell
   ========================================================= */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: 100svh;
  min-height: 620px;
  background: radial-gradient(70% 60% at 50% 55%, var(--bg-hi) 0%, var(--bg) 60%, var(--bg-deep) 100%);
}

.hero__bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__motif {
  position: absolute;
  left: -20%;
  top: -40%;
  width: 140%;
  display: grid;
  transform: rotate(-8deg);
  font: italic 600 clamp(170px, 22vw, 340px)/1.05 var(--f-display);
  color: var(--on-dark);
  opacity: .045;
  white-space: nowrap;
}
.hero__motif span:nth-child(even) { margin-left: -18%; }

.hero__kicker {
  position: absolute;
  z-index: 6;
  top: 92px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 36px;
  margin: 0;
  font: 700 14px/1.45 var(--f-body);
  text-transform: uppercase;
  letter-spacing: .14em;
  text-shadow: var(--halo);
}
.hero__by { color: var(--accent); }

/* =========================================================
   Stage
   ========================================================= */
.hero__stage { position: absolute; inset: 0; pointer-events: none; }

.wordmark {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  top: 14%;
  bottom: 18%;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Fraunces set tall, like vintage wood type */
.wordmark__in {
  display: flex;
  font: 700 min(21vw, 50svh)/.82 var(--f-display);
  text-transform: uppercase;
  color: var(--cream);
  transform: scaleY(1.42);
  letter-spacing: -.01em;
}
.wordmark .l { display: inline-block; margin-inline: -.01em; transform: translateY(var(--y)) rotate(var(--r)); }
.wordmark .l__i { position: relative; display: inline-block; will-change: transform; }

/* 3D letters, lit from the top-left like the 3D bowl:
   back  → ::before, a copy of the glyph extruded down-right with stacked shadows + a cast shadow
   mid   → .l__in, the ingredient seen through the counter (sits inside the letter's thickness)
   front → .l__f, the lit face */
.wordmark { will-change: transform; }
.wordmark .l__i {
  --d: .0085em;               /* depth of one extrusion step */
  --ex: .55;                  /* extrusion direction (down-right, away from the light) */
  --ey: 1;
}
.wordmark .l__i::before {
  content: attr(data-l);
  position: absolute;
  inset: 0;
  z-index: -2;
  /* subtle: half the depth, cream-to-sand sides, a soft short shadow, so the bowl stays the star */
  color: #EFE2C8;
  text-shadow:
    calc(var(--ex) * var(--d) * 1) calc(var(--ey) * var(--d) * 1) 0 #ECDDC1,
    calc(var(--ex) * var(--d) * 2) calc(var(--ey) * var(--d) * 2) 0 #E7D6B8,
    calc(var(--ex) * var(--d) * 3) calc(var(--ey) * var(--d) * 3) 0 #E1CEAE,
    calc(var(--ex) * var(--d) * 4) calc(var(--ey) * var(--d) * 4) 0 #DAC5A3,
    calc(var(--ex) * var(--d) * 5) calc(var(--ey) * var(--d) * 5) 0 #D1BA97,
    calc(var(--ex) * var(--d) * 9) calc(var(--ey) * var(--d) * 12) .045em rgba(55, 8, 4, .28);
}
.wordmark .l__f {
  position: relative;
  display: inline-block;
  color: transparent;
  background: linear-gradient(165deg, #FFFEF8 0%, #FBF3E2 35%, #F1E3C6 75%, #E4CFA8 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.l__in {
  position: absolute;
  z-index: -1;
  left: var(--lx);
  top: var(--ly);
  width: var(--w);
  transform: translate(-50%, -50%) scaleY(.7);
}
.l__in svg { width: 100%; height: auto; aspect-ratio: 1; }

.dish {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 24%;
  width: min(37.2vw, 62.4svh); /* +20% */
  transform: translateX(-50%);
}
.dish__in { position: relative; will-change: transform; }
.dish__in > svg { position: relative; z-index: 2; width: 100%; height: auto; filter: drop-shadow(0 22px 18px rgba(0, 0, 0, .35)); }
.dish__shadow {
  position: absolute;
  left: 16%; right: 16%; bottom: 2%;
  height: 10%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent);
  filter: blur(6px);
}

/* orbit lives inside the dish layer: far items (z 1) sit under the dish art (z 2), near items (z 3) over it */
.orbit { position: absolute; inset: 0; }

/* real 3D (js/salsa3d.js): the canvas takes over from the SVG bowl and orbit, which stay in the
   DOM (hidden, still laid out) because the canvas tracks their box for intro, scroll and bob */
.stage3d { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; }
.is-3d .dish__in > svg,
.is-3d .dish__shadow,
.is-3d .orbit { visibility: hidden; }
.orb {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  width: calc(var(--s) * 1.3vmin + var(--s) * .65vw);
  will-change: transform;
}
.orb__m { filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .3)); }
.orb__r { will-change: transform; }
.orb svg { width: 100%; height: auto; aspect-ratio: 1; }
.orb.is-front { z-index: 3; }

.seal {
  position: absolute;
  z-index: 5;
  left: 6%;
  top: 22%;
  width: clamp(96px, 11vw, 150px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .3);
}
.seal > svg:first-child { width: 100%; height: 100%; animation: spin 22s linear infinite; }
.seal text { font: 700 15px var(--f-body); letter-spacing: .1em; fill: var(--cream); }
.seal__icon { position: absolute; inset: 28%; width: 44%; height: 44%; color: var(--cream); }
@keyframes spin { to { transform: rotate(1turn); } }

/* =========================================================
   Foot
   ========================================================= */
.hero__foot {
  position: absolute;
  z-index: 6;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(22px, 6svh, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 24px;
}

.hero__title {
  margin: 0;
  max-width: 12ch;
  font: 700 clamp(30px, 3.2vw, 50px)/1 var(--f-display);
  letter-spacing: -.015em;
  text-shadow: var(--halo);
}
.hero__title em { font-style: italic; font-weight: 600; color: var(--accent); }

.ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 48px;
  padding: 0 1.4em;
  border-radius: 999px;
  border: 2px solid transparent;
  font: 700 15px/1 var(--f-body);
  text-decoration: none;
  white-space: nowrap;
  transition: transform .3s var(--ease-out), background .25s, color .25s;
}
.btn svg { width: 18px; height: 18px; transition: transform .3s var(--ease-out); }
.btn:hover { transform: translateY(-2px); }
.btn:hover svg { transform: translateX(4px); }
.btn--red { background: var(--cream); color: var(--red); box-shadow: 0 5px 0 #D6C3A4, 0 12px 26px rgba(42, 10, 5, .35); }
.btn--red:hover { background: var(--accent); color: var(--charcoal); }
.btn--red:active { transform: translateY(3px); box-shadow: 0 2px 0 #D6C3A4; }
.btn--ghost { border-color: var(--on-dark); background: var(--bg); color: var(--on-dark); }
.btn--ghost:hover { background: var(--cream); color: var(--bg); }

.paths { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.paths a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(122, 25, 16, .85);
  border: 1px solid rgba(246, 240, 227, .35);
  font: 700 13px/1 var(--f-body);
  text-decoration: none;
  transition: background .25s, color .25s;
}
.paths a:hover { background: var(--cream); color: var(--bg); }
.paths svg { width: 18px; height: 18px; }

.hero__scroll {
  display: grid;
  justify-items: center;
  gap: 10px;
  font: 700 11px/1 var(--f-body);
  text-transform: uppercase;
  letter-spacing: .14em;
  text-decoration: none;
  text-shadow: var(--halo);
}
.hero__scroll i { position: relative; width: 2px; height: 40px; overflow: hidden; background: rgba(246, 240, 227, .25); }
.hero__scroll i::after { content: ""; position: absolute; inset: 0; background: var(--cream); animation: cue 1.8s var(--ease-out) infinite; }
@keyframes cue { from { transform: translateY(-100%); } to { transform: translateY(100%); } }

.talk { justify-self: end; text-align: right; text-shadow: var(--halo); }
.talk__label { margin: 0 0 8px; font: 700 clamp(12px, 1.1vw, 15px)/1 var(--f-body); text-transform: uppercase; letter-spacing: .1em; color: rgba(246, 240, 227, .85); }
.talk__big { display: grid; justify-items: end; margin: 0; font: 700 clamp(24px, 2.4vw, 36px)/1.05 var(--f-display); }
.talk__big a { text-decoration: none; }
.talk__big a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.talk__hola { font-style: italic; font-weight: 600; color: var(--accent); font-size: 1.1em; }
.talk__mail { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; font: 700 14px/1 var(--f-body); }
.talk__mail svg { width: 18px; height: 18px; }

/* =========================================================
   Bands + placeholder next section
   ========================================================= */
.bands { position: relative; z-index: 5; margin-top: 5vw; padding-bottom: 3vw; overflow-x: clip; pointer-events: none; }
.band { width: 112vw; margin-left: -6vw; overflow: hidden; white-space: nowrap; }
.band__track { display: inline-flex; align-items: center; gap: .55em; animation: marquee 34s linear infinite; }
.band b { font-weight: 400; }
.band--terra {
  transform: rotate(-4deg);
  padding: .14em 0 .2em;
  background: var(--accent);
  color: var(--green-deep);
  font: 700 clamp(46px, 7.5vw, 112px)/1 var(--f-display);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .25);
}
.band--terra .band__alt { font-style: italic; font-weight: 600; color: var(--red); }
.band--terra b { font-size: .45em; color: var(--red); }
.band--cream {
  position: relative;
  margin-top: -1.5vw;
  transform: rotate(2deg);
  padding: .4em 0;
  background: var(--cream);
  color: var(--green);
  font: 700 clamp(18px, 2vw, 28px)/1 var(--f-body);
  text-transform: uppercase;
  letter-spacing: .06em;
  border-block: 4px solid var(--green);
}
.band--cream .band__track { animation-direction: reverse; animation-duration: 40s; }
.band--cream b { color: var(--bg); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* the sections after the hero live in css/sections.css */

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1180px) {
  .topnav { display: none; }
  .topbar { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px) {
  .hero__foot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero__scroll { display: none; }
}
@media (min-width: 768px) and (max-height: 760px) {
  .paths { display: none; }
}

@media (max-width: 767px) {
  .topbar { height: 68px; }
  .brand { padding: 5px 12px 5px 6px; }
  .brand__emblem { width: 34px; height: 34px; }
  .brand__name { font-size: 15px; }
  .topbar__cta { height: 40px; padding: 0 14px; font-size: 13px; }
  .topbar__cta svg { display: none; }

  .hero { height: auto; min-height: 100svh; display: flex; flex-direction: column; padding: 86px var(--gutter) 28px; }
  .hero__kicker { position: static; flex-wrap: wrap; gap: 6px 14px; font-size: 11px; }
  .hero__stage { position: relative; inset: auto; height: min(112vw, 56svh); margin: 4px calc(var(--gutter) * -1) 0; }
  .wordmark { top: 4%; bottom: 34%; }
  .wordmark__in { font-size: 24vw; transform: scaleY(1.35); }
  .dish { width: 79vw; bottom: 0; } /* +20% */
  .orb { width: calc(var(--s) * 2.4vmin); }
  .orb[data-sm="hide"], .seal { display: none; }

  .hero__foot { position: static; grid-template-columns: 1fr; gap: 22px; margin-top: 14px; }
  .hero__title { font-size: 34px; }
  .ctas { display: grid; grid-template-columns: 1fr; }
  .talk { justify-self: start; text-align: left; }
  .talk__big { justify-items: start; }
  .bands { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .intro-pending [data-intro], .intro-pending [data-reveal] { opacity: 1; }
}
