/* GoalWay — goalway.io
   The site is a route: night map up top, survey paper below, one trail
   drawn down the page through four waypoints to the summit flag. */

:root {
  --night: #0A1626;
  --night-raised: #13233A;
  --night-line: rgba(143, 160, 184, 0.22);
  --paper: #EEF2F6;
  --paper-raised: #F8FAFC;
  --ink: #14213A;
  --ink-soft: #4D5A70;
  --ink-faint: #6B778B;
  --rule: #D5DCE6;
  --route: #3D63DD;
  --route-light: #8AA8FF;
  --contour: #8FA0B8;
  --flag: #F5C26B;
  --water: #CFE0F2;

  --serif: "New York", ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Inter", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;

  --measure: 34rem;
  --page: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius-device: 3.1rem;
}

*, *::before, *::after { box-sizing: border-box; }
.wrap > *, .wrap > * > * { min-width: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, canvas { display: block; max-width: 100%; }
figure { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2.5px solid var(--route); outline-offset: 3px; border-radius: 6px; }

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

/* Type scale: a perfect fourth, set in New York like the app. */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.012em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.9rem, 7.4vw, 5.6rem); line-height: 0.98; letter-spacing: -0.025em; }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.04; }
h3 { font-size: clamp(1.45rem, 2.4vw, 1.8rem); line-height: 1.15; }
p { margin: 0; max-width: var(--measure); text-wrap: pretty; }
.lede { font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.5; color: var(--ink-soft); }
.serif-note { font-family: var(--serif); font-style: italic; color: var(--ink-soft); }

/* ---------- Header ---------- */
.site-header {
  position: absolute; inset: 0 0 auto; z-index: 10;
  padding-block: 1.1rem;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font: 600 1.15rem/1 var(--serif); }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.nav { display: flex; gap: clamp(0.8rem, 2.2vw, 1.8rem); font-size: 0.95rem; }
.nav a { text-decoration: none; opacity: 0.82; padding: 0.4rem 0; }
.nav a:hover { opacity: 1; }
.on-night { color: #E8EEF8; }
.on-paper .brand, .on-paper .nav { color: var(--ink); }
@media (max-width: 560px) { .nav .nav-extra { display: none; } }

/* ---------- Hero: the night map ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: min(100svh, 62rem);
  background: radial-gradient(120% 90% at 70% 30%, #13284A 0%, var(--night) 62%);
  color: #E8EEF8;
  overflow: hidden;
  display: grid; align-items: center;
  padding-block: 7rem 4rem;
}
.hero canvas.terrain { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero h1 { color: #F4F7FC; }
.hero .lede { color: #AEBBD0; margin-top: 1.4rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; margin-top: 2.2rem; }
.hero-note { font-size: 0.95rem; color: #8FA0B8; }

.store-badge {
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 0.75rem 1.25rem 0.75rem 1.05rem;
  border-radius: 14px; text-decoration: none;
  background: #F4F7FC; color: var(--night);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.store-badge:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(0,0,0,.4); }
.store-badge svg { width: 26px; height: 26px; }
.store-badge span { display: grid; line-height: 1.05; }
.store-badge small { font-size: 0.72rem; opacity: 0.7; }
.store-badge strong { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }
.store-badge.on-paper { background: var(--ink); color: #F4F7FC; box-shadow: 0 10px 30px rgba(20,33,58,.25); }

@media (max-width: 860px) {
  .hero { padding-block: 6.5rem 3rem; }
  .hero .wrap { grid-template-columns: 1fr; text-align: left; }
  .hero .device { margin: 7.5rem auto 0; width: min(78%, 17.5rem); transform: none; }
  .hero-actions { margin-top: 1.8rem; }
}

/* ---------- Device frame ---------- */
.device {
  position: relative;
  width: min(100%, 21rem);
  aspect-ratio: 1206 / 2622;
  border-radius: var(--radius-device);
  padding: 0.55rem;
  background: linear-gradient(150deg, #3A4558, #161E2C 40%, #2B3546);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.08) inset,
    0 40px 80px -20px rgba(2, 8, 20, .65),
    0 18px 30px -18px rgba(2, 8, 20, .5);
}
.device img { width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--radius-device) - 0.55rem); background: #0A1626; }
.device.small { width: min(100%, 16.5rem); }
.device.on-paper { box-shadow: 0 0 0 1px rgba(255,255,255,.06) inset, 0 30px 60px -24px rgba(20, 33, 58, .45), 0 12px 24px -16px rgba(20, 33, 58, .35); }
.hero .device { transform: rotate(2.5deg); }

/* ---------- Sections ---------- */
section { position: relative; }
.band { padding-block: clamp(5rem, 11vw, 9rem); }
.band-tight { padding-block: clamp(3.5rem, 7vw, 6rem); }

.fog { text-align: left; }
.fog .wrap { display: grid; gap: 1.5rem; }
.fog h2 { max-width: 20ch; }

/* ---------- The trail through "how it works" ---------- */
.trail { position: relative; }
.trail-line {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; overflow: visible; z-index: 0;
}
.trail-line .ahead { fill: none; stroke: var(--contour); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 0.5 9; opacity: .85; }
.trail-line .walked { fill: none; stroke: var(--route); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }

.waypoint {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) 6rem minmax(0, 1fr);
  column-gap: clamp(1.5rem, 4vw, 4rem); align-items: center;
  min-height: 30rem;
}
.waypoint + .waypoint { margin-top: clamp(2rem, 6vw, 5rem); }
.waypoint .text { display: grid; gap: 1rem; align-content: center; }
.waypoint .pin { justify-self: center; }
.waypoint .shot { display: grid; justify-items: center; }
/* Alternate sides: the screenshot leads on every second stop. */
.waypoint:nth-child(even of .waypoint) .text { order: 3; }
.waypoint:nth-child(even of .waypoint) .shot { order: 1; }
.waypoint:nth-child(even of .waypoint) .pin { order: 2; }
.pin {
  width: 3rem; height: 3rem; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 1.05rem/1 var(--sans); font-variant-numeric: tabular-nums;
  color: var(--ink-soft); background: var(--paper);
  border: 2px solid var(--contour);
  position: relative; z-index: 2;
  transition: color .4s ease, background .4s ease, border-color .4s ease, box-shadow .4s ease;
}
.waypoint.reached .pin { color: #fff; background: var(--route); border-color: var(--route); box-shadow: 0 0 0 8px rgba(61, 99, 221, .16); }
.waypoint.summit.reached .pin { background: var(--ink); border-color: var(--ink); color: var(--flag); }

@media (max-width: 760px) {
  .waypoint { grid-template-columns: 3rem minmax(0, 1fr); column-gap: 1.2rem; row-gap: 1.8rem; min-height: 0; align-items: start; }
  .waypoint .pin, .waypoint:nth-child(even of .waypoint) .pin { order: 0; grid-row: 1; grid-column: 1; }
  .waypoint .text, .waypoint:nth-child(even of .waypoint) .text { order: 0; grid-row: 1; grid-column: 2; }
  .waypoint .shot, .waypoint:nth-child(even of .waypoint) .shot { order: 0; grid-row: 2; grid-column: 2; justify-items: start; }
}

/* ---------- Two ways to plan ---------- */
.ways { background: var(--paper-raised); border-block: 1px solid var(--rule); }
.ways .wrap { display: grid; gap: 3rem; }
.ways-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); }
.way { display: grid; gap: 0.9rem; align-content: start; }
.way h3 { display: flex; align-items: center; gap: 0.7rem; }
.way ul { margin: 0.3rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.55rem; color: var(--ink-soft); }
.way li { padding-left: 1.4rem; position: relative; }
.way li::before { content: ""; position: absolute; left: 0.15rem; top: 0.62em; width: 0.5rem; height: 0.5rem; border-radius: 50%; border: 2px solid var(--route); }
.typed-list {
  margin-top: 0.6rem;
  font-family: var(--serif); font-size: 1.08rem;
  border: 1px solid var(--rule); border-radius: 18px; background: var(--paper);
  padding: 0.4rem 1.1rem;
}
.typed-list div { display: flex; gap: 0.9rem; align-items: center; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
.typed-list div:last-child { border-bottom: 0; color: var(--ink-faint); }
.typed-list b { font: 700 0.75rem/1 var(--sans); width: 1.7rem; height: 1.7rem; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--contour); color: var(--ink-soft); flex: none; }
.typed-list .caret { width: 2px; height: 1.1em; background: var(--route); animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .typed-list .caret { animation: none; } }
@media (max-width: 760px) { .ways-grid { grid-template-columns: 1fr; } }

/* ---------- Everywhere ---------- */
.everywhere .wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.places { display: grid; gap: 1.25rem; margin-top: 2rem; }
.place { display: grid; grid-template-columns: 2.2rem 1fr; gap: 0.9rem; align-items: start; }
.place svg { width: 2.2rem; height: 2.2rem; color: var(--route); }
.place strong { display: block; font-weight: 600; }
.place span { color: var(--ink-soft); }
@media (max-width: 860px) { .everywhere .wrap { grid-template-columns: 1fr; } .everywhere .device { margin-inline: auto; } }

/* ---------- Make it yours: the walker picker ---------- */
.yours { background: var(--night); color: #E8EEF8; overflow: hidden; }
.yours .lede { color: #AEBBD0; }
.yours .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.walk-map {
  position: relative; aspect-ratio: 4 / 3; border-radius: 28px; overflow: hidden;
  background: var(--night-raised); border: 1px solid var(--night-line);
}
.walk-map canvas, .walk-map svg.walk-route { position: absolute; inset: 0; width: 100%; height: 100%; }
.walk-map .walker { position: absolute; width: 4.2rem; height: 4.2rem; transform: translate(-50%, -50%); filter: drop-shadow(0 6px 8px rgba(0,0,0,.45)); transition: left .9s cubic-bezier(.3,.7,.2,1), top .9s cubic-bezier(.3,.7,.2,1); }
.pieces { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.7rem; margin-top: 2rem; }
.piece {
  appearance: none; border: 0; cursor: pointer; padding: 0.55rem;
  aspect-ratio: 1; border-radius: 50%;
  background: #F4F7FC; display: grid; place-items: center;
  box-shadow: 0 0 0 0 var(--route-light);
  transition: transform .2s ease, box-shadow .25s ease;
}
.piece:hover { transform: translateY(-2px); }
.piece[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--night), 0 0 0 5.5px var(--route-light); }
.piece svg { width: 100%; height: 100%; }
.themes { display: flex; gap: 0.6rem; margin-top: 1.4rem; flex-wrap: wrap; }
.theme {
  appearance: none; cursor: pointer; font: inherit; font-size: 0.95rem; color: #E8EEF8;
  border: 1px solid var(--night-line); background: transparent; border-radius: 999px;
  padding: 0.5rem 1rem 0.5rem 0.6rem; display: inline-flex; align-items: center; gap: 0.5rem;
}
.theme i { width: 1.05rem; height: 1.05rem; border-radius: 50%; display: block; }
.theme[aria-pressed="true"] { border-color: #E8EEF8; }
@media (max-width: 860px) { .yours .wrap { grid-template-columns: 1fr; } .pieces { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Privacy promise ---------- */
.promise .wrap { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 6rem); }
.facts { display: grid; gap: 1.6rem; }
.fact strong { display: block; font: 600 1.25rem/1.3 var(--serif); margin-bottom: 0.3rem; }
.fact p { color: var(--ink-soft); }
@media (max-width: 860px) { .promise .wrap { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.pricing { background: var(--paper-raised); border-block: 1px solid var(--rule); }
.pricing .wrap { display: grid; gap: 2.5rem; }
.plans { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; align-items: stretch; }
.plan { min-width: 0; border: 1px solid var(--rule); border-radius: 22px; padding: clamp(1.2rem, 4vw, 1.6rem); background: var(--paper); display: grid; gap: 0.6rem; align-content: start; }
.plan.lead { border: 2px solid var(--route); background: #fff; }
.plan h3 { font-size: 1.3rem; }
.plan .price { font: 600 clamp(1.9rem, 6vw, 2.4rem)/1 var(--serif); letter-spacing: -0.02em; margin-top: 0.4rem; }
.plan .price small { font: 400 1rem/1 var(--sans); color: var(--ink-faint); letter-spacing: 0; }
.plan p { color: var(--ink-soft); }
.fine { font-size: 0.9rem; color: var(--ink-faint); }
@media (max-width: 860px) { .plans { grid-template-columns: minmax(0, 1fr); gap: 0.9rem; } }

/* ---------- Summit CTA ---------- */
.summit-cta {
  background: radial-gradient(100% 120% at 50% 0%, #13284A, var(--night) 70%);
  color: #E8EEF8; text-align: center; overflow: hidden;
}
.summit-cta canvas.terrain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .7; }
.summit-cta .wrap { position: relative; display: grid; justify-items: center; gap: 1.4rem; }
.summit-cta h2 { color: #F4F7FC; max-width: 16ch; }
.summit-cta .lede { color: #AEBBD0; margin-inline: auto; }
.flag-mark { width: 3.4rem; height: 3.4rem; color: var(--flag); filter: drop-shadow(0 0 18px rgba(245,194,107,.45)); }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: #8FA0B8; padding-block: 3rem; border-top: 1px solid var(--night-line); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 2rem; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.site-footer a { text-decoration: none; color: #C9D3E3; }
.site-footer a:hover { color: #fff; }

/* ---------- Document pages (privacy, terms, support) ---------- */
.doc-hero { background: var(--night); color: #E8EEF8; padding-block: 8rem 3.5rem; position: relative; overflow: hidden; }
.doc-hero canvas.terrain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.doc-hero .wrap { position: relative; }
.doc-hero h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); color: #F4F7FC; }
.doc-hero p { color: #AEBBD0; margin-top: 1rem; }
.doc { padding-block: 3.5rem 6rem; }
.doc .wrap { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); }
.doc nav.toc {
  position: sticky; top: 2rem; align-self: start;
  display: grid; gap: 0.15rem; font-size: 0.95rem;
  /* A dotted trail with a waypoint on the section you're reading. */
  padding-left: 1.1rem;
  background: radial-gradient(circle, var(--contour) 1px, transparent 1.4px) 0.28rem 0 / 6px 7px repeat-y;
}
.doc nav.toc a { position: relative; text-decoration: none; color: var(--ink-soft); padding: 0.28rem 0; transition: color .2s ease; }
.doc nav.toc a:hover { color: var(--route); }
.doc nav.toc a::before {
  content: ""; position: absolute; left: -1.1rem; top: 50%;
  width: 0.62rem; height: 0.62rem; margin-top: -0.31rem; margin-left: 0.24rem;
  border-radius: 50%; background: var(--route);
  box-shadow: 0 0 0 4px rgba(61, 99, 221, .18);
  transform: scale(0); transition: transform .25s cubic-bezier(.3,.7,.2,1.3);
}
.doc nav.toc a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.doc nav.toc a[aria-current="true"]::before { transform: scale(1); }
@media (prefers-reduced-motion: reduce) { .doc nav.toc a::before { transition: none; } }
.doc article { max-width: 42rem; }
.doc article h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); margin: 3rem 0 0.8rem; scroll-margin-top: 2rem; }
.doc article h2:first-child { margin-top: 0; }
.doc article h3 { font-size: 1.25rem; margin: 1.8rem 0 0.5rem; }
.doc article p, .doc article li { color: #2E3A50; line-height: 1.65; }
.doc article p + p { margin-top: 0.9rem; }
.doc article ul { padding-left: 1.2rem; display: grid; gap: 0.45rem; margin: 0.8rem 0; }
.doc article a { color: var(--route); text-underline-offset: 3px; }
.summary-card { border: 1px solid var(--rule); background: var(--paper-raised); border-radius: 20px; padding: 1.4rem 1.6rem; margin-bottom: 2.5rem; }
.summary-card p { color: var(--ink) !important; }
.caps-note { font-weight: 600; }
details.faq { border-bottom: 1px solid var(--rule); padding: 1.1rem 0; }
details.faq summary { cursor: pointer; font: 600 1.15rem/1.35 var(--serif); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font: 400 1.4rem/1 var(--sans); color: var(--route); transition: transform .25s ease; }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq p { margin-top: 0.7rem; }
.contact-card { margin-top: 3rem; border-radius: 22px; background: var(--night); color: #E8EEF8; padding: 2rem; display: grid; gap: 0.8rem; }
.contact-card p { color: #AEBBD0 !important; }
.contact-card a.mail { color: #fff; font: 600 1.5rem/1.2 var(--serif); text-decoration: none; }
@media (max-width: 860px) { .doc .wrap { grid-template-columns: 1fr; } .doc nav.toc { position: static; display: none; } }

/* Visible only to screen readers. */
.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; }

/* ---------- Feedback choices ---------- */
.choices { display: grid; gap: 1rem; }
.choice {
  display: grid; gap: 0.35rem; text-decoration: none;
  padding: 1.4rem 1.6rem; border-radius: 20px;
  background: var(--paper-raised); border: 1px solid var(--rule);
  transition: border-color .2s ease, transform .2s ease;
}
.choice:hover { border-color: var(--route); transform: translateY(-1px); }
.choice strong { font: 600 1.35rem/1.2 var(--serif); color: var(--ink); }
.choice span { color: var(--ink-soft); }
