/* ============================================================
   Story of US - header, brand, navigation, mobile menu
   ============================================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  transition:
    background-color 300ms var(--ease-out),
    box-shadow 300ms var(--ease-out);
}

.site-header.is-scrolled {
  background: rgba(247, 243, 236, 0.86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 72px;
}

/* --- Brand lockup (live text + dot-cluster mark, faithful to the SVG lockup) --- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--ink);
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.2em;
  color: var(--ink);
}

.brand-sub {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--red);
  text-transform: uppercase;
}

/* --- Primary nav --- */

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  padding: 0.35rem 0;
  transition: color var(--dur-micro) var(--ease-out);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--red);
}

/* Current page: one clay-red dot under the label */
.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  transform: translateX(-50%);
}

.nav-cta {
  margin-left: 0.5rem;
  padding: 0.6rem 1.4rem;
  font-size: 0.92rem;
}

/* --- Mobile menu --- */

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.6rem;
  cursor: pointer;
  z-index: calc(var(--z-menu) + 1);
}

.menu-toggle-bars {
  display: block;
  position: relative;
  width: 26px;
  height: 2px;
  background: var(--ink);
  transition: background-color var(--dur-micro) var(--ease-out);
}

.menu-toggle-bars::before,
.menu-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 26px;
  height: 2px;
  background: var(--ink);
  transition: transform var(--dur-micro) var(--ease-out);
}

.menu-toggle-bars::before {
  top: -8px;
}

.menu-toggle-bars::after {
  top: 8px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  background: var(--paper);
  padding: 6.5rem var(--gutter) 3rem;
  flex-direction: column;
  gap: 0.4rem;
}

.mobile-menu.is-open {
  display: flex;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 7vw, 2.6rem);
  font-weight: 600;
  color: var(--ink);
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--hairline);
}

.mobile-menu a[aria-current="page"] {
  color: var(--red);
}

.mobile-menu .mobile-menu-cta {
  margin-top: 1.6rem;
  border-bottom: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  align-self: flex-start;
}

html.menu-locked,
html.menu-locked body {
  overflow: hidden;
}

/* Page content clears the fixed header */
main {
  padding-top: 72px;
}

main.main-flush {
  padding-top: 0;
}

@media (max-width: 900px) {
  .site-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }
}
