/* ============================================================
   Autopan — design system
   Beige, warm, artisanal. Fraunces (display) + Manrope (text)
   ============================================================ */

:root {
  --bg: #f4ecdf;          /* papel/harina */
  --bg-tint: #ebdfcb;     /* beige más profundo */
  --surface: #fbf7f0;     /* tarjetas */
  --line: #dccbb0;
  --ink: #3a2a1d;         /* café oscuro */
  --ink-soft: #6e5a47;
  --crust: #a8652e;       /* corteza */
  --crust-deep: #7c4520;
  --dark: #2f2219;
  --dark-ink: #f1e6d4;
  --ok: #5f8a4a;
  --closed: #b0573a;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(58, 42, 29, .06), 0 12px 32px -14px rgba(58, 42, 29, .28);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-text: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 128px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.33 0 0 0 0 0.2 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, .site-header, .site-footer { position: relative; z-index: 1; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
figure { margin: 0; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 0;
  font-variation-settings: "opsz" 120;
}

h1 { font-size: clamp(44px, 7vw, 88px); }
h2 { font-size: clamp(34px, 4.6vw, 56px); }
h3 { font-size: 22px; letter-spacing: -.01em; font-variation-settings: "opsz" 40; }

h1 em, h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--crust);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px; top: 16px; z-index: 100;
  background: var(--dark); color: var(--dark-ink);
  padding: 10px 16px; border-radius: 10px;
}

:focus-visible { outline: 3px solid var(--crust); outline-offset: 3px; border-radius: 6px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-dark { background: var(--dark); color: var(--dark-ink); }
.btn-dark:hover { background: var(--crust-deep); }

.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

.btn-small { padding: 10px 18px; font-size: 15px; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.2) blur(12px);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--crust-deep);
  margin-right: auto;
}
.brand-mark { width: auto; height: 50px; }
.brand-word { width: auto; height: 22px; }

.nav { display: flex; gap: 28px; }
.nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--crust);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.menu-toggle span {
  position: absolute;
  left: 11px; right: 11px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s ease, top .25s ease;
}
.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 25px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- hero ---------- */

.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(56px, 8vw, 110px); }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 8px 16px 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}

.status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--line);
  flex: none;
}
.status-dot.is-open { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent); animation: pulse 2.4s ease-in-out infinite; }
.status-dot.is-closed { background: var(--closed); }

@keyframes pulse {
  50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--ok) 6%, transparent); }
}

.hero h1 em { display: block; }

.lead {
  font-size: clamp(18px, 1.6vw, 20px);
  color: var(--ink-soft);
  max-width: 34ch;
  margin: 24px 0 34px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 36px;
  margin: 44px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.hero-facts div { margin: 0; }
.hero-facts dt {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}
.hero-facts dd { margin: 0; font-size: 14px; color: var(--ink-soft); }

.hero-media {
  position: relative;
  aspect-ratio: 1 / 1.05;
}
.hero-main,
.hero-small {
  position: absolute;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-main img,
.hero-small img { width: 100%; height: 100%; object-fit: cover; }

.hero-main {
  inset: 0 0 18% 12%;
  border-radius: 200px 200px var(--radius) var(--radius);
}
.hero-small {
  left: 0; bottom: 0;
  width: 48%;
  aspect-ratio: 4 / 3.2;
  border: 6px solid var(--bg);
  transform: rotate(-4deg);
}

.hero-badge {
  position: absolute;
  right: -6px; bottom: 4%;
  width: 132px; height: 132px;
  border-radius: 50%;
  background: var(--crust);
  color: var(--bg);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}
.hero-badge > svg:first-child {
  position: absolute;
  inset: 6px;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  animation: spin 22s linear infinite;
}
.hero-badge text {
  fill: currentColor;
  font-family: var(--font-text);
  font-size: 10.6px;
  font-weight: 700;
  letter-spacing: .14em;
}
.badge-logo {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
}
.badge-logo img { width: auto; height: 54px; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- strip ---------- */

.strip {
  background: var(--dark);
  color: var(--dark-ink);
  overflow: hidden;
  padding: 18px 0;
  transform: rotate(-1.2deg);
  margin: 0 -20px;
}
.strip-track {
  display: flex;
  align-items: center;
  gap: 28px;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.strip span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 28px);
  white-space: nowrap;
}
.strip i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--crust);
  flex: none;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */

.section { padding: var(--section) 0; }
.section-tint { background: var(--bg-tint); }
.section-dark { background: var(--dark); color: var(--dark-ink); }
.section-dark .kicker { color: #d89b62; }
.section-dark .section-sub { color: #c9b9a3; }

.section-head { max-width: 640px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head.split {
  max-width: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 64px;
  align-items: end;
}

.kicker {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--crust);
}

.section-sub {
  margin: 18px 0 0;
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 46ch;
}
.split .section-sub { margin: 0; }

/* steps */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: none;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px 30px;
}
.step-num {
  position: absolute;
  top: 24px; right: 26px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
}
.step-icon {
  width: 52px; height: 52px;
  color: var(--crust);
  margin-bottom: 22px;
}
.step h3 { margin-bottom: 10px; }
.step p { margin: 0; color: var(--ink-soft); font-size: 16px; }

/* cards (photo) */

.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-tint);
  box-shadow: var(--shadow);
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}
.card:hover img { transform: scale(1.04); }

.card figcaption {
  position: absolute;
  left: 14px; bottom: 14px; right: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  pointer-events: none;
}
.card figcaption strong {
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  padding: 6px 14px;
  border-radius: 999px;
  line-height: 1.2;
}
.card figcaption span {
  background: color-mix(in srgb, var(--dark) 80%, transparent);
  color: var(--dark-ink);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin-left: 4px;
}

.bread-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  grid-template-rows: 280px 280px;
  gap: 18px;
}
.bread-grid .card-tall { grid-row: span 2; }
.bread-grid .card-wide { grid-column: span 2; }

.sweet-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  grid-template-rows: repeat(3, 240px);
  grid-template-areas:
    "a b b"
    "a c d"
    "e f d";
  gap: 18px;
}
.s-a { grid-area: a; }
.s-b { grid-area: b; }
.s-c { grid-area: c; }
.s-d { grid-area: d; }
.s-e { grid-area: e; }
.s-f { grid-area: f; }

/* para el camino */

.road-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.road {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 200px 200px var(--radius) var(--radius);
  overflow: hidden;
}
.road img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.road:hover img { transform: scale(1.05); }
.road figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 60px 20px 20px;
  background: linear-gradient(to top, rgba(31, 21, 14, .85), transparent);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: #fff7ea;
}

/* despacho */

.delivery {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.delivery-media {
  aspect-ratio: 4 / 5;
  max-height: 560px;
  border-radius: var(--radius) var(--radius) 200px 200px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.delivery-media img { width: 100%; height: 100%; object-fit: cover; }
.delivery-copy p:not(.kicker) { color: var(--ink-soft); font-size: 18px; max-width: 44ch; margin: 22px 0 32px; }

/* horario + contacto */

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 48px);
}
.info-card h2 { font-size: clamp(30px, 3.4vw, 42px); }
.info-card > p:not(.kicker) { color: var(--ink-soft); margin: 18px 0 0; }

.live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink) !important;
}
.live::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--line);
}
.live.is-open::before { background: var(--ok); }
.live.is-closed::before { background: var(--closed); }

.hours-list {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}
.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px dashed var(--line);
  font-size: 17px;
}
.hours-list li:last-child { border-bottom: 1px dashed var(--line); }
.hours-list li span:last-child { font-weight: 700; white-space: nowrap; }
.hours-list li.today { color: var(--crust-deep); }
.info-card > .hours-note { font-size: 15px; margin-top: 22px; }
.hours-list li.today span:first-child::after {
  content: "hoy";
  margin-left: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--crust);
  color: var(--surface);
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: 2px;
}

.contact-actions {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}
.contact-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.contact-link:hover { background: var(--bg-tint); border-color: var(--crust); transform: translateX(3px); }
.cl-label { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.cl-value { font-weight: 700; font-size: 17px; }
.cl-value::after { content: " →"; color: var(--crust); }

/* footer */

.site-footer {
  background: var(--dark);
  color: var(--dark-ink);
  padding: 48px 0 56px;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}
.footer-id { display: flex; align-items: center; gap: 20px; }
.footer-logo {
  flex: none;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.footer-logo img { display: block; width: auto; height: 104px; }
.footer-tag { margin: 0; color: #c9b9a3; font-size: 15px; max-width: 26ch; }
.footer-meta { margin: 0; color: #c9b9a3; font-size: 14px; }
.footer-meta a { color: var(--dark-ink); }

/* floating WhatsApp */

.fab {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: 60;
  width: 58px; height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--crust);
  color: #fff;
  box-shadow: 0 10px 28px -8px rgba(58, 42, 29, .55);
  transform: translateY(120px);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), background .2s ease;
}
.fab.show { transform: none; }
.fab:hover { background: var(--crust-deep); }
.fab svg { width: 28px; height: 28px; }
.fab-ig {
  bottom: 88px;
  background: var(--dark);
  transform: translateY(190px);
  transition-delay: .05s;
}
.fab-ig:hover { background: var(--ink); }
.fab-ig svg { width: 26px; height: 26px; }

/* reveal on scroll */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .nav {
    position: fixed;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav.open { opacity: 1; transform: none; visibility: visible; }
  .nav a { padding: 14px 0; font-size: 18px; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .menu-toggle { display: block; }
  .header-row { gap: 8px; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { max-width: 560px; width: 100%; margin: 0 auto; }

  .section-head.split { grid-template-columns: 1fr; }

  .steps { grid-template-columns: 1fr; }

  .bread-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 300px 220px 220px; }
  .bread-grid .card-tall { grid-row: auto; grid-column: span 2; }
  .bread-grid .card-wide { grid-column: span 2; }

  .sweet-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(5, 200px);
    grid-template-areas:
      "b b"
      "a c"
      "a d"
      "e d"
      "f f";
  }

  .road-row { grid-template-columns: 1fr 1fr; }

  .delivery { grid-template-columns: 1fr; }
  .delivery-media { max-width: 460px; }

  .info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .header-cta { display: none; }
  .brand-mark { height: 44px; }
  .brand-word { height: 19px; }

  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-facts { gap: 14px 24px; }
  .hero-facts dt { font-size: 19px; }
  .hero-badge { width: 104px; height: 104px; right: 0; }
  .hero-badge text { font-size: 10px; }
  .badge-logo { width: 60px; height: 60px; }
  .badge-logo img { height: 42px; }

  .bread-grid { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: 240px; }
  .bread-grid .card-tall,
  .bread-grid .card-wide { grid-column: auto; }

  .sweet-grid { grid-template-rows: repeat(5, 165px); gap: 12px; }
  .card figcaption strong { font-size: 17px; }

  .road-row { gap: 12px; }
  .road figcaption { font-size: 19px; padding: 40px 14px 14px; }

  .hours-list li { flex-direction: column; gap: 2px; }
  .contact-link { flex-direction: column; align-items: flex-start; gap: 2px; }
}

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