/* ==========================================================================
   Header - Mobile first
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  padding: 0.65rem 1.25rem;

  background-color: #f7eee9;
  border-bottom: 1px solid rgba(27, 27, 29, 0.08);
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "branding hamburger"
    "nav nav";

  align-items: center;

  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ==========================================================================
   Branding
   ========================================================================== */

.branding {
  grid-area: branding;

  display: flex;
  align-items: center;
  gap: 0.75rem;

  min-width: 0;
}

.custom-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.custom-logo {
  display: block;
  width: 58px;
  height: auto;
}

.site-title-link {
  display: block;

  color: #1b1b1d;
  text-decoration: none;
}

.site-title {
  display: block;

  color: #1b1b1d;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.15;
}

/* ==========================================================================
   Hamburger
   ========================================================================== */

.hamburger {
  grid-area: hamburger;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;

  padding: 0.5rem;

  background: transparent;
  border: 0;

  cursor: pointer;
}

.hamburger span {
  display: block;

  width: 27px;
  height: 2px;

  background-color: #1b1b1d;
  border-radius: 999px;

  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hamburger,
.hamburger:hover,
.hamburger:focus,
.hamburger:active,
.hamburger.active {
  background: transparent;
  box-shadow: none;
}

/* ==========================================================================
   Navigation mobile
   ========================================================================== */

.main-nav {
  grid-area: nav;

  display: flex;
  flex-direction: column;
  gap: 1rem;

  width: 100%;
  max-height: 0;

  overflow: hidden;
  opacity: 0;

  transition:
    max-height 0.35s ease,
    opacity 0.25s ease,
    padding 0.25s ease;
}

.main-nav.active {
  max-height: 450px;

  padding: 1rem 0 0.5rem;

  opacity: 1;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;

  margin: 0;
  padding: 0;

  list-style: none;
}

.nav-list a {
  display: block;

  padding: 0.6rem 0;

  color: #1b1b1d;

  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

/* ==========================================================================
   Call button
   ========================================================================== */

.header-btn {
  display: block;

  width: 100%;
  padding: 0.75rem 1.25rem;

  background-color: #a63a2d;
  border-radius: 999px;

  color: #ffffff;

  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;

  transition:
    transform 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}

/* ==========================================================================
   Tablet
   ========================================================================== */

@media (min-width: 768px) {
  .site-header {
    padding: 0.7rem 2rem;
  }

  .custom-logo {
    width: 68px;
  }

  .site-title {
    font-size: 1.05rem;
  }

  .main-nav.active {
    padding-top: 1.25rem;
  }

  .header-btn {
    width: auto;
    min-width: 150px;
    align-self: flex-start;
  }
}

/* ==========================================================================
   Desktop
   ========================================================================== */

@media (min-width: 1024px) {
  .site-header {
    padding: 0.6rem 2.5rem;
  }

  .header-inner {
    display: flex;
    align-items: center;
    gap: 2rem;
  }

  .branding {
    flex-shrink: 0;
  }

  .branding-link {
    gap: 0.8rem;
  }

  .custom-logo {
    width: 76px;
  }

  .site-title {
    font-size: 1.05rem;
    white-space: nowrap;
  }

  .hamburger {
    display: none;
  }

  .main-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 2rem;

    width: auto;
    max-height: none;
    margin-left: auto;
    padding: 0;

    overflow: visible;
    opacity: 1;
  }

  .nav-list {
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }

  .nav-list a {
    position: relative;

    padding: 0.5rem 0;

    font-size: 0.95rem;
  }

  .nav-list a::after {
    content: "";

    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;

    height: 2px;

    background-color: #a63a2d;

    transform: scaleX(0);
    transform-origin: center;

    transition: transform 0.2s ease;
  }

  .nav-list a:hover::after {
    transform: scaleX(1);
  }

  .header-btn {
    width: auto;
    min-width: auto;
    padding: 0.7rem 1.4rem;

    transition: background-color 0.2s ease;
  }

  .header-btn:hover {
    background-color: #bd4737;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(166, 58, 45, 0.25);
  }
}
