:root {
  --paper: #f7f2e8;
  --paper-deep: #ebe0cc;
  --ink: #11100d;
  --ink-soft: #544b3e;
  --gold: #d6a445;
  --line: #d8cab2;
  --shadow: 0 24px 70px rgba(17, 16, 13, 0.15);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(247, 242, 232, 0.96), rgba(235, 224, 204, 0.98)),
    var(--paper);
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "SOFT" 40, "WONK" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
}

.page-shell {
  min-height: 100vh;
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 76vh;
  display: grid;
  grid-template-rows: minmax(18px, 0.42fr) auto auto minmax(10px, 0.2fr);
  place-items: center;
  padding: clamp(20px, 3vw, 42px);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: clamp(14px, 2vw, 30px);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  border-radius: 999px 999px 26px 26px;
  pointer-events: none;
}

.hero-art {
  grid-row: 2;
  width: min(42vw, 270px);
  min-width: 205px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  margin-bottom: clamp(16px, 2.4vh, 26px);
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-copy {
  grid-row: 3;
  width: min(100%, 980px);
  text-align: center;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: clamp(0.86rem, 1.6vw, 1.05rem);
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

h1 {
  max-width: 13ch;
  margin: 0 auto;
  font-size: clamp(3.2rem, 7.2vw, 5.65rem);
  font-weight: 900;
  line-height: 0.88;
}

.lede {
  max-width: 42rem;
  margin: clamp(18px, 3vw, 28px) auto 0;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 2.3vw, 1.55rem);
  font-weight: 520;
  line-height: 1.32;
}

.site-links {
  position: absolute;
  top: clamp(22px, 4vw, 48px);
  right: clamp(22px, 4vw, 56px);
  display: flex;
  gap: 18px;
  z-index: 2;
  font-size: clamp(0.95rem, 1.4vw, 1.08rem);
  font-weight: 760;
}

.lower-band {
  min-height: 28vh;
  display: grid;
  place-items: center;
  align-content: start;
  gap: 7px;
  padding: 30px 24px 58px;
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}

.lower-band p {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 3.1rem);
  font-weight: 850;
  line-height: 1;
}

.lower-band .small {
  color: color-mix(in srgb, var(--paper) 70%, transparent);
  font-size: clamp(0.98rem, 1.8vw, 1.22rem);
  font-weight: 520;
}

@media (min-width: 980px) {
  .hero {
    min-height: 76vh;
    grid-template-rows: minmax(12px, 0.28fr) auto auto minmax(6px, 0.12fr);
  }

  .hero-art {
    width: min(24vw, 250px);
  }
}

@media (max-width: 720px) {
  .hero {
    min-height: 84vh;
    padding: 24px 18px;
  }

  .hero::before {
    inset: 12px;
    border-radius: 999px 999px 18px 18px;
  }

  .site-links {
    position: static;
    grid-row: 4;
    align-self: end;
    justify-content: center;
    margin-top: 28px;
  }

  .hero-art {
    width: min(68vw, 300px);
    min-width: 198px;
  }

  h1 {
    max-width: 10.5ch;
    font-size: clamp(3rem, 15vw, 4.9rem);
  }
}

@media (max-width: 420px) {
  .site-links {
    gap: 12px;
    font-size: 0.95rem;
  }

  .lede {
    font-size: 1rem;
  }
}

/* ---------- Hunts ---------- */

.hunts {
  padding: clamp(44px, 7vw, 88px) clamp(20px, 5vw, 48px) clamp(52px, 8vw, 96px);
  border-top: 1px solid var(--line);
}

.hunts-title {
  max-width: 62rem;
  margin: 0 auto clamp(26px, 4vw, 40px);
  color: var(--gold);
  font-size: clamp(0.86rem, 1.6vw, 1.05rem);
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  text-align: center;
}

.hunt-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(26px, 4vw, 52px);
  max-width: 62rem;
  margin: 0 auto;
}

.hunt-art {
  display: block;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 180ms ease;
}

.hunt-art:hover {
  transform: translateY(-3px);
}

.hunt-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.hunt-name {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.01em;
}

.hunt-date {
  margin: clamp(10px, 1.6vw, 16px) 0 0;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  font-weight: 760;
}

.hunt-note {
  margin: clamp(12px, 2vw, 18px) 0 0;
  max-width: 28rem;
  color: var(--ink-soft);
  font-size: clamp(0.98rem, 1.5vw, 1.1rem);
  font-weight: 500;
  line-height: 1.4;
}

.hunt-cta {
  display: inline-block;
  margin-top: clamp(20px, 3vw, 30px);
  padding: 0.72em 1.5em;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  font-weight: 850;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.hunt-cta:hover {
  background: var(--gold);
  color: var(--ink);
  transform: translateY(-2px);
}

@media (max-width: 760px) {
  .hunt-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .hunt-art {
    width: min(100%, 340px);
  }

  .hunt-note {
    margin-left: auto;
    margin-right: auto;
  }
}

/* ---------- FAQ ---------- */

.faq {
  padding: clamp(44px, 7vw, 80px) clamp(20px, 5vw, 48px) clamp(52px, 8vw, 88px);
  border-top: 1px solid var(--line);
}

.faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 28px);
  max-width: 62rem;
  margin: 0 auto;
}

.faq-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--paper) 70%, white);
}

.faq-item h3 {
  margin: 0;
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  font-weight: 850;
  line-height: 1.15;
}

.faq-item p {
  margin: 10px 0 20px;
  color: var(--ink-soft);
  font-size: clamp(0.98rem, 1.5vw, 1.08rem);
  font-weight: 500;
  line-height: 1.45;
}

.faq-item p a {
  color: var(--ink);
  font-weight: 700;
}

.faq-link {
  margin-top: auto;
  font-weight: 800;
  text-decoration: underline;
}

.faq-link:hover {
  color: var(--gold);
}

@media (max-width: 760px) {
  .faq-list {
    grid-template-columns: 1fr;
  }
}

/* ---------- Shared site footer ---------- */

.site-footer {
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 26px 24px 34px;
  background: var(--ink);
  color: color-mix(in srgb, var(--paper) 78%, transparent);
  text-align: center;
  font-size: clamp(0.92rem, 1.5vw, 1.02rem);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--gold);
  font-weight: 700;
  text-decoration: underline;
}

.site-footer a:hover {
  color: var(--paper);
}

.site-footer .small {
  color: color-mix(in srgb, var(--paper) 52%, transparent);
  font-size: 0.86em;
}

/* ---------- Legal / terms page ---------- */

.legal .legal-shell {
  max-width: 62rem;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 48px) clamp(40px, 6vw, 76px);
}

.legal-head {
  padding-bottom: clamp(20px, 3vw, 30px);
  border-bottom: 1px solid var(--line);
}

.legal-back {
  display: inline-block;
  margin-bottom: clamp(18px, 3vw, 30px);
  color: var(--ink-soft);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.legal-back:hover {
  color: var(--ink);
  text-decoration: underline;
}

.legal-head h1 {
  max-width: 22ch;
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.1rem);
  font-weight: 900;
  line-height: 1;
  text-align: left;
}

.legal-effective {
  margin: 14px 0 0;
  color: var(--gold);
  font-size: clamp(0.86rem, 1.5vw, 1rem);
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.legal-body {
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.15vw, 1.08rem);
  font-weight: 460;
  line-height: 1.62;
}

.legal-body section {
  margin-top: clamp(28px, 4vw, 44px);
}

.legal-body h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(1.18rem, 2.2vw, 1.5rem);
  font-weight: 850;
  line-height: 1.2;
}

.legal-body p {
  margin: 0 0 1em;
}

.legal-body p:last-child {
  margin-bottom: 0;
}

.legal-body a {
  color: var(--ink);
  font-weight: 600;
}

.legal-sub {
  margin: 0;
  padding-left: 1.6em;
  list-style: lower-alpha;
}

.legal-sub li::marker {
  color: var(--gold);
  font-weight: 850;
}

.rule-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rule-list li {
  position: relative;
  padding: 0.45em 0 0.45em 1.5em;
  border-bottom: 1px dashed var(--line);
}

.rule-list li::before {
  content: "";
  position: absolute;
  top: 1.05em;
  left: 0.3em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.rules-intro {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  font-weight: 600;
  line-height: 1.45;
}

.legal-body .rules-signoff {
  margin: clamp(38px, 6vw, 60px) 0 0;
  color: var(--ink);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 850;
}

.hint-hours {
  margin: 0 0 1em;
  padding: 0;
  list-style: none;
}

.hint-hours li {
  display: flex;
  gap: 0.75em;
  padding: 0.45em 0;
  border-bottom: 1px dashed var(--line);
}

.hint-hours strong {
  min-width: 6.5em;
  color: var(--ink);
  font-weight: 800;
}

/* ---------- How It's Built hub (architecture.html) ---------- */

.legal-body .diagram-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-body .diagram-list .faq-link {
  font-weight: 800;
}

.build-figure {
  margin: clamp(20px, 3vw, 28px) 0;
}

.build-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.build-figure figcaption {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-style: italic;
}

@media (max-width: 760px) {
  .diagram-list {
    grid-template-columns: 1fr;
  }
}

/* ---------- Shared-password gate (served by the CloudFront edge function) ---------- */

.gate-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: clamp(24px, 6vw, 60px) 20px;
}

.gate {
  width: min(100%, 30rem);
  text-align: center;
}

.gate-mark {
  display: block;
  width: min(38vw, 132px);
  margin: 0 auto clamp(14px, 3vw, 24px);
}

/* The global h1 is the homepage wordmark; the gate needs a plainer one. */
.gate h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(2.3rem, 7vw, 3.4rem);
  line-height: 0.95;
}

.gate-lede {
  max-width: 27rem;
  margin: clamp(14px, 2.4vw, 20px) auto 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  font-weight: 500;
  line-height: 1.45;
}

.gate-form {
  display: grid;
  gap: 10px;
  margin-top: clamp(24px, 4vw, 34px);
  text-align: left;
}

.gate-label {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.gate-input {
  width: 100%;
  padding: 0.78em 1em;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--paper) 76%, #fff);
  color: var(--ink);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
}

.gate-input:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-color: transparent;
}

.gate-go {
  margin-top: 4px;
  padding: 0.78em 1.5em;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.gate-go:hover {
  background: var(--gold);
  color: var(--ink);
  transform: translateY(-2px);
}

.gate-error {
  margin: 16px 0 0;
  color: #9a2f2f;
  font-size: 0.98rem;
  font-weight: 700;
}

.gate-back {
  margin: clamp(22px, 4vw, 32px) 0 0;
  font-size: 0.98rem;
  font-weight: 700;
}

.gate-back a {
  color: var(--ink-soft);
}

/* Separator between the footer's links. */
.site-footer .sep {
  margin: 0 0.6em;
  color: color-mix(in srgb, var(--paper) 34%, transparent);
}
