@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;
}

@font-face {
  font-family: "Great Vibes";
  src: url("assets/fonts/great-vibes-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --wine-deep: #24040a;
  --wine: #3b0711;
  --wine-light: #5a0f1c;
  --cream: #fdf4de;
  --cream-2: #f8ecd0;
  --cream-3: #f2e2c1;
  --ink: #33200f;
  --ink-soft: #4a3320;
  --muted: #7c6353;
  --gold-pale: #f4e2b0;
  --gold: #d9b56d;
  --gold-deep: #b3863f;
  --gold-dark: #8a5f23;
  --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;
  --script: "Great Vibes", "Segoe Script", "French Script MT", cursive;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  background:
    radial-gradient(130% 50% at 50% -6%, #5f1020 0%, rgba(77, 12, 22, 0) 64%),
    radial-gradient(100% 46% at 50% 105%, #500e19 0%, rgba(66, 9, 17, 0) 72%),
    linear-gradient(180deg, #450b15 0%, #470b15 46%, #3c0711 100%);
  color: var(--cream);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

body::before {
  background-image:
    radial-gradient(circle at 7% 17%, rgba(255, 205, 130, 0.28) 0 2px, transparent 3px),
    radial-gradient(circle at 17% 9%, rgba(255, 224, 168, 0.22) 0 1.4px, transparent 2.4px),
    radial-gradient(circle at 4% 31%, rgba(255, 190, 108, 0.18) 0 3px, transparent 4.4px),
    radial-gradient(circle at 93% 14%, rgba(255, 208, 138, 0.24) 0 2.2px, transparent 3.4px),
    radial-gradient(circle at 86% 27%, rgba(255, 224, 168, 0.16) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 97% 41%, rgba(255, 194, 112, 0.16) 0 2.6px, transparent 4px),
    radial-gradient(circle at 9% 63%, rgba(255, 205, 130, 0.12) 0 2px, transparent 3.2px),
    radial-gradient(circle at 92% 69%, rgba(255, 205, 130, 0.12) 0 1.8px, transparent 3px),
    radial-gradient(circle at 15% 88%, rgba(255, 196, 118, 0.18) 0 2.8px, transparent 4.2px),
    radial-gradient(circle at 82% 92%, rgba(255, 214, 148, 0.18) 0 2.2px, transparent 3.4px),
    radial-gradient(circle at 48% 96%, rgba(255, 205, 130, 0.1) 0 3.4px, transparent 5px);
  filter: blur(1px);
  opacity: 0.55;
}

body::after {
  background:
    radial-gradient(78% 52% at 50% 33%, rgba(255, 219, 160, 0.045) 0%, transparent 70%),
    radial-gradient(130% 95% at 50% 44%, transparent 52%, rgba(18, 2, 7, 0.3) 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__garland {
  position: relative;
  width: calc(100% + var(--page-gutter) * 2);
  margin-left: calc(var(--page-gutter) * -1);
}

.hero__garland-photo {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 88%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 88%, transparent 100%);
  filter: drop-shadow(0 10px 16px rgba(10, 0, 4, 0.28));
}

.hero__bauble {
  position: absolute;
  z-index: 0;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(10, 0, 4, 0.35));
}

.hero__bauble--left {
  top: 87.5%;
  left: 1.03%;
  width: 12.82%;
}

.hero__bauble--right {
  top: 77.5%;
  left: 89.1%;
  width: 10.26%;
}

.hero__kicker {
  position: relative;
  z-index: 1;
  margin: 0.1rem 0 0;
  background: linear-gradient(180deg, #f8e8bd 6%, #e0bb79 52%, #c09245 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: var(--gold-pale);
  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(255, 244, 212, 0.14);
}

.hero__headline {
  position: relative;
  z-index: 1;
  margin: 0.15rem 0 0;
  background: linear-gradient(180deg, #f9e7b6 5%, #e5be7b 48%, #c49145 82%, #b07f36 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: #f1d59c;
  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 2px 10px rgba(15, 0, 5, 0.3);
}

.hero__subtitle {
  position: relative;
  z-index: 1;
  max-width: 18rem;
  margin: 0.35rem auto 0;
  color: #f1dfb6;
  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(255, 244, 212, 0.18),
    0 4px 12px rgba(15, 0, 5, 0.3);
}

.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(219, 181, 109, 0.18) 25%, #d9b56d);
}

.hero__rule-line:last-child {
  background: linear-gradient(90deg, #d9b56d, rgba(219, 181, 109, 0.18) 75%, transparent);
}

.hero__rule-star {
  width: 0.7rem;
  height: 0.7rem;
  flex: none;
  color: #f4dda6;
  filter: drop-shadow(0 0 4px rgba(255, 218, 148, 0.6));
}

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

.passport {
  position: relative;
  padding: 1.55rem 0.95rem 1.05rem;
  border: 1.5px solid rgba(255, 250, 236, 0.92);
  border-radius: 1.5rem;
  background:
    radial-gradient(115% 62% at 50% -8%, #fffaf0 0%, rgba(255, 250, 240, 0) 58%),
    linear-gradient(180deg, #fdf5e1 0%, #faf0d8 58%, #f4e5c4 100%);
  box-shadow:
    0 1.7rem 3.4rem rgba(12, 0, 4, 0.5),
    0 0.5rem 1.1rem rgba(12, 0, 4, 0.28),
    0 0 0 1px rgba(255, 226, 164, 0.16),
    inset 0 0 0 3px rgba(255, 255, 255, 0.22);
}

.passport__title {
  margin: 0;
  color: var(--ink);
  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(--muted);
  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: #201a13;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
}

.progress__segment--done {
  background: linear-gradient(180deg, #f3ddaa 0%, #d6ae68 42%, #bf9247 68%, #e2c17c 100%);
  box-shadow:
    inset 0 0.5px 0 rgba(255, 249, 228, 0.55),
    0 0 0.35rem rgba(224, 188, 118, 0.45);
}

/* ---------- 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: #f6e3b4;
  box-shadow:
    0 0 0 1px rgba(255, 239, 197, 0.5),
    0 6px 16px rgba(62, 32, 10, 0.28),
    0 0 1.5rem rgba(217, 181, 109, 0.38);
}

.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 #f4e2b0;
  outline-offset: 3px;
}

.mission__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border: 2px solid #d4ac65;
  border-radius: 0.72rem;
  background: #2a1712;
  box-shadow:
    0 0 0 1px rgba(255, 239, 197, 0.42),
    0 2px 5px rgba(62, 32, 10, 0.16);
  overflow: hidden;
}

.mission__photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 100%;
  height: 100%;
  color: rgba(242, 218, 168, 0.62);
  background:
    radial-gradient(circle at 74% 22%, rgba(255, 206, 128, 0.19) 0 2px, transparent 3px),
    radial-gradient(circle at 24% 76%, rgba(255, 196, 108, 0.14) 0 3px, transparent 4.4px),
    radial-gradient(75% 58% at 32% 18%, rgba(255, 211, 143, 0.2), transparent 62%),
    linear-gradient(155deg, #5b3722 0%, #34201a 48%, #231510 100%);
}

.mission__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, rgba(255, 240, 205, 0.1) 0%, transparent 32%, transparent 68%, rgba(0, 0, 0, 0.16) 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.72;
}

.mission__check {
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  display: grid;
  place-items: center;
  width: 1.62rem;
  height: 1.62rem;
  border: 1px solid rgba(255, 244, 216, 0.16);
  border-radius: 50%;
  background: #15110c;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.mission__check svg {
  width: 0.88rem;
  height: 0.88rem;
  color: #ecd296;
}

.mission__name {
  width: 106%;
  min-height: 2.05em;
  margin: 0.4rem 0 0 -3%;
  color: #2e1c0f;
  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;
}

.mission--next {
  aspect-ratio: 1;
}

.next-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  width: 100%;
  height: 100%;
  padding: 0.5rem;
  border: 1px solid #332a1d;
  border-radius: 0.72rem;
  background:
    radial-gradient(85% 70% at 50% 110%, rgba(168, 118, 48, 0.14), transparent 68%),
    linear-gradient(158deg, #1b1812 0%, #12100c 52%, #0b0907 100%);
  color: var(--cream);
  font-family: var(--body);
  cursor: pointer;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 2px 5px rgba(62, 32, 10, 0.16);
  transition:
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.next-tile::before {
  content: "";
  position: absolute;
  inset: 0.28rem;
  border: 1.5px dashed rgba(250, 236, 205, 0.5);
  border-radius: 0.48rem;
  pointer-events: none;
}

.next-tile__icon {
  width: 1.55rem;
  height: 1.55rem;
  color: #e8cb8d;
}

.next-tile span {
  font-size: clamp(0.76rem, 3.2vw, 0.84rem);
  font-weight: 700;
  line-height: 1.2;
}

.next-tile:hover {
  background-color: #241f16;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 4px 12px rgba(20, 8, 0, 0.3);
}

.next-tile:active {
  transform: scale(0.985);
}

.reward {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 0.66rem;
  border: 1px solid #e7d6b2;
  border-radius: 0.72rem;
  background:
    radial-gradient(120% 120% at 0% 0%, #fbf3df 0%, rgba(251, 243, 223, 0) 55%),
    linear-gradient(135deg, #f7ecd3 0%, #f2e4c5 52%, #eddcb8 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 1px 2px rgba(86, 53, 19, 0.06);
}

.reward__icon {
  width: 2.15rem;
  height: 2.15rem;
  flex: none;
  color: #a9762c;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.5));
}

.reward__copy {
  min-width: 0;
}

.reward__copy h3 {
  margin: 0 0 0.16rem;
  color: #30200f;
  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: #705748;
  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 #c39a52;
  border-radius: 0.82rem;
  background:
    radial-gradient(80% 150% at 50% 0%, rgba(255, 218, 150, 0.08), transparent 60%),
    linear-gradient(180deg, #17140f 0%, #0c0a08 100%);
  color: #e8cb8d;
  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(12, 0, 4, 0.38),
    inset 0 1px 0 rgba(255, 237, 195, 0.13);
  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: #e5c583;
  color: #f7e4b7;
  box-shadow:
    0 1rem 2rem rgba(12, 0, 4, 0.44),
    0 0 0 1px rgba(227, 193, 127, 0.18),
    inset 0 1px 0 rgba(255, 237, 195, 0.18);
}

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

/* ---------- Gift scene ---------- */

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

.gift-scene img {
  display: block;
  width: 100%;
  height: auto;
}

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

.next-tile:focus-visible,
.scan-button:focus-visible {
  outline: 2px solid #f4dda6;
  outline-offset: 3px;
}

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

@media (min-width: 30rem) {
  .page {
    padding-top: 0.5rem;
  }

  .hero__garland {
    width: calc(100% + var(--page-gutter) * 2 + 1rem);
    margin-left: calc(var(--page-gutter) * -1 - 0.5rem);
  }

  /* The ornament band is narrower than a desktop viewport, so soften its
     side edges into the page instead of ending on a hard rectangle. */
  .hero__garland-photo {
    -webkit-mask-image:
      linear-gradient(180deg, #000 0%, #000 88%, transparent 100%),
      linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(180deg, #000 0%, #000 88%, transparent 100%),
      linear-gradient(90deg, transparent 0%, #000 7%, #000 93%, transparent 100%);
    mask-composite: intersect;
  }

  .gift-scene {
    width: calc(100% + var(--page-gutter) * 2 + 1rem);
    margin-left: calc(var(--page-gutter) * -1 - 0.5rem);
  }
}

/* ---------- 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) {
  .next-tile,
  .scan-button,
  .mission__link .mission__frame {
    transition: none;
  }

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