/* Agad landing page. Brand from "Trail app UI design" (1a). */

@font-face { font-family: Sora; src: url(assets/fonts/Sora-400.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Sora; src: url(assets/fonts/Sora-600.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: Sora; src: url(assets/fonts/Sora-700.ttf) format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(assets/fonts/IBMPlexMono-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(assets/fonts/IBMPlexMono-Medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }

:root {
  --lime: #A9E56B;
  --forest: #2F6B3A;
  --ink: #15241B;
  --ink-2: #1C231F;
  --paper: #F6F4EE;
  --card: #FFFFFF;
  --muted: #5E6B62;
  --muted-dark: #A3ADA5;
  --line: #E3E6DD;
  --red: #D8463C;
  --radius: 22px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Sora, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--forest); }
.mono { font-family: "Plex Mono", ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--lime); padding: 8px 12px; border-radius: 8px; }

/* ---------- header ---------- */
.nav {
  position: absolute; inset: 0 0 auto; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px max(16px, calc((100% - var(--wrap)) / 2));
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 16px 0 10px; border-radius: 22px;
  background: rgba(21, 36, 27, .85); color: var(--paper);
  text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -.3px;
  backdrop-filter: blur(6px);
}
.brand img { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  color: var(--paper); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 10px 14px; border-radius: 20px;
}
.nav-links a:hover { background: rgba(255, 255, 255, .12); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--paper);
  background: var(--ink) url(assets/img/hero.jpg) center 30% / cover no-repeat;
  padding: 120px 0 0;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(21,36,27,.35) 0%, rgba(21,36,27,.15) 30%, rgba(21,36,27,.85) 70%, var(--ink) 100%);
}
.hero-grid {
  position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: end;
}
.hero-copy { padding-bottom: 96px; }
.hero h1 {
  font-size: clamp(44px, 7vw, 84px); line-height: .98; letter-spacing: -.045em;
  margin: 0 0 18px; font-weight: 700;
}
.hero h1 span { color: var(--lime); }
.hero .lede { font-size: clamp(17px, 2vw, 20px); max-width: 30em; color: #F1F3EC; margin: 0 0 28px; text-shadow: 0 1px 10px rgba(21,36,27,.6); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 24px;
  border-radius: 28px; font-weight: 600; font-size: 16px; text-decoration: none; border: 0; cursor: pointer;
}
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-lime:hover { filter: brightness(1.05); }
.btn-ghost { background: rgba(246,244,238,.12); color: var(--paper); border: 1.5px solid rgba(246,244,238,.35); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn small { display: block; font-size: 11px; font-weight: 400; opacity: .75; line-height: 1.1; }
.btn .two { display: flex; flex-direction: column; line-height: 1.15; }
.soon { margin-top: 14px; font-size: 13px; color: var(--muted-dark); }
.hero-phones { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 18px; }
.hero-phones .phone:first-child { transform: translateY(40px) rotate(-4deg); }
.hero-phones .phone:last-child { transform: rotate(3deg); margin-bottom: -60px; }

/* ---------- device frames ---------- */
.phone {
  width: 250px; flex: none; border-radius: 40px; padding: 9px;
  background: #0B0E0C; box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 0 0 1.5px #2F3A32;
}
.phone img { border-radius: 32px; aspect-ratio: 1206 / 2622; object-fit: cover; width: 100%; }
.watch {
  width: 190px; flex: none; border-radius: 52px; padding: 14px;
  background: #0B0E0C; box-shadow: 0 24px 60px rgba(0,0,0,.4), inset 0 0 0 1.5px #2F3A32;
}
.watch img { border-radius: 38px; }

/* ---------- strip ---------- */
.strip { background: var(--ink); color: var(--paper); padding: 72px 0 40px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.fact { background: var(--ink-2); border-radius: var(--radius); padding: 20px; }
.fact b { display: block; font-family: "Plex Mono", monospace; font-weight: 500; font-size: 30px; color: var(--lime); letter-spacing: -.02em; }
.fact span { color: var(--muted-dark); font-size: 14px; }

/* ---------- sections ---------- */
section { padding: 96px 0; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--forest); margin: 0 0 10px; }
h2 { font-size: clamp(32px, 4.5vw, 52px); line-height: 1.05; letter-spacing: -.035em; margin: 0 0 16px; }
.sub { font-size: 18px; color: var(--muted); max-width: 36em; margin: 0 0 40px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--card); border-radius: var(--radius); padding: 26px; box-shadow: 0 1px 2px rgba(21,36,27,.05); }
.feature .ico {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: #E6F5D6; color: var(--forest); margin-bottom: 16px;
}
.feature .ico svg { width: 24px; height: 24px; }
.feature h3 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.02em; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* screenshots row */
.gallery { display: flex; gap: 22px; overflow-x: auto; padding: 8px 4px 28px; scroll-snap-type: x mandatory; }
.gallery figure { margin: 0; scroll-snap-align: start; }
.gallery figcaption { text-align: center; font-size: 14px; color: var(--muted); margin-top: 14px; }

/* follow / dark band */
.band { background: var(--ink); color: var(--paper); }
.band .eyebrow { color: var(--lime); }
.band .sub { color: var(--muted-dark); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.ticks li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.ticks li::before {
  content: ""; width: 22px; height: 22px; border-radius: 50%; margin-top: 2px;
  background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%2315241B' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.ticks b { display: block; }
.ticks span { color: var(--muted-dark); font-size: 15px; }
.band .ticks span { color: var(--muted-dark); }
.light .ticks span { color: var(--muted); }
.devices { display: flex; justify-content: center; align-items: center; gap: 26px; }
.trio { gap: 16px; }
.trio .watch { flex: 0 1 190px; width: auto; min-width: 0; }

/* photo */
.photo-wrap { padding: 0 0 96px; }
.photo { position: relative; margin: 0 auto; max-width: 960px; border-radius: 28px; overflow: hidden; background: var(--ink); box-shadow: 0 24px 60px rgba(21,36,27,.18); }
.photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(21,36,27,0) 50%, rgba(21,36,27,.85) 100%); pointer-events: none; }
.photo figcaption { position: absolute; left: clamp(20px, 4vw, 40px); bottom: clamp(18px, 4vw, 36px); z-index: 1; color: var(--paper); }
.photo .eyebrow { color: var(--lime); }
.photo-grid { max-width: 960px; margin: 14px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; }
.photo h2 { margin: 0; font-size: clamp(24px, 3.4vw, 40px); text-shadow: 0 2px 16px rgba(21,36,27,.5); }

/* story */
.story { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: center; }
.story .mark { width: 160px; height: 160px; border-radius: 42px; background: var(--ink); display: grid; place-items: center; }
.story .mark img { width: 106px; }
.coords { font-family: "Plex Mono", monospace; color: var(--muted); font-size: 14px; }

/* faq */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--card); border-radius: 18px; padding: 18px 22px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--forest); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 10px 0 0; color: var(--muted); }

/* cta + footer */
.final { background: var(--lime); color: var(--ink); text-align: center; }
.final h2 { margin-bottom: 12px; }
.final p { margin: 0 auto 28px; max-width: 32em; font-size: 18px; }
.final .btn-ink { background: var(--ink); color: var(--paper); }
footer { background: var(--ink); color: var(--muted-dark); padding: 40px 0; font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
footer a { color: var(--paper); text-decoration: none; margin-left: 18px; }
footer a:hover { text-decoration: underline; }
footer .brand { background: transparent; padding: 0; }

/* legal pages */
.legal { padding: 140px 0 80px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(34px, 5vw, 48px); letter-spacing: -.035em; line-height: 1.1; margin: 0 0 8px; }
.legal h2 { font-size: 22px; letter-spacing: -.02em; margin: 36px 0 10px; }
.legal p, .legal li { color: #3d4a42; }
.legal .updated { color: var(--muted); font-family: "Plex Mono", monospace; font-size: 13px; }
.legal-nav { background: var(--ink); }
.legal-nav .nav { position: static; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 40px; }
  .hero-phones { padding-bottom: 0; }
  .hero-phones .phone:last-child { margin-bottom: -40px; }
  .features { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .split .devices { order: -1; }
}
@media (max-width: 600px) {
  .nav-links a:not(.keep) { display: none; }
  .hero { padding-top: 96px; }
  .phone { width: 190px; border-radius: 32px; padding: 7px; }
  .phone img { border-radius: 26px; }
  .hero-phones .phone:first-child { display: none; }
  .hero-phones .phone:last-child { transform: none; }
  .watch { width: 150px; border-radius: 42px; padding: 11px; }
  .watch img { border-radius: 31px; }
  .trio { gap: 8px; }
  .trio .watch { padding: 6px; border-radius: 26px; }
  .trio .watch img { border-radius: 21px; }
  .photo-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
  .photo-grid img { border-radius: 14px; }
  .features { grid-template-columns: 1fr; }
  section { padding: 72px 0; }
  .story { grid-template-columns: 1fr; }
  .story .mark { width: 120px; height: 120px; border-radius: 32px; }
  .story .mark img { width: 80px; }
  footer a { margin: 0 18px 0 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Gallery scrolls horizontally, which clips big shadows into a grey box. */
.gallery .phone { box-shadow: 0 12px 28px rgba(21, 36, 27, .16), inset 0 0 0 1.5px #2F3A32; }

/* ---------- parallax hero + flying logo ---------- */
.hero { background: var(--ink); }
.hero-bg {
  position: absolute; left: 0; right: 0; top: -12%; height: 124%;
  background: url(assets/img/hero.jpg) center 30% / cover no-repeat;
  will-change: transform;
}
.hero::before { z-index: 1; }
.hero-grid { z-index: 2; }

.nav { position: fixed; transition: background-color .25s, box-shadow .25s, backdrop-filter .25s; }
.nav.solid {
  background: rgba(21, 36, 27, .88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06);
}
.brand-slot { width: 96px; height: 44px; flex: none; }

/* Big state is the natural size; JS scales it down toward the nav. */
.flylogo {
  position: fixed; left: 0; top: 0; z-index: 6;
  display: inline-flex; align-items: center; gap: 16px;
  color: var(--paper); text-decoration: none;
  font-weight: 700; font-size: 72px; letter-spacing: -3px; line-height: 1;
  transform-origin: 0 0; will-change: transform;
  padding: 0 0 0 0; border-radius: 999px;
  visibility: hidden; /* until positioned by site.js */
}
.flylogo img { width: 96px; height: 96px; }
.flylogo.ready { visibility: visible; }
.hero-logo-slot { height: 96px; margin-bottom: 22px; }

@media (max-width: 600px) {
  .flylogo { font-size: 52px; letter-spacing: -2px; gap: 12px; }
  .flylogo img { width: 68px; height: 68px; }
  .hero-logo-slot { height: 68px; }
  .hero { padding-top: 92px; }
}
/* Privacy page keeps the static pill. */
.legal-nav .nav { position: static; }

/* Sharper hero: less parallax overscan (less zoom), and on wide screens the
   photo is capped near its real width (1920 px) and fades into the edges. */
.hero-bg { top: -6%; height: 112%; }
@media (min-width: 1200px) {
  .hero-bg {
    left: 50%; right: auto; width: 1200px; margin-left: -600px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
  }
}

/* Phones sit lower and overlap into the stats band below the hero. The
   photo is clipped by .hero-clip so it doesn't spill out with them. */
.hero { overflow: visible; z-index: 2; }
.hero-clip { position: absolute; inset: 0; overflow: hidden; }
.hero::before { z-index: 1; }
.hero-phones { transform: translateY(150px); z-index: 3; }
.hero-phones .phone:first-child { transform: translateY(30px) rotate(-4deg); }
.hero-phones .phone:last-child { transform: rotate(3deg); margin-bottom: 0; }
.strip { position: relative; z-index: 1; padding-top: 190px; }
@media (max-width: 960px) {
  .hero-phones { transform: translateY(120px); }
  .strip { padding-top: 160px; }
}
@media (max-width: 600px) {
  .hero-phones { transform: translateY(90px); }
  .hero-phones .phone:last-child { transform: none; }
  .strip { padding-top: 130px; }
}
