@layer reset, init, design;

@import url(./normalize.css) layer(reset);
@import url(./typography.css) layer(init);
@import url(./media-mobile.css) layer(design) screen;
@import url(./media-tablet.css) layer(design) screen and (min-width: 775px);
@import url(./media-desktop.css) layer(design) screen and (min-width: 1350px);

@layer init {
  :root {
    /* COLORS */
    color-scheme: light;
    --primary: #e63946;
    --secondary: #d8d8d8;
    --background: #ffffff;
    --light: #ffffff;
    --hover: #d50032;
    --highlight: #e63946;
    --heading: #38342e;
    --text: #212121;
    --icon: #ee606c;

    /* METRICS */
    --mobile-page-padding: 1rem;
    --section-gap: 8rem;
    --in-rect-padding: 2em;
    --max-width: 1350px;

    --roundness: 0.2rem;
  }

  html {
    font-family: "Open Sans", sans-serif;
    background-color: var(--background, #ffffff);
    scroll-behavior: smooth;
    scroll-padding: 12rem;
    overflow-x: hidden;
  }

  header {
    --navbar-height: 5rem;
  }

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

  .page p {
    margin: 0;
  }

  .page b {
    font-weight: 650;
    color: var(--heading, #38342e);
  }

  /* ROUDING */
  .intro__text,
  .page img,
  .page__service-category,
  .page__services-item,
  .page__testimonials-item,
  .footer__cta,
  .footer__map iframe,
  .navbar__hamburger span,
  .button,
  .popup__content {
    border-radius: var(--roundness, 0.5rem);
  }

  /* COMPONENTS */
  /* button */
  .button {
    display: inline-block;
    padding: 1em 1.5em;
    background-color: var(--primary, #ffa500);
    color: var(--light, #ffffff) !important;
    font-weight: 650;
    font-size: var(--h5, 1.2rem);
    transition: all 0.3s ease-in-out;
  }
  .button:hover {
    transform: scale(1.02);
    background-color: var(--hover, #ffbd37);
  }

  /* responsive image */
  .image-responsive {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
  }
  .image-responsive--fill {
    height: 100%;
    object-fit: cover;
  }

  /* non-visible elements that are important for SEO */
  .seo-only {
    position: absolute;
    top: -1000px;
    left: -1000px;
  }

  /* stripe */
  .stripe {
    background-color: var(--secondary, #e2dccf);
    padding: 3em var(--mobile-page-padding, 1rem);
    text-align: center;
  }

  /* popup */
  .popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #00000090;
    display: none;
    place-items: center;
    z-index: 1000;
  }
  .popup.active {
    display: grid;
  }
  .popup__content {
    background-color: var(--light, #ffffff);
    padding: var(--in-rect-padding, 2rem) 3rem;
    width: 70%;
    max-width: 500px;
    text-align: center;
    display: grid;
    gap: 1rem;
    position: relative;
  }
  .popup__close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    cursor: pointer;
    background-color: transparent;
    border: none;
    font-size: 0;
  }
  .popup__close::before {
    content: "✕";
    font-size: 2rem;
    font-weight: 700;
    color: var(--text, #212121);
  }

  /* NAVBAR */
  .navbar {
    box-sizing: border-box;
    position: fixed;
    display: grid;
    top: 0;
    width: 100%;
    height: var(--navbar-height, 5rem);
    z-index: 1000;
    background-color: var(--light, #ffffff);
  }
  .navbar__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
  }
  .navbar__logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
  }
  .navbar__logo {
    font-size: var(--h4, 1.44rem);
    font-weight: 650;
  }
  .navbar__items a.active {
    color: var(--primary, #e2dccf);
    font-weight: 700;
  }
  .navbar__items a {
    display: inline-block;
    font-weight: 300;
    text-transform: uppercase;
  }
  .navbar__item::after {
    transition: width 0.2s ease-in-out;
    --height: 2px;
    content: "";
    display: block;
    background-color: var(--primary, #ffa500);
    height: var(--height, 2px);
    width: 0;
    margin-bottom: var(--height, 2px);
  }
  .navbar__items a.active::after {
    width: 100%;
  }
  .navbar__item:hover::after {
    width: 100%;
  }
  .navbar__items {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  /* intro */
  .intro {
    background-image: image-set(url("/images/header/header_image.webp") type("image/webp"), url("/images/header/header_image.jpg") type("image/jpeg"));
    background-size: cover;
    background-position: center top;
    margin-top: var(--navbar-height, 5rem);
    --offset: 20dvh;
    height: calc(100dvh - var(--navbar-height, 20rem) - var(--offset, 10dvw));
    text-align: center;
    padding: 2rem var(--mobile-page-padding, 1rem);
    position: relative;
  }
  .intro::after {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-color: #00000015;
    z-index: 1;
  }
  .page__contact-cta .button,
  .page__service-category {
    position: relative;
    z-index: 2;
  }
  .intro--short {
    background-position: center;
    height: calc(50dvh - var(--navbar-height, 20rem) - var(--offset, 10dvw));
    padding-top: 2.5rem !important;
  }
  .intro__text {
    background-color: #00000090;
    color: #ffffff;
    padding: var(--in-rect-padding, 2em);
    display: grid;
    place-items: center;
    position: relative;
    z-index: 2;
  }
  .intro__text .intro__heading {
    margin-bottom: 16px;
  }
  .intro__text a {
    margin-bottom: 8px;
  }
  .intro__text .button {
    margin-top: 24px;
    margin-bottom: 0;
  }

  /* footer */
  .footer {
    --offset: 8rem;
    padding: 0 var(--mobile-page-padding, 1rem);
    background-color: var(--secondary, #e2dccf);
    padding-top: var(--offset, 8rem);
  }
  .footer__cta {
    background-color: #000000d5;
    padding: var(--in-rect-padding, 2em);
    text-align: center;
    display: grid;
    gap: 1rem;
    place-items: center;
    margin-top: calc(var(--offset, 8rem) * -1.5);
    margin-bottom: 4rem;
  }
  .footer__cta-phone {
    display: none;
  }
  .footer__container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem 1rem;
  }
  .footer__contact-info {
    order: 1;
    display: flex;
    column-gap: 4rem;
    row-gap: 1rem;
    justify-content: stretch;
    flex-wrap: wrap;
  }
  .footer__contact-item {
    line-height: 1.7;
  }
  .footer__contact,
  .footer__opening-hours {
    list-style: none;
    padding: 0;
  }
  .footer__copyrigth {
    text-align: center;
    margin-top: 1rem;
    padding: 1em 0;
    font-size: var(--small, 0.833rem);
  }
  .footer__map {
    aspect-ratio: 16 / 9;
    margin-bottom: 1rem;
  }
}
