/* Shared by the RSVP and staff pages: nav bar, string lights, candy-cane ribbon
   and the night-blue band. Colors are literal so it works with either stylesheet. */
/* Nav bar shared by every page (js/nav.js): night blue, with page links and the account */
html { scroll-padding-top: calc(var(--nav-h) + 16px); }
:root { --nav-h: 56px; }
.site-nav {
  position: sticky; top: 0; z-index: 20;
  background: rgb(7 16 40 / 92%); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgb(255 255 255 / 9%); color: #ffffff;
}
.site-nav-inner {
  max-width: 1320px; margin: 0 auto; padding: 0 16px; min-height: var(--nav-h);
  display: flex; align-items: center; gap: 8px 18px;
}
.nav-brand {
  display: inline-flex; align-items: center; gap: 8px; margin-right: auto;
  font-family: var(--font-display); font-weight: 700; font-size: 1.08rem; color: #ffffff; text-decoration: none; white-space: nowrap;
}
.site-nav .nav-brand .i { width: 16px; height: 16px; color: #e8b64c; fill: currentColor; stroke: none; }
.nav-links { display: flex; gap: 2px; }
.nav-links:empty { display: none; }
.nav-links a {
  padding: 7px 12px; border-radius: 999px; font-size: .88rem; font-weight: 600;
  color: rgb(255 255 255 / 72%); text-decoration: none; transition: background .15s ease, color .15s ease;
}
.nav-links a:hover { background: rgb(255 255 255 / 8%); color: #ffffff; }
.nav-links a[aria-current="page"] { background: rgb(232 182 76 / 16%); color: #f8e1a1; }
.nav-account { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: rgb(255 255 255 / 72%); }
.nav-account strong { color: #ffffff; font-weight: 600; }
.nav-account .role { color: #f8e1a1; }
.nav-account .avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px rgb(255 255 255 / 22%); }
.nav-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 14px 6px 11px; border-radius: 999px;
  background: rgb(255 255 255 / 10%); border: 1px solid rgb(255 255 255 / 22%); color: #ffffff;
  font: inherit; font-size: .82rem; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s ease;
}
.site-nav .nav-btn .i { width: 16px; height: 16px; stroke-width: 2; }
.nav-btn:hover { background: rgb(255 255 255 / 20%); color: #ffffff; }
.site-nav a:focus-visible, .nav-btn:focus-visible { outline: 2px solid #e8b64c; outline-offset: 2px; }
@media (max-width: 719px) {
  .site-nav-inner { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .nav-who { display: none; }
  .site-nav-inner { gap: 6px 10px; }
  .nav-brand { font-size: 1rem; }
  .nav-links { order: 3; width: 100%; margin: 0 -12px; }
}

/* String lights along the top of the header */
.lights {
  position: absolute; top: 0; left: 0; right: 0; height: 34px; z-index: 2;
  display: flex; overflow: hidden; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='16'%3E%3Cpath d='M0 3Q22 15 44 3' fill='none' stroke='%23071a10' stroke-width='1.6'/%3E%3C/svg%3E") repeat-x 0 0 / 44px 16px;
}
.bulb { position: relative; flex: none; width: 44px; height: 34px; }
.bulb::before { content: ""; position: absolute; left: 50%; top: 7px; width: 5px; height: 6px; margin-left: -2.5px; border-radius: 1.5px; background: #45564c; }
.bulb::after {
  content: ""; position: absolute; left: 50%; top: 12px; width: 9px; height: 14px; margin-left: -4.5px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; background: var(--c);
  box-shadow: 0 0 10px 2px var(--g), inset -2px -3px 3px rgb(0 0 0 / 15%);
  animation: twinkle var(--t) ease-in-out var(--o) infinite alternate;
}
.bulb.red { --c: #ff5466; --g: rgb(255 84 102 / 60%); }
.bulb.green { --c: #5edc8c; --g: rgb(94 220 140 / 55%); }
.bulb.white { --c: #fffbea; --g: rgb(255 251 234 / 65%); }
@keyframes twinkle { from { opacity: .35; box-shadow: 0 0 2px 0 var(--g); } }


/* Candy-cane rope with snow resting on top */
.ribbon {
  position: relative; height: 22px; margin-top: -6px; z-index: 1;
  background:
    linear-gradient(to bottom, rgb(255 255 255 / 0%) 0%, rgb(255 255 255 / 55%) 22%, rgb(255 255 255 / 0%) 46%, rgb(0 0 0 / 0%) 62%, rgb(80 0 10 / 28%) 100%),
    repeating-linear-gradient(118deg,
      #b71c2c 0 10px, #d43a49 10px 11.5px, #ffffff 11.5px 17px,
      #b71c2c 17px 19px, #ffffff 19px 25px);
  box-shadow: 0 4px 8px -2px rgb(15 44 30 / 30%);
}
.ribbon::before {
  content: ""; position: absolute; left: 0; right: 0; top: -17px; height: 36px;
  background: url("/images/snow-cap.svg") repeat-x 0 0 / 360px 36px;
  filter: drop-shadow(0 1px 1px rgb(15 44 30 / 15%));
}

/* Night-blue band with falling snow, the same sky as the RSVP header */
.night {
  position: relative;
  background:
    radial-gradient(circle at 12% 18%, rgb(255 255 255 / 14%) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 62% 42%, rgb(255 255 255 / 11%) 0 2px, transparent 3px),
    radial-gradient(circle at 36% 78%, rgb(255 255 255 / 9%) 0 1px, transparent 2px),
    radial-gradient(130% 100% at 50% 40%, transparent 55%, rgb(0 0 0 / 38%) 100%),
    radial-gradient(55% 65% at 50% 38%, rgb(60 110 210 / 26%), transparent 72%),
    radial-gradient(38% 60% at 90% 8%, rgb(120 170 255 / 20%), transparent 70%),
    radial-gradient(34% 55% at 8% 96%, rgb(232 182 76 / 13%), transparent 70%),
    linear-gradient(170deg, #12285a 0%, #0a1838 55%, #040b1c 100%);
  background-size: 110px 110px, 150px 150px, 70px 70px, auto, auto, auto, auto, auto;
}
.night::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("/images/snow-a.svg"), url("/images/snow-b.svg");
  background-size: 310px 310px, 470px 470px;
  animation: snowfall 60s linear infinite;
}
@keyframes snowfall {
  from { background-position: 0 0, 0 0; }
  to { background-position: 62px 1240px, -47px 1410px; }
}

/* Staff pages: a short strip of sky and lights under the nav, then the ribbon */
.page-band { height: 46px; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .night::before, .bulb::after { animation: none !important; }
}
