/* GPS Fest 2026 refresh: shared header and footer.
 *
 * Loaded on every page. Pages outside the refresh still load the Tailwind
 * build, so everything here uses gr-* classes, scopes its tokens to the two
 * landmarks, and sets the properties Tailwind's base layer would otherwise
 * decide. */

.gr-header,
.gr-footer {
  --teal: #218197;
  --teal-deep: #134b5a;
  --yellow: #ffcb03;
  --cyan: #b1fcf9;
  --lavender: #d5afd5;
  --cream: #faf1de;
  --white: #ffffff;
  --ink: #2b2e34;
  --font-display: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --wave-h: clamp(28px, 4.5vw, 64px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --squiggle-rule: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 6'%3E%3Cpath d='M0 3C4 0 8 0 12 3S20 6 24 3' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E");
  --wave-a: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 64' preserveAspectRatio='none'%3E%3Cpath d='M0 36C110 18 230 8 380 20S650 60 820 48 1090 6 1250 12 1400 34 1440 32V64H0Z'/%3E%3C/svg%3E");
  --wave-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 64' preserveAspectRatio='none'%3E%3Cpath d='M0 22C150 40 300 54 470 42S760 6 930 14 1230 54 1440 30V64H0Z'/%3E%3C/svg%3E");
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

:is(.gr-header, .gr-footer) *,
:is(.gr-header, .gr-footer) *::before,
:is(.gr-header, .gr-footer) *::after {
  box-sizing: border-box;
}

:is(.gr-header, .gr-footer) :focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 4px;
}

:is(.gr-header, .gr-footer) img {
  display: block;
  max-width: 100%;
  height: auto;
}

.gr-wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.gr-skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: #ffcb03;
  color: #2b2e34;
  font-weight: 600;
  text-decoration: none;
  &:focus {
    top: 1rem;
  }
}

.gr-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------------------------------------------------------------
 * Header
 *
 * Refreshed pages paint lavender on the body so the first section's wave
 * can dip under the header; elsewhere the header carries its own color.
 * ------------------------------------------------------------- */

.gr-header {
  --tail: 0px;
  position: relative;
  z-index: 20;
  padding-block: 1.1rem calc(1.1rem + var(--tail));
  background: var(--lavender);
  color: var(--ink);
}

.gpsr-page .gr-header {
  --tail: var(--wave-h);
  background: none;
}

.gr-header .gr-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.gr-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: inherit;
  text-decoration: none;
}

.gr-brand > img {
  height: clamp(2.6rem, 4vw, 3.4rem);
  width: auto;
}

.gr-presented {
  display: none;
  padding-left: 1rem;
  border-left: 1px solid rgb(43 46 52 / 0.3);
  @media (min-width: 560px) {
    display: block;
  }
}

.gr-presented span {
  display: block;
  font-family: var(--font-display);
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

.gr-presented img {
  height: 1.35rem;
  width: auto;
  margin-top: 0.2rem;
}

.gr-nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.6rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  font: 600 0.95rem/normal var(--font-display);
  color: var(--ink);
  cursor: pointer;
  @media (min-width: 1000px) {
    display: none;
  }
}

.gr-nav {
  display: none;
  @media (min-width: 1000px) {
    display: block;
  }
}

.gr-header.is-open .gr-nav {
  display: block;
  position: absolute;
  inset: 100% var(--gutter) auto;
  margin-top: calc(var(--tail) * -1 + 0.5rem);
  padding: 1rem 1.25rem;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 6px 6px 0 var(--ink);
  @media (min-width: 1000px) {
    position: static;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }
}

.gr-menu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  @media (min-width: 1000px) {
    flex-direction: row;
    align-items: center;
  }
}

.gr-menu li {
  margin: 0;
}

.gr-menu a {
  display: block;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.65;
  text-decoration: none;
  color: var(--teal-deep);
  transition: background-color 200ms ease;
  &:hover {
    background: rgb(255 255 255 / 0.55);
    color: var(--teal-deep);
  }
  &[aria-current="page"] {
    background: var(--white);
    box-shadow: inset 0 0 0 2px var(--ink);
  }
}

.gr-menu .has-sub {
  position: relative;
}

.gr-menu .has-sub > a::after {
  content: " ▾";
}

.gr-sub {
  margin: 0 0 0.5rem 0.8rem;
  padding: 0;
  list-style: none;
  @media (min-width: 1000px) {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 13rem;
    margin: 0;
    padding: 0.5rem;
    border: 2px solid var(--ink);
    border-radius: 16px;
    background: var(--white);
    box-shadow: 5px 5px 0 var(--ink);
    opacity: 0;
    visibility: hidden;
    translate: 0 6px;
    transition:
      opacity 200ms ease,
      translate 200ms var(--ease-out),
      visibility 200ms;
  }
}

.gr-menu .has-sub:hover > .gr-sub,
.gr-menu .has-sub:focus-within > .gr-sub {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
}

.gr-sub a {
  font-weight: 500;
  &:hover {
    background: var(--cream);
  }
}

/* ---------------------------------------------------------------
 * Footer: a teal band that cuts its own wavy top edge
 * ------------------------------------------------------------- */

.gr-footer {
  --pad: clamp(4rem, 7vw, 5.5rem);
  --line: rgb(255 255 255 / 0.42);
  position: relative;
  margin-top: calc(var(--wave-h) * -1);
  padding-block: calc(var(--pad) + var(--wave-h)) var(--pad);
  background: var(--teal);
  color: var(--white);
  -webkit-mask:
    var(--footer-wave, var(--wave-a)) top / 100% var(--wave-h) no-repeat,
    linear-gradient(#000 0 0) 0 calc(var(--wave-h) - 1px) / 100% calc(100% - var(--wave-h) + 1px) no-repeat;
  mask:
    var(--footer-wave, var(--wave-a)) top / 100% var(--wave-h) no-repeat,
    linear-gradient(#000 0 0) 0 calc(var(--wave-h) - 1px) / 100% calc(100% - var(--wave-h) + 1px) no-repeat;
}

.gr-footer p {
  margin: 0;
}

.gr-footer--alt {
  --footer-wave: var(--wave-b);
}

.gr-footer-grid {
  display: grid;
  gap: 2.5rem;
  @media (min-width: 800px) {
    grid-template-columns: 5fr 3.5fr 3.5fr;
  }
}

.gr-footer-logo {
  display: block;
  width: fit-content;
}

.gr-footer-logo img {
  height: 4.75rem;
  width: auto;
  padding: 0.5rem 0.9rem;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--cream);
  box-shadow: 4px 4px 0 var(--ink);
}

.gr-footer-presented {
  margin-top: 1.25rem;
}

.gr-footer-presented span {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gr-footer-presented img {
  height: 1.5rem;
  width: auto;
  margin-top: 0.35rem;
  filter: invert(1);
}

.gr-footer-tagline {
  max-width: 18rem;
  margin-top: 1.25rem !important;
  color: rgb(255 255 255 / 0.82);
}

.gr-footer h2 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.gr-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.gr-footer li + li {
  margin-top: 0.6rem;
}

.gr-footer a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgb(255 255 255 / 0.4);
  text-underline-offset: 0.25em;
  &:hover {
    color: inherit;
    text-decoration-color: currentColor;
  }
}

.gr-footer-bottom {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.75);
  &::before {
    content: "";
    position: absolute;
    top: -3px;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--line);
    -webkit-mask: var(--squiggle-rule) left center / 24px 6px repeat-x;
    mask: var(--squiggle-rule) left center / 24px 6px repeat-x;
  }
}
