@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;
  }

  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;
  }

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

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

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

@layer components {
  @font-face {
    font-display: swap;
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 500;
    src: url("/assets/fonts/montserrat-v31-latin-500.woff2") format("woff2");
  }

  @font-face {
    font-display: swap;
    font-family: "Playfair Display";
    font-style: normal;
    font-weight: 400;
    src: url("/assets/fonts/playfair-display-v40-latin-regular.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;

    --ff-text: "Montserrat", Arial, sans-serif;
    --ff-heading: "Playfair Display", Arial, sans-serif;

    --grey-100: #ec1c1c;
    --black-100: #000;
    --white-100: #fff;
    --white-200: #f4f6fc;
    --white-300: #e5e7eb;

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

  .cmp-main-btn {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    display: inline-block;
    position: relative;
    font-family: var(--ff-text);
    font-size: 0.9rem;
    color: var(--black-100) !important;
    letter-spacing: 1px;
    font-weight: 700;
    background-color: var(--white-200);
    padding: 1.25em 1.75em;
    border-radius: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    z-index: 0;
    outline: none;
    border: none;
    overflow: hidden;
    box-shadow:
      inset 0 1px 2px #ffffff80,
      0 2px 4px #00000070,
      0 4px 8px #00000050;
    transition:
      transform 0.2s ease,
      background-color 0.2s ease,
      box-shadow 0.2s ease;

    &:hover {
      transform: translateY(-3px);
      background-color: var(--grey-100);
      box-shadow:
        inset 0 1px 2px #ffffffa0,
        0 4px 10px #00000040;
    }

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

@layer base {
  html {
    scrollbar-width: thin;

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

  html,
  body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  body {
    font-size: 1rem;
    font-family: var(--ff-text);
    font-weight: 500;
    color: var(--white-100);
    background-color: #000;
    text-align: center;
    overflow-x: clip;
  }

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

  .header {
    position: relative;
    top: 0;
    z-index: 1000;

    &.sticking {
      position: sticky;
      animation: slideDown 1.2s ease-out forwards;
    }
  }

  .header__container {
    background-color: var(--white-300);
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  .swup-header {
    display: contents;
  }

  .wrapper--header {
    min-height: clamp(3rem, 8vw, 3.5rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .header-title {
    position: relative;
    left: 3rem;
    color: var(--black-100);
    margin-inline: auto;
    text-transform: uppercase;
  }

  .hamburger-btn-box {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    order: 1;
    margin-left: 3rem;
  }

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

  .hero-background-image {
    position: relative;
    width: 100%;
    min-height: 64lvh;
    background-image: url("/assets/images/tool-background.webp");
    background-size: cover;
    background-position: center;
  }

  .hero-background-image::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
  }

  .hero-main-heading {
    position: relative;
    font-size: clamp(3rem, 6vw, 4rem);
    font-family: var(--ff-heading);
    font-weight: 400;
    color: var(--white-100);
    bottom: 17rem;
    z-index: 10;
  }

  /* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ */
  /* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\      *** CONTACT-SECTION ***       \\\\\\\\\\\\\\\\\\\\\\ */
  /* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ */

  .contact-heading,
  .contact-span {
    font-family: var(--ff-heading);
    font-weight: 400;
  }

  .contact-heading {
    position: relative;
    font-size: clamp(2.5rem, 5vw, 3rem);
    color: var(--white-200);
  }

  .contact-span {
    display: block;
    font-size: clamp(1.25rem, 5vw, 1.5rem);
    font-family: var(--ff-text);
    font-size: 1.35rem;
    color: var(--white-300);
    opacity: 0.92;
    margin-top: 5rem;
  }

  .contact-heading:after {
    content: "";
    position: absolute;
    background-color: #4a4a4a;
    width: 65px;
    height: 1px;
    left: 50%;
    transform: translate(-50%, -50%);
    bottom: -2.75rem;
    opacity: 0.75;
  }

  .contact-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
  }

  .contact-form__input,
  .contact-form__textarea {
    padding: 0.75rem;
    color: var(--white-200);
    width: 100%;
    max-width: 800px;
    height: 3.5rem;
    margin-inline: auto;
    border: 1px solid #ebebeb;
    border-radius: 0.375rem;
    background: transparent;
    font-size: 1rem;
  }

  .contact-form__textarea {
    height: 13rem;
  }

  .footer-section {
    padding-block: 2rem;
  }

  .footer-copyright {
    display: inline-block;
    color: var(--grey-100);
    margin-top: 1rem;
  }
}

@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(75.25rem + 2rem);
  }

  .wrapper--narrow-m {
    max-width: calc(82.25rem + 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-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);
    }
  }
}

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

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

    ::view-transition-new(root) {
      animation: circle-in-S 1.5s ease-out;
    }

    @media (width > 47.5rem) {
      ::view-transition-new(root) {
        animation: circle-in-L 1.5s ease-out;
      }
    }
  }
}

@layer animations {
  @keyframes circle-in-L {
    /* For larger screens */
    from {
      clip-path: circle(0% at 95% 5%);
    }
    to {
      clip-path: circle(100% at 50% 0%);
    }
  }

  @keyframes circle-in-S {
    /* For mobile screens */
    from {
      clip-path: circle(0% at 50% 0%);
    }
    to {
      clip-path: circle(130% at 50% 0%);
    }
  }
}
