/* mytreasuremap.fun public homepage. Same brand tokens as the app (styles.css),
   kept separate so the homepage can be shown without signing in. */
:root {
  --sky: #EAF3FA;
  --white: #FFFFFF;
  --tint: #D9EAF6;
  --ink: #13294B;
  --ink-soft: #4A5F80;
  --line: #B9CFE3;
  --sun: #FFC52E;
  --tomato: #EF4F2B;
  --grass: #2FA36F;
  --sea: #2A7FC0;
  --paper: #FFF3D1;
  --paper-ink: #5A3A1A;
  --display: "Grandstander", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --body: "Andika", "Segoe UI", system-ui, -apple-system, sans-serif;
  --hand: "Gochi Hand", "Comic Sans MS", "Chalkboard SE", cursive;
  --tap: 56px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; overflow-x: clip; }
body {
  background: var(--sky);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.5;
  background-image: radial-gradient(circle, var(--line) 1px, transparent 1.4px);
  background-size: 24px 24px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
a { color: var(--ink); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 10px; }
.sprite { position: absolute; }

h1, h2, h3 { font-family: var(--display); font-weight: 900; line-height: 1.05; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(2.4rem, 7vw, 4rem); }
h2 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
h3 { font-size: 1.4rem; font-weight: 800; }
p { margin: 0; }

.i { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }

.btn {
  min-height: var(--tap); border-radius: 999px; padding: 0 26px; border: 2px solid var(--ink);
  background: var(--ink); color: #fff; font-weight: 700; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  transition: transform .12s, box-shadow .12s;
}
.btn.ghost { background: var(--white); color: var(--ink); }
.btn.sun { background: var(--sun); color: var(--ink); border-width: 3px; box-shadow: 4px 4px 0 var(--ink); }
.btn.sun:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.big { font-size: 1.15rem; min-height: 64px; }
.btn .i { --sun: #FFC52E; }
.btn.sun .i { --sun: #fff; }
.fine { color: var(--ink-soft); font-size: 1rem; }
.center { text-align: center; }

/* ---------- top bar ---------- */
.topbar {
  position: relative;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  max-width: 1080px; margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; font-family: var(--display); font-weight: 900; font-size: 1.2rem; letter-spacing: -.01em; }
.logo b { color: var(--tomato); font-weight: 900; }
/* The header is the same at every width: the logo, a "Try free" button and a plain hamburger.
   Log in never gets a button: the page sells passes, members know where the door is (it's in the menu). */
.top-nav { display: flex; align-items: center; gap: 8px; }
/* "Try free" is the free day pass, one tap from any page: a small sun button, still a 44px target. */
.btn.try { min-height: 44px; padding: 0 18px; font-size: 1rem; box-shadow: 3px 3px 0 var(--ink); }
.btn.try:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
/* The hamburger: a 44px box with no border, level with the logo. */
.menu-btn {
  display: grid; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px;
  background: none; color: var(--ink); cursor: pointer; place-items: center;
}
.menu-btn svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--tint); }
/* The menu holds every header link: Pricing, Log in, Blog and the language switch. */
.menu {
  position: absolute; right: 16px; top: calc(100% - 4px); z-index: 30; min-width: 220px;
  display: flex; flex-direction: column; padding: 8px; gap: 0;
  background: var(--white); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 5px 5px 0 var(--ink);
}
.menu[hidden] { display: none; }
/* Every item the same: 48px tall (16px of text with 16px above and below), one size, one weight. */
.menu a { display: flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 12px; font-size: 1rem; font-weight: 700; text-decoration: none; }
.menu a:hover, .menu a:focus-visible { background: var(--tint); }
.menu a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--tomato); text-decoration-thickness: 3px; text-underline-offset: 6px; }

main { max-width: 1080px; margin: 0 auto; padding: 8px 16px 32px; display: flex; flex-direction: column; gap: 72px; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding-top: 16px; }
.hero-text { display: flex; flex-direction: column; gap: 20px; }
.inky-says { display: flex; align-items: flex-start; gap: 12px; }
.inky { width: 64px; height: 64px; flex: none; }
.bubble { background: var(--white); border: 2px solid var(--ink); border-radius: 18px 18px 18px 4px; padding: 10px 14px; max-width: 40ch; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 46ch; }
.perks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-weight: 700; }
.perks li { display: flex; align-items: center; gap: 10px; }
.perks .tick { width: 24px; height: 24px; flex: none; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.cta-alt {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-weight: 700; white-space: nowrap;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.cta-alt:hover { text-decoration-color: var(--tomato); text-decoration-thickness: 3px; }

.hero-map { position: relative; margin: 0; transform: rotate(1.5deg); }
/* The ink shadow goes on the map only, not on Inky peeking over its corner. */
.hero-map > svg:first-child { display: block; width: 100%; height: auto; filter: drop-shadow(8px 8px 0 var(--ink)); }
.hm-trail { animation: march 1.6s linear infinite; }
@keyframes march { to { stroke-dashoffset: -26; } }
.hm-n { font-family: var(--display); font-weight: 800; font-size: 15px; fill: var(--ink); }
.hm-title, .hm-sticker {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  font-family: var(--hand); color: var(--paper-ink); background: rgba(255,243,209,.94); line-height: 1.1;
}
.hm-title { left: 42%; top: 11%; font-size: clamp(1.1rem, 3vw, 1.6rem); padding: 2px 14px; border-radius: 12px; }
.hm-sticker { font-size: clamp(.8rem, 2.2vw, 1.1rem); border: 2px solid var(--paper-ink); border-radius: 10px; padding: 3px 9px; }
.s1 { left: 26%; top: 44%; transform: translate(-50%, -50%) rotate(-4deg); }
.s2 { left: 50%; top: 79%; transform: translate(-50%, -50%) rotate(3deg); }
.s3 { left: 77%; top: 48%; transform: translate(-50%, -50%) rotate(-2deg); }
.s4 { left: 64%; top: 25%; transform: translate(-50%, -50%) rotate(2deg); }
.peek { position: absolute; width: 22%; height: auto; left: -9%; bottom: -10%; transform: rotate(-12deg); }

/* ---------- how ---------- */
.how, .worlds, .grownups { display: flex; flex-direction: column; gap: 24px; }
.how h2, .worlds h2, .grownups h2 { text-align: center; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step, .feature {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  border: 3px solid var(--ink); border-radius: 24px; padding: 24px 22px 26px; box-shadow: 6px 6px 0 var(--ink);
}
.step p, .feature p { color: var(--ink); }
.step > svg, .feature > svg { width: 80px; height: 60px; }
.step > svg.i, .feature > svg.i { width: 56px; height: 56px; stroke-width: 1.6; }
.num {
  position: absolute; top: -18px; left: 18px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--tomato); color: #fff; border: 3px solid var(--ink);
  font-family: var(--display); font-weight: 900; font-size: 1.2rem;
}
.c-map { background: #FFE7A3; }
.c-ink { background: #E4DBF7; }
.c-print { background: #CDEBD9; }
.c-globe { background: #CFE6FA; }
.c-pass { background: var(--white); }

/* ---------- worlds ---------- */
.world-chips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.world-chips li {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 108px;
  background: var(--white); border: 2px solid var(--line); border-radius: 20px; padding: 12px 8px; font-weight: 700; text-align: center; line-height: 1.25;
}
.world-chips .emo { font-size: 2.2rem; line-height: 1; }

/* ---------- globe + passport ---------- */
.features { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }

/* ---------- grown-ups ---------- */
.trust { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.trust li { background: var(--paper); border: 2px dashed #B9A36A; border-radius: 18px; padding: 18px 20px; }
.trust b { display: block; font-family: var(--display); font-weight: 800; font-size: 1.2rem; margin-bottom: 4px; }

/* ---------- treasure hunt ideas ---------- */
/* The guides and blog posts, one tap from the homepage. Written for phones first: one link per
   row, each a full-width 56px card; tablets get two columns and wide screens three. */
.ideas { display: flex; flex-direction: column; gap: 20px; }
.ideas h2 { text-align: center; }
.idea-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
.idea-list a {
  display: flex; align-items: center; min-height: var(--tap); padding: 12px 18px;
  background: var(--white); border: 2px solid var(--line); border-radius: 18px;
  font-weight: 700; line-height: 1.3; text-decoration: none;
}
.idea-list a:hover, .idea-list a:focus-visible { border-color: var(--ink); background: var(--tint); }
.idea-list li:last-child a { background: var(--paper); border: 2px dashed #B9A36A; }
@media (min-width: 481px) { .idea-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 861px) { .idea-list { grid-template-columns: repeat(3, 1fr); gap: 16px; } }

/* ---------- closer ---------- */
.closer {
  display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center;
  background: var(--ink); color: #fff; border-radius: 28px; padding: 28px 32px;
}
.closer .inky { width: 96px; height: 96px; }
.closer p { color: #D9EAF6; margin-top: 6px; }
.closer p a { color: #fff; font-weight: 700; }

.sticky-cta {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; gap: 10px; align-items: center;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(234, 243, 250, .96); border-top: 3px solid var(--ink); backdrop-filter: blur(6px);
}
.sticky-cta .btn { flex: 1 1 auto; min-height: 52px; font-size: 1.05rem; padding: 0 16px; }
.sticky-close {
  flex: none; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 2px solid var(--ink);
  background: var(--white); color: var(--ink); cursor: pointer; display: grid; place-items: center;
}
.sticky-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }

.foot { max-width: 1080px; margin: 0 auto; padding: 8px 16px 32px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--ink-soft); font-size: 1rem; text-align: center; }
.foot a { color: var(--ink-soft); font-weight: 700; white-space: nowrap; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 4px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 12px; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.foot-links a:hover { background: var(--tint); }
.foot-note a { display: inline-block; padding: 11px 2px; }

/* ---------- small screens ---------- */
/* ---------- real sample maps ---------- */
.hero-map > img:first-child { display: block; width: 100%; height: auto; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 8px 8px 0 var(--ink); background: var(--paper); }
.samples { display: flex; flex-direction: column; gap: 20px; }
.samples h2 { text-align: center; }
.sample-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.sample-map { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.sample-map img { display: block; width: 100%; height: auto; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 6px 6px 0 var(--ink); background: var(--paper); }
.sample-map figcaption { font-family: var(--hand); font-size: 1.2rem; color: var(--paper-ink); text-align: center; }

@media (max-width: 860px) {
  .sticky-cta:not([hidden]) { display: flex; }
  .sample-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 4px; }
  .hero-text { gap: 14px; }
  .hero-map { max-width: 560px; margin: 0 14px 0 18px; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .world-chips { grid-template-columns: repeat(3, 1fr); }
  .features, .trust { grid-template-columns: 1fr; }
  .closer { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
@media (max-width: 480px) {
  main { gap: 56px; padding-top: 4px; }
  .logo { font-size: 1.05rem; }
  /* Phones keep the header they had: the logo and the menu. The button would push the menu off a 360px screen;
     the hero, the sticky bar and the page's own calls to action carry the day pass there. */
  .btn.try { display: none; }
  .inky-says { gap: 10px; }
  .inky { width: 52px; height: 52px; }
  .bubble { padding: 8px 12px; }
  h1 { font-size: 2.15rem; }
  .lede { font-size: 1.05rem; }
  .perks { gap: 6px; font-size: 1rem; }
  .cta-row { flex-direction: column; align-items: stretch; gap: 6px; }
  .btn.big { font-size: 1.05rem; padding: 0 18px; }
  .cta-alt { justify-content: center; }
  .world-chips { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hm-trail { animation: none; }
}

@media (max-width: 370px) {
  .btn.big { font-size: 1rem; padding: 0 14px; }
}
