/* RV3 Alimentos. Hand-written styles; values measured from the 2019 Divi site. */

@font-face {
  font-family: "Open Sans";
  src: url("/assets/fonts/open-sans-latin.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sofia";
  src: url("/assets/fonts/sofia-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #2d3c77;
  --gray: #ededee;
  --text: #333333;
  --muted: #999999;
  --footer-link: #2f6aa6;
  --nav-link: rgba(0, 0, 0, 0.6);
  --font-body: "Open Sans", Arial, sans-serif;
  --font-display: "Sofia", cursive;
  --container: min(80%, 1080px);
  --header-h: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400; /* the original asks for 500 but only loads 400/600, so it renders at 400 */
  line-height: 1.7;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 767px) { body { font-size: 16px; } }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
p { margin: 0; padding-bottom: 1em; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; padding-bottom: 10px; font-weight: 500; line-height: 1; color: var(--text); }
h1, h2 { font-family: var(--font-display); font-size: 30px; }
h3 { font-size: 18px; }
figure { margin: 0; }
svg[hidden] { position: absolute; width: 0; height: 0; overflow: hidden; }
section[id] { scroll-margin-top: var(--header-h); }

.container { width: var(--container); margin: 0 auto; }
.icon { width: 1em; height: 1em; fill: currentColor; flex: none; }
.visually-hidden, .hp {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px; border: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.only-mobile { display: none; }
@media (max-width: 767px) {
  .only-mobile { display: inline; }
  .hide-mobile { display: none !important; }
}

.button {
  display: inline-block;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.7;
  padding: 0.3em 1em;
  border: 2px solid var(--blue);
  border-radius: 3px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.3s, color 0.3s;
}
.button:hover, .button:focus-visible { background: #fff; color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 300; padding: 8px 16px; border-radius: 3px;
  background: var(--blue); color: #fff; font-weight: 600; transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 100; background: #fff; }
.top-bar { background: var(--blue); color: #fff; font-size: 12px; font-weight: 600; line-height: 13px; }
.top-bar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 13px; min-height: 31px; padding: 4px 0; }
.top-bar__item { color: #fff; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.top-bar__socials { margin-left: auto; display: inline-flex; gap: 12px; }
.top-bar__social { color: #fff; display: inline-flex; }
.top-bar__social .icon { width: 17px; height: 17px; }
@media (max-width: 767px) { .top-bar__socials { display: none; } }

.main-bar { background: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1); }
.main-bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; min-height: 80px; position: relative; }
.logo { padding-left: 4px; }
.logo img { height: 72px; width: auto; }
.menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: 32px; height: 56px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--blue);
}
.menu-toggle__bar, .menu-toggle__bar::before, .menu-toggle__bar::after {
  display: block; width: 22px; height: 2px; background: currentColor; position: relative;
}
.menu-toggle__bar::before, .menu-toggle__bar::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bar::before { top: -7px; }
.menu-toggle__bar::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar::after { top: 0; transform: rotate(-45deg); }

/* Without JS the nav is a plain list under the logo; with JS it collapses behind the menu button. */
.site-nav { flex-basis: 100%; }
@media (max-width: 980px) {
  .js .menu-toggle { display: inline-flex; }
  .js .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-top: 3px solid var(--blue);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }
  .js .site-nav.is-open { display: block; }
}
.site-nav a { display: block; padding: 10px 5%; color: #666; font-weight: 600; border-bottom: 1px solid rgba(0, 0, 0, 0.03); }

@media (min-width: 981px) {
  /* The fixed, hidden-until-scrolled header needs site.js; without it the header stays in the flow. */
  .js { --header-h: 115px; }
  .js .site-header {
    position: fixed; top: 0; left: 0; right: 0;
    opacity: 0; transform: translateY(-100%);
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .js .site-header.is-scrolled, .js .site-header:focus-within { opacity: 1; transform: none; }
  .main-bar__inner { height: 84px; flex-wrap: nowrap; }
  .logo img { height: 80px; }
  .site-nav { flex-basis: auto; }
  .site-nav ul { display: flex; gap: 26px; }
  .site-nav a { padding: 0; border: 0; color: var(--nav-link); font-size: 16px; line-height: 14px; }
  .site-nav a:hover { opacity: 0.7; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: #fff;
  background: url("/assets/img/hero.webp") 50% 0 / cover no-repeat;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.3) url("/assets/img/grid.webp") repeat;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 16px; z-index: 3;
  background: url("/assets/img/ornament.webp") repeat-x center;
}
.hero__title { position: relative; z-index: 2; padding: 0; margin: 0; color: #fff; }
.hero__logo { width: 33.25vw; margin: 0 auto; }
.hero__tagline { display: block; max-width: 231px; margin: 0 auto; font-size: 26px; line-height: 1; color: #fff; }
.hero__down { position: absolute; z-index: 2; bottom: 40px; left: 50%; transform: translateX(-50%); color: #fff; }
.hero__down .icon { width: 35px; height: 35px; }
@media (min-width: 768px) {
  /* Divi sets the logo left of and above centre by a fixed share of the viewport width. */
  .hero__title { transform: translate(-1.95vw, -3.7vw); }
  .hero__tagline { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
/* The original's background is viewport-fixed (cover, top) at every width. Below 981px the same crop is
   drawn without fixed attachment: viewport-cover size, shifted up by the header height (109px). */
@media (max-width: 980px) { .hero { margin-top: -2px; background-size: max(100vw, 150vh) auto; background-position: 50% -109px; } }
@media (min-width: 981px) { .hero { min-height: 100vh; background-attachment: fixed; } }

/* ---------- Quem somos ---------- */
.about { padding: 60px 0 30px; margin-bottom: 20px; }
.about__inner { display: grid; gap: 60px; align-items: center; }
.about h2 { color: var(--blue); }
.about__text p { padding-bottom: 0; }
.about__symbol { display: none; }
@media (min-width: 981px) {
  .about { padding: 27px 0 0; }
  .about__inner { grid-template-columns: 1fr 20.8333%; gap: 5.5%; }
  .about__symbol { display: block; width: 100%; }
}

/* ---------- Produtos ---------- */
.products__header { background: var(--gray); text-align: center; padding: 50px 0; }
.products__header h2 { color: var(--blue); }
.product { display: grid; container-type: inline-size; --row: min(80cqw, 1080px); }
.product__image img { width: 100%; }
.product__body { width: var(--container); margin: 0 auto; padding: 60px 0 30px; }
.product__body h3 { font-family: var(--font-display); font-size: 30px; color: var(--blue); font-weight: 500; }
.product__list { margin: 20px 0 30px 5px; }
.product__list li { display: flex; align-items: center; gap: 5px; }
.product__list li::before {
  content: ""; width: 0.8em; height: 0.8em; border-radius: 50%;
  border: 2px solid currentColor; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 6px currentColor;
}
@media (min-width: 981px) {
  .products__header { padding: 40px 0 35px; }
  .product { grid-template-columns: 1fr 1fr; min-height: 490px; }
  .product__image { position: relative; overflow: hidden; }
  .product__image img { position: absolute; inset: 0; height: 100%; object-fit: cover; }
  .product--image-right .product__image { order: 2; }
  .product__body {
    width: calc(var(--row) * 0.4725); padding: 0;
    margin: 50px 0 50px calc(var(--row) * 0.0275);
  }
  .product--image-right .product__body { margin-left: calc((100cqw - var(--row)) / 2); }
  .product__list { min-height: 250px; margin: 20px 0 29px 5px; }
}

/* ---------- Onde revendemos ---------- */
.segments { background: var(--blue); color: #fff; padding: 80px 0; text-align: center; }
.segments h2 { color: #fff; }
.segments p { padding-bottom: 0; }
.segments__intro { max-width: 70%; margin: 0 auto; }
.segments__grid { display: grid; gap: 30px 5.5%; margin-top: 89px; }
.segments__grid img { width: 120px; margin: 0 auto 30px; }
.segments__grid h3 { color: #fff; font-weight: 700; }
@media (min-width: 981px) {
  .segments { padding: 81px 0; }
  .segments__grid { grid-template-columns: repeat(3, 1fr); row-gap: 53px; margin-top: 54px; }
}

/* ---------- Marcas ---------- */
.brands { padding: 80px 0 81px; }
.brands__inner { display: grid; gap: 30px 5.5%; }
.brands__title { display: flex; align-items: center; justify-content: center; }
.brands__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px 4px; padding: 7px 0; }
.brand {
  width: 100px; height: 100px; margin: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; line-height: 26px;
}
.brand--gray { background: var(--gray); color: var(--blue); }
.brand--blue { background: var(--blue); color: #fff; }
@media (min-width: 981px) {
  .brands { padding: 81px 0; }
  .brands__inner { grid-template-columns: 1fr 1fr; }
  .brands__title { border: 3px solid var(--blue); }
  .brands__list { justify-content: flex-start; }
}

/* ---------- Contato ---------- */
.contact { background: var(--gray); padding: 50px 0 80px; }
.contact h2 { color: var(--blue); text-align: center; margin-bottom: 30px; }
.contact__inner { display: grid; gap: 30px 5.5%; }
.contact__info { margin-left: 5px; }
.contact__info li { display: flex; align-items: center; gap: 5px; padding-bottom: 5px; }
.contact__info .icon { width: 16px; height: 16px; color: var(--text); }
.contact__info a { color: inherit; }
.contact-form p { padding-bottom: 0; margin-bottom: 3%; }
.contact-form input, .contact-form textarea {
  display: block; width: 100%; padding: 16px; border: 0; border-radius: 3px;
  background: #fff; color: var(--text); font: 400 14px var(--font-body);
}
.contact-form ::placeholder { color: var(--muted); opacity: 1; }
.contact-form textarea { height: 150px; min-height: 150px; resize: vertical; }
.contact-form .is-invalid { box-shadow: 0 0 0 2px #e74c3c; }
.contact-form__actions { text-align: right; margin-bottom: 0 !important; }
.contact-form .button:hover { background: var(--gray); }
.form-message:not(:empty) { margin-bottom: 15px; color: var(--blue); font-weight: 600; }
@media (min-width: 768px) { .contact h2 { margin-bottom: 60px; } }
@media (max-width: 980px) { .contact-form .button { width: 100%; } }
@media (min-width: 981px) {
  .contact { padding: 54px 0 81px; }
  .contact h2 { margin-bottom: 57px; }
  .contact__inner { grid-template-columns: 1fr 1fr; }
}

/* ---------- Footer ---------- */
.site-footer { background: #fff; padding: 15px 0 5px; }
.site-footer__inner { display: flex; flex-direction: column-reverse; align-items: center; text-align: center; gap: 5px; }
.site-footer__info { font-weight: 300; padding-bottom: 10px; }
.site-footer__info span:not([data-current-year]), .site-footer__info a { font-size: 12px; font-weight: 300; }
.site-footer__info a { color: var(--footer-link); }
.site-footer__socials { display: inline-flex; gap: 12px; }
.site-footer__social { color: #767676; display: inline-flex; }
.site-footer__social .icon { width: 30px; height: 30px; }
@media (min-width: 981px) {
  .site-footer__inner { flex-direction: row; justify-content: space-between; text-align: left; }
  .site-footer__social { padding-bottom: 8px; }
}

/* ---------- Scroll to top ---------- */
.to-top {
  position: fixed; right: 0.75em; bottom: 0.75em; z-index: 200;
  width: 40px; height: 40px; border: 0; border-radius: 100px;
  background: rgba(0, 0, 0, 0.4); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s, background-color 0.3s;
}
.to-top .icon { width: 28px; height: 28px; }
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--blue); }

/* ---------- 404 ---------- */
.not-found { padding: 80px 0; text-align: center; }
.not-found h1 { color: var(--blue); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-header, .to-top { transition: none; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 980px) {
  .js [data-reveal] { transition: opacity 0.8s ease, transform 0.8s ease; }
  .js [data-reveal]:not(.is-visible) { opacity: 0; transform: translateX(-20%); }
}
