@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  img,
  picture {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
  }

  ul,
  ol {
    list-style: none;
  }

  body {
    min-height: 100vh;
    line-height: 1.5;
  }

  h1,
  h2,
  h3,
  h4,
  button,
  input,
  label {
    line-height: 1.1;
  }

  h1,
  h2,
  h3,
  h4 {
    text-wrap: balance;
  }

  p,
  li {
    text-wrap: pretty;
    letter-spacing: -0.03em;
  }

  a {
    letter-spacing: 0.04em;
  }

  a:not([class]) {
    text-decoration-skip-ink: auto;
    color: currentColor;
  }

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

  a:visited,
  a:active {
    color: inherit;
  }

  a,
  input,
  button,
  select,
  textarea,
  [role="button"] {
    -webkit-tap-highlight-color: transparent;
  }

  input,
  button,
  select {
    font-family: inherit;
    font-size: inherit;
  }

  button {
    background: none;
    border: none;

    &:hover {
      cursor: pointer;
    }
  }

  :focus:not(:focus-visible) {
    outline: none;
  }

  @media (hover: none) {
    :hover {
      transform: unset;
      transition: unset;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      transition: none !important;
      animation: none !important;
    }
  }
}

@layer components {
  @font-face {
    font-display: swap;
    font-family: "Cinzel";
    font-style: normal;
    font-weight: 400;
    src: url("/assets/fonts/cinzel-v26-latin-regular.woff2") format("woff2");
  }

  @font-face {
    font-display: swap;
    font-family: "Cinzel";
    font-style: normal;
    font-weight: 500;
    src: url("/assets/fonts/cinzel-v26-latin-500.woff2") format("woff2");
  }

  @font-face {
    font-display: swap;
    font-family: "Cinzel";
    font-style: normal;
    font-weight: 600;
    src: url("/assets/fonts/cinzel-v26-latin-600.woff2") format("woff2");
  }

  @font-face {
    font-display: swap;
    font-family: "IM Fell English";
    font-style: normal;
    font-weight: 400;
    src: url("/assets/fonts/im-fell-english-v14-latin-regular.woff2")
      format("woff2");
  }

  @font-face {
    font-display: swap;
    font-family: "Inter";
    font-style: normal;
    font-weight: 300;
    src: url("/assets/fonts/inter-v20-latin-300.woff2") format("woff2");
  }

  @font-face {
    font-display: swap;
    font-family: "Inter";
    font-style: normal;
    font-weight: 400;
    src: url("/assets/fonts/inter-v20-latin-regular.woff2") format("woff2");
  }

  @font-face {
    font-display: swap;
    font-family: "Inter";
    font-style: normal;
    font-weight: 500;
    src: url("/assets/fonts/inter-v20-latin-500.woff2") format("woff2");
  }

  @font-face {
    font-display: swap;
    font-family: "Inter";
    font-style: normal;
    font-weight: 600;
    src: url("/assets/fonts/inter-v20-latin-600.woff2") format("woff2");
  }

  :root {
    text-size-adjust: none;
    -moz-text-size-adjust: none;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: none;
    -ms-text-size-adjust: none;

    --fs-sub-text: clamp(0.95rem, 1.5vw + 0.4rem, 1rem);
    --fs-body-text: clamp(1rem, 0.6vw + 0.7rem, 1.125rem);
    --fs-nav-text: 1.3rem;
    --fs-larger-text: clamp(1rem, 0.8vw + 0.75rem, 1.35rem);
    --fs-hero-heading: clamp(2.5rem, 2.5vw + 2rem, 3.5rem);
    --fs-main-heading: clamp(2rem, 2.5vw + 2rem, 3rem);
    --fs-micro-heading: clamp(1.5rem, 3vw + 0.5rem, 1.75rem);

    --ff-heading-main: "Cinzel", Arial, sans-serif;
    --ff-heading: "IM Fell English", Arial, sans-serif;
    --ff-text: "Inter", Arial, sans-serif;

    --padd-light: clamp(3.75rem, 6vw + 2rem, 6.25rem);
    --padd-light-bottom: clamp(2rem, 6vw + 2rem, 4.5rem);

    --margin-text-top: clamp(0.5rem, 1.5vw, 0.75rem);
    --margin-text-bottom: clamp(1.25rem, 3vw, 1.5rem);
    --margin-text: clamp(0.75rem, 1vw, 0.875rem);
    --margin-pictures: clamp(0.75rem, 2vw, 1.25rem);
    --margin-nav-horizontal: 1.75rem;
    --margin-nav-vertical: 1.25rem;

    --base-color: #185085;
    --blue-100: #60a5fa;
    --blue-200: #2a6aa3;
    --blue-300: #185085;
    --blue-400: #10345c;
    --blue-500: #12395a;
    --blue-600: #0b1f33;
    --grey-100: #1f2933;
    --black-100: #000;
    --black-200: #111111;
    --white-100: #fff;
    --white-200: #f5f7fc;
    --white-300: #e5e7eb;

    --clr-background: var(--blue-600);
    --clr-hero-heading: var(--blue-400);
    --clr-hero-heading-white: var(--white-100);
    --clr-secondary-heading: var(--blue-400);
    --clr-secondary-heading-white: var(--white-200);
    --clr-micro-heading: var(--white-200);
    --clr-micro-heading-dark: var(--grey-100);
    --clr-text: var(--grey-100);
    --clr-text-white: var(--white-300);
    --clr-text-images: var(--white-100);
    --clr-button-background: var(--blue-500);
    --clr-button-background-white: var(--white-100);
    --clr-button-text: var(--black-100);
    --clr-button-text-white: var(--white-200);
    --clr-nav-text: var(--grey-100);
    --clr-nav-text-white: var(--white-200);
    --clr-hover-accent: var(--blue-200);
    --clr-active-accent: var(--blue-500);
    --clr-focus-outline: var(--blue-100);

    :focus-visible {
      outline: 2px solid var(--clr-focus-outline);
      outline-offset: 2px;
    }
  }

  img:not(.business-logo):not(.hero-business-full-logo):not(
      .algarve-webcraft-logo img
    ) {
    border-radius: 0.35rem;
    box-shadow:
      0 2px 4px rgba(0, 0, 0, 0.25),
      0 16px 40px rgba(0, 0, 0, 0.16);
    transition: transform 0.4s ease-out;

    &:hover {
      transform: translateY(-2px);
    }
  }

  .cmp-main-heading,
  .cmp-main-heading-white {
    font-size: var(--fs-main-heading);
    color: var(--clr-secondary-heading);
    max-width: 20ch;
  }

  .cmp-main-heading-white {
    color: var(--clr-text-white);
  }

  .cmp-micro-heading {
    font-size: var(--fs-micro-heading);
    color: var(--clr-micro-heading);
  }

  .cmp-hero-heading,
  .cmp-main-heading,
  .cmp-main-heading-white,
  .cmp-micro-heading {
    font-family: var(--ff-heading-main);
    line-height: 1.1;
    font-weight: 500;
  }

  .cmp-hero-heading {
    position: relative;
    font-size: var(--fs-hero-heading);
    color: var(--clr-hero-heading-white);
    z-index: 100;
    margin-bottom: 4rem;

    @media (width > 32.5rem) {
      margin-bottom: 0;
    }
  }

  .cmp-main-text,
  .cmp-main-text-white {
    font-size: var(--fs-body-text);
    font-weight: 300;
  }

  .cmp-main-text-white {
    color: var(--clr-text-white);
  }

  .cmp-main-text-margins {
    margin-top: var(--margin-text-top);
    margin-bottom: var(--margin-text-bottom);
  }

  .cmp-light-section {
    padding-top: var(--padd-light);
    padding-bottom: var(--padd-light-bottom);
  }

  .cmp-light-section--no-bottom {
    padding-bottom: 0;
  }

  .cmp-main-btn,
  .cmp-secondary-btn {
    display: inline-block;
    position: relative;
    font-family: var(--ff-heading);
    font-size: var(--fs-body-text);
    background-color: var(--clr-button-background-white);
    padding: 0.75em 1.25em;
    text-decoration: none;
    cursor: pointer;
    z-index: 0;
    outline: none;
    border: 2px solid #0000007e;
    overflow: hidden;
    box-shadow:
      inset 0 1px 2px #ffffff80,
      0 1px 2px #00000070,
      0 2px 4px #00000050;
    transition:
      transform 0.3s ease,
      background-color 0.3s ease,
      color 0.3s ease;

    &:hover {
      background-color: var(--clr-button-background);
      color: var(--clr-button-text-white);
      transform: translateY(-1px);
      box-shadow:
        inset 0 1px 2px #ffffffa0,
        0 2px 5px #00000040;
    }

    &:active {
      transform: translateY(0);
      box-shadow: inset 0 2px 4px #00000030;
      transition:
        transform 0.1s ease,
        box-shadow 0.1s ease;
    }
  }

  .cmp-secondary-btn {
    background-color: var(--clr-button-background-white);
    color: var(--clr-button-text);
  }

  .cmp-hero-section {
    position: relative;
    background: url("/assets/images/home-bg.jpg");
    background-size: cover;
    background-position: center 0px;
    z-index: 0;
    background-attachment: scroll;
    will-change: background-position;

    &::before {
      --hero-overlay-start: rgba(0, 0, 0, 0.92);
      --hero-overlay-end: rgba(0, 0, 0, 0.42);

      content: "";
      position: absolute;
      inset: 0;

      /* background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.78),
        rgba(0, 0, 0, 0.38)
      ); */
      background: linear-gradient(
        to top,
        var(--hero-overlay-start),
        var(--hero-overlay-end)
      );
    }
  }

  .cmp-hero-section-wrapper {
    display: grid;
    place-items: center;
    min-height: 92vh;
    z-index: 2;

    @media (width > 32.5rem) {
      min-height: 100vh;
    }
  }
}

@layer base {
  html {
    scrollbar-width: thin;
    overflow-x: clip;

    &.is-loading body {
      opacity: 0 !important;
    }

    /* &.has-smooth-scroll {
      scroll-behavior: smooth;
    } */
  }

  html,
  body {
    min-height: 100%;
  }

  body {
    font-size: 1rem;
    font-family: var(--ff-text);
    font-weight: 400;
    background-color: #fff;
    color: var(--clr-text);
    overflow-x: clip;
  }

  /* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ */
  /* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\      *** HEADER ***       \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ */
  /* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ */

  .header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
  }

  .hamburger-btn-box {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    top: 1.75rem;

    @media (width > 62.5rem) {
      top: 4.5rem;
    }
  }

  .hamburger-btn {
    max-width: 2rem;
    background-color: inherit;
    border: none;
    cursor: pointer;
    user-select: none;
    z-index: 10;
    touch-action: manipulation;

    .hamburger {
      position: relative;
      width: 45px;

      & label {
        display: block;
        cursor: pointer;
      }

      .hamburger-lines {
        position: relative;

        &:hover span,
        &:focus-visible span {
          opacity: 0.6;
        }
      }

      .hamburger-lines span {
        display: block;
        height: 3px;
        margin: 7px 0;
        border-radius: 5px;
        background: var(--white-100);
        filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.5))
          drop-shadow(0 0 2px rgba(0, 0, 0, 0.3));
        transition:
          opacity 0.3s ease-out,
          transform 0.3s ease-in-out;
      }
    }

    &.active .hamburger-lines span:nth-child(1) {
      transform: translateY(10px) rotate(45deg);
    }

    &.active .hamburger-lines span:nth-child(2) {
      transform: scale(0);
    }

    &.active .hamburger-lines span:nth-child(3) {
      transform: translateY(-10px) rotate(-45deg);
    }
  }

  .nav-bar {
    position: fixed;
    background: var(--black-200);
    color: var(--clr-nav-text-white);
    font-size: var(--fs-nav-text);
    font-family: var(--ff-heading);
    font-weight: 400;
    letter-spacing: 0.03em;
    min-height: 100vh;
    inset: 0;
    margin-inline: auto;
    text-align: center;
    z-index: -1;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    transform: translateX(-100%);
    opacity: 1;
    /* prettier-ignore */
    transition: transform 0.5s ease-out,
     opacity 1s ease;

    ul {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: fit-content;
      height: 100%;
      margin-inline: auto;
      gap: 3rem;
      margin-top: 12rem;
    }

    a {
      display: inline-block;
      text-decoration: none;
      transition: color 0.3s ease-out;

      &:hover:not(.active-link) {
        color: var(--clr-hover-accent);
      }

      &.active-link {
        transform: scale(1.35);
        transform-origin: center;
        cursor: default;
      }
    }
  }

  .hamburger-btn__open {
    transform: translateX(0);
  }

  .nav-bar.no-transition {
    transition: none !important;
  }

  /* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ */
  /* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\      *** HERO-SECTION ***       \\\\\\\\\\\\\\\\\\\\\\\\\ */
  /* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ */

  .hero-business-full-logo {
    position: relative;
    width: 50%;
    max-width: 19rem;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.2))
      drop-shadow(0 0 50px rgba(0, 0, 0, 1));
    border-radius: 12%;
    border-top-left-radius: 100%;
    border-top-right-radius: 100%;
    padding: 1em;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 2;
  }
}

@layer utilities {
  .wrapper {
    max-width: calc(87.25rem + 2rem);
    padding-inline: clamp(1rem, 3.5vw, 2rem);
    height: 100%;
    margin-inline: auto;
  }

  .wrapper--narrow {
    max-width: calc(73rem + 2rem);
  }

  .wrapper--narrow-m {
    max-width: calc(80rem + 2rem);
  }

  .wrapper--narrow-l {
    max-width: calc(82rem + 2rem);
  }

  .wrapper--wide {
    max-width: calc(90rem + 2rem);
  }

  .wrapper--tablet-xl {
    @media (width < 62.5rem) {
      max-width: calc(48rem + 2rem);
    }
  }

  .wrapper--tablet-l {
    @media (width < 62.5rem) {
      max-width: calc(40rem + 2rem);
    }
  }

  .wrapper--mobile-m {
    @media (width < 47.5rem) {
      max-width: calc(35.62rem + 2rem);
    }
  }

  .wrapper--mobile-tablet-m {
    @media (width < 62.5rem) {
      max-width: calc(35.62rem + 2rem);
    }
  }

  .wrapper--mobile-s {
    @media (width < 47.5rem) {
      max-width: calc(31.25rem + 2rem);
    }
  }

  .wrapper--mobile-xs {
    @media (width < 47.5rem) {
      max-width: calc(26rem + 2rem);
    }
  }

  .wrapper--mobile-mini {
    @media (width < 31.25rem) {
      max-width: calc(20rem + 2rem);
    }
  }

  .hidden {
    display: none;
  }

  .visually-hidden {
    position: absolute;
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    white-space: nowrap;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
  }

  .skip-to-content:not(:focus) {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
    transform: translateY(-5rem);
  }

  .skip-to-content {
    position: absolute;
    color: #000;
    font-size: 1.5rem;
    font-weight: 700;
    left: 1rem;
    top: 7rem;
    transition: transform 1s ease-out;
    /* prettier-ignore */
    transition-timing-function: linear( 0, 0.544 5.5%, 0.947 11.5%, 1.213 18.1%, 1.298 21.7%, 1.352 25.5%, 1.372 28.2%, 1.379 31.1%, 1.374 34.2%, 1.357 37.6%, 1.307 43.7%, 1.121 61.8%, 1.074 67.8%, 1.04 73.7%, 1.007 84.7%, 1
    );
  }
}

@layer page-transitions {
  /* Animation change for dark-mode */

  @media (prefers-reduced-motion: no-preference) {
    ::view-transition-old(root) {
      animation-delay: 1.25s;
    }

    ::view-transition-new(root) {
      animation: oval-in-top 1.25s ease-out;
    }

    @media (width > 47.5rem) {
      ::view-transition-new(root) {
        animation: oval-in-top 1.25s ease-out;
      }
    }
  }

  /* SWUP animation changes */

  .transition-slide-down {
    transform: translate(0, 0);
    opacity: 1;
  }

  .transition-slide-down {
    transition:
      transform 0.3s ease,
      opacity 0.4s ease;
  }

  html.is-leaving .transition-slide-down,
  html.is-rendering .transition-slide-down {
    transform: translateY(20%);
    opacity: 0;
  }

  .transition-fade {
    opacity: 1;
    transition: opacity 0.2s ease;
  }

  html.is-animating .transition-fade,
  html.is-leaving .transition-fade,
  html.is-rendering .transition-fade {
    opacity: 0 !important;
    will-change: opacity;
  }
}

@layer animations {
  @keyframes oval-in-top {
    from {
      clip-path: ellipse(10% 0% at 10% 0%);
    }
    to {
      clip-path: ellipse(140% 140% at 10% 0%);
    }
  }
}
