/* Stockpile Scan — site styles.
   One stylesheet, no framework. The look follows the app's onboarding:
   dusk-teal gradient, a soft teal glow behind illustrations, Sora titles,
   system body text, green capsule buttons, 7 % white cards. */

/* ---------- Fonts (Sora, SIL OFL — see /fonts/OFL.txt) ---------- */

/* Titles only use Sora at 600 and 700. */
@font-face {
  font-family: "Sora";
  src: url("/fonts/Sora-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("/fonts/Sora-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  /* Backdrop: the app icon's dusk teal. */
  --bg-top: #24475a;
  --bg-bottom: #10222d;
  --bg-deep: #0c1a23;
  --glow-rgb: 79 140 158;            /* #4F8C9E */

  /* Accents from the onboarding. */
  --green: #3ddb7a;                  /* go / done, primary fill */
  --green-rgb: 61 219 122;
  --ink: #10222d;                    /* text on green */
  --gold: #ffd14d;                   /* past the start */
  --gold-rgb: 255 209 77;
  --sky: #8fdbf5;
  --sky-rgb: 143 219 245;
  --orange: #ff9938;                 /* warnings */
  --earth: #cc9e6b;                  /* pile earth */
  --pile-green: #4dcc78;             /* covered pile */
  --olive: #a89924;
  --olive-rgb: 168 153 36;

  /* Text and surfaces. */
  --text: #fff;
  --text-2: rgb(255 255 255 / 0.72);
  --text-3: rgb(255 255 255 / 0.62);
  --card: rgb(255 255 255 / 0.07);
  --card-strong: rgb(255 255 255 / 0.1);
  --line: rgb(255 255 255 / 0.1);
  --scrim-rgb: 16 34 45;

  --radius-card: 18px;
  --radius-big: 24px;
  --radius-tile: 12px;

  --font-title: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --max: 1120px;
  --gutter: 16px;
  --header-h: 56px;
  --section-pad: 72px;

  /* viewport-fit=cover: keep content clear of the notch / Dynamic Island
     in landscape (backgrounds still run edge to edge). */
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);

  color-scheme: dark;
}

@media (min-width: 600px) {
  :root { --gutter: 24px; --section-pad: 88px; }
}
@media (min-width: 720px) {
  :root { --header-h: 64px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 32px; --section-pad: 104px; }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
  background: var(--bg-bottom);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-bottom);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

main { flex: 1 0 auto; }

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

img,
video { height: auto; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
  overflow-wrap: break-word;   /* very large text sizes: break, don't clip */
}

h1 { font-size: clamp(2.375rem, 1.55rem + 3.4vw, 4rem); line-height: 1.06; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.875rem, 1.45rem + 1.8vw, 2.75rem); letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0; text-wrap: pretty; }

a { color: inherit; }

::selection { background: rgb(var(--green-rgb) / 0.35); color: #fff; }

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

/* Keeps a phrase on one line where it fits (wraps between phrases). */
.keep { display: inline-block; max-width: 100%; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: max(var(--gutter), var(--safe-l));
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--green);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 10px; }

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

.section { padding-block: var(--section-pad); }
/* Back-to-back sections share the dark background: don't stack two full
   paddings between them. */
.section + .section { padding-top: calc(var(--section-pad) * 0.6); }
/* An in-page link lands with the section's heading ~40 px under the header. */
.section[id] { scroll-margin-top: calc(40px - var(--section-pad)); }
.section + .section[id] { scroll-margin-top: calc(40px - var(--section-pad) * 0.6); }

.section-head {
  max-width: 680px;
  margin-bottom: clamp(32px, 4vw, 48px);
}
.section-head.center { margin-inline: auto; text-align: center; }

.eyebrow {
  margin-bottom: 12px;
  color: var(--green);
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.lede {
  color: var(--text-2);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.5;
}

/* ---------- Icon tiles (40 × 40, radius 12, tint at 16 %) ---------- */

.tile {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-tile);
  color: var(--tile, var(--green));
  background: rgb(var(--tile-rgb, var(--green-rgb)) / 0.16);
}
.tile svg { width: 22px; height: 22px; }
.tile-green { --tile: var(--green); --tile-rgb: var(--green-rgb); }
.tile-gold  { --tile: var(--gold);  --tile-rgb: var(--gold-rgb); }
.tile-sky   { --tile: var(--sky);   --tile-rgb: var(--sky-rgb); }
.tile-olive { --tile: #d9c63c;      --tile-rgb: var(--olive-rgb); }
.tile-lg { width: 52px; height: 52px; border-radius: 15px; }
.tile-lg svg { width: 28px; height: 28px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-wrap: balance;     /* one line normally; wraps evenly at very large text sizes */
  max-width: 100%;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, background-color 0.15s ease;
}

/* "Coming soon to the App Store" on one line down to 320 px. */
@media (max-width: 359px) {
  .btn { gap: 8px; padding: 0 16px; font-size: 1rem; }
}

.btn-primary {
  background: var(--green);
  color: var(--ink);
  box-shadow: 0 10px 28px -12px rgb(var(--green-rgb) / 0.7);
}
.btn-primary:hover { filter: brightness(1.07); }
.btn-primary:active { transform: translateY(1px); opacity: 0.88; }

.btn-sm {
  flex: none;
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.9375rem;
  white-space: nowrap;
  box-shadow: none;
}

.btn-ghost {
  background: rgb(255 255 255 / 0.1);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16);
}
.btn-ghost:hover { background: rgb(255 255 255 / 0.16); }

/* Download buttons before the App Store link exists: plain text (an <a>
   with no href), drawn as a status pill, not a button. */
.btn.is-soon {
  background: rgb(var(--green-rgb) / 0.12);
  color: #d4f7e2;
  box-shadow: inset 0 0 0 1px rgb(var(--green-rgb) / 0.42);
  cursor: default;
  pointer-events: none;
  filter: none;
}
.btn.is-soon::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgb(var(--green-rgb) / 0.18);
}
.btn-sm.is-soon::before { width: 6px; height: 6px; box-shadow: 0 0 0 3px rgb(var(--green-rgb) / 0.18); }

/* ---------- Header ---------- */

/* 0.85: the nav keeps 4.5:1 even with the white report screenshots under it. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-h);
  background: rgb(var(--scrim-rgb) / 0.85);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgb(255 255 255 / 0.07);
}

/* One row; wraps (rather than overlapping) only at very large text sizes. */
.header-inner {
  min-height: calc(var(--header-h) - 1px); /* + the header's 1 px border */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 16px;
}

.brand {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
/* logo-512.png has a wide transparent margin: draw it at 48 px so the pile
   and ring read at ~36 px, and pull the margin back in. */
.brand-logo {
  width: 48px;
  height: 48px;
  margin: -8px -4px -8px -6px;
}

.site-nav {
  display: none;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.site-nav a:hover { color: #fff; background: rgb(255 255 255 / 0.08); }
.site-nav a[aria-current="page"] { color: #fff; }

@media (min-width: 720px) {
  .site-nav { display: flex; }
  .brand { font-size: 1.125rem; }
}

/* Narrow phones: a slimmer pill; below 360 px the header shows the name
   alone (the hero's own App Store pill sits right under it). */
@media (max-width: 374px) {
  .site-header .btn-sm { padding: 0 12px; }
  .site-header .btn-sm::before { display: none; }
}
@media (max-width: 359px) {
  .site-header .btn-sm { display: none; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  margin-top: calc(-1 * var(--header-h));
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: 56px;
  /* The top layer fades the glow out into the page color at the bottom
     edge, so there's no seam above "How it works". */
  background:
    linear-gradient(0deg, var(--bg-bottom) 0, rgb(var(--scrim-rgb) / 0) 96px),
    radial-gradient(ellipse 80% 45% at 50% 78%, rgb(var(--glow-rgb) / 0.42), rgb(var(--glow-rgb) / 0.14) 55%, rgb(var(--glow-rgb) / 0) 100%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  isolation: isolate;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* The copy column is a size container so the headline can be sized to keep
   "Walk around a pile." on one line (its width is 9.3 em in Sora Bold). */
.hero-copy {
  width: 100%;
  max-width: 600px;
  container-type: inline-size;
}

.hero h1 {
  margin-bottom: 18px;
  font-size: clamp(1.875rem, 100cqi / 9.6, 3.5rem);
}


.hero .lede { margin-bottom: 28px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 9px;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.32);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.pill svg { width: 16px; height: 16px; color: var(--green); }

/* Phones: an even 2 × 2 instead of 3 + 1. */
@media (max-width: 599px) {
  .pills {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    justify-content: center;
  }
  .pill { justify-content: center; white-space: normal; }
}

/* Media block: the tall video in its own rounded box on phones, the wide
   video as the hero background on wider screens. */
.hero-media {
  position: relative;
  width: min(100%, 460px);
  margin-top: 40px;
  aspect-ratio: 720 / 900;
  border-radius: var(--radius-big);
  overflow: hidden;
  background: var(--bg-bottom);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), 0 30px 60px -24px rgb(0 0 0 / 0.65);
}

.hero-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 70% 42% at 50% 58%, rgb(var(--glow-rgb) / 0.5), rgb(var(--glow-rgb) / 0.18) 55%, rgb(var(--glow-rgb) / 0) 100%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}
.hero-placeholder img {
  width: 78%;
  max-width: 560px;
  height: auto;
  filter: drop-shadow(0 24px 30px rgb(0 0 0 / 0.35));
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
/* js/site.js sets src. Without JS, browsers draw a src-less <video> as an
   empty player with native controls over the placeholder. */
.hero-video:not([src]) { display: none; }

.hero-scrim { display: none; }

.video-toggle {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18);
  color: #fff;
  cursor: pointer;
}
.video-toggle:hover { background: rgb(0 0 0 / 0.6); }
.video-toggle svg { width: 16px; height: 16px; }
.video-toggle .icon-play { display: none; }
.video-toggle.is-paused .icon-play { display: block; }
.video-toggle.is-paused .icon-pause { display: none; }
.hero.video-ready .video-toggle { display: grid; }
.hero.video-missing .hero-video { visibility: hidden; }

@media (min-width: 820px) {
  /* The video band starts under the header and keeps the video's 16:9
     where it can (the phone in it fills most of the frame's height). */
  .hero {
    --hero-h: clamp(560px, min(56.25vw, 100vh - var(--header-h)), 1100px);
    display: flex;
    align-items: center;
    min-height: calc(var(--header-h) + var(--hero-h));
    padding-top: calc(var(--header-h) + 40px);
    padding-bottom: 56px;
    background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom) var(--header-h)) var(--bg-bottom);
  }
  .hero-inner {
    align-items: flex-start;
    text-align: left;
  }
  .hero-copy {
    position: relative;
    z-index: 2;
    width: min(600px, 54%);
    max-width: none;
    text-shadow: 0 1px 14px rgb(var(--scrim-rgb) / 0.55);
  }
  .hero h1 { font-size: clamp(2.5rem, 100cqi / 9.6, 4rem); }
  .hero-actions,
  .pills { justify-content: flex-start; }
  /* The copy column is too narrow for four pills in one row: 2 × 2, not 3 + 1. */
  @media (max-width: 906px) {
    .pills { display: grid; grid-template-columns: repeat(2, max-content); }
  }

  .hero-media {
    position: absolute;
    inset: var(--header-h) 0 0 0;
    z-index: 0;
    width: auto;
    margin: 0;
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    container: hero-media / size;
  }
  .hero-placeholder {
    background:
      radial-gradient(ellipse 34% 42% at 72% 50%, rgb(var(--glow-rgb) / 0.5), rgb(var(--glow-rgb) / 0.16) 60%, rgb(var(--glow-rgb) / 0) 100%),
      linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  }
  .hero-placeholder img {
    position: absolute;
    left: 72%;
    top: 50%;
    width: clamp(340px, 38vw, 600px);
    transform: translate(-50%, -50%);
  }
  .hero-video { object-position: 82% 50%; }

  .hero-scrim {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
      linear-gradient(90deg, rgb(var(--scrim-rgb) / 0.94) 0%, rgb(var(--scrim-rgb) / 0.86) 38%, rgb(var(--scrim-rgb) / 0.68) 50%, rgb(var(--scrim-rgb) / 0) 62%),
      linear-gradient(0deg, var(--bg-bottom) 0%, rgb(var(--scrim-rgb) / 0) 9%);
  }
  .video-toggle {
    right: max(var(--gutter), var(--safe-r));
    bottom: 28px;
  }
}

/* A band wider than 16:9 would crop the phone in the video (it fills ~85 %
   of the frame's height): fit the height instead, keep it at the right and
   fade its left edge into the scrim. */
@container hero-media (min-aspect-ratio: 16 / 9) {
  .hero-video {
    inset: 0 0 0 auto;
    width: auto;
    height: 100%;
    aspect-ratio: 16 / 9;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 30%);
    mask-image: linear-gradient(90deg, transparent, #000 30%);
  }
}

/* ---------- How it works ---------- */

.steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgb(var(--green-rgb) / 0.16);
  color: var(--green);
  font-family: var(--font-title);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
}

.step-walk {
  display: grid;
  gap: 28px;
  align-items: center;
  padding-bottom: 24px;
}

.step-walk .step-num { margin-bottom: 14px; }
.step-walk h3 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); font-weight: 700; margin-bottom: 10px; }
.step-walk .step-text { color: var(--text-2); margin-bottom: 22px; }

/* The pile-walk mount (filled by /js/pile-walk.js); the module's canvas,
   caption, pause button and fallback are styled here because the CSP
   (style-src 'self') rules out an injected <style>. 5:4 on phones: the scene
   is framed to the width and sits low, so a square leaves the top empty. */
.pile-walk {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 4;
  border-radius: var(--radius-big);
  overflow: hidden;
  background:
    radial-gradient(ellipse 62% 48% at 50% 52%, rgb(var(--glow-rgb) / 0.5), rgb(var(--glow-rgb) / 0.18) 55%, rgb(var(--glow-rgb) / 0) 100%),
    linear-gradient(180deg, #1d3c4c 0%, #132a36 100%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06);
}
.pile-walk-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.pile-walk .pile-walk-caption {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: max-content;   /* left: 50% would cap a shrink-to-fit pill at half the box */
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.32);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.pile-walk-caption > span { flex: none; }
.pile-walk-caption svg { display: block; width: 17px; height: 17px; max-width: none; }
.pile-walk-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.4);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18);
  color: #fff;
  cursor: pointer;
}
.pile-walk-toggle:hover { background: rgb(0 0 0 / 0.55); }
.pile-walk-toggle svg { width: 16px; height: 16px; }
.pile-walk-toggle .icon-play,
.pile-walk-toggle.is-paused .icon-pause { display: none; }
.pile-walk-toggle.is-paused .icon-play { display: block; }
/* Reduce Motion shows a still: nothing to pause. */
@media (prefers-reduced-motion: reduce) {
  .pile-walk-toggle { display: none; }
}
.pile-walk-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pile-walk:empty::before {
  content: "";
  position: absolute;
  inset: 12%;
  background: url("/img/logo-512.png") center 55% / contain no-repeat;
  opacity: 0.9;
}

@media (min-width: 600px) {
  .pile-walk { aspect-ratio: 4 / 3; }
}

.tips {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tips li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 550;
}

.step-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--card);
}
.step-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.step-card p { color: var(--text-2); }

@media (min-width: 720px) {
  .steps { grid-template-columns: 1fr 1fr; gap: 20px; }
  .step-walk { grid-column: 1 / -1; }
  .step-card { padding: 28px; }
}
/* Side by side, step 2's title takes two lines here: keep both bodies level. */
@media (min-width: 720px) and (max-width: 839px) {
  .step-card h3 { min-height: 2.24em; }
}

@media (min-width: 900px) {
  .step-walk {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: clamp(32px, 4vw, 64px);
    padding-bottom: 32px;
  }
}

/* ---------- Phone frame (CSS only) ---------- */

/* .phone-shot sets the width; everything inside scales with it. */
.phone-shot {
  container-type: inline-size;
  width: 100%;
}
.phone {
  position: relative;
  padding: 2.9cqw;
  border-radius: 12.5cqw;
  background: linear-gradient(160deg, #1f2c33, #0b1217 45%, #141d22);
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.14),
    inset 0 0 0 1px rgb(0 0 0 / 0.6),
    0 28px 50px -22px rgb(0 0 0 / 0.75),
    0 8px 18px -10px rgb(0 0 0 / 0.5);
}
.phone-screen {
  position: relative;
  aspect-ratio: 720 / 1565;
  border-radius: 9.8cqw;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 30% at 50% 46%, rgb(var(--glow-rgb) / 0.45), rgb(var(--glow-rgb) / 0) 100%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}
/* Placeholder art until the screenshot loads (or if it is missing). */
.phone-screen::before {
  content: "";
  position: absolute;
  inset: 0 12%;
  background: url("/img/logo-512.png") center 46% / contain no-repeat;
  opacity: 0.55;
}
.phone-screen img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  color: transparent;
}
/* Dynamic Island. */
.phone-screen::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 2.4cqw;
  left: 50%;
  width: 29cqw;
  height: 8.4cqw;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #05090c;
}
.phone.is-empty .phone-screen img { visibility: hidden; }

/* ---------- Features ---------- */

.feature-grid {
  display: grid;
  gap: 16px;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 16px 18px 16px 16px;
  border-radius: var(--radius-card);
  background:
    radial-gradient(ellipse 60% 70% at 22% 50%, rgb(var(--glow-rgb) / 0.3), rgb(var(--glow-rgb) / 0) 100%),
    var(--card);
}
.feature h3 { margin-bottom: 6px; font-size: 1.125rem; }
.feature p { color: var(--text-2); font-size: 1rem; }

.feature-wide {
  grid-template-columns: auto minmax(0, 1fr);
  padding: 20px;
  background: var(--card);
}

@media (min-width: 600px) {
  .feature-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 32px 24px 28px;
    text-align: center;
    border-radius: var(--radius-big);
    background:
      radial-gradient(ellipse 65% 38% at 50% 34%, rgb(var(--glow-rgb) / 0.34), rgb(var(--glow-rgb) / 0) 100%),
      var(--card);
  }
  .feature .phone-shot { width: min(64%, 236px); }
  .feature h3 { font-size: 1.25rem; margin-bottom: 8px; }
  .feature p { font-size: 1.0625rem; max-width: 30ch; margin-inline: auto; }
  /* The two icon cards (export, LiDAR) share the last row. */
  .feature-wide {
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 18px;
    padding: 28px;
    text-align: left;
    background: var(--card);
  }
  .feature-wide p { max-width: none; margin: 0; }
}

/* Two columns are too narrow for an icon card: each gets the whole row. */
@media (min-width: 600px) and (max-width: 979px) {
  .feature-wide { grid-column: 1 / -1; }
  .feature-wide p { max-width: 36em; }
}

/* Three screenshot cards a row, the two icon cards half a row each. */
@media (min-width: 980px) {
  .feature-grid { grid-template-columns: repeat(6, 1fr); }
  .feature { grid-column: span 2; }
  .feature-wide { grid-column: span 3; }
}

/* ---------- Free and private ---------- */

.free-card {
  position: relative;
  padding: 40px 20px;
  border-radius: 28px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 70% at 50% 0%, rgb(var(--glow-rgb) / 0.45), rgb(var(--glow-rgb) / 0) 100%),
    linear-gradient(180deg, var(--bg-top), #17313f);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
  overflow: hidden;
}
.free-card .tile { margin: 0 auto 20px; }
/* Lighter green: the card's top glow is bright enough to drop --green below 4.5:1. */
.free-card .eyebrow { color: #6be6a0; }
.free-card h2 { max-width: 24ch; margin: 0 auto 16px; }
@media (max-width: 359px) { .free-card h2 { font-size: 1.5rem; } }
.free-card .lede { max-width: 34ch; margin: 0 auto 26px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-link svg { width: 18px; height: 18px; transition: transform 0.15s ease; }
.text-link:hover svg { transform: translateX(3px); }

@media (min-width: 720px) {
  .free-card { padding: 64px 48px; }
}

/* ---------- FAQ ---------- */

.faq-wrap { max-width: 800px; }

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  border-radius: var(--radius-card);
  background: var(--card);
  transition: background-color 0.15s ease;
}
.faq-item[open] { background: var(--card-strong); }

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-card);
  font-weight: 650;
  font-size: 1.0625rem;
  list-style: none;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    linear-gradient(var(--green), var(--green)) center / 12px 2px no-repeat,
    linear-gradient(var(--green), var(--green)) center / 2px 12px no-repeat,
    rgb(var(--green-rgb) / 0.14);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}
.faq-answer {
  padding: 0 20px 20px;
  color: var(--text-2);
}
.faq-answer p { max-width: 35em; }   /* ~70 characters a line */

/* Forced colors drop background images, and with them the +/× marker. */
@media (forced-colors: active) {
  .faq-item { border: 1px solid CanvasText; }
  .faq-item summary::after {
    forced-color-adjust: none;
    background:
      linear-gradient(CanvasText, CanvasText) center / 12px 2px no-repeat,
      linear-gradient(CanvasText, CanvasText) center / 2px 12px no-repeat;
    border: 1px solid CanvasText;
  }
}

/* ---------- Final call to action ---------- */

.cta {
  text-align: center;
  background:
    radial-gradient(ellipse 55% 60% at 50% 100%, rgb(var(--glow-rgb) / 0.4), rgb(var(--glow-rgb) / 0) 100%),
    linear-gradient(180deg, var(--bg-bottom) 0%, var(--bg-top) 100%);
}
.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cta-icon {
  width: 112px;
  height: 112px;
  margin-bottom: 24px;
  border-radius: 25px;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), 0 20px 40px -16px rgb(0 0 0 / 0.7);
}
.cta h2 { margin-bottom: 10px; }
.cta .lede { margin-bottom: 28px; }
.cta-note {
  margin-top: 18px;
  color: var(--text-2);   /* --text-3 is under 4.5:1 on the CTA's glow */
  font-size: 0.9375rem;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 28px;
  background: var(--bg-deep);
  border-top: 1px solid rgb(255 255 255 / 0.06);
  color: var(--text-3);
  font-size: 0.9375rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-family: var(--font-title);
  font-weight: 600;
  text-decoration: none;
}
.footer-brand img { width: 36px; height: 36px; margin: -6px -2px -6px -4px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 600px) {
  .footer-links { gap: 4px 0; }
  .footer-links li + li::before {
    content: "·";
    margin: 0 10px;
    color: rgb(255 255 255 / 0.35);
  }
}
.footer-links a {
  color: var(--text-2);
  text-decoration: none;
}
.footer-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Text pages (privacy, 404) ---------- */

/* A text page sits under the sticky header the same way the hero does. */
.text-page {
  margin-top: calc(-1 * var(--header-h));
  padding-top: calc(var(--header-h) + clamp(40px, 6vw, 72px));
  padding-bottom: var(--section-pad);
  background:
    radial-gradient(ellipse 70% 320px at 50% 0%, rgb(var(--glow-rgb) / 0.32), rgb(var(--glow-rgb) / 0) 100%),
    linear-gradient(180deg, var(--bg-top) 0, var(--bg-bottom) 420px) no-repeat,
    var(--bg-bottom);
}

.prose {
  max-width: 720px;
}
.prose h1 {
  font-size: clamp(2.125rem, 1.6rem + 2vw, 3rem);
  margin-bottom: 14px;
}
.prose h2 {
  font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem);
  margin: 44px 0 12px;
}
.prose h3 {
  font-size: 1.125rem;
  margin: 28px 0 8px;
}
.prose p,
.prose ul,
.prose ol {
  margin: 0 0 16px;
  color: var(--text-2);
}
.prose ul,
.prose ol { padding-left: 1.3em; }
/* ~70 characters a line; headings and the "In short" card keep 720 px. */
.prose > p,
.prose > ul,
.prose > ol { max-width: 35em; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--green); }
.prose strong { color: #fff; font-weight: 650; }
.prose a {
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover { text-decoration-thickness: 2px; }
.prose .lede { margin-bottom: 8px; color: var(--text-2); }
.prose .eyebrow { margin-bottom: 12px; color: var(--green); }
.prose-meta {
  color: var(--text-3);
  font-size: 0.9375rem;
}
.prose-summary {
  margin: 32px 0 8px;
  padding: 20px 22px;
  border-radius: var(--radius-card);
  background: var(--card);
}
.prose-summary p:last-child,
.prose-summary ul:last-child { margin-bottom: 0; }
.prose hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

/* 404 */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-block: clamp(24px, 6vw, 72px);
}
.not-found-art {
  width: min(320px, 80%);
  margin-bottom: 20px;
  filter: drop-shadow(0 20px 26px rgb(0 0 0 / 0.35));
}
.not-found h1 {
  font-size: clamp(2rem, 1.6rem + 2vw, 3rem);
  margin-bottom: 12px;
}
.not-found .lede { margin-bottom: 28px; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Text pages: privacy policy ---------- */

/* The "In short" card: four points, each with an icon tile; two columns
   when there's room. */
.prose-summary .eyebrow { margin-bottom: 16px; }
.prose .prose-points {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.prose .prose-points li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0;
}
.prose .prose-points p {
  margin: 0;
  padding-top: 1px;
  font-size: 1rem;
  line-height: 1.5;
}

@media (min-width: 640px) {
  .prose-summary { padding: 24px 26px; }
  .prose .prose-points { grid-template-columns: 1fr 1fr; gap: 20px 28px; }
}

/* ---------- Touch ---------- */

/* 44 px targets where a finger is the pointer (last, so it wins). */
@media (pointer: coarse) {
  .btn-sm { min-height: 44px; }
  .site-nav a { padding-block: 12px; }
  .video-toggle,
  .pile-walk-toggle { width: 44px; height: 44px; }
  .text-link { padding-block: 9px; }
  .footer-links a { display: inline-block; padding-block: 12px; }
}
