/*! HTML5 Boilerplate v9.0.0-RC1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: var(--naranja);
  text-shadow: none;
  color: var(--fondo);
}

::selection {
  background: var(--naranja);
  text-shadow: none;
  color: var(--fondo);
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

:root {
  --azul: #242b6b;
  --fondo: #fffaf6;
  --cremita: #f0e4d8;
  --naranja: #d88468;
  --beige: #f0e4d8;
  --custom-border: 2px solid var(--azul);
  --custom-radius: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background-color: var(--fondo);
  color: var(--azul);
  font-family: "DM Sans", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
}

p {
  font-size: 16px;
  font-weight: 400;
}

h1,
h2,
h3,
p {
  margin: 0;
}

p + p {
  margin-top: 8px;
}

h2 {
  font-family: quiche-display, sans-serif;
  font-weight: 500;
  font-style: normal;
  font-size: 32px;
}

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

ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

#somos,
footer,
.mobile-menu {
  background-color: var(--azul);
  color: var(--cremita);
}

/* ------------ HEADER ------------ */

header {
  position: fixed;
  top: 0;
  width: 100vw;
  z-index: 2;
  background-color: var(--fondo);
  border-bottom: var(--custom-border);
}

nav ul {
  display: flex;
}

.btn {
  padding: 10px 24px;
  font-weight: 500;
  background-color: var(--azul);
  color: var(--fondo);
  border: var(--custom-border);
  border-radius: var(--custom-radius);
  transition: 0.3s ease;
}

.btn:hover {
  background-color: var(--fondo);
  color: var(--azul);
}

/* ------------ MOBILE HEADER ------------ */

#header-mobile {
  display: flex;
  justify-content: center;
}

#header-mobile .logo img {
  height: 70px;
}

#open-menu img {
  cursor: pointer;
}

#open-menu {
  position: absolute;
  top: 24px;
  right: 24px;
}

#open-menu img {
  height: auto;
}

#fullscreen-menu {
  display: none;
  animation-duration: 200ms;
}

.fullscreen-menu-opened #fullscreen-menu {
  display: flex;
}

.fullscreen-menu-opened {
  overflow-y: hidden;
}

.mobile-menu {
  height: 100vh;
  width: 100vw;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  animation-duration: 100ms;
}

.mobile-menu-content {
  width: fit-content;
  font-family: quiche-display, sans-serif;
  font-weight: 500;
  font-style: normal;
  font-size: 24px;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

.mobile-menu #close-menu {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
}

/* ------------ DESKTOP HEADER ------------ */

@media only screen and (min-width: 992px) {
  #header-mobile {
    display: none;
  }
}

#header-desktop {
  display: none;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-align: center;
  padding: 0 40px;
}

@media only screen and (min-width: 992px) {
  #header-desktop {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    justify-content: space-between;
    align-items: center;
  }
}

#header-desktop .logo img {
  max-height: 75px;
}

#header-desktop nav {
  grid-column: 2;
}

#header-desktop nav ul {
  gap: 48px;
  justify-content: space-between;
  align-items: center;
}

@media screen and (min-width: 992px) {
  #header-desktop nav,
  header .btn {
    display: inline-block;
  }
}

#btn-container {
  justify-self: end;
}

#header-desktop li {
  text-decoration: underline rgba(0, 0, 0, 0);
  text-underline-offset: 4px;
  transition: text-decoration-color 300ms;
}

#header-desktop li:hover {
  text-decoration-color: var(--azul);
}

/* ------------ MAIN ------------ */

.seccion {
  padding: 56px 24px;
}

@media only screen and (min-width: 768px) {
  .seccion {
    padding: 120px;
  }
}

/* ------------ HERO ------------ */

#hero-foto {
  background-image: url(/img/hero.avif);
  background-position: top left;
  background-size: cover;
  height: 100%;
  width: 100%;
  animation-duration: 2s;
}

@media only screen and (min-width: 992px) {
  #hero {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #hero-foto {
    background-position: top center;
    height: auto;
    aspect-ratio: 5/2;
    margin: 0 120px;
    border-radius: var(--custom-radius);
    border: var(--custom-border);
  }
}

/* ------------ QUIENES SOMOS ------------ */

#somos {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
  gap: 24px;
}

#somos h2 {
  grid-row: 1;
}

#somos-foto {
  grid-row: 2;
  background-image: url("/img/somos.avif");
  background-size: cover;
  background-position: center center;
  border-radius: var(--custom-radius);
  height: auto;
  width: 100%;
  aspect-ratio: 1/1;
}

#somos-desc {
  grid-row: 3;
}

@media only screen and (min-width: 992px) {
  #somos {
    grid-template-columns: 5fr 1fr 6fr;
    grid-template-rows: auto 1fr;
    column-gap: 16px;
    row-gap: 16px;
  }

  #somos-foto {
    grid-row: 1 / span 2;
    grid-column: 3;
    aspect-ratio: auto;
  }

  #somos-desc {
    grid-row: 2;
    grid-column: 1;
  }
}

/* ------------ PRODUCTOS ------------ */

#productos {
  text-align: center;
  padding-bottom: 0;
}

#productos h2,
#diferentes h2,
footer h2,
h3 {
  padding-bottom: 24px;
}

#prod-gallery {
  display: grid;
  gap: 24px;
}

@media only screen and (min-width: 768px) {
  #prod-gallery-container {
    display: grid;
    grid-template-columns: 1fr 4fr 1fr;
    gap: 16px;
    padding-top: 16px;
  }

  #prod-gallery {
    grid-column: 2;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 16px;
  }
}

@media only screen and (min-width: 992px) {
  #prod-gallery-container {
    grid-template-columns: 1fr 2fr 1fr;
  }
}

.producto {
  position: relative;
  border-radius: var(--custom-radius);
}

.prod-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  border-radius: var(--custom-radius);
  border: var(--custom-border);
}

.producto:nth-child(1) .prod-img {
  background-image: url(/img/producto1.avif);
  background-position: top center;
  background-size: cover;
}

.producto:nth-child(3) .prod-img {
  background-image: url(/img/producto2.avif);
  background-position: center;
  background-size: cover;
}
.producto:nth-child(5) .prod-img {
  background-image: url(/img/producto3.avif);
  background-position: center;
  background-size: cover;
}

.producto:nth-child(7) .prod-img {
  background-image: url(/img/producto4.avif);
  background-position: center;
  background-size: cover;
}

.producto img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  border-radius: var(--custom-radius);
  border: var(--custom-border);
}

.overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  width: 100%;
  opacity: 0;
  transition: 0.5s ease;
  background-color: var(--azul);
  border-radius: var(--custom-radius);
  border: var(--custom-border);
  overflow: hidden;
}

.overlay-text {
  color: var(--cremita);
  width: 100%;
  height: 100%;
  font-size: 16px;
  position: absolute;
  box-sizing: border-box;
  text-align: center;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.prod-desc-mobile {
  font-size: 18px;
  padding-bottom: 32px;
}

@media only screen and (min-width: 768px) {
  .producto:hover .overlay {
    opacity: 1;
  }

  .prod-desc-mobile {
    display: none;
  }
}

/* ------------ QUE NOS HACE DIFERENTES ------------ */

#diferentes {
  padding: 56px 0 0;
}

#diferentes-banner {
  background-color: var(--beige);
  text-align: center;
  border: var(--custom-border);
  border-width: 2px 0;
  padding: 56px 24px;
}

#diferentes-banner p {
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 1px;
}

@media only screen and (min-width: 992px) {
  #diferentes {
    padding: 120px 0 0;
  }

  #diferentes-banner {
    border-radius: var(--custom-radius);
    border-width: 2px;
    padding: 40px 120px 80px;
    margin: 0 120px 120px;
  }

  #diferentes-banner p {
    font-weight: 250;
    font-size: 32px;
  }
}

h3 {
  text-transform: uppercase;
}

#diferentes-grid {
  display: grid;
  grid-template-areas:
    "txt1"
    "foto1"
    "txt2"
    "foto2";
}

#diferentes-grid > * {
  box-sizing: border-box;
}

.grid-foto {
  height: 100%;
  width: 100%;
  background-size: cover;
  background-position: center;
  aspect-ratio: 1/1;
  border-bottom: var(--custom-border);
}

.grid-text {
  padding: 56px 24px;
}

@media only screen and (min-width: 768px) {
  #diferentes-grid {
    border: var(--custom-border);
    border-width: 2px 0;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    grid-template-areas:
      "foto1 txt1"
      "txt2 foto2";
  }

  .grid-foto {
    aspect-ratio: auto;
    border-bottom: 0;
  }

  .grid-text {
    padding: 120px;
  }
}

.grid-foto:nth-child(2) {
  background-image: url(/img/grid1.avif);
  grid-area: foto1;
}

.grid-foto:nth-child(4) {
  background-image: url(/img/grid2.avif);
  grid-area: foto2;
}

.grid-text:nth-child(1) {
  grid-area: "txt1";
}

.grid-text ul {
  list-style-type: disc;
  padding: 8px 0 8px 1rem;
}

@media only screen and (min-width: 768px) {
  .grid-foto:nth-child(2) {
    border-right: var(--custom-border);
    border-bottom: var(--custom-border);
  }

  .grid-text:nth-child(1) {
    border-bottom: var(--custom-border);
  }

  .grid-text:nth-child(3) {
    border-right: var(--custom-border);
  }
}

/* ------------ ELIGEN ------------ */

#eligen {
  padding: 80px 0;
}

#eligen h2 {
  padding: 0 0 40px 24px;
}

@media only screen and (min-width: 992px) {
  #eligen {
    padding: 120px 0 80px;
  }

  #eligen h2 {
    padding: 0 0 40px 120px;
  }
}

#marquee {
  --marquee-gap: 56px;
  display: flex;
  overflow: hidden;
  position: relative;
  user-select: none;
  gap: var(--marquee-gap);
}

.marquee-content {
  flex-shrink: 0;
  display: flex;
  justify-content: space-around;
  min-width: 100%;
  gap: var(--marquee-gap);
}

.scroll {
  animation: scroll 25s linear infinite;
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - var(--marquee-gap)));
  }
}

.marquee-element {
  aspect-ratio: 8/6;
  width: 180px;
  background-size: contain;
}

.marquee-content div:nth-of-type(1) {
  background-image: url(/img/clientes-antiche.png);
}

.marquee-content div:nth-of-type(2) {
  background-image: url(/img/clientes-mostaza.png);
}

.marquee-content div:nth-of-type(3) {
  background-image: url(/img/clientes-bigpons.png);
}

.marquee-content div:nth-of-type(4) {
  background-image: url(/img/clientes-axion.png);
}

.marquee-content div:nth-of-type(5) {
  background-image: url(/img/clientes-kfc.png);
}

.marquee-content div:nth-of-type(6) {
  background-image: url(/img/clientes-wendys.png);
}

.marquee-content div:nth-of-type(7) {
  background-image: url(/img/clientes-aramark.png);
}

.marquee-content div:nth-of-type(8) {
  background-image: url(/img/clientes-mc.png);
}

/* ------------ FOOTER ------------ */

footer {
  padding: 56px 20px;
}

footer img {
  width: 33%;
}

@media only screen and (max-width: 992px) {
  #info-contacto {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  footer h2 {
    padding-top: 32px;
  }
}

@media only screen and (min-width: 992px) {
  footer {
    display: grid;
    grid-template-columns: 1fr 1fr 4fr;
    grid-template-areas: "logo . contacto";
    align-items: center;
    margin: 80px 40px 40px;
    padding: 40px 80px;
    border-radius: var(--custom-radius);
  }

  footer img {
    grid-area: logo;
    width: 100%;
  }

  #footer-content {
    grid-area: contacto;
  }

  #info-contacto {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  footer a {
    text-decoration: underline rgba(0, 0, 0, 0);
    text-underline-offset: 4px;
    transition: text-decoration-color 300ms;
  }

  footer a:hover {
    text-decoration-color: var(--cremita);
  }
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

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

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  /*
   * Don't show links that are fragment identifiers,
   * or use the `javascript:` pseudo protocol
   */
  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}
