/* ============================================================================
   NatureScout — "Undergrowth" web theme.
   Tokens mirror the Android app (ui/theme/Color.kt, Type.kt) one-for-one, so a
   palette change in the app can be replayed here by editing :root below.
   ========================================================================= */

/* --- Fonts -------------------------------------------------------------- */
/* Onest is what the app actually ships (Type.kt falls back to it for both the
   heading and body families), so the site self-hosts the same four weights. */
@font-face {
  font-family: 'Onest';
  src: url('../fonts/onest-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Onest';
  src: url('../fonts/onest-medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Onest';
  src: url('../fonts/onest-semibold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Onest';
  src: url('../fonts/onest-extrabold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- Design tokens ------------------------------------------------------ */
:root {
  /* Undergrowth palette */
  --pine-canopy: #3f5a36;
  --birch-milk: #f7f4e9;
  --fern-wash: #d8e4c8;
  --deep-thicket: #17240f;
  --chanterelle: #c97f2e;
  --cream: #fff9ef;
  --honey-haze: #f3e2c6;
  --toasted-bark: #8a5615;
  --sloe-plum: #7a5064;
  --blossom: #fbeff3;
  --parchment: #f5f2e8;
  --charcoal-moss: #22281e;
  --mushroom-white: #fbf9f1;
  --dry-grass: #e9e4d2;
  --lichen-grey: #5c6353;
  --twig: #8c927f;
  --placeholder-grey: #9aa08d;
  --fly-agaric: #b3372b;
  --scrim: rgba(23, 29, 18, 0.55);
  --location-blue: #4a7daf;

  /* Shape scale (dp → px) */
  --r-card: 20px;
  --r-input: 14px;
  --r-dialog: 26px;
  --r-pill: 999px;
  --r-badge: 12px;

  /* Elevation */
  --shadow-card: 0 1px 3px rgba(34, 40, 30, 0.08);
  --shadow-raised: 0 4px 14px rgba(34, 40, 30, 0.18);
  --shadow-primary: 0 8px 20px rgba(63, 90, 54, 0.38);
  --shadow-secondary: 0 8px 20px rgba(201, 127, 46, 0.38);

  /* Layout */
  --page: 1120px;
  --gutter: 24px;
  --header-h: 68px;
}

/* --- Reset -------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--parchment);
  color: var(--charcoal-moss);
  font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--pine-canopy);
  text-decoration-color: rgba(63, 90, 54, 0.35);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 3px solid var(--chanterelle);
  outline-offset: 3px;
  border-radius: 6px;
}

/* --- Type scale --------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--charcoal-moss);
}

h1 {
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.6rem);
}
h2 {
  font-size: clamp(1.7rem, 1.25rem + 1.9vw, 2.4rem);
}
h3 {
  font-size: 1.2rem;
}
h4 {
  font-size: 1.05rem;
}

p {
  margin: 0 0 1.1em;
}

.eyebrow {
  display: block;
  margin: 0 0 12px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--chanterelle);
}

.lede {
  font-size: 1.15rem;
  color: var(--lichen-grey);
  max-width: 58ch;
}

.muted {
  color: var(--lichen-grey);
}

/* --- Layout helpers ----------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(56px, 8vw, 104px);
}

.section--surface {
  background: var(--mushroom-white);
  border-block: 1px solid var(--dry-grass);
}

.section__head {
  max-width: 62ch;
  margin-bottom: 44px;
}

.center {
  text-align: center;
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--pine-canopy);
  color: var(--birch-milk);
  border-radius: var(--r-pill);
}

.skip-link:focus {
  left: 16px;
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  border: 0;
  border-radius: var(--r-pill);
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out,
    background-color 0.18s ease-out;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--pine-canopy);
  color: var(--birch-milk);
  box-shadow: var(--shadow-primary);
}

.btn--primary:hover {
  background: #35502d;
}

.btn--secondary {
  background: var(--chanterelle);
  color: var(--cream);
  box-shadow: var(--shadow-secondary);
}

.btn--secondary:hover {
  background: #b87126;
}

.btn--outline {
  background: transparent;
  color: var(--pine-canopy);
  box-shadow: inset 0 0 0 1.5px var(--twig);
}

.btn--outline:hover {
  background: var(--fern-wash);
  box-shadow: inset 0 0 0 1.5px var(--pine-canopy);
}

.btn--sm {
  padding: 9px 18px;
  font-size: 0.875rem;
}

/* Google Play button. Swap the whole <a> for the official Play badge image if
   you prefer — see README. */
.btn--play {
  padding: 11px 24px 11px 20px;
  text-align: left;
}

.btn--play .play-mark {
  flex: none;
  width: 22px;
  height: 24px;
}

.btn--play b {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.btn--play small {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.cta-note {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--lichen-grey);
}

/* --- Chips -------------------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  font-size: 0.875rem;
  font-weight: 700;
  background: var(--parchment);
  color: var(--lichen-grey);
  box-shadow: inset 0 0 0 1.5px var(--twig);
}

.chip--fern {
  background: var(--fern-wash);
  color: var(--deep-thicket);
  box-shadow: none;
}

.chip--honey {
  background: var(--honey-haze);
  color: var(--toasted-bark);
  box-shadow: none;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* --- Header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 249, 241, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--dry-grass);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--charcoal-moss);
  text-decoration: none;
  margin-right: auto;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a:not(.btn) {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--lichen-grey);
  text-decoration: none;
  transition: background-color 0.18s ease-out, color 0.18s ease-out;
}

.nav a:not(.btn):hover,
.nav a[aria-current='page'] {
  background: var(--fern-wash);
  color: var(--deep-thicket);
  font-weight: 700;
}

.nav__cta {
  margin-left: 8px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  background: var(--mushroom-white);
  border: 1.5px solid var(--twig);
  border-radius: var(--r-input);
  color: var(--pine-canopy);
  cursor: pointer;
}

@media (max-width: 800px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    inset: calc(var(--header-h)) var(--gutter) auto;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px;
    background: var(--mushroom-white);
    border: 1px solid var(--dry-grass);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-raised);
  }

  .nav[data-open='true'] {
    display: flex;
  }

  .nav__cta {
    margin: 8px 0 0;
  }
}

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 7vw, 88px) clamp(56px, 8vw, 96px);
  background: linear-gradient(180deg, var(--parchment) 0%, #eef0e2 100%);
}

.hero::after {
  /* Fern-wash hills, echoing the launcher-icon background. */
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 220px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 220' preserveAspectRatio='none'%3E%3Cpath fill='%23d8e4c8' fill-opacity='.55' d='M0 118C180 60 420 84 720 140c260 48 480 40 720-14v94H0z'/%3E%3Cpath fill='%233f5a36' fill-opacity='.10' d='M0 168c220-42 440-28 660 16 220 44 500 40 780-10v46H0z'/%3E%3C/svg%3E")
    bottom / 100% 100% no-repeat;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.hero h1 {
  margin-bottom: 20px;
}

.hero__art {
  display: flex;
  justify-content: center;
  /* Without this the row stretches both frames to the tallest one, so the
     offset second phone leaves the first with an oversized dark chin. */
  align-items: flex-start;
  gap: 20px;
}

.hero__art .phone {
  width: min(236px, 70vw);
}

.hero__art .phone:nth-child(2) {
  margin-top: 46px;
}

@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }

  .hero__art .phone:nth-child(2) {
    display: none;
  }
}

/* --- Feature cards ------------------------------------------------------ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  padding: 26px;
  background: var(--mushroom-white);
  border: 1px solid var(--dry-grass);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}

.section--surface .card {
  background: var(--parchment);
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  margin: 0;
  color: var(--lichen-grey);
  font-size: 0.975rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: var(--r-badge);
  background: var(--fern-wash);
  color: var(--pine-canopy);
}

.badge svg {
  width: 24px;
  height: 24px;
}

.badge--honey {
  background: var(--honey-haze);
  color: var(--toasted-bark);
}

.badge--blossom {
  background: var(--blossom);
  color: var(--sloe-plum);
}

/* --- Phone frames / screenshots ----------------------------------------- */
.phone {
  flex: none;
  width: min(280px, 74vw);
  padding: 10px;
  background: var(--charcoal-moss);
  border-radius: 40px;
  box-shadow: var(--shadow-raised), 0 24px 48px rgba(34, 40, 30, 0.16);
}

.phone__screen {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: var(--mushroom-white);
  /* Matches the 1080×2400 device captures, so nothing is cropped. */
  aspect-ratio: 9 / 20;
}

.phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shots {
  display: flex;
  gap: 24px;
  padding: 8px var(--gutter) 28px;
  margin-inline: calc(var(--gutter) * -1);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--twig) transparent;
}

.shots > figure {
  scroll-snap-align: center;
  margin: 0;
  flex: none;
}

.shots figcaption {
  margin-top: 14px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--lichen-grey);
}

/* --- Privacy band ------------------------------------------------------- */
.band {
  padding: clamp(32px, 5vw, 52px);
  border-radius: var(--r-card);
  background: var(--pine-canopy);
  color: var(--birch-milk);
  box-shadow: var(--shadow-card);
}

.band h2,
.band h3 {
  color: var(--birch-milk);
}

.band p {
  color: rgba(247, 244, 233, 0.82);
}

.band .eyebrow {
  color: var(--honey-haze);
}

.band a {
  color: var(--honey-haze);
}

.band .btn--outline {
  color: var(--birch-milk);
  box-shadow: inset 0 0 0 1.5px rgba(247, 244, 233, 0.5);
}

.band .btn--outline:hover {
  background: rgba(247, 244, 233, 0.12);
  box-shadow: inset 0 0 0 1.5px var(--birch-milk);
}

.band__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  align-items: start;
}

/* --- Roadmap list ------------------------------------------------------- */
.ticks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px 32px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.ticks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--dry-grass);
  color: var(--lichen-grey);
  font-size: 0.975rem;
}

.ticks li b {
  color: var(--charcoal-moss);
  font-weight: 700;
}

.ticks svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  color: var(--chanterelle);
}

/* --- Footer ------------------------------------------------------------- */
.site-footer {
  padding-block: 48px 40px;
  background: var(--mushroom-white);
  border-top: 1px solid var(--dry-grass);
  font-size: 0.925rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  align-items: flex-start;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.site-footer a {
  color: var(--lichen-grey);
}

.site-footer small {
  display: block;
  margin-top: 14px;
  color: var(--placeholder-grey);
}

/* --- Legal / document pages --------------------------------------------- */
.doc-hero {
  padding-block: clamp(40px, 6vw, 72px) 28px;
  background: linear-gradient(180deg, var(--parchment) 0%, #eef0e2 100%);
  border-bottom: 1px solid var(--dry-grass);
}

.doc-hero p {
  margin: 0;
  color: var(--lichen-grey);
}

.doc {
  max-width: 78ch;
  padding-block: clamp(36px, 5vw, 64px);
}

.doc h2 {
  margin-top: 2em;
  padding-top: 0.6em;
  border-top: 1px solid var(--dry-grass);
  font-size: 1.5rem;
}

.doc h2:first-of-type {
  margin-top: 1em;
}

.doc h3 {
  margin-top: 1.8em;
  font-size: 1.15rem;
  color: var(--pine-canopy);
}

.doc ul,
.doc ol {
  margin: 0 0 1.1em;
  padding-left: 1.3em;
}

.doc li {
  margin-bottom: 0.5em;
}

.doc li::marker {
  color: var(--chanterelle);
}

.doc strong {
  font-weight: 700;
  color: var(--charcoal-moss);
}

.doc blockquote {
  margin: 1.5em 0;
  padding: 18px 22px;
  background: var(--honey-haze);
  border-left: 4px solid var(--chanterelle);
  border-radius: 0 var(--r-input) var(--r-input) 0;
  color: var(--toasted-bark);
}

.doc blockquote p:last-child {
  margin-bottom: 0;
}

.doc table {
  width: 100%;
  margin: 1.5em 0;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--mushroom-white);
  border: 1px solid var(--dry-grass);
  border-radius: var(--r-input);
  overflow: hidden;
}

.doc th,
.doc td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--dry-grass);
  vertical-align: top;
}

.doc th {
  background: var(--fern-wash);
  color: var(--deep-thicket);
  font-weight: 700;
}

.doc tr:last-child td {
  border-bottom: 0;
}

.doc .table-scroll {
  overflow-x: auto;
}

.doc hr {
  margin: 2.5em 0;
  border: 0;
  border-top: 1px solid var(--dry-grass);
}

.doc code {
  padding: 2px 6px;
  background: var(--dry-grass);
  border-radius: 6px;
  font-size: 0.9em;
}

.toc {
  padding: 20px 24px;
  margin-bottom: 2em;
  background: var(--mushroom-white);
  border: 1px solid var(--dry-grass);
  border-radius: var(--r-card);
}

.toc h2 {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--chanterelle);
}

.toc ol {
  columns: 2;
  column-gap: 32px;
  margin: 0;
  padding-left: 1.2em;
  font-size: 0.95rem;
}

.toc li {
  margin-bottom: 4px;
  break-inside: avoid;
}

@media (max-width: 620px) {
  .toc ol {
    columns: 1;
  }
}

/* --- Motion preferences ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Print -------------------------------------------------------------- */
@media print {
  .site-header,
  .site-footer,
  .doc-hero .btn {
    display: none;
  }

  body {
    background: #fff;
    font-size: 11pt;
  }
}
