/* Header */
#site-header{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.site-header{
  background: white;
  border-bottom: 1px solid var(--border);
}

.header-inner{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
}

.brand{
  display: flex;
  align-items: center;
  min-width: 220px; /* keeps logo from collapsing */
  justify-self: start;
}

.brand-logo{
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
}

.nav-toggle{
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.nav-toggle-line{
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
  transition: transform 180ms ease, opacity 180ms ease;
}
.site-header.is-menu-open .nav-toggle-line:nth-child(1){
  transform: translateY(7px) rotate(45deg);
}
.site-header.is-menu-open .nav-toggle-line:nth-child(2){
  opacity: 0;
}
.site-header.is-menu-open .nav-toggle-line:nth-child(3){
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 640px){
  .brand-logo{ height: 48px; }
}

.nav{
  display: flex;
  gap: 20px;
  align-items: center;
  justify-self: center;
  margin-left: 0;
}
.nav-link{
  font-size: 14px;
  color: var(--primary);
  padding: 10px 2px;
  border-bottom: 2px solid transparent;
}
.nav-link:hover{ border-bottom-color: rgba(162, 141, 105, 0.35); }
.nav-link.is-active{ 
  border-bottom-color: var(--gold);
  font-weight: 700;
}
.nav-dropdown{
  position: relative;
}
.nav-dropdown-toggle{
  display: inline-flex;
  align-items: center;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: inherit;
  cursor: default;
  color: var(--primary);
}
.nav-dropdown-menu{
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(26, 43, 69, 0.12);
  display: grid;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 140ms ease, visibility 140ms ease;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu{
  opacity: 1;
  visibility: visible;
}
.nav-sub-link{
  display: block;
  border-radius: 8px;
  border-bottom: 0;
  padding: 8px 10px;
}
.nav-sub-link:hover{
  background: transparent;
  border-bottom: 0;
}

/* Buttons */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 10px 20px rgba(26, 43, 69, 0.18);
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
.btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(26, 43, 69, 0.22);
}
.btn-outline{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid var(--primary);
  background: rgba(255, 255, 255, 0.85);
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 8px 16px rgba(26, 43, 69, 0.12);
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}
.btn-outline:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(26, 43, 69, 0.16);
  background: rgba(162, 141, 105, 0.12);
  border-color: var(--gold);
  color: var(--primary);
}

.text-link{
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}
.text-link:hover{ text-decoration: underline; }

/* Section head */
.section-head{
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

/* Grid */
.grid{ display: grid; gap: 16px; }
.grid-3{ grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Tags */
.tag{
  font-size: 12px;
  border: 1px solid var(--border);
  background: var(--soft);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--primary-2);
}

/* Footer */
.site-footer{
  border-top: 1px solid var(--border);
  padding: 40px 0 18px;
  background: white;
}

.footer-grid{
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}
.footer-brand{ font-weight: 800; margin-bottom: 8px; }
.footer-text{ color: var(--muted); max-width: 55ch; }
.footer-title{ font-weight: 800; margin-bottom: 10px; }
.footer-link{
  display: block;
  color: var(--primary-2);
  margin: 8px 0;
}
.footer-link:hover{ text-decoration: underline; }
.footer-muted{ color: var(--muted); font-size: 14px; }

.footer-bottom{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* Responsive basics */
@media (max-width: 900px){
  .section-head{
    align-items: start;
  }
  .grid-3{
    grid-template-columns: 1fr;
  }
  .footer-grid{
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .footer-bottom{
    flex-direction: column;
    align-items: flex-start;
  }
  .header-inner{
    grid-template-columns: 1fr auto;
    gap: 12px;
  }
  .brand{
    min-width: auto;
  }
  .brand-logo{
    height: 56px;
  }
  .nav-toggle{
    display: inline-flex;
    justify-self: end;
  }
  .nav{
    display: none;
    grid-column: 1 / -1;
    align-items: stretch;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 0;
    gap: 0;
  }
  .site-header.is-menu-open .nav{
    display: grid;
  }
  .nav-link{
    display: block;
    width: 100%;
    padding: 8px 0;
    border-bottom: 0;
    text-align: center;
  }
  .nav-link:hover{ border-bottom-color: transparent; }
  .nav-link.is-active{ border-bottom-color: transparent; }
  .nav-dropdown-menu{
    position: static;
    top: auto;
    left: auto;
    transform: none;
    min-width: 0;
    padding: 2px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    display: none;
    opacity: 1;
    visibility: visible;
  }
  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu{
    display: none;
  }
  .nav-dropdown-toggle{
    cursor: pointer;
    justify-content: center;
    width: 100%;
  }
  .nav-dropdown-toggle:hover,
  .nav-dropdown-toggle:focus,
  .nav-dropdown-toggle:focus-visible{
    outline: none;
    box-shadow: none;
    border-bottom-color: transparent;
  }
  .nav-dropdown.is-open .nav-dropdown-menu{
    display: grid;
  }
  .nav-sub-link{
    padding: 8px 0;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
  }
}
