:root {
  font-family: "Roboto", Arial, system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  --color-blue: hsl(210, 100%, 33%);
  --color-yellow: hsl(47, 100%, 71%);
  --color-yellow-rgb: rgb(255, 223, 107);
  --color-golden: hsl(42, 83%, 28%);
  --color-mulberry: hsl(330, 56%, 38%);
  --color-purple: hsl(264, 52%, 49%);
  --color-green: hsl(130.9, 20.8%, 31.2%);
  --color-brown: hsl(12, 8%, 26%);
  --color-black: hsl(0, 1%, 15%);
  --color-gray-light: hsl(0, 0%, 98.8%);
  --color-gray-dark: hsl(60, 3%, 23%);
  --color-blue-200: hsl(from var(--color-blue) h s 98%);
  --color-blue-900: hsl(from var(--color-blue) h s 20%);
  --color-background: #fefefe;

  --mark-bg: var(--color-yellow);
  --mark-color: var(--color-black);

  --font-regular: 400;
  --font-bold: 800;
  --font-black: 900;

  --text-s: clamp(0.5rem, 0.5rem + 1vw, 1rem);
  --text-m: clamp(1.15rem, 1rem + 0.0857vw, 1.2rem);
  --text-l: clamp(1.62rem, 1.3287rem + 1.2948vw, 2.3322rem);
  --text-xl: clamp(1.944rem, 1.4675rem + 2.1178vw, 3.1088rem);
  --text-button: var(--text-m);

  --size-100: 0.25rem;
  --size-200: 0.5rem;
  --size-300: 0.75rem;
  --size-400: 1rem;
  --size-500: 1.5rem;
  --size-600: 2rem;
  --size-700: 3rem;
  --size-800: 4rem;
  --size-900: 5rem;

  --transition-color: color 0.1s ease, background-color 0.1s ease;
}

@layer reset, base, utilities;

/* 
***********
  CSS Reset     
***********
*/
@layer reset {
  /* Box sizing rules */
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  /* Prevent font size inflation */
  html {
    -moz-text-size-adjust: none;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
  }

  /* Remove default margin in favour of better control in authored CSS */
  * {
    margin: 0;
    padding: 0;
    font: inherit;
  }

  /* Remove list styles on ul, ol elements with a list role */
  ul[role="list"],
  ol[role="list"] {
    list-style: none;
  }

  /* Set core body defaults */
  html {
    height: 100%;
  }
  body {
    min-height: 100%;
    line-height: 1.5;
  }

  /* Set shorter line heights on headings and interactive elements */
  h1,
  h2,
  h3,
  h4,
  button,
  input,
  label {
    line-height: 1.1;
  }

  /* Balance text wrapping on headings */
  h1,
  h2,
  h3,
  h4 {
    text-wrap: balance;
  }

  /* A elements that don't have a class get default styles */
  a:not([class]) {
    text-decoration-skip-ink: auto;
    color: currentColor;
  }

  /* Make images easier to work with */
  img,
  picture,
  svg {
    max-width: 100%;
    display: block;
  }

  /* Make sure textareas without a rows attribute are not tiny */
  textarea:not([rows]) {
    min-height: 10em;
  }

  /* Anything that has been anchored to should have extra scroll margin */
  :target {
    scroll-margin-block: 5ex;
  }

  :focus {
    outline: none;
  }

  :focus-visible {
    outline: 3px dotted var(--color-golden);
    outline-offset: 2px;
  }
}

/* 
***************
Base styles
***************
*/
@layer base {
  body {
    font-size: var(--text-m);
    color: var(--color-blue);
    background-color: var(--color-background);
  }

  h1 {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
  }

  h2 {
    font-size: var(--text-l);
    font-weight: var(--font-bold);
  }

  a {
    color: inherit;
    text-decoration: 2px dotted underline;
    text-decoration-color: inherit;
    text-underline-offset: 0.25rem;
  }

  a:hover {
    text-decoration: none;
  }

  p {
    text-wrap: pretty;
  }

  b {
    font-weight: var(--font-bold);
  }

  mark {
    background: var(
      --mark-bg,
      linear-gradient(
        0deg,
        transparent 20%,
        rgba(var(--color-yellow-rgb), 1) 20%,
        rgba(var(--color-yellow-rgb), 1) 84%,
        transparent 84%
      )
    );
    color: var(--mark-color, inherit);
  }
}

/* 
***************
Utility classes
***************
*/

@layer utilities {
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }

  .text-primary {
    color: var(--color-blue);
  }
  .text-primary-900 {
    color: var(--color-blue-900);
  }

  .text-bold {
    font-weight: var(--font-bold);
  }

  small {
    font-size: calc(var(--text-s) * 0.7);
    text-wrap: balance;
    line-height: 1.1;
  }

  .fs-small {
    font-size: var(--text-s);
  }
  .fs-normal {
    font-size: var(--text-m);
  }
  .fs-large {
    font-size: var(--text-l);
  }

  .headline {
    font-size: var(--text-l);
    font-weight: var(--font-bold);
    line-height: 1.2;
    text-wrap: balance;
  }

  .padding-block-900 {
    padding-block: var(--size-900);
  }

  .margin-400 {
    margin-top: var(--size-400);
  }
  .margin-700 {
    margin-top: var(--size-700);
  }
  .margin-900 {
    margin-top: var(--size-900);
  }

  .container {
    --max-width: 1120px;
    --padding: 1rem;

    width: min(var(--max-width), 100% - var(--padding) * 2);
    margin-inline: auto;
  }

  .even-columns {
    display: grid;
    gap: 1rem;
  }

  @media (min-width: 50em) {
    .even-columns {
      grid-auto-flow: column;
      grid-auto-columns: 1fr;
    }
  }

  .grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 16px 24px;
    align-items: stretch;
  }

  .preserve-breaks {
    white-space: pre-line;
  }
}

/* 
****************
Component styles 
****************
*/

/* 
********
Shaders 
********
*/

.overlay-wrapper {
  position: relative;
  height: 100%;
  width: auto;
  overflow: hidden;
  isolation: isolate;
}

.overlay-wrapper img {
  display: block;
  height: 100%;
  width: auto;
  filter: grayscale(0.8) contrast(1) brightness(1.05);
}

.overlay-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(currentColor, currentColor),
    linear-gradient(rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.25));
  background-blend-mode: multiply;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
}

/* 
******
Button 
******
*/

.button {
  cursor: pointer;
  text-decoration: none;
  background-color: var(--color-black);
  color: var(--color-background);
  padding: 0.9em 1.75em;
  font-size: var(--text-button);
  font-weight: var(--font-bold);
  transition: var(--transition-color);
}

.button:hover,
.button:focus-visible {
  background-color: var(--color-gray-dark);
}

/* 
***********
Navigation - Desktop and Mobile
***********
*/
/* 
Header
*/

.header {
  padding-top: var(--size-400);
}

.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;

  position: relative;
}

@media (min-width: 55em) {
  .header {
    position: sticky;
    top: 0;
    padding-top: var(--size-400);
    z-index: 20;
    background-color: var(--color-background);
  }
}

.primary-navigation {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 5rem;
}

.nav-list button {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0.75em 0;
  cursor: pointer;
  color: inherit;
  font-weight: var(--font-bold);
  transition: var(--transition-color);
}

.nav-list button .chevron {
  margin-bottom: 2px;
  transform: rotate(0deg);
  transition: transform 0.3s ease;
}

.nav-list a {
  text-decoration: none;
  color: inherit;
  padding: 0.75em 0;
  font-weight: var(--font-bold);
  transition: var(--transition-color);
}

.nav-list a:hover {
  text-decoration: 2px dotted underline;
  text-underline-offset: 0.5rem;
  color: var(--color-black);
}

.nav-list button:hover {
  text-decoration: 2px dotted underline;
  text-underline-offset: 0.5rem;
  color: var(--color-black);
}

.nav-list li {
  align-items: center;
}

.menu-toggle {
  display: none;
}

.has-submenu {
  position: relative;
}

.has-submenu > .submenu {
  opacity: 0;
  visibility: hidden;
  position: absolute;
}

.has-submenu > .submenu a {
  display: block;
  padding: 0.5rem 0;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.has-submenu > .submenu a:hover,
.has-submenu > .submenu a:focus {
  text-decoration: 2px dotted underline;
  text-underline-offset: 0.5rem;
  color: var(--color-black);
}

/* Show submenu (on desktop) */
@media (min-width: 55em) {
  .has-submenu > .submenu {
    z-index: 10;
    transform: translate(-20%, 4px);
    box-shadow:
      0 2px 2px #00000003,
      0 4px 4px #00000005,
      0 16px 24px #0000000a;
    background: var(--color-gray-light);
    padding: var(--size-200) var(--size-600);
    border-radius: 4px;
  }

  .has-submenu > .submenu::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 4px;
  }

  .has-submenu:has(button[aria-expanded="true"]) > .submenu {
    opacity: 1;
    visibility: visible;
  }
}

@media (min-width: 50em) {
  /* .has-submenu:hover .chevron,
  .has-submenu:focus-within .chevron {
    transform: rotate(180deg);
  } */

  .has-submenu button[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
  }
}

.menu-toggle .icon-close {
  display: none;
}

/* 
******************
Mobile navigation 
******************
*/

@media (max-width: 55em) {
  body.menu-open {
    overflow: hidden;
    font-size: var(--text-l);
  }

  .primary-navigation {
    display: none;
  }

  body.menu-open .header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100svh;
    z-index: 50;
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    background: var(--color-blue);
  }
  body.menu-open .header .logo {
    color: var(--color-background);
  }
  body.menu-open .header .icon-close {
    filter: brightness(0) invert(1);
  }
  body.menu-open .header .primary-navigation ul {
    background: var(--color-blue);
  }

  body.menu-open .nav-list a {
    color: var(--color-background);
    text-underline-offset: 1rem;
  }

  body.menu-open .nav-list .has-submenu > button {
    /*  color: var(--color-gray-light);
    font-weight: var(--font-bold);
    font-size: var(--text-l);
    letter-spacing: 0.1em;
    text-decoration: none;
    opacity: 0.7;
    pointer-events: none;
    padding-bottom: 0.25em; */
    display: none;
  }

  #button-atendimento {
    color: var(--color-background);
  }

  .primary-navigation.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
    position: absolute;
    top: 200%;
    left: 0;
    width: 100%;
    height: 100svh;
    overflow: hidden;
    background: inherit;
    z-index: 50;
  }

  .nav-list.mobile {
    flex-direction: column;
    gap: var(--size-400);
    align-items: center;
    text-align: center;
  }

  .icon-menu.hidden {
    display: none;
  }

  .menu-toggle {
    color: inherit;
  }

  .menu-toggle .icon-close.visible {
    display: block;
  }

  .has-submenu > .submenu {
    opacity: 1;
    visibility: visible;
    position: static;
    top: auto;
    left: auto;
    padding-left: 0;
    background: transparent;
    z-index: 40;
  }

  .has-submenu > .submenu a:hover {
    color: var(--color-background);
  }

  .has-submenu > button > .chevron {
    display: none;
  }

  /* .has-submenu > .submenu li > a {
    padding-left: 0.5em;
  } */

  .nav-link a {
    display: block;
    padding: 0 0;
  }

  .nav-list .has-submenu > button {
    width: 100%;
    cursor: initial;
    padding: 0.75em 0;
  }

  .nav-list .has-submenu > .submenu a {
    width: 100%;
    cursor: initial;
    padding: 0.75em 0;
  }

  .nav-list .has-submenu > button:hover {
    background: none;
    text-decoration: none;
  }

  .nav-list .has-submenu:first-child {
    border-top: none;
  }

  .menu-toggle {
    display: block;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5em;
  }
}

/* Footer */

footer {
  margin-top: var(--size-900);
  background-color: var(--color-black);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--size-600);
  justify-items: start;
  color: var(--color-background);
  padding: var(--size-700) 0;
}

.footer-logo img {
  width: 200px;
}

.social-links-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1.5rem;
  margin-left: 0.25rem;
}

.footer-social {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  grid-row: 2;
  grid-column: 1;
  justify-content: space-between;
  align-items: start;
}
.footer-contacts,
.footer-address {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
  grid-column: 1;
  justify-self: start;
}

.footer-copyright {
  margin-top: var(--size-400);
  text-wrap: pretty;
}

@media (min-width: 50em) {
  .footer-content {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }
  .footer-contacts,
  .footer-address {
    grid-column: 2;
    justify-self: start;
    margin-top: var(--size-500);
  }
  .footer-social {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    grid-row: 1;
    grid-column: 3;
    justify-self: start;
    margin-top: var(--size-500);
  }
  .footer-copyright {
    grid-row: 2;
    grid-column: 3;
    justify-self: end;
    max-width: 30ch;
    margin-top: var(--size-500);
  }
}
