/* ============================================================
   BUYARY — sitewide hamburger menu
   Self-contained: loads after platform.css (dark pages) or
   solutions.css (light pages) and depends on neither. One deep-
   navy overlay design shared by both themes; the burger inherits
   the page's text color.
   ============================================================ */

.nav__burger {
  display: flex; flex-direction: column; justify-content: center;
  gap: 4.5px;
  width: 40px; height: 40px;
  padding: 10px 9px;
  margin: -4px -6px -4px 0.15rem;
  background: none; border: none; cursor: pointer;
  color: inherit;
  border-radius: 8px;
}
.nav__burger i {
  display: block; width: 20px; height: 1.6px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s;
}
.nav__burger[aria-expanded="true"] { position: relative; z-index: 960; color: #F8F7F3; }
.nav__burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(6.1px) rotate(45deg); }
.nav__burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-6.1px) rotate(-45deg); }

/* the section tag beside the logo is its own link */
a.nav__tag { text-decoration: none; transition: background 0.3s, color 0.3s; }
a.nav__tag:hover { background: rgba(217, 98, 60, 0.1); color: #D9623C; }

.sitemenu__group + .sitemenu__group { margin-top: 2.6rem; }

.sitemenu {
  position: fixed; inset: 0; z-index: 950;
  background: linear-gradient(165deg, #1B2642 0%, #142033 60%, #10192A 100%);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.35s;
}
.sitemenu.is-open { opacity: 1; visibility: visible; }

.sitemenu__inner {
  max-width: 1180px; margin: 0 auto;
  padding: clamp(5.5rem, 12vh, 8rem) clamp(1.25rem, 4vw, 3rem) 4rem;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.8rem, 4vw, 3.5rem);
}
/* Desktop: a left rail (search + featured tile) beside the nav columns, so the
   tile is anchored under the search and the columns fill the rest — no void. */
@media (min-width: 901px) {
  .sitemenu__inner {
    max-width: 1340px;
    grid-template-columns: clamp(256px, 19vw, 288px) repeat(4, 1fr);
    gap: clamp(1.4rem, 2.4vw, 2.4rem) clamp(1.3rem, 1.8vw, 1.9rem);
    align-items: start;
  }
  /* the rail is a bordered card, so it needs more air than text-to-text gaps —
     padding, not margin, so the columns don't lose width */
  .sitemenu__rail {
    grid-column: 1; grid-row: 1;
    padding-right: clamp(0.9rem, 1.6vw, 1.7rem);
  }
  .sitemenu__foot { grid-column: 1 / -1; margin-top: clamp(2.2rem, 5vh, 3.6rem); }
}
/* Tablet: rail sits full-width on top; flow the columns as a balanced masonry
   instead of a rigid 2×2 grid (a shorter column otherwise left a 75–90px hole). */
@media (max-width: 900px) {
  .sitemenu__inner {
    display: block; grid-template-columns: none;
    columns: 2; column-gap: clamp(1.8rem, 4vw, 3.5rem);
  }
  .sitemenu__inner > .sitemenu__rail { column-span: all; margin-bottom: 2.4rem; }
  .sitemenu__inner > .sitemenu__foot { column-span: all; }
  .sitemenu__col { break-inside: avoid; margin-bottom: 2.6rem; }
}
@media (max-width: 440px) { .sitemenu__inner { columns: 1; padding-top: 5rem; } }

.sitemenu__head {
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.64rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: #E8926F;
  margin: 0 0 1.1rem;
}
.sitemenu__col a {
  display: block;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: rgba(248, 247, 243, 0.74);
  text-decoration: none;
  padding: 0.44rem 0;
  transition: color 0.25s, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.sitemenu__col a:hover { color: #F8F7F3; transform: translateX(4px); }

.sitemenu__foot {
  grid-column: 1 / -1;
  margin-top: 1.5rem; padding-top: 1.6rem;
  border-top: 1px solid rgba(248, 247, 243, 0.14);
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
@media (max-width: 640px) {
  /* two-line brand block left, pill right */
  .sitemenu__foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem 1.2rem;
  }
  .sitemenu__foot img { grid-column: 1; }
  .sitemenu__foot span { grid-column: 1; }
  .sitemenu__foot .sitemenu__cta {
    grid-column: 2; grid-row: 1 / 3;
    margin-left: 0;
    text-align: center;
    padding: 0.95rem 2rem 0.85rem;
    white-space: nowrap;
  }
}
@media (max-width: 480px) {
  /* no room beside the tagline: stack everything */
  .sitemenu__foot { display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem; }
  .sitemenu__foot .sitemenu__cta { align-self: flex-start; }
}
.sitemenu__foot img { height: 26px; width: auto; opacity: 0.9; }
.sitemenu__foot span {
  font-family: "Playfair Display", Georgia, serif; font-style: italic;
  font-size: 0.92rem; color: rgba(248, 247, 243, 0.55);
}
.sitemenu__cta {
  margin-left: auto;
  font-family: "Josefin Sans", sans-serif;
  font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: #F8F7F3 !important;
  background: #D9623C;
  border-radius: 100px;
  padding: 0.85rem 1.6rem 0.75rem;
  text-decoration: none;
  transition: background 0.3s;
}
.sitemenu__cta:hover { background: #A8431E; }

/* menu-open state: keep the nav visible above the overlay */
body.menu-open { overflow: hidden; }
body.menu-open .nav { z-index: 955; background: linear-gradient(to bottom, rgba(27,38,66,0.95) 40%, rgba(27,38,66,0)); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.menu-open .nav__links, body.menu-open .nav__signin, body.menu-open .nav__cta,
body.menu-open .nav__tag { visibility: hidden; }
body.menu-open .nav__logo img { filter: brightness(0) invert(0.97); }

@media (prefers-reduced-motion: reduce) {
  .sitemenu, .nav__burger i, .sitemenu__col a { transition: none; }
}

/* ============================================================
   Menu enhancements: active state · search · stagger · featured
   ============================================================ */

/* active page marker */
.sitemenu__col a.is-current {
  color: #F8F7F3; font-weight: 600;
  position: relative;
}
.sitemenu__col a.is-current::before {
  content: ""; position: absolute; left: -0.9rem; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: #D9623C;
}

/* search row (spans the whole grid, above the columns) */
.sitemenu__search {
  grid-column: 1 / -1;
  display: flex; align-items: center; gap: 0.7rem;
  max-width: 560px; margin: 0 0 0.6rem;
  padding: 0.85rem 1.1rem;
  border-radius: 10px;
  background: rgba(248, 247, 243, 0.05);
  border: 1px solid rgba(248, 247, 243, 0.14);
  color: rgba(248, 247, 243, 0.5);
  transition: border-color 0.3s, background 0.3s;
}
.sitemenu__search:focus-within {
  border-color: rgba(217, 98, 60, 0.6);
  background: rgba(248, 247, 243, 0.07);
  color: #E8926F;
}
.sitemenu__search input {
  flex: 1; min-width: 0;
  background: none; border: none; outline: none;
  font-family: "Inter", system-ui, sans-serif; font-size: 0.95rem;
  color: #F8F7F3;
}
.sitemenu__search input::placeholder { color: rgba(248, 247, 243, 0.4); }
.sitemenu__search-clear {
  background: none; border: none; cursor: pointer;
  color: rgba(248, 247, 243, 0.55); font-size: 1.3rem; line-height: 1;
  padding: 0 0.2rem;
}
.sitemenu__search-clear:hover { color: #F8F7F3; }
.sitemenu__empty {
  grid-column: 1 / -1;
  font-family: "Inter", system-ui, sans-serif; font-size: 0.95rem;
  color: rgba(248, 247, 243, 0.55); margin: 0.4rem 0 0;
}

/* rail: search + featured tile as one block (left sidebar on desktop, full-width
   header on narrower widths). Search and tile share a width so they line up. */
.sitemenu__rail { display: flex; flex-direction: column; align-items: flex-start; gap: 0.9rem; }
.sitemenu__rail .sitemenu__search { margin: 0; width: 100%; }

/* featured tile — anchored directly under the search field and matched to its
   width, so it reads as part of that rail rather than floating inside a column. */
.sitemenu__featured {
  position: relative; overflow: hidden;
  display: block;
  width: 100%; max-width: 560px;
  padding: 1.3rem 1.5rem 1.2rem;
  border-radius: 10px;   /* match the search field */
  border: 1px solid rgba(217, 98, 60, 0.4) !important;
  background: linear-gradient(120deg, rgba(217, 98, 60, 0.16), rgba(217, 98, 60, 0.04));
  text-decoration: none;
  transition: border-color 0.35s, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.sitemenu__featured:hover { border-color: rgba(217, 98, 60, 0.8) !important; transform: translateY(-3px); }
.sitemenu__featured-glow {
  position: absolute; right: -30%; top: -50%;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 98, 60, 0.28), transparent 68%);
  pointer-events: none;
}
.sitemenu__featured-kicker {
  display: block;
  font-family: "Josefin Sans", sans-serif; font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: #E8926F;
  margin-bottom: 0.7rem;
}
.sitemenu__featured-title {
  display: block; font-family: "Playfair Display", Georgia, serif;
  font-size: 1.4rem; font-weight: 600; color: #F8F7F3; line-height: 1.1;
  margin-bottom: 0.4rem;
}
.sitemenu__featured-desc {
  display: block; font-family: "Inter", system-ui, sans-serif;
  font-size: 0.82rem; color: rgba(248, 247, 243, 0.6); line-height: 1.5;
  margin-bottom: 0.9rem;
}
.sitemenu__featured-go {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: "Josefin Sans", sans-serif; font-size: 0.64rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: #E8926F;
}
.sitemenu__featured-go i { font-style: normal; transition: transform 0.3s var(--ease-out, ease); }
.sitemenu__featured:hover .sitemenu__featured-go i { transform: translateX(4px); }

/* stagger-in cascade on open */
.sitemenu__inner > * { opacity: 0; transform: translateY(12px); }
.sitemenu.is-open .sitemenu__inner > * {
  opacity: 1; transform: none;
  transition: opacity 0.5s var(--ease-out, cubic-bezier(0.22,1,0.36,1)),
              transform 0.5s var(--ease-out, cubic-bezier(0.22,1,0.36,1));
  transition-delay: calc(var(--sm-i, 0) * 55ms + 60ms);
}

@media (prefers-reduced-motion: reduce) {
  .sitemenu__inner > * { opacity: 1; transform: none; }
  .sitemenu.is-open .sitemenu__inner > * { transition: none; }
  .sitemenu__featured { transition: none; }
}
