@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/cormorant-garamond-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/cormorant-garamond-italic-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night-abyss: #03060d;
  --night-deep: #050a16;
  --night: #081328;
  --night-soft: #0c1d36;
  --night-lift: #12294a;
  --ice: #e6f0ff;
  --ice-2: #c3d9f5;
  --ice-dim: #93aed2;
  --ice-muted: #7c96b8;
  --cyan: #9fdcff;
  --cyan-mid: #6fc0f2;
  --cyan-deep: #3f93c9;
  --steel: #2f4c73;
  --steel-soft: #223a58;
  --page-gutter: 1.05rem;
  --page-width: 28rem;
  --display: "Cormorant Garamond", "Bodoni MT", Didot, Georgia, "Times New Roman", serif;
  --body: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--night-abyss);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  background:
    radial-gradient(120% 46% at 50% -8%, #102c4c 0%, rgba(9, 22, 40, 0) 62%),
    radial-gradient(100% 44% at 50% 104%, #0d2440 0%, rgba(6, 14, 26, 0) 72%),
    linear-gradient(180deg, #050a16 0%, #060d1c 46%, #04080f 100%);
  color: var(--ice);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Fine snow and a cold vignette behind the card. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body::before {
  background-image:
    radial-gradient(circle at 6% 15%, rgba(214, 235, 255, 0.5) 0 1.1px, transparent 2px),
    radial-gradient(circle at 16% 8%, rgba(198, 226, 255, 0.34) 0 0.9px, transparent 1.8px),
    radial-gradient(circle at 3% 33%, rgba(214, 235, 255, 0.3) 0 1.4px, transparent 2.4px),
    radial-gradient(circle at 94% 12%, rgba(214, 235, 255, 0.42) 0 1.2px, transparent 2.1px),
    radial-gradient(circle at 87% 26%, rgba(198, 226, 255, 0.28) 0 0.9px, transparent 1.8px),
    radial-gradient(circle at 98% 43%, rgba(214, 235, 255, 0.26) 0 1.3px, transparent 2.2px),
    radial-gradient(circle at 9% 62%, rgba(214, 235, 255, 0.22) 0 1.1px, transparent 2px),
    radial-gradient(circle at 92% 71%, rgba(214, 235, 255, 0.22) 0 1px, transparent 1.9px),
    radial-gradient(circle at 14% 87%, rgba(214, 235, 255, 0.3) 0 1.4px, transparent 2.4px),
    radial-gradient(circle at 83% 93%, rgba(214, 235, 255, 0.3) 0 1.2px, transparent 2.2px),
    radial-gradient(circle at 47% 97%, rgba(214, 235, 255, 0.2) 0 1.6px, transparent 2.7px);
  opacity: 0.75;
}

body::after {
  background:
    radial-gradient(72% 46% at 50% 26%, rgba(110, 168, 240, 0.07) 0%, transparent 72%),
    radial-gradient(130% 95% at 50% 44%, transparent 50%, rgba(1, 4, 9, 0.55) 100%);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.page {
  position: relative;
  z-index: 1;
  width: min(100%, var(--page-width));
  margin: 0 auto;
  padding: 0 var(--page-gutter) 0;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  text-align: center;
}

.hero__sky {
  position: relative;
  width: calc(100% + var(--page-gutter) * 2);
  margin-left: calc(var(--page-gutter) * -1);
  border-radius: 0 0 0.6rem 0.6rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 58%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 58%, transparent 100%);
}

.hero__sky-svg {
  display: block;
  width: 100%;
  height: auto;
  background: linear-gradient(180deg, #050a16 0%, #0a1830 58%, #0e2448 100%);
}

/* The silhouettes read as cut-outs against the moon, with a faint rim light. */
.flight {
  color: #04070f;
  filter: drop-shadow(0 0 5px rgba(150, 200, 255, 0.3));
}

.hero__kicker {
  position: relative;
  z-index: 1;
  margin: 0.15rem 0 0;
  background: linear-gradient(180deg, #f2f8ff 6%, #b9d6f7 52%, #6f9fd0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--ice);
  font-family: var(--display);
  font-size: clamp(1rem, 4vw, 1.15rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(214, 238, 255, 0.12);
}

.hero__headline {
  position: relative;
  z-index: 1;
  margin: 0.15rem 0 0;
  background: linear-gradient(180deg, #f4f9ff 4%, #cfe4ff 46%, #86b8ea 82%, #5d90c4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: #d8e9ff;
  font-family: var(--display);
  font-size: clamp(1.22rem, 6.7vw, 1.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.055em;
  text-indent: 0.055em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow:
    0 1px 0 rgba(220, 240, 255, 0.16),
    0 0 18px rgba(90, 160, 230, 0.35);
}

.hero__subtitle {
  position: relative;
  z-index: 1;
  max-width: 18rem;
  margin: 0.35rem auto 0;
  color: #d3e4f9;
  font-family: var(--display);
  font-size: clamp(0.92rem, 4.05vw, 1.05rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-align: center;
  text-shadow:
    0 1px 0 rgba(214, 238, 255, 0.12),
    0 4px 14px rgba(2, 6, 14, 0.5);
}

.hero__rule {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: min(8.4rem, 42%);
  margin: 0.55rem auto 0.8rem;
}

.hero__rule-line {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(140, 190, 245, 0.18) 25%, #7fb6ec);
}

.hero__rule-line:last-child {
  background: linear-gradient(90deg, #7fb6ec, rgba(140, 190, 245, 0.18) 75%, transparent);
}

.hero__rule-star {
  width: 0.7rem;
  height: 0.7rem;
  flex: none;
  color: #d7ecff;
  filter: drop-shadow(0 0 5px rgba(150, 210, 255, 0.7));
}

/* ---------- Passport card ---------- */

.passport {
  position: relative;
  padding: 1.55rem 0.95rem 1.05rem;
  border: 1.5px solid rgba(166, 204, 250, 0.42);
  border-radius: 1.5rem;
  background:
    radial-gradient(112% 58% at 50% -10%, rgba(86, 143, 210, 0.24) 0%, rgba(8, 18, 34, 0) 62%),
    linear-gradient(180deg, #0c1c33 0%, #091426 56%, #060d1a 100%);
  box-shadow:
    0 1.8rem 3.6rem rgba(0, 2, 6, 0.72),
    0 0.5rem 1.2rem rgba(0, 2, 6, 0.5),
    0 0 0 1px rgba(126, 180, 240, 0.12),
    0 0 2.6rem rgba(52, 118, 190, 0.18),
    inset 0 1px 0 rgba(190, 222, 255, 0.14);
}

.passport__title {
  margin: 0;
  color: #eef5ff;
  font-family: var(--display);
  font-size: clamp(1.65rem, 8vw, 2.35rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.012em;
  text-align: center;
  text-wrap: balance;
}

.passport__title em {
  font-weight: 400;
}

.passport__lede {
  margin: 0.32rem 0 0;
  color: var(--ice-dim);
  font-family: var(--body);
  font-size: clamp(0.86rem, 3.6vw, 0.98rem);
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
}

.progress {
  display: flex;
  gap: 0.34rem;
  margin: 0.78rem 0 0.92rem;
  padding: 0;
}

.progress__segment {
  height: 0.32rem;
  flex: 1;
  border-radius: 999px;
  background: #101f33;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(120, 165, 220, 0.08);
}

.progress__segment--done {
  background: linear-gradient(180deg, #eaf5ff 0%, #a8d3f8 44%, #6aaee4 70%, #b7dcff 100%);
  box-shadow:
    inset 0 0.5px 0 rgba(255, 255, 255, 0.7),
    0 0 0.5rem rgba(120, 190, 250, 0.5);
}

/* ---------- Mission grid ---------- */

.missions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 0.5rem;
  row-gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mission {
  min-width: 0;
}

/* Each frame opens that mission's page; the frame and the name share one
   link so the whole tile is one target. */
.mission__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.mission__link .mission__frame {
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.mission__link:hover .mission__frame {
  border-color: #bfe4ff;
  box-shadow:
    0 0 0 1px rgba(150, 196, 246, 0.28),
    0 6px 16px rgba(0, 3, 8, 0.6),
    0 0 1.5rem rgba(120, 190, 250, 0.34);
}

.mission__link:hover .mission__name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.mission__link:active .mission__frame {
  transform: scale(0.985);
}

.mission__link:focus-visible {
  outline: none;
}

.mission__link:focus-visible .mission__frame {
  outline: 2px solid #bfe4ff;
  outline-offset: 3px;
}

.mission__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid #3f6a99;
  border-radius: 0.72rem;
  background: #050c17;
  box-shadow:
    0 0 0 1px rgba(150, 196, 246, 0.16),
    0 2px 8px rgba(0, 3, 8, 0.5);
  overflow: hidden;
}

.mission__photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 100%;
  height: 100%;
  color: rgba(178, 208, 246, 0.62);
  background:
    radial-gradient(circle at 74% 22%, rgba(190, 224, 255, 0.35) 0 1.4px, transparent 2.6px),
    radial-gradient(circle at 24% 76%, rgba(170, 210, 250, 0.28) 0 1.8px, transparent 3.2px),
    radial-gradient(circle at 58% 44%, rgba(190, 224, 255, 0.18) 0 1px, transparent 2px),
    radial-gradient(78% 58% at 32% 18%, rgba(96, 154, 216, 0.28), transparent 64%),
    linear-gradient(158deg, #17324f 0%, #0c1d31 50%, #060f1c 100%);
}

.mission__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, rgba(200, 228, 255, 0.1) 0%, transparent 32%, transparent 68%, rgba(0, 0, 0, 0.34) 100%);
  pointer-events: none;
}

.mission__photo-icon {
  width: 1.35rem;
  height: 1.35rem;
  opacity: 0.62;
}

.mission__photo span {
  font-family: var(--body);
  font-size: 0.48rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* The badge only appears once this visitor's own session has completed the
   mission; landing.js adds .mission--done. */
.mission__check {
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  display: none;
  place-items: center;
  width: 1.62rem;
  height: 1.62rem;
  border: 1px solid rgba(166, 210, 255, 0.26);
  border-radius: 50%;
  background: #050b14;
  box-shadow:
    0 2px 7px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(190, 222, 255, 0.14);
}

.mission--done .mission__check {
  display: grid;
}

.mission__check svg {
  width: 0.88rem;
  height: 0.88rem;
  color: #a9dcff;
  filter: drop-shadow(0 0 4px rgba(120, 200, 255, 0.45));
}

.mission__name {
  width: 106%;
  min-height: 2.05em;
  margin: 0.4rem 0 0 -3%;
  color: #cfe0f4;
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: clamp(0.72rem, 3.15vw, 0.8rem);
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: -0.015em;
  text-align: center;
}

/* The first unfinished mission wears the dashed "up next" tile: a scan mark
   where its photo will go, and its name set bold like the reference. */
.mission--next {
  aspect-ratio: 1;
}

.mission__next {
  display: none;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #a4d8ff;
}

.mission__next-icon {
  width: 1.55rem;
  height: 1.55rem;
  color: #a4d8ff;
  filter: drop-shadow(0 0 6px rgba(110, 190, 255, 0.4));
}

.mission--next .mission__frame {
  border: 1px solid #294466;
  background:
    radial-gradient(85% 70% at 50% 112%, rgba(88, 158, 220, 0.22), transparent 68%),
    linear-gradient(158deg, #0a1524 0%, #060d18 52%, #03070d 100%);
  box-shadow:
    inset 0 1px 0 rgba(180, 214, 255, 0.1),
    0 2px 8px rgba(0, 3, 8, 0.4);
}

.mission--next .mission__frame::before {
  content: "";
  position: absolute;
  inset: 0.28rem;
  border: 1.5px dashed rgba(170, 212, 255, 0.42);
  border-radius: 0.48rem;
  pointer-events: none;
}

.mission--next .mission__frame:hover::before {
  border-color: rgba(191, 228, 255, 0.7);
}

.mission--next .mission__photo,
.mission--next .mission__check {
  display: none;
}

.mission--next .mission__next {
  display: grid;
}

.mission--next .mission__name {
  font-weight: 700;
}

.reward {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 0.66rem;
  border: 1px solid rgba(146, 194, 244, 0.3);
  border-radius: 0.72rem;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(76, 138, 202, 0.28) 0%, rgba(76, 138, 202, 0) 55%),
    linear-gradient(135deg, #0e2036 0%, #0a1728 52%, #071220 100%);
  box-shadow:
    inset 0 1px 0 rgba(190, 222, 255, 0.12),
    0 1px 3px rgba(0, 3, 8, 0.4);
}

.reward__icon {
  width: 2.15rem;
  height: 2.15rem;
  flex: none;
  color: #8ccdf5;
  filter: drop-shadow(0 0 6px rgba(120, 195, 250, 0.4));
}

.reward__copy {
  min-width: 0;
}

.reward__copy h3 {
  margin: 0 0 0.16rem;
  color: #e9f3ff;
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: clamp(0.76rem, 3.15vw, 0.84rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.015em;
}

.reward__copy p {
  margin: 0;
  color: #93aaca;
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: clamp(0.7rem, 2.95vw, 0.78rem);
  font-weight: 400;
  line-height: 1.3;
}

/* ---------- Scan button ---------- */

.scan-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.62rem;
  width: 100%;
  min-height: 3.4rem;
  margin-top: 1.1rem;
  padding: 0.55rem 1rem 0.48rem;
  border: 1.5px solid #42729f;
  border-radius: 0.82rem;
  background:
    radial-gradient(80% 150% at 50% 0%, rgba(120, 190, 250, 0.12), transparent 60%),
    linear-gradient(180deg, #0a1626 0%, #03070d 100%);
  color: #cfe7ff;
  font-family: var(--display);
  font-size: clamp(1.15rem, 5.1vw, 1.35rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.055em;
  cursor: pointer;
  box-shadow:
    0 0.9rem 1.8rem rgba(0, 2, 6, 0.6),
    inset 0 1px 0 rgba(190, 222, 255, 0.14);
  transition:
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.scan-button svg {
  width: 1.28rem;
  height: 1.28rem;
  flex: none;
}

.scan-button:hover {
  border-color: #7cc4f5;
  color: #f2fbff;
  box-shadow:
    0 1rem 2rem rgba(0, 2, 6, 0.66),
    0 0 0 1px rgba(124, 196, 245, 0.22),
    0 0 1.6rem rgba(80, 160, 220, 0.28),
    inset 0 1px 0 rgba(190, 222, 255, 0.2);
}

.scan-button:active {
  transform: translateY(1px) scale(0.995);
}

/* ---------- Night scene ---------- */

.night-scene {
  position: relative;
  width: calc(100% + var(--page-gutter) * 2);
  margin: 0.5rem 0 0 calc(var(--page-gutter) * -1);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 100%);
}

.night-scene svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Focus ---------- */

.scan-button:focus-visible {
  outline: 2px solid #bfe4ff;
  outline-offset: 3px;
}

/* ---------- Larger screens ---------- */

@media (min-width: 30rem) {
  .hero__sky,
  .night-scene {
    width: calc(100% + var(--page-gutter) * 2 + 1rem);
    margin-left: calc(var(--page-gutter) * -1 - 0.5rem);
  }

  /* Soften the scene's side and lower edges instead of ending on hard
     rectangle boundaries. */
  .hero__sky {
    -webkit-mask-image:
      linear-gradient(180deg, #000 0%, #000 66%, transparent 100%),
      linear-gradient(90deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(180deg, #000 0%, #000 66%, transparent 100%),
      linear-gradient(90deg, transparent 0%, #000 16%, #000 84%, transparent 100%);
    mask-composite: intersect;
  }

  .night-scene {
    -webkit-mask-image:
      linear-gradient(180deg, transparent 0%, #000 18%, #000 100%),
      linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(180deg, transparent 0%, #000 18%, #000 100%),
      linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
    mask-composite: intersect;
  }
}

/* ---------- Small screens ---------- */

@media (max-width: 22.5rem) {
  :root {
    --page-gutter: 0.8rem;
  }

  .passport {
    padding: 1.7rem 0.72rem 1.05rem;
  }

  .missions {
    column-gap: 0.4rem;
    row-gap: 1rem;
  }

  .reward {
    gap: 0.42rem;
    padding: 0.55rem 0.5rem;
  }

  .reward__icon {
    width: 1.75rem;
    height: 1.75rem;
  }

  .mission__check {
    width: 1.42rem;
    height: 1.42rem;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .scan-button,
  .mission__link .mission__frame {
    transition: none;
  }

  .scan-button:active,
  .mission__link:active .mission__frame {
    transform: none;
  }
}
