@font-face {
  font-family: 'Quicksand';
  src: url(assets/fonts/Quicksand-Medium.woff2);
  font-display: swap;
}
html {
  scroll-behavior: smooth;
}
* {
  margin: 0;
  padding: 0;
}
*::selection {
  background-color: var(--secondary);
}
a {
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.3s ease-out;
  color: var(--font);
}
a:visited {
  color: inherit;
}
a:active {
  color: var(--secondary);
}
button {
  cursor: pointer;
  transition: opacity 0.3s ease-out;
  color: var(--font);
}
button:active {
  color: var(--secondary);
}
a.cta-btn {
  background-color: var(--primary);
  border: 2px solid var(--primary);
  color: var(--light-always);
  padding: calc(var(--space-base) * 4);
  min-width: calc(var(--space-base) * 48);
  border-radius: calc(var(--space-base) * 2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--space-base) * 4);
  font-weight: bold;
}
a.cta-btn.transparent-btn {
  color: var(--primary);
  background-color: transparent;
  border: 2px solid var(--primary);
}
a.cta-btn:active {
  background-color: var(--secondary);
  box-shadow: inset 1px 1px 2px var(--dark-always);
}
svg {
  color: inherit;
}
h1 {
  font-size: calc(1.5rem + 0.1vw);
  text-shadow: 1px 1px 2px var(--primary);
}
/* ======================================= */
/* ROOT & BODY ========================== */
/* ===================================== */
:root {
  --space-base: 4px;

  --gap-inside: calc(var(--space-base) * 8);
  --gap-outsde: calc(var(--space-base) * 16);

  --primary: hsl(0, 76%, 40%);
  --secondary: hsl(15, 97%, 70%);
  --primary-blur: hsl(0, 76%, 40%, 0.1);

  --font: hsl(0, 0%, 10%);
  --light-always: hsl(0, 0%, 90%);
  --dark-always: hsl(0, 0%, 10%);

  --bg-dark: hsl(120, 10%, 86%);
  --bg: hsl(120, 10%, 96%);
}
body {
  -webkit-tap-highlight-color: transparent;
  text-wrap: pretty;
  font-size: calc(1rem + 0.1vw);
  line-height: 1.5;
  background-color: var(--bg-dark);
  color: var(--font);
  font-family: 'Quicksand';
}
header,
section,
footer {
  padding-inline: calc(var(--space-base) * 16);
  overflow: hidden;
}
section {
  padding-block: var(--gap-outsde);
  gap: var(--gap-outsde);
}
section > * {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--gap-inside);
}
section.duo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
  justify-content: center;
}
section.duo-grid > .card-content {
  overflow: hidden;
  align-items: flex-start;
  border-radius: calc(var(--space-base) * 2);
  flex: 0 0 calc(var(--space-base) * 100);
  display: flex;
  gap: var(--gap-inside);
  justify-content: flex-start;
}
section.duo-grid > .card-content h1 {
  font-size: calc(1.2rem + 0.1vw);
  background-color: var(--primary);
  padding-block: calc(var(--space-base) * 2);
  color: var(--light-always);
  width: 100%;
  text-align: center;
}
section.duo-grid > .card-content ul {
  list-style-position: outside;
  margin-left: calc(var(--space-base) * 5);
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: var(--gap-inside);
  padding-top: var(--gap-inside);
  padding-bottom: var(--gap-outsde);
  padding-inline: var(--gap-inside);
  height: 100%;
}
section.duo-grid > .card-content ul > li::marker {
  color: var(--secondary);
}
section .container-cta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  border-radius: calc(var(--space-base) * 4);
  padding: var(--gap-outsde);
  gap: var(--gap-outsde);
  justify-self: center;
}
section .container-cta p {
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: calc(var(--space-base) * 4);
}
.container-cta,
.card-content,
.google-map {
  box-shadow: 0 2px 10px -2px gray;
}
.container-cta,
.card-content {
  background-color: var(--bg-dark);
  background: radial-gradient(
    circle farthest-corner at 100% 0%,
    var(--bg-dark) 0%,
    var(--primary-blur) 50%,
    var(--bg-dark) 100%
  );
  background-blend-mode: darken;
}
/* ======================================= */
/* HEADER =============================== */
/* ===================================== */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(var(--space-base) * 20);
  border-radius: 0 0 calc(var(--space-base) * 2) calc(var(--space-base) * 2);
  background-color: var(--bg-dark);
}
.logo-header {
  height: calc(var(--space-base) * 16);
  width: auto;
}
nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: calc(var(--space-base) * 16);
  z-index: 999;
}
.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--space-base) * 16);
}
.nav-list > li {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease-out;
}
.nav-list > li:active {
  color: var(--secondary);
}
.nav-list > li svg.icon-external-link {
  height: calc(var(--space-base) * 4);
  width: auto;
}
nav a.current {
  color: var(--primary);
}
.decor-menu-logo {
  display: none;
  margin-top: calc(var(--space-base) * 16);
  padding: calc(var(--space-base) * 2);
  max-width: calc(var(--space-base) * 32);
  border-radius: 999rem;
  background-color: var(--bg);
}
button.toggle-btn {
  border: none;
  border-radius: 999rem;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  padding: calc(var(--space-base) * 2);
}
button.toggle-btn.hamburger-toggle-btn {
  display: none;
}
button.toggle-btn.x-toggle-btn {
  display: none;
}
button.toggle-btn > .sun-icon {
  display: block;
}
button.toggle-btn > .moon-icon {
  display: none;
}
button.toggle-btn svg {
  width: calc(var(--space-base) * 8);
}
/* ======================================= */
/* FOOTER =============================== */
/* ===================================== */
footer {
  display: grid;
  place-items: center;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: auto;
  grid-template-areas:
    'first-footer second-footer'
    'signature signature';
  gap: calc(var(--space-base) * 16);
  margin-top: calc(var(--space-base) * 24);
}
footer > * {
  display: flex;
  align-items: center;
  justify-content: center;
}
.first-footer {
  grid-area: first-footer;
  gap: calc(var(--space-base) * 24);
  flex-direction: column;
}
.first-footer > div.social-media-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: calc(var(--space-base) * 16);
}
.social-media-icon svg {
  width: calc(var(--space-base) * 6);
  height: auto;
}
.second-footer {
  grid-area: second-footer;
}
.signature {
  grid-area: signature;
  opacity: 0.6;
  display: flex;
  gap: calc(var(--space-base) * 2);
  width: fit-content;
  font-size: 0.9rem;
}
.signature svg {
  height: calc(var(--space-base) * 4);
}
.footer-logo {
  width: min(50%, calc(var(--space-base) * 64));
}
.footer-logo--dark {
  display: none;
}
ul.legal-links {
  list-style: none;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
.legal-links > li {
  padding-inline: calc(var(--space-base) * 4);
  text-align: center;
  font-size: 0.9rem;
}
/* ======================================= */
/* TOP-OF-PAGE-WITH-BACKGROUND-IMG======= */
/* ===================================== */
.top-wrapper {
  background-color: var(--bg);
}
.top-wrapper.top-index {
  min-height: 100vh;
  background:
    linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
    url('assets/background/background_intro.webp') left center / cover no-repeat;

  /* It will let section fill the rest of container below header by setting flex: 1 */
  display: flex;
  flex-direction: column;
}
.top-wrapper.top-index > section.duo-grid {
  flex: 1;
  /* Flexbox fix: allow this section to shrink below its content height (prevents overflow/extra scrolling in some layouts). */
  min-height: 0;
}
/* .intro-content */
.top-wrapper.top-index .intro-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* 100% minus header height */
  min-height: calc(100vh - calc(var(--space-base) * 20));
  padding-bottom: var(--gap-outsde);
  gap: var(--gap-inside);
}
.top-wrapper.top-index .intro-logo img.hero-photo {
  background-color: var(--bg);
  background: radial-gradient(
    circle farthest-corner at 100% 0%,
    var(--bg-dark) 0%,
    var(--bg-dark) 50%,
    var(--primary) 100%
  );
  background-blend-mode: darken;
  border: 4px solid var(--bg-dark);
  border-radius: 999rem;
  width: calc(var(--space-base) * 60);
  height: auto;
  position: relative;
  right: 30px;
  top: 100px;
}
.top-wrapper.top-index .intro-logo img.hero-logo {
  background-color: var(--bg-dark);
  padding: calc(var(--space-base) * 2);
  border-radius: 999rem;
  width: calc(var(--space-base) * 40);
  height: auto;
  position: relative;
  left: 90px;
  bottom: 60px;
}
.hero-logo--dark {
  display: none;
}
.top-wrapper.top-index .intro-article {
  color: var(--light-always);
  border-radius: calc(var(--space-base) * 2);
}
.top-wrapper.top-index .intro-article h1 {
  align-self: flex-start;
}
.top-wrapper.top-index .intro-article h1 > i {
  text-shadow: 1px 1px 2px var(--secondary);
  font-size: calc(0.9rem + 0.1vw);
}
.top-wrapper.top-index .intro-article p {
  align-self: flex-start;
  max-width: 65ch;
  padding-block: calc(var(--space-base) * 4);
  border-radius: calc(var(--space-base) * 2);
  text-shadow: 1px 1px 0px var(--dark-always);
}
.top-wrapper.top-index .intro-article .cta-btn {
  align-self: flex-start;
}

/* ======================================= */
/* MAIN ================================= */
/* ===================================== */
main {
  background-color: var(--bg);
}
.google-map {
  border-radius: calc(var(--space-base) * 2);
  aspect-ratio: 4 / 3;
  width: 80%;
  height: auto;
}
section > article.contact-address-container {
  align-items: flex-start;
  width: fit-content;
  justify-self: center;
}
section > article.contact-address-container > * {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--space-base) * 4);
}
section > article.contact-address-container > address {
  font-style: normal;
}
section > article.contact-address-container a:active {
  color: var(--secondary);
}
.duo-btns-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: calc(var(--space-base) * 2);
}
section.duo-grid.offer-grid {
  grid-template-columns: repeat(2, calc(var(--space-base) * 96));
  grid-auto-rows: 1fr;
}
section.offer-description {
  margin-inline: 20%;
}
/* ======================================= */
/* INTERSECTION-OBSERVER ================ */
/* ===================================== */
.hero-photo,
.contact-address-container,
.card-content:first-of-type {
  opacity: 0;
  transform: translateX(-15%);
}
.hero-logo,
.google-map,
.card-content:nth-of-type(2) {
  opacity: 0;
  transform: translateX(15%);
}
.intro-article,
.container-cta,
.offer-description {
  opacity: 0;
  transform: translateY(15%);
}
.hero-photo,
.contact-address-container,
.card-content,
.hero-logo,
.intro-article,
.google-map,
.container-cta,
.offer-description {
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}
.hero-photo.show,
.contact-address-container.show,
.card-content.show,
.hero-logo.show,
.intro-article.show,
.google-map.show,
.container-cta.show,
.offer-description.show {
  opacity: 1;
  transform: translateX(0) translateY(0);
}
/* ======================================= */
/* DARK-MODE============================= */
/* ===================================== */

[data-theme='dark'] {
  --bg: hsl(300, 10%, 15%);
  --bg-dark: hsl(300, 10%, 10%);

  --font: hsl(0, 0%, 90%);

  img,
  a.cta-btn,
  .google-map,
  .card-content h1 {
    filter: brightness(0.8) contrast(0.9);
  }

  button.toggle-btn > .sun-icon {
    display: none;
  }
  button.toggle-btn > .moon-icon {
    display: block;
  }
  .container-cta,
  .card-content,
  .google-map {
    box-shadow: 0 2px 10px -2px black;
  }
  a.cta-btn.transparent-btn {
    color: var(--light-always);
  }
  .top-wrapper.top-index {
    background:
      linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
      url('assets/background/background_intro.webp') left center / cover
        no-repeat;
  }
  .hero-logo--light {
    display: none;
  }
  .hero-logo--dark {
    display: block;
  }
  .footer-logo--light {
    display: none;
  }
  .footer-logo--dark {
    display: block;
  }
  /* Mobile only nodes with specific dark display*/
  @media (max-width: 768px) {
    .top-wrapper.top-index {
      background:
        linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url('assets/background/background_intro_mobile.webp') left center /
          cover no-repeat;
    }
    .decor-menu-logo--light {
      display: none;
    }
    .decor-menu-logo--dark {
      display: block;
    }
  }
}

/* ======================================= */
/* HOVER================================= */
/* ===================================== */
@media (hover: hover) {
  button:hover,
  .nav-list > li:hover,
  .social-media-icon:hover,
  a.cta-btn:hover,
  article.contact-address-container a:hover {
    opacity: 0.8;
  }
}
/* ====================================== */
/* RESPONSIVE-MEDIA-QUERIES ============ */
/* ==================================== */

@media (max-width: 1024px) {
  header,
  section,
  footer {
    padding-inline: calc(var(--space-base) * 8);
  }
  nav,
  .nav-list {
    gap: calc(var(--space-base) * 8);
  }
  .top-wrapper.top-index .intro-logo img.hero-photo {
    width: calc(var(--space-base) * 40);
    right: 20px;
    top: 60px;
  }
  .top-wrapper.top-index .intro-logo img.hero-logo {
    width: calc(var(--space-base) * 30);
    left: 60px;
    bottom: 50px;
  }
  section.duo-grid.offer-grid {
    grid-template-columns: calc(var(--space-base) * 88);
  }
  section.offer-description {
    margin-inline: 10%;
  }
}

@media (max-width: 768px) {
  .top-wrapper.top-index {
    background:
      linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
      url('assets/background/background_intro_mobile.webp') left center / cover
        no-repeat;
  }
  header,
  section,
  footer {
    padding-inline: calc(var(--space-base) * 4);
  }
  nav {
    /* display manipulate in menu-mobile.js in udateWidth*/
    /* top set dinamically upon header position to avoid gap when header is not entirely visible*/
    position: fixed;
    left: 0;
    min-height: 100%;
    min-width: 100%;
    background-color: var(--bg-dark);
    border-radius: calc(var(--space-base) * 2) calc(var(--space-base) * 2) 0 0;
    flex-direction: column;
    padding-top: calc(var(--space-base) * 8);
    will-change: transform, opacity;
  }
  nav.show {
    display: flex;
    animation: menu-slide-in 0.3s ease-out forwards;
  }
  nav.hide {
    animation: menu-slide-out 0.3s ease-out forwards;
  }
  .nav-list {
    flex-direction: column;
  }
  img.decor-menu-logo--light {
    display: block;
  }
  .decor-menu-logo--dark {
    display: none;
  }
  button.toggle-btn.hamburger-toggle-btn {
    display: flex;
  }
  footer {
    grid-template-columns: 1fr;
    grid-template-areas:
      'first-footer'
      'second-footer'
      'signature';
  }
  .top-wrapper.top-index .intro-logo {
    transform: scale(1.3);
  }
  section.duo-grid {
    grid-template-columns: 1fr;
  }
  .top-wrapper.top-index .intro-article h1 {
    align-self: center;
    text-align: center;
  }
  .top-wrapper.top-index .intro-article p {
    text-align: center;
  }
  .top-wrapper.top-index .intro-article .cta-btn {
    align-self: center;
    margin-block: var(--gap-inside);
  }
  section.offer-description {
    margin-inline: 5%;
  }
}

@media (max-width: 360px) {
  header,
  section,
  footer {
    padding-inline: calc(var(--space-base) * 2);
  }
  section.duo-grid.offer-grid {
    grid-template-columns: 96vw;
  }
  section div.container-cta {
    width: 96vw;
  }
  section.offer-description {
    margin-inline: 1%;
  }
}

/* ====================================== */
/* ANIMATIONS ========================== */
/* ==================================== */

@keyframes menu-slide-in {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes menu-slide-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

@keyframes arrow-bounce {
  0% {
    transform: translateY(0);
  }
  20% {
    transform: translateY(8px);
  }
  40% {
    transform: translateY(0);
  }
  60% {
    transform: translateY(12px);
  }
  80% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(0);
  }
}
