:root {
  --sky: #00BFFF;
  --sky-deep: #007AA8;
  --ink: #04263A;
  --ice: #E8F8FF;
  --white: #FFFFFF;
  --line: rgba(4, 38, 58, .16);
  --grid: rgba(0, 191, 255, .14);

  --font-display: "Unbounded", "Onest", system-ui, sans-serif;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --wrap: 1160px;
  --gutter: clamp(16px, 5vw, 40px);
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
}

body {
  margin: 0;
  font: 400 1.0625rem/1.65 var(--font-body);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: .6em 1em;
  background: var(--ink);
  color: var(--white);
  border-radius: 6px;
}
.skip:focus { top: 12px; }

.wrap {
  width: min(var(--wrap), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

h1, h2, h3 { margin: 0; font-family: var(--font-display); }

h2 {
  font-weight: 600;
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -.01em;
  margin-bottom: .6em;
}

h3 {
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.3;
}

p { margin: 0 0 1em; }

.section { padding-block: clamp(64px, 9vw, 120px); }

.section-lead {
  max-width: 52ch;
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .72em 1.15em;
  font: 600 .95rem/1 var(--font-body);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background-color .12s;
}
.btn:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }

.btn--solid { background: var(--sky); }
.btn--ghost:hover { background: var(--ice); }
.btn--ink { background: var(--ink); color: var(--white); box-shadow: 3px 3px 0 var(--white); }
.btn--ink:hover { box-shadow: 2px 2px 0 var(--white); }
.btn--ink:active { box-shadow: 0 0 0 var(--white); }
.btn--lg { padding: .95em 1.5em; font-size: 1.02rem; }
.btn--sm { padding: .6em .9em; font-size: .88rem; }
.btn--icon { padding: .6em; }

.btn__short { display: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
  padding-inline: var(--gutter);
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand__name { font: 800 1rem/1 var(--font-display); letter-spacing: -.01em; }

.nav { display: flex; gap: clamp(16px, 2.4vw, 32px); }
.nav a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  padding-block: 6px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--sky); }

.header-actions { display: flex; gap: 12px; }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 4vw, 56px);
  padding-block: clamp(28px, 5vw, 72px);
  padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2));
  overflow: hidden;
  background-color: var(--white);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  font-weight: 800;
  font-size: clamp(2.2rem, 5.4vw, 5rem);
  line-height: 1;
  letter-spacing: -.02em;
}
.hero h1 span { display: block; }

.hero__lead {
  max-width: 46ch;
  margin: 1.4rem 0 2rem;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }

.ip-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 1.6rem;
  padding: .6em .7em .6em 1.1em;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  animation: rise .7s .5s cubic-bezier(.2, .8, .2, 1) both;
}
.ip-chip__label {
  font: 600 .8rem/1 var(--font-display);
  color: var(--sky-deep);
  white-space: nowrap;
}
.ip-chip__value {
  font: 600 .98rem/1 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color: var(--ink);
}
.ip-chip__copy { border-radius: 999px; box-shadow: none; padding: .5em .9em; }
.ip-chip__copy:hover { box-shadow: none; background: var(--ice); }
.ip-chip__copy:active { transform: none; }

.ip-chip.is-placeholder { border-style: dashed; box-shadow: none; }
.ip-chip.is-placeholder .ip-chip__value { color: var(--sky-deep); opacity: .7; }
.ip-chip.is-placeholder .ip-chip__copy { opacity: .5; cursor: not-allowed; }

@media (max-width: 460px) {
  .ip-chip { flex-wrap: wrap; border-radius: 12px; }
}

.hero__stage {
  position: relative;
  width: 100%;
  max-width: 660px;
  aspect-ratio: 5 / 4;
  justify-self: end;
}

#gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.stage__shadow {
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 5%;
  height: 7%;
  background: radial-gradient(closest-side, rgba(4, 38, 58, .2), transparent);
  filter: blur(6px);
}

.stage__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage__svg .g {
  stroke: var(--ink);
  stroke-width: .05;
  stroke-linejoin: round;
  transform-box: fill-box;
  transform-origin: center;
}
.stage__svg .g--big { fill: var(--sky); animation: spin 24s linear infinite; }
.stage__svg .g--small { fill: var(--white); animation: spin 12s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

@keyframes rise {
  from { transform: translateY(.5em); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.hero h1 span { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.hero h1 span:nth-child(2) { animation-delay: .12s; }
.hero__lead { animation: rise .7s .3s cubic-bezier(.2, .8, .2, 1) both; }
.hero__actions { animation: rise .7s .42s cubic-bezier(.2, .8, .2, 1) both; }

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.about__text p { max-width: 56ch; }

.facts { margin: 0; }
.facts__row {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 16px;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}
.facts__row:last-child { border-bottom: 1px solid var(--line); }
.facts dt {
  font: 600 .85rem/1.6 var(--font-display);
  color: var(--sky-deep);
}
.facts dd { margin: 0; }

.launcher { background: var(--sky); }

.launcher__grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.launcher__copy p { max-width: 44ch; margin-bottom: 1.8rem; }

.alt-dl {
  margin: .9rem 0 0;
  font-size: .92rem;
}
.alt-dl a {
  color: var(--sky-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.alt-dl a:hover { color: var(--ink); }
.alt-dl--ink a { color: var(--ink); }
.alt-dl--ink a:hover { color: var(--white); }

.alt-dl button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.alt-dl a,
.alt-dl button { color: var(--sky-deep); }
.alt-dl a:hover,
.alt-dl button:hover { color: var(--ink); }
.alt-dl--ink a,
.alt-dl--ink button { color: var(--ink); }
.alt-dl--ink a:hover,
.alt-dl--ink button:hover { color: var(--white); }

.alt-dl__sep { opacity: .5; }

.modal {
  width: min(480px, 92vw);
  max-width: none;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
}
.modal::backdrop { background: rgba(4, 38, 58, .55); }

.modal__inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(24px, 4vw, 32px);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 8px 8px 0 var(--ink);
}
.modal__inner h3 { font-size: 1.25rem; }
.modal__inner p { margin: 0; max-width: 40ch; }
.modal__inner code {
  padding: .1em .4em;
  font: 600 .95em/1 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  background: var(--ice);
  border-radius: 4px;
}

.modal__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.tilt-scene { padding: 24px 8px 24px 0; }

.shot {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--ice);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 8px 8px 0 var(--ink);
  transition: transform .18s ease-out;
  will-change: transform;
}
.shot img { display: block; width: 100%; height: 100%; object-fit: cover; }

.shot__empty {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  font: 600 .95rem/1.3 var(--font-display);
  color: var(--ink);
  pointer-events: none;
}
.shot__empty small { font: 400 .8rem/1.3 var(--font-body); color: var(--sky-deep); }

.shot.is-empty img { display: none; }
.shot.is-empty .shot__empty { display: flex; }

.screens__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}
.screens__nav { display: flex; gap: 12px; }

.gallery {
  display: flex;
  gap: clamp(20px, 3vw, 36px);
  padding: 12px max(var(--gutter), calc((100% - var(--wrap)) / 2)) 40px;
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--wrap)) / 2));
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--sky) var(--ice);
}
.gallery .shot { flex: 0 0 min(78vw, 540px); scroll-snap-align: start; }

.shot__open {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.shot.is-empty .shot__open { cursor: default; }

.start { background: var(--ice); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 72px 32px 0 0;
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  font: 800 1.3rem/1 var(--font-display);
  color: var(--ink);
  background: var(--sky);
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: 3px 3px 0 var(--ink);
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 26px;
  left: 72px;
  right: 20px;
  border-top: 2px dashed var(--ink);
  opacity: .45;
}
.steps p { margin: .5rem 0 0; max-width: 32ch; }

.ip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 48px 0 0;
}
.ip code {
  padding: .45em .8em;
  font: 500 1rem/1 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 6px;
}

.links { background: var(--sky); }

.ip-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding: 24px 28px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 6px 6px 0 var(--ink);
}
.ip-card__text { display: flex; flex-direction: column; gap: .15rem; }
.ip-card__text strong { font: 700 1.1rem/1.3 var(--font-display); }
.ip-card__text span { font-size: .92rem; color: var(--sky-deep); }

.ip-card__value { display: flex; align-items: center; gap: 10px; }
.ip-card__value code {
  padding: .5em .9em;
  font: 600 1.05rem/1 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  background: var(--ice);
  border: 2px solid var(--ink);
  border-radius: 6px;
}

.ip-card.is-placeholder { border-style: dashed; box-shadow: none; }
.ip-card.is-placeholder .ip-card__value code { color: var(--sky-deep); opacity: .7; }
.ip-card.is-placeholder .ip-card__value .btn { opacity: .5; cursor: not-allowed; }

@media (max-width: 560px) {
  .ip-card { padding: 20px; }
  .ip-card__value { width: 100%; }
  .ip-card__value code { flex: 1; }
}

.links__primary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  margin-top: 28px;
}

.bigl {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 28px 28px 32px;
  color: var(--ink);
  text-decoration: none;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.bigl strong { font: 700 clamp(1.3rem, 2.4vw, 1.7rem)/1.2 var(--font-display); }
.bigl:hover { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--ink); }

.bigl--donate {
  color: var(--white);
  background: var(--ink);
  box-shadow: 6px 6px 0 var(--white);
}
.bigl--donate:hover { box-shadow: 4px 4px 0 var(--white); }
.bigl--donate:focus-visible { outline-color: var(--white); }

.links__social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}
.pill {
  display: inline-block;
  padding: .6em 1.1em;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border: 2px solid var(--ink);
  border-radius: 6px;
  transition: background-color .12s;
}
.pill:hover { background: var(--white); }

.footer { padding-block: 32px; font-size: .9rem; border-top: 1px solid var(--line); }
.footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
}
.footer p { margin: 0; }
.footer p + p { max-width: 62ch; }

.lightbox {
  width: min(1200px, 94vw);
  max-width: none;
  padding: 0;
  overflow: visible;
  color: var(--white);
  background: transparent;
  border: 0;
}
.lightbox::backdrop { background: rgba(4, 38, 58, .88); }
.lightbox__inner { display: flex; flex-direction: column; gap: 14px; }
.lightbox img {
  display: block;
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  background: var(--ink);
  border: 2px solid var(--white);
  border-radius: 6px;
}
.lightbox__bar { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px; }
.lightbox .btn { box-shadow: 3px 3px 0 var(--sky); }
.lightbox :focus-visible { outline-color: var(--white); }

.rules-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  color: var(--sky-deep);
  font-weight: 600;
  text-decoration: none;
}
.rules-back:hover { color: var(--ink); }

.rules-hero {
  padding-block: clamp(40px, 7vw, 76px) clamp(24px, 4vw, 40px);
  background-color: var(--white);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  border-bottom: 1px solid var(--line);
}
.rules-hero h1 {
  font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -.02em;
}
.rules-hero__lead {
  max-width: 60ch;
  margin: 1.1rem 0 0;
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 8px;
}
.rules-grid .bigl { height: 100%; }

.rule-groups { display: flex; flex-direction: column; gap: clamp(40px, 6vw, 64px); }

.rule-group__head { max-width: 62ch; margin-bottom: 1.4rem; }
.rule-group__head h2 { margin-bottom: .3rem; }
.rule-group__head p { margin: 0; color: var(--sky-deep); }

.rule-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rule;
}
.rule-list li {
  position: relative;
  padding: 14px 20px 14px 58px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--ink);
  counter-increment: rule;
}
.rule-list li::before {
  content: counter(rule);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font: 700 .95rem/1 var(--font-display);
  color: var(--ink);
  background: var(--sky);
  border: 2px solid var(--ink);
  border-radius: 6px;
}
.rule-list li.is-placeholder { color: var(--sky-deep); font-style: italic; border-style: dashed; box-shadow: none; }

.rule-table-wrap { overflow-x: auto; border: 2px solid var(--ink); border-radius: 8px; box-shadow: 4px 4px 0 var(--ink); }
.rule-table { width: 100%; border-collapse: collapse; min-width: 420px; background: var(--white); }
.rule-table th,
.rule-table td { padding: .85em 1.1em; text-align: left; border-bottom: 1px solid var(--line); }
.rule-table thead th {
  font: 600 .82rem/1.2 var(--font-display);
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--sky-deep);
  background: var(--ice);
}
.rule-table tbody tr:last-child td { border-bottom: 0; }
.rule-table td.is-placeholder { color: var(--sky-deep); font-style: italic; }

@media (max-width: 860px) {
  .rules-grid { grid-template-columns: 1fr; }
}

@media (min-width: 861px) {
  .hero { min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h)); }
}

@media (max-width: 860px) {
  .nav { display: none; }

  .hero { grid-template-columns: 1fr; }
  .hero__stage { order: -1; max-width: 460px; justify-self: center; }

  .about__grid,
  .launcher__grid { grid-template-columns: 1fr; }
  .tilt-scene { padding-right: 0; }

  .steps { grid-template-columns: 1fr; gap: 36px; }
  .steps li { padding: 0 0 0 76px; min-height: 52px; }
  .steps li:not(:last-child)::after { display: none; }

  .links__primary { grid-template-columns: 1fr; }
  .screens__head { align-items: flex-start; flex-direction: column; margin-bottom: 28px; }
}

@media (max-width: 560px) {
  .btn__long { display: none; }
  .btn__short { display: inline; }
  .facts__row { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 460px) {
  .brand__name { display: none; }
  .hero__actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}
