@import url('https://fonts.googleapis.com/css2?family=Alex+Brush&family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,600;9..144,700&family=Karla:wght@400;500;700&display=swap');

:root {
  --color-brand: #ffde59;
  --color-saludable: #64f2d4;
  --color-tradicional: #ff4444;
  --color-bg: #fdfaf0;
  --color-text: #2e2a25;
  --font-title: 'Fraunces', serif;
  --font-text: 'Karla', sans-serif;
  --font-accent: 'Alex Brush', cursive;
}

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

html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
figure,
blockquote,
dl,
dd {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-text);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
}

body.splash-active {
  overflow: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-title);
}

#hero h1 {
  font-family: var(--font-accent);
}

img,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

nav a.active,
nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

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

.splash {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.splash--hidden {
  opacity: 0;
  pointer-events: none;
}

.splash__logo {
  display: block;
  width: 85vw;
  max-width: 31.25rem;
  max-height: 60vh;
  height: auto;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.splash__logo--visible {
  opacity: 1;
  transform: scale(1);
}

button {
  font: inherit;
}

header,
main,
footer,
section {
  width: 100%;
}

header,
main,
footer {
  padding-inline: 1rem;
}

.header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
  padding-block: 1rem;
}

.header__brand {
  font-family: var(--font-accent);
  font-size: 1.75rem;
  line-height: 1;
}

.header__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 0.75rem;
  background: var(--color-brand);
  color: var(--color-text);
}

.header nav {
  display: none;
}

.header__whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.75rem 1rem;
  border-radius: 999rem;
  background: var(--color-text);
  color: var(--color-bg);
  font-size: 1rem;
  white-space: nowrap;
}

.icon-whatsapp {
  display: inline-block;
  flex: none;
  fill: currentColor;
  color: currentColor;
}

.icon-whatsapp--nav {
  width: 1.5rem;
  height: 1.5rem;
}

.icon-whatsapp--paso {
  width: 2rem;
  height: 2rem;
}

/* Ejemplo de alternancia: .header.menu-open nav { display: flex; } */
.header.menu-open nav {
  display: flex;
}

.header.menu-open {
  grid-template-columns: 1fr auto;
}

.main-content {
  display: grid;
  gap: 2rem;
  padding-block: 1rem 2rem;
}

.hero,
.historia,
.lineas-produccion,
.catalogo,
.como-pedir,
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 100%;
}

.hero,
.historia,
.lineas-produccion,
.catalogo,
.como-pedir,
.footer,
.hero article,
.historia article,
.lineas-produccion article,
.como-pedir article,
.footer article {
  text-align: center;
}

.hero {
  padding-block: 2rem;
}

.hero img,
.historia img {
  width: min(100%, 32rem);
  margin-inline: auto;
  border-radius: 1.25rem;
  box-shadow: 0 0.45rem 1.25rem rgba(46, 42, 37, 0.08);
}

.historia img {
  width: min(100%, 28rem);
}

.hero h1 {
  font-size: 3rem;
  line-height: 0.95;
}

.hero p,
.historia p,
.lineas-produccion p,
.catalogo p,
.como-pedir p,
.footer p {
  font-size: 1rem;
}

.catalogo-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 1.25rem;
}

.catalogo-cta h2,
.catalogo-cta p {
  max-width: 40rem;
}

.btn-ver-catalogo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  border-radius: 999rem;
  background: var(--color-brand);
  color: var(--color-text);
  font-weight: 700;
  box-shadow: 0 0.35rem 1rem rgba(46, 42, 37, 0.08);
  transition: transform 180ms ease, opacity 180ms ease;
}

.btn-ver-catalogo:hover {
  opacity: 0.92;
  transform: translateY(-0.08rem);
}

.lineas-produccion {
  width: 100%;
}

.lineas-produccion article {
  width: 100%;
  padding: 1.5rem;
  border-radius: 1rem;
  color: var(--color-text);
}

.lineas-produccion .saludable {
  background: var(--color-saludable);
}

.lineas-produccion .tradicional {
  background: var(--color-tradicional);
  color: #fff;
}

#catalogo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

.catalogo-buscador {
  width: 100%;
  max-width: 25rem;
  margin-inline: auto;
}

.catalogo-buscador input[type="search"] {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 0.1rem solid rgba(46, 42, 37, 0.18);
  border-radius: 999rem;
  background: rgba(255, 255, 255, 0.85);
  font: inherit;
  font-family: var(--font-text);
  color: var(--color-text);
  box-shadow: 0 0.35rem 1rem rgba(46, 42, 37, 0.06);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.catalogo-buscador input[type="search"]:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 0.18rem rgba(255, 222, 89, 0.35);
}

.producto-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  padding: 1.25rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 0.45rem 1.25rem rgba(46, 42, 37, 0.08);
  text-align: center;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.producto-card:hover {
  transform: translateY(-0.18rem);
  box-shadow: 0 0.7rem 1.5rem rgba(46, 42, 37, 0.1);
}

.producto-card img {
  width: 11.25rem;
  max-width: 11.25rem;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  margin-inline: auto;
  border: 0.28rem solid transparent;
  box-shadow: 0 0.35rem 1rem rgba(46, 42, 37, 0.08);
}

.producto-card.saludable img {
  border-color: var(--color-saludable);
}

.producto-card.tradicional img {
  border-color: var(--color-tradicional);
}

.producto-card h3 {
  font-size: 1.35rem;
  line-height: 1.1;
}

.producto-card p {
  margin: 0;
}

.producto-card p:first-of-type {
  font-size: 1.05rem;
  font-weight: 700;
}

.producto-card p:nth-of-type(2) {
  font-size: 0.95rem;
  color: rgba(46, 42, 37, 0.78);
}

.producto-card .producto-card__tamano {
  font-size: 0.85rem;
  color: rgba(46, 42, 37, 0.72);
}

.producto-card .producto-card__nota {
  font-size: 0.78rem;
  color: rgba(46, 42, 37, 0.64);
  font-style: italic;
}

.producto-card a[href*="wa.me"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border-radius: 999rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  transition: transform 180ms ease, opacity 180ms ease;
}

.producto-card.saludable a[href*="wa.me"] {
  background: var(--color-saludable);
  color: var(--color-text);
}

.producto-card.tradicional a[href*="wa.me"] {
  background: var(--color-tradicional);
  color: #fff;
}

.producto-card a[href*="wa.me"]:hover {
  opacity: 0.92;
  transform: scale(1.02);
}

.footer {
  padding-block: 2rem;
}

.footer h2,
.footer h3,
.footer p {
  text-align: center;
}

.footer__cobertura,
.footer__redes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
}

.footer__cobertura {
  margin-top: 0.75rem;
}

.footer__mapa {
  width: 100%;
}

.footer__mapa iframe {
  display: block;
  width: 100%;
  height: 18.75rem;
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 0.45rem 1.25rem rgba(46, 42, 37, 0.08);
}

.icon-red {
  display: inline-block;
  flex: none;
  fill: currentColor;
  color: var(--color-brand);
}

.icon-red--social {
  width: 2rem;
  height: 2rem;
}

.footer__redes-links {
  display: flex;
  gap: 0.9rem;
  align-items: center;
}

.footer__redes-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999rem;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 0.35rem 1rem rgba(46, 42, 37, 0.08);
}

.footer article img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 25rem;
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.como-pedir ol {
  list-style: none;
  display: grid;
  gap: 1rem;
  width: 100%;
}

.como-pedir li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 0.45rem 1.25rem rgba(46, 42, 37, 0.08);
  text-align: left;
}

.como-pedir li + li::before {
  content: '';
  position: absolute;
  top: -0.5rem;
  left: 1.9rem;
  width: 0.08rem;
  height: 1rem;
  background: rgba(46, 42, 37, 0.14);
}

.paso-numero {
  font-family: var(--font-title);
  font-size: 2.25rem;
  line-height: 1;
  color: var(--color-brand);
}

.como-pedir li > div {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.como-pedir li > div h3 {
  font-size: 1.25rem;
}

.como-pedir li > div p {
  font-size: 0.95rem;
  color: rgba(46, 42, 37, 0.8);
}

.como-pedir li > div .icon-whatsapp--paso {
  margin-top: 0.15rem;
}

@media (max-width: 767.98px) {
  body {
    overflow-x: hidden;
  }

  .header.menu-open {
    grid-template-columns: 1fr auto auto;
  }

  .header.menu-open nav {
    display: flex;
    flex-direction: column;
    grid-column: 1 / -1;
    justify-self: stretch;
    align-items: flex-start;
    width: 100%;
    padding-top: 0.75rem;
    gap: 0.75rem;
  }
}

@media (min-width: 768px) {
  .header {
    grid-template-columns: auto 1fr auto;
  }

  .header__toggle {
    display: none;
  }

  .header nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .main-content,
  .header,
  .footer {
    max-width: 90rem;
    margin-inline: auto;
  }

  .lineas-produccion {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .lineas-produccion h2 {
    grid-column: 1 / -1;
  }

  .lineas-produccion > p {
    grid-column: 1 / -1;
  }

  .lineas-produccion article {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  #catalogo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .como-pedir ol {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .como-pedir li {
    height: 100%;
  }

  .como-pedir li + li::before {
    display: none;
  }

  .footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto;
    gap: 2rem;
    align-items: stretch;
  }

  .footer > article,
  .footer__cobertura,
  .footer__redes {
    height: 100%;
  }

  .footer__cobertura,
  .footer__redes {
    align-items: flex-start;
  }

  .footer__mapa iframe {
    height: 25rem;
  }

  .footer article img {
    width: auto;
    height: 100%;
    max-height: none;
  }

  .catalogo-buscador {
    max-width: 25rem;
  }

  .splash__logo {
    width: 65vw;
    max-width: 43.75rem;
    max-height: 60vh;
  }
}

@media (min-width: 1024px) {
  .header,
  .main-content,
  .footer {
    max-width: 75rem;
    margin-inline: auto;
  }

  #catalogo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .producto-card img {
    width: 13.75rem;
    max-width: 13.75rem;
  }

  .hero img,
  .historia img {
    max-width: 38rem;
    margin-inline: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }

  .como-pedir ol {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .como-pedir li {
    height: 100%;
  }

  .como-pedir li + li::before {
    display: none;
  }

  .splash__logo {
    width: 55vw;
    max-width: 56.25rem;
    max-height: 65vh;
  }

  .catalogo-cta {
    padding: 3rem 1.5rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  .splash,
  .splash__logo {
    transition: none;
  }

  .splash__logo {
    transform: none;
  }

  .splash__logo--visible {
    transform: none;
  }
}
