/* ==========================================================================
   Frasso Studio — Header, Drawer, Search Modal & Footer Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Site Header & Nav Bar
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: 28px 60px;
  background-color: transparent;
  transition: background-color 0.4s var(--ease-out), padding 0.4s var(--ease-out), color 0.4s var(--ease-out);
  pointer-events: none;
}

.site-header.nav-home {
  color: var(--wool);
}
.site-header.nav-home .menu-trigger,
.site-header.nav-home .search-trigger {
  color: var(--wool);
}
.site-header.nav-home .frasso-brand-logo {
  filter: brightness(0) invert(1);
}

.site-header.scrolled {
  background-color: rgba(246, 242, 235, 0.9);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  padding-top: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--color-border-subtle);
  color: var(--slate) !important;
}
.site-header.nav-home.scrolled .menu-trigger,
.site-header.nav-home.scrolled .search-trigger {
  color: var(--slate) !important;
}
.site-header.nav-home.scrolled .frasso-brand-logo {
  filter: none !important;
}

.nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Header Hamburger Trigger */
.menu-trigger {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  pointer-events: auto;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
}
.menu-trigger:hover {
  opacity: 0.6;
}

.burger {
  width: 20px;
  height: 13px;
  display: block;
  position: relative;
}
.burger-line {
  width: 100%;
  height: 1px;
  background-color: currentColor;
  position: absolute;
  left: 0;
  transition: transform var(--duration-fast) var(--ease-out), opacity var(--duration-quick) var(--ease-out);
}
.burger-line:nth-child(1) { top: 0; }
.burger-line:nth-child(2) { top: 6px; }
.burger-line:nth-child(3) { top: 12px; }

/* Wordmark / Brand Logo */
.brand-wordmark {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--duration-fast) var(--ease-out);
}
.brand-wordmark:hover {
  opacity: 0.75;
}
.frasso-brand-logo {
  height: 56px;
  width: auto;
  max-height: 64px;
  max-width: 220px;
  object-fit: contain;
  display: block;
}

/* Search Trigger */
.search-trigger {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text);
  pointer-events: auto;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  transition: opacity var(--duration-fast) var(--ease-out);
}
.search-trigger:hover {
  opacity: 0.55;
}

/* --------------------------------------------------------------------------
   2. Glassmorphic Drawer Menu
   -------------------------------------------------------------------------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(48, 38, 32, 0.25);
  opacity: 0;
  visibility: hidden;
  z-index: 94;
  transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}
.drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.drawer-menu {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(420px, 86vw);
  background: rgba(246, 242, 235, 0.8) !important;
  background-color: rgba(246, 242, 235, 0.8) !important;
  backdrop-filter: blur(32px) saturate(170%) brightness(1.03);
  -webkit-backdrop-filter: blur(32px) saturate(170%) brightness(1.03);
  border-right: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 24px 0 64px rgba(48, 38, 32, 0.12);
  z-index: var(--z-drawer);
  padding: 120px 56px 56px;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.45s var(--ease-out);
}
.drawer-menu.open {
  transform: translateX(0);
}

.drawer-close {
  position: absolute;
  top: 28px;
  left: 60px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: opacity var(--duration-fast) var(--ease-out);
}
.drawer-close:hover {
  opacity: 0.6;
}
.drawer-close svg {
  display: block;
  width: 22px;
  height: 22px;
  stroke: var(--slate);
}

.drawer-label {
  font-family: var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--walnut);
  font-size: 10px;
  font-weight: 500;
  margin-bottom: 36px;
  display: block;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.drawer-link, .drawer-search-btn {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 300;
  color: var(--color-text);
  text-decoration: none;
  padding: 6px 0;
  position: relative;
  text-align: left;
  transition: opacity var(--duration-fast) var(--ease-out), transform 0.3s var(--ease-settle);
}
.drawer-link:hover, .drawer-search-btn:hover {
  opacity: 0.6;
  transform: translateX(8px);
}
.drawer-link.active {
  opacity: 1;
}
.drawer-link.active::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 50%;
  width: 10px;
  height: 1px;
  background-color: var(--walnut);
}

.drawer-foot {
  margin-top: auto;
  padding-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.drawer-email {
  font-size: 13px;
  font-weight: 300;
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}
.drawer-email:hover {
  color: var(--walnut);
}
.drawer-meta {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--walnut);
}

/* --------------------------------------------------------------------------
   3. Search Overlay Modal
   -------------------------------------------------------------------------- */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background-color: var(--wool);
  opacity: 0;
  visibility: hidden;
  display: flex;
  flex-direction: column;
  transition: opacity 0.35s var(--ease-out), visibility 0.35s;
}
.search-overlay.open {
  opacity: 1;
  visibility: visible;
}

.search-bar {
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 26px 40px;
}
.search-brand img {
  height: 48px;
  width: auto;
}
.search-bar-right {
  display: flex;
  align-items: center;
  gap: 22px;
}
.search-esc-hint {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--oak);
}
.search-close-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--slate);
  transition: opacity var(--duration-fast) var(--ease-out);
}
.search-close-btn:hover {
  opacity: 0.6;
}

.search-wrap {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.search-field {
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: clamp(36px, 6vh, 64px) 0 18px;
  transition: border-color var(--duration-mid) var(--ease-out);
}
.search-field:focus-within {
  border-bottom-color: var(--slate);
}
.search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--slate);
}
.search-input::placeholder {
  color: var(--oak);
  opacity: 0.7;
}

.search-content {
  flex: 1;
  padding: clamp(24px, 4vh, 40px) 0 40px;
  overflow-y: auto;
}

.search-group-label {
  font-family: var(--font-body);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--oak);
  font-size: 10px;
  font-weight: 500;
  margin-bottom: 12px;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  list-style: none;
}
.search-item {
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 16px 0;
  text-decoration: none;
  position: relative;
  transition: padding-left 0.35s var(--ease-out);
}
.search-item:hover, .search-item.focused {
  padding-left: 24px;
}
.search-arrow {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  opacity: 0;
  color: var(--walnut);
  transition: opacity 0.25s var(--ease-out), transform 0.35s var(--ease-out);
}
.search-item:hover .search-arrow, .search-item.focused .search-arrow {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.search-item-title {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  font-weight: 300;
  color: var(--slate);
}
.search-item-loc {
  color: var(--oak);
  font-size: 0.85em;
  margin-left: 12px;
}
.search-item-meta {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--oak);
  white-space: nowrap;
}

/* Category Filter Cells */
.search-type-wrap {
  border-top: 1px solid var(--color-border);
  display: flex;
  margin-top: 28px;
}
.search-type-cell {
  flex: 1;
  padding: 16px 20px 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: padding-left 0.35s var(--ease-out);
}
.search-type-cell:not(:first-child) {
  border-left: 1px solid var(--color-border);
  padding-left: 24px;
}
.search-type-cell:hover {
  padding-left: 8px;
}
.search-type-cell:not(:first-child):hover {
  padding-left: 32px;
}
.search-type-name {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  font-weight: 300;
  color: var(--slate);
}
.search-type-count {
  font-size: 12px;
  color: var(--oak);
}

.search-legend {
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 16px 40px;
}
.search-legend-item {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--oak);
  display: flex;
  align-items: center;
  gap: 8px;
}
.kbd {
  font-family: inherit;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 10px;
}

/* --------------------------------------------------------------------------
   4. Site Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--slate);
  color: var(--sand);
  border-top: 1px solid var(--seam-on-dark);
  padding: clamp(56px, 8vh, 100px) clamp(24px, 8vw, 140px) clamp(28px, 4vh, 44px);
}
.footer-inner {
  max-width: 1480px;
  margin: 0 auto;
}
.footer-cta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding-bottom: clamp(40px, 6vh, 76px);
}
.footer-cta-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-kicker {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--oak);
}
.footer-cta-link {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 4.4vw, 3.5rem);
  font-weight: 300;
  line-height: var(--leading-tight);
  color: var(--wool);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  transition: opacity var(--duration-fast) var(--ease-out);
}
.footer-cta-link:hover {
  opacity: 0.65;
}
.footer-cta-arrow {
  width: 0.52em;
  height: 0.52em;
  transition: transform var(--duration-mid) var(--ease-out);
  margin-top: 0.12em;
}
.footer-cta-link:hover .footer-cta-arrow {
  transform: translateX(0.22em);
}
.footer-mark {
  color: var(--oak);
  flex-shrink: 0;
  margin-top: 6px;
}

.footer-rule {
  height: 1px;
  background-color: var(--hairline-on-dark);
}

.footer-cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px 40px;
  padding: clamp(34px, 5vh, 56px) 0;
}
.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
}
.footer-col-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--oak);
  margin-bottom: 6px;
}
.footer-col-link {
  font-size: 14px;
  font-weight: 300;
  color: var(--sand);
  transition: color var(--duration-fast) var(--ease-out);
}
.footer-col-link:hover {
  color: var(--wool);
}
.footer-address {
  font-style: normal;
  font-size: 14px;
  font-weight: 300;
  line-height: var(--leading-body);
  color: var(--sand);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding-top: clamp(20px, 3vh, 30px);
}
.footer-fine {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--oak);
}

/* --------------------------------------------------------------------------
   Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .site-header { padding: 24px 40px; }
  .drawer-close { top: 24px; left: 40px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-col:last-child { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  .site-header { padding: 20px 24px; }
  .drawer-menu { padding: 100px 32px 40px; }
  .drawer-close { top: 20px; left: 24px; }
  .search-bar, .search-wrap, .search-legend { padding-left: 24px; padding-right: 24px; }
  .search-type-wrap { flex-direction: column; }
  .search-type-cell:not(:first-child) { border-left: none; padding-left: 0; }
  .footer-cta { flex-direction: column-reverse; align-items: flex-start; gap: 28px; }
  .footer-cols { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}
