@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&display=swap');

:root {
  --bg: #f2f4f7; --panel: #fff; --ink: #1e2430; --muted: #5f6b7a;
  --line: #d6dde6; --accent: #1f5f8b; --accent-light: #e7f0f7; --accent2: #d08a2c;
  --radius: 16px; --shadow: 0 2px 12px rgba(0,0,0,.08); --max-w: 960px;
  --font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font: 16px/1.6 var(--font-body); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* NAV */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(255,255,255,.88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); padding: 0 20px; transition: box-shadow .3s; }
.nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,.1); }
.nav-inner { max-width: var(--max-w); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 56px; }
.nav-brand { font-family: var(--font-display); font-size: 20px; font-weight: 400; color: var(--accent); display: flex; align-items: center; gap: 10px; letter-spacing: -.2px; }
.nav-brand img { width: 28px; height: 28px; border-radius: 6px; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.lang-toggle { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 4px 10px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); transition: border-color .15s, color .15s; }
.lang-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* CTA BUTTONS */
.cta { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff; font-weight: 700; font-size: 16px; padding: 14px 28px; border-radius: 999px; border: 0; cursor: pointer; box-shadow: 0 4px 16px rgba(31,95,139,.3); transition: transform .15s, box-shadow .15s; }
.cta:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(31,95,139,.35); text-decoration: none; color: #fff; }
.cta-sm { font-size: 14px; padding: 10px 20px; }
.cta-outline { background: rgba(255,255,255,.85); color: var(--accent); border: 2px solid var(--accent); box-shadow: none; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.cta-outline:hover { background: #fff; color: var(--accent); }

/* HERO */
.hero { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 80px 20px 60px; background: #164566; color: #fff; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: url('../img/trail.jpg') center/cover no-repeat; opacity: .85; z-index: 0; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,69,102,.3) 0%, rgba(30,36,48,.55) 100%); z-index: 0; }
.hero > * { position: relative; z-index: 1; }
.hero-badge { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: rgba(255,255,255,.65); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 6px 16px; margin-bottom: 24px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(36px, 7vw, 64px); font-weight: 400; line-height: 1.05; margin-bottom: 20px; letter-spacing: -.5px; }
.hero h1 span { color: #7ec3e8; }
.hero p { font-size: clamp(16px, 2.5vw, 19px); max-width: 540px; color: rgba(255,255,255,.75); margin-bottom: 36px; line-height: 1.6; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; align-items: center; }
/* "Get it on Google Play" badge — the prominent primary CTA */
.gp-badge { display: inline-flex; align-items: center; gap: 12px; background: #000; color: #fff; border-radius: 12px; padding: 13px 26px; text-decoration: none; box-shadow: 0 6px 20px rgba(0,0,0,.28); border: 1px solid transparent; transition: box-shadow .15s, border-color .15s; }
.gp-badge:hover { box-shadow: 0 8px 28px rgba(0,0,0,.42); border-color: rgba(255,255,255,.45); }
.gp-badge svg { width: 30px; height: 30px; flex-shrink: 0; }
.gp-badge .gpb-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.gp-badge .gpb-text small { font-size: 10px; text-transform: uppercase; letter-spacing: .7px; opacity: .92; }
.gp-badge .gpb-text b { font-size: 21px; font-weight: 600; letter-spacing: .2px; }
.hero-seelink { display: inline-block; margin-top: 20px; color: rgba(255,255,255,.75); font-size: 14px; text-decoration: none; font-weight: 600; }
.hero-seelink:hover { color: #fff; }
.final-cta .hero-seelink { color: var(--accent); }
.hero-stats { display: flex; gap: 40px; margin-top: 56px; font-size: 13px; color: rgba(255,255,255,.5); letter-spacing: .3px; }
.hero-stats b { display: block; font-family: var(--font-display); font-size: 28px; color: #fff; font-weight: 400; margin-bottom: 2px; }

/* SHOWCASE SECTIONS */
.showcase {
  padding: 80px 20px;
}
.showcase:nth-child(odd) { background: var(--bg); }
.showcase:nth-child(even) { background: linear-gradient(180deg, #e6ebf1 0%, var(--bg) 100%); }
.showcase-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1fr;
  gap: 40px; align-items: center;
}
.showcase-label {
  display: inline-block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px; color: var(--accent);
  margin-bottom: 12px;
}
.showcase-text h2 {
  font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px);
  font-weight: 400; line-height: 1.15; margin-bottom: 16px; color: var(--ink);
}
.showcase-text p {
  color: var(--muted); font-size: 16px; line-height: 1.7; margin-bottom: 28px; max-width: 480px;
}
.showcase-phone {
  display: flex; justify-content: center;
}
.showcase-phone img {
  width: 100%; max-width: 280px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.15), 0 4px 16px rgba(0,0,0,.08);
  border: 1px solid rgba(0,0,0,.06);
  transition: transform .4s ease;
}
.showcase:hover .showcase-phone img {
  transform: translateY(-4px);
}

@media (min-width: 768px) {
  .showcase { padding: 120px 20px; }
  .showcase-inner { grid-template-columns: 1fr 1fr; gap: 60px; }
  .showcase-flip .showcase-text { order: 2; }
  .showcase-flip .showcase-phone { order: 1; }
}

/* ALSO INCLUDED */
.also {
  padding: 60px 20px 80px;
  background: var(--accent); color: #fff;
  position: relative; overflow: hidden;
}
.also::before {
  content: ""; position: absolute; inset: 0;
  background: url('../img/hero.jpg') center/cover no-repeat; opacity: .22;
}
/* A scrim over the photo. Without it the white display serif has to survive whatever happens to
   be behind it, and the right-hand cards land on open sky — pale blue under white 400-weight
   serif is close to invisible. The photo still reads; the type stops fighting it. */
.also::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,14,22,.30) 0%, rgba(6,14,22,.46) 100%);
}
.also-inner {
  max-width: var(--max-w); margin: 0 auto; position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr; gap: 24px;
}
.also-item {
  padding: 28px 24px;
  background: rgba(8,16,26,.26); border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.20);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: background .2s;
}
.also-item:hover { background: rgba(255,255,255,.14); }
.also-icon { font-size: 28px; margin-bottom: 12px; }
.also-item h3 {
  font-family: var(--font-display); font-size: 20px; font-weight: 400;
  margin-bottom: 8px; text-shadow: 0 1px 12px rgba(0,0,0,.55);
}
.also-item p { font-size: 14px; line-height: 1.6; opacity: .92; }

/* The resource headings wrap their text in a link, so the global a{color:var(--accent)} beat the
   section's white and printed accent-on-photo — dark green on a green hillside, near-invisible.
   Inside this section a link takes the surrounding colour; the whole card is the affordance. */
.also a { color: inherit; text-decoration: none; }
.also a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (min-width: 768px) {
  .also-inner { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

/* TRAIL ESSENTIALS */
.trail-essentials { padding: 80px 20px 100px; }
.trail-essentials-inner { max-width: var(--max-w); margin: 0 auto; }
.trail-essentials h2 {
  font-family: var(--font-display); font-size: 32px; font-weight: 400;
  text-align: center; margin-bottom: 48px; color: var(--ink);
}
.essentials-grid {
  display: grid; grid-template-columns: 1fr; gap: 16px;
}
.essential {
  padding: 28px 24px; background: var(--panel);
  border-radius: var(--radius); border: 1px solid var(--line);
}
.essential-key {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 2px; color: var(--accent); margin-bottom: 6px;
}
.essential-val {
  font-family: var(--font-display); font-size: 24px; font-weight: 400;
  color: var(--ink); margin-bottom: 8px;
}
.essential-note {
  font-size: 14px; color: var(--muted); line-height: 1.6;
}

@media (min-width: 768px) {
  .essentials-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

/* BUILDER NOTE */
.builder {
  padding: 60px 20px; position: relative;
  background: linear-gradient(180deg, var(--bg) 0%, #e0e7ee 50%, var(--bg) 100%);
}
.builder-inner { max-width: 640px; margin: 0 auto; }
.builder-quote {
  position: relative; padding: 36px 32px;
  border-left: 3px solid var(--accent);
}
.builder-quote p {
  font-size: 17px; line-height: 1.7; color: var(--ink);
  font-style: italic;
}
.builder-sig {
  margin-top: 16px; font-size: 14px; font-weight: 600;
  color: var(--accent); font-style: normal;
}

/* FINAL CTA */
.final-cta { padding: 100px 20px; text-align: center; background: var(--bg); }
.final-cta h2 { font-family: var(--font-display); font-size: 32px; font-weight: 400; margin-bottom: 12px; }
.final-cta p { color: var(--muted); margin-bottom: 36px; max-width: 480px; margin-left: auto; margin-right: auto; line-height: 1.6; }

/* FOOTER */
.footer { padding: 36px 20px; text-align: center; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.footer a { color: var(--muted); transition: color .15s; }
.footer a:hover { color: var(--accent); text-decoration: none; }
.footer-links { display: flex; gap: 24px; justify-content: center; margin-bottom: 12px; }

/* MOBILE NAV */
.nav .cta-sm .cta-short { display: none; }
@media (max-width: 480px) {
  .nav { padding: 0 12px; }
  .nav-inner { height: 44px; }
  .nav-brand { font-size: 15px; gap: 6px; }
  .nav-brand img { width: 22px; height: 22px; }
  .nav-brand span { font-size: 13px; }
  .nav-right { gap: 6px; }
  .nav .cta-sm { font-size: 11px; padding: 5px 10px; white-space: nowrap; border-radius: 6px; box-shadow: none; font-weight: 600; }
  .lang-toggle { padding: 3px 7px; font-size: 11px; }
  .hero-stats { gap: 20px; }
  .hero-stats b { font-size: 22px; }
  .nav .cta-sm .cta-long { display: none; }
  .nav .cta-sm .cta-short { display: inline; }
}


/* ---------- endorsement stream ----------
   A seamless horizontal loop, same markup and geometry as randonav.app. The track holds the
   quotes twice and translates by exactly -50%, so the duplicate arrives where the original began
   at the moment the animation resets. Duration comes from --stream-duration, set per page from
   the card count, so adding a quote lengthens the loop instead of speeding it up.

   Pauses on hover and on keyboard focus, and prefers-reduced-motion drops it to a plain
   scrollable row — an animation nobody can stop is an accessibility problem. */
.stream{margin:56px 0 8px;overflow:hidden}
.stream h2{font-size:clamp(22px,3vw,28px);margin:0 0 24px}

.stream-viewport{position:relative;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent);
  mask-image:linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent)}

/* Spacing is a per-card margin, not a flex gap: n cards have n-1 gaps, so a gap makes one full
   period 20px shorter than half the track and the loop jumps by that much every cycle. No
   horizontal padding on the track either — translateX(-50%) resolves against the border box. */
.stream-track{display:flex;width:max-content;padding:4px 0;
  animation:stream-slide var(--stream-duration,40s) linear infinite}
.stream-track:hover,.stream-track:focus-within{animation-play-state:paused}
@keyframes stream-slide{from{transform:translate3d(0,0,0)}to{transform:translate3d(-50%,0,0)}}

.tq{flex:0 0 320px;margin:0 20px 0 0;background:var(--panel-alt,#f5f7f9);border-radius:15px;padding:24px 22px 20px;
  display:flex;flex-direction:column}
.tq blockquote{margin:0 0 14px;font-size:16.5px;line-height:1.6;position:relative;flex:1}
.tq blockquote::before{content:"\201C";position:absolute;left:-4px;top:-18px;
  font-size:48px;line-height:1;color:var(--line,#dde5ec)}
.tq figcaption{font-size:13.5px;font-weight:700}
.tq figcaption span{display:block;font-weight:400;color:var(--muted,#5b6b7c);margin-top:2px}

/* too few cards to loop convincingly — centre them and stand still */
.stream-static .stream-viewport{-webkit-mask-image:none;mask-image:none}
.stream-static .stream-track{animation:none;width:auto;flex-wrap:wrap;justify-content:center;gap:20px}
.stream-static .tq{flex:1 1 280px;max-width:360px;margin:0}

@media(prefers-reduced-motion:reduce){
  .stream-track{animation:none;overflow-x:auto;scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch}
  .stream-track>[aria-hidden="true"]{display:none}
  .tq{scroll-snap-align:start}
  .stream-viewport{-webkit-mask-image:none;mask-image:none}
}

