/* ==========================================================================
   Layout — page gutters, announcement bar, sticky header, main navigation
   (with the mobile menu toggle), the Iznik tile band, and footer.
   ========================================================================== */

/* Page gutters ------------------------------------------------------------ */

.section-shell {
  padding-right: max(5.5vw, 24px);
  padding-left: max(5.5vw, 24px);
}

/* Announcement bar -------------------------------------------------------- */

.topbar {
  padding: 9px 16px;
  background: var(--ink);
  color: var(--saffron-soft);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-align: center;
}

/* The pulsing saffron dot, used in the bar and the hero badge. */
.pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--saffron);
  vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(233, 185, 73, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 8px rgba(233, 185, 73, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(233, 185, 73, 0);
  }
}

/* Header ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-height);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 246, 236, 0.94);
  backdrop-filter: blur(6px);
}

/* The logo is cream with ink outlines on a transparent background, so it
   sits straight on the cream header. */
.brand img {
  width: auto;
  height: 84px;
}

/* Navigation -------------------------------------------------------------- */

nav {
  display: flex;
  gap: 28px;
}

nav a {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 200ms;
}

nav a:hover {
  color: var(--teal-deep);
}

/* Shown only below 760px, where the nav collapses into a drop-down.
   nav-menu.js keeps aria-expanded in sync with the open state. */
.menu-toggle {
  display: none;
}

/* Tile band --------------------------------------------------------------- */

/* Iznik tile border between sections. Decorative; aria-hidden in the HTML. */
.tiles {
  height: 18px;
  background: var(--teal) url("../../assets/brand/iznik-tile.svg") repeat-x;
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-top: 44px;
  padding-bottom: 22px;
  color: var(--muted);
  font-size: 0.8rem;
}

.footer-brand img {
  width: 180px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.footer-bottom a:hover {
  color: var(--teal-deep);
}

/* Responsive -------------------------------------------------------------- */

/* Keep 80px gutters on wide screens and cap the content at 1200px. */
@media (min-width: 1400px) {
  .section-shell {
    padding-right: max(calc((100vw - 1200px) / 2), 80px);
    padding-left: max(calc((100vw - 1200px) / 2), 80px);
  }
}

/* Below this width the nav becomes a drop-down behind the menu toggle. */
@media (max-width: 760px) {
  :root {
    --header-height: 84px;
  }

  .section-shell {
    padding-right: 16px;
    padding-left: 16px;
  }

  .brand img {
    height: 66px;
  }

  .footer-brand img {
    width: 150px;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    width: 44px;
    height: 44px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--ink);
  }

  .menu-toggle span {
    width: 100%;
    height: 1px;
    background: currentColor;
  }

  /* The two bars cross into an "×" while the menu is open. */
  .menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  nav {
    position: absolute;
    top: var(--header-height);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px 16px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--cream);
    box-shadow: 0 8px 10px rgba(30, 58, 52, 0.06);
  }

  nav.is-open {
    display: flex;
  }

  nav a {
    padding: 12px 0;
    font-size: 0.9375rem;
  }
}

@media (max-width: 380px) {
  .brand img {
    height: 58px;
  }
}

/* Reduced motion ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .pulse {
    animation: none;
  }

  nav a {
    transition: none;
  }
}
