:root {
  --bg: #050711;
  --panel: rgba(5, 7, 17, 0.58);
  --panel-strong: rgba(5, 7, 17, 0.78);
  --line: rgba(255, 255, 255, 0.13);
  --line-soft: rgba(255, 255, 255, 0.08);
  --text: #f5f5f5;
  --muted: #c9d1d7;
  --dim: #8f9aa4;
  --green: #35c26b;
  --green-dark: #163d2a;
  --orange: #9a4b18;
  --blue: #1d4268;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 72% 18%, rgba(53, 194, 107, 0.12), transparent 26rem),
    radial-gradient(circle at 15% 72%, rgba(29, 66, 104, 0.24), transparent 28rem),
    #050711;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

.static-galaxy-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.92;
}

.static-galaxy-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 183, 91, 0.07), transparent 32%),
    radial-gradient(circle at 50% 80%, rgba(214, 85, 152, 0.045), transparent 38%),
    linear-gradient(180deg, rgba(5, 7, 17, 0.1), rgba(5, 7, 17, 0.36));
}

.static-galaxy-svg {
  position: relative;
  width: min(64vmin, 620px);
  height: auto;
  max-width: 68vw;
  max-height: 78dvh;
  overflow: visible;
  opacity: 0.92;
  filter: saturate(1.1);
}

.static-galaxy-rotor {
  transform-box: view-box;
  transform-origin: 120px 118px;
  animation: staticGalaxyTurn 58s linear infinite;
}

.static-galaxy-core {
  opacity: 0.94;
  filter: url("#staticGalaxyGlow");
}

.static-galaxy-arm {
  fill: none;
  stroke-linecap: round;
  stroke-width: 1.65;
  filter: url("#staticGalaxyGlow");
  opacity: 0.36;
}

.static-galaxy-arm-warm {
  stroke: rgba(255, 188, 92, 0.72);
}

.static-galaxy-arm-pink {
  stroke: rgba(255, 104, 148, 0.86);
}

.static-galaxy-particles {
  filter: none;
}

.static-galaxy-particle {
  transform-box: fill-box;
  transform-origin: center;
  animation: staticGalaxyTwinkle 4.8s ease-in-out infinite;
}

@keyframes staticGalaxyTurn {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes staticGalaxyTwinkle {
  0%,
  100% {
    opacity: 0.28;
    transform: scale(0.76) translateY(0);
  }
  48% {
    opacity: 0.78;
    transform: scale(1.08) translateY(1px);
  }
}

@media (max-width: 820px) {
  .static-galaxy-svg {
    width: min(78vmin, 520px);
    max-width: 86vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .static-galaxy-rotor,
  .static-galaxy-particle {
    animation: none;
  }
}

a {
  color: inherit;
}

.page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 76px clamp(18px, 4vw, 54px) 34px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 52px;
  padding: 0 20px;
  background: #001A38;
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: none;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.mobile-menu-toggle {
  display: none;
}

.mobile-donate-link {
  display: none;
}

.nav a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 0.82rem;
  line-height: 1;
  white-space: nowrap;
}

.nav .auth-link {
  min-width: 4.4rem;
  text-align: center;
}

@media (hover: hover) and (pointer: fine) {
  .nav .auth-link:hover,
  .nav .auth-link:focus-visible {
    font-size: 0;
  }

  .nav .auth-link:hover::after,
  .nav .auth-link:focus-visible::after {
    content: attr(data-rollover);
    font-size: 0.82rem;
  }
}

.nav .waf-link {
  color: #f3c45f;
  font-weight: 850;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(243, 196, 95, 0.34);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: #fff;
}

.nav .waf-link:hover,
.nav .waf-link[aria-current="page"] {
  color: #ffd978;
}

.nav .donate {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 0.95rem;
  border-radius: 999px;
  background: var(--green);
  color: #041010;
  font-weight: 800;
}

.hero-grid {
  min-height: calc(100vh - 112px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.88fr);
  gap: clamp(28px, 6vw, 86px);
  align-items: center;
}

.hero-copy {
  max-width: 780px;
}

.kicker {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1rem, 1.35vw, 1.22rem);
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0 0 1rem;
  max-width: 15ch;
  font-size: clamp(3.25rem, 6.4vw, 5.75rem);
  line-height: 0.96;
  font-weight: 600;
}

h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.55rem, 2.45vw, 2.2rem);
  line-height: 1.04;
  font-weight: 540;
}

h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.16rem);
  line-height: 1.62;
}

.lede {
  max-width: 62ch;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: #fff;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.045);
}

.button.primary {
  background: var(--green);
  border-color: var(--green);
  color: #041010;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(5px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}

.panel.pad {
  padding: clamp(22px, 4vw, 40px);
}

.media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #050711;
}

.media-frame iframe,
.media-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.media-fullscreen-toggle {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 6;
  min-width: 2.55rem;
  min-height: 2.55rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(5, 7, 17, 0.7);
  color: #fff;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.media-fullscreen-toggle:hover,
.media-fullscreen-toggle:focus-visible {
  background: rgba(53, 194, 107, 0.86);
  color: #041010;
  outline: none;
}

.media-fullscreen-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
}

.media-frame:fullscreen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border-radius: 0;
  background: #000;
}

.media-frame:fullscreen iframe,
.media-frame:fullscreen video,
.media-frame:fullscreen .waf-slide {
  width: 100%;
  height: 100%;
}

.shader-globe {
  position: relative;
  width: min(100%, 560px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.34), transparent 42%, rgba(0, 0, 0, 0.72) 78%),
    url("/textures/earth_day.png") center / cover;
  box-shadow:
    inset -52px -24px 80px rgba(0, 0, 0, 0.72),
    inset 22px 12px 48px rgba(255, 220, 175, 0.18),
    0 0 56px rgba(29, 66, 104, 0.36),
    0 0 120px rgba(53, 194, 107, 0.08);
  transform: rotate(-10deg);
}

.shader-globe::before {
  content: "";
  position: absolute;
  inset: -1%;
  background: url("/textures/earth_clouds.png") center / cover;
  opacity: 0.34;
  mix-blend-mode: screen;
  animation: cloudDrift 48s linear infinite;
}

.shader-globe::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 26% 22%, rgba(255, 241, 210, 0.48), transparent 18%),
    radial-gradient(circle at 70% 52%, transparent 0 38%, rgba(0, 0, 0, 0.84) 62%, rgba(0, 0, 0, 0.96) 100%),
    linear-gradient(90deg, rgba(255, 145, 62, 0.14), transparent 38%, rgba(28, 67, 106, 0.24));
}

.shader-globe .rings {
  position: absolute;
  inset: -7%;
  border-radius: 50%;
  border: 1px solid rgba(53, 194, 107, 0.3);
  box-shadow: 0 0 26px rgba(53, 194, 107, 0.12);
}

@keyframes cloudDrift {
  to {
    transform: rotate(360deg);
  }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.card {
  padding: 1.2rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.icon {
  width: 30px;
  height: 30px;
  margin-bottom: 0.85rem;
  color: var(--green);
}

.form-grid {
  display: grid;
  gap: 0.9rem;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

label {
  display: grid;
  gap: 0.38rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.78rem 0.85rem;
  background: rgba(0, 0, 0, 0.24);
  color: #fff;
  font: inherit;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

fieldset {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem;
}

legend {
  padding: 0 0.35rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 800;
}

.choice-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.choice-row input {
  width: auto;
}

.conditional-field {
  display: grid;
  gap: 0.65rem;
  background: rgba(53, 194, 107, 0.08);
}

.conditional-field[hidden] {
  display: none;
}

.submit-panel {
  margin-top: 1rem;
}

.submit-form {
  margin-top: 1.2rem;
}

.consent-row {
  color: rgba(255, 255, 255, 0.78);
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.tier {
  display: block;
}

.tier input {
  position: absolute;
  opacity: 0;
}

.tier span {
  display: grid;
  gap: 0.15rem;
  min-height: 78px;
  align-content: center;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
}

.tier strong {
  color: #fff;
  font-size: 1.1rem;
}

.tier input:checked + span {
  border-color: var(--green);
  background: rgba(53, 194, 107, 0.12);
}

.notice {
  margin-top: 1rem;
  color: var(--dim);
  font-size: 0.86rem;
}

.thanks-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 42px);
  background: rgba(0, 4, 12, 0.72);
  backdrop-filter: blur(8px);
}

.thanks-modal {
  width: min(100%, 520px);
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(5, 7, 17, 0.94);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52);
}

.thanks-modal h2 {
  max-width: 16ch;
}

.thanks-modal .button {
  margin-top: 1.35rem;
}

.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 42px);
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(8px);
}

.auth-modal {
  position: relative;
  width: min(100%, 520px);
  max-height: min(88dvh, 760px);
  overflow-y: auto;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(5, 7, 17, 0.94);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52);
}

.auth-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.66);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
}

.auth-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.auth-modal-kicker {
  margin: 0 0 0.6rem;
  color: var(--dim);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-modal h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.45rem, 3.8vw, 2.2rem);
  line-height: 1.05;
}

.auth-modal-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.auth-modal-tabs button,
.auth-modal-google,
.auth-modal-submit {
  min-height: 42px;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.auth-modal-tabs button {
  border: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.04);
}

.auth-modal-tabs button.active {
  color: #041010;
  border-color: var(--green);
  background: var(--green);
}

.auth-modal-google {
  width: 100%;
  margin-bottom: 0.9rem;
  border: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.05);
}

.auth-modal-form {
  display: grid;
  gap: 0.75rem;
}

.auth-modal-form label {
  display: grid;
  gap: 0.35rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
}

.auth-modal-form input {
  min-height: 42px;
  width: 100%;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(0, 0, 0, 0.28);
  font: inherit;
}

.auth-modal-submit {
  margin-top: 0.2rem;
  border: 1px solid var(--green);
  color: #041010;
  background: var(--green);
}

.auth-modal-status {
  min-height: 1.2em;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
  color: var(--dim);
  font-size: 0.82rem;
}

@media (max-width: 820px) {
  .page-shell {
    padding-top: 64px;
  }

  .site-header {
    align-items: center;
    height: auto;
    min-height: 0;
    gap: 0.75rem;
    padding: max(8px, env(safe-area-inset-top)) 12px 0;
    background: transparent;
    border-bottom: 0;
    pointer-events: none;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    position: relative;
    z-index: 32;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    margin-left: 0;
    border: 1px solid rgba(245, 245, 245, 0.28);
    border-radius: 999px;
    background: rgba(0, 10, 24, 0.48);
    color: #f5f5f5;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    cursor: pointer;
    pointer-events: auto;
  }

  .mobile-donate-link {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 0 13px;
    border: 1px solid rgba(53, 194, 107, 0.9);
    border-radius: 999px;
    background: var(--green);
    color: #041010;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    pointer-events: auto;
  }

  .mobile-menu-toggle span,
  .mobile-menu-toggle::before,
  .mobile-menu-toggle::after {
    content: "";
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .mobile-menu-toggle span {
    position: relative;
  }

  .mobile-menu-toggle::before,
  .mobile-menu-toggle::after {
    position: absolute;
  }

  .mobile-menu-toggle::before {
    transform: translateY(-6px);
  }

  .mobile-menu-toggle::after {
    transform: translateY(6px);
  }

  .site-header.nav-open .mobile-menu-toggle span {
    opacity: 0;
  }

  .site-header.nav-open .mobile-menu-toggle::before {
    transform: rotate(45deg);
  }

  .site-header.nav-open .mobile-menu-toggle::after {
    transform: rotate(-45deg);
  }

  .nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 12px;
    left: auto;
    z-index: 31;
    display: none;
    width: min(220px, calc(100vw - 32px));
    max-height: calc(100dvh - 72px);
    padding: 10px;
    gap: 4px;
    overflow-y: auto;
    border: 1px solid rgba(245, 245, 245, 0.18);
    border-radius: 18px;
    background: rgba(0, 14, 32, 0.9);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(14px);
    flex-direction: column;
    align-items: stretch;
    pointer-events: auto;
  }

  .site-header.nav-open .nav {
    display: flex;
  }

  .nav a,
  .nav a[aria-current="page"],
  .nav .donate {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 44px;
    width: 100%;
    padding: 0 12px;
    border-radius: 12px;
    white-space: normal;
    font-size: 0.92rem;
    font-weight: 700;
  }

  .nav .auth-link {
    min-width: 0;
    text-align: left;
  }

  .nav a:hover,
  .nav a[aria-current="page"] {
    background: rgba(255, 255, 255, 0.08);
  }

  .nav .donate {
    display: none;
  }

  .brand {
    max-width: calc(100vw - 130px);
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 10px 0;
    font-size: 0.92rem;
    line-height: 1;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.72);
    pointer-events: auto;
  }

  .hero-grid,
  .card-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    min-height: auto;
  }

  .kicker {
    font-size: clamp(0.95rem, 4vw, 1.12rem);
  }

  h1 {
    max-width: 14ch;
    font-size: clamp(2.65rem, 11vw, 4.15rem);
  }

  h2 {
    font-size: clamp(1.35rem, 6vw, 1.95rem);
  }

  .tier-grid {
    grid-template-columns: 1fr 1fr;
  }
}
