/* Whereabox — shared stylesheet. No frameworks, no JS.
   Tokens follow the app design (ios/Design/app/tokens.json, Developer-Spec.md
   "Color tokens" and "Layout and typography"): 8 pt spacing, radius 20 for
   cards, 16 for buttons, 12 for fields and icon tiles, 24 for large panels. */

:root {
  --canvas: #F3F6FB;
  --surface: #FFFFFF;
  --focus: #EBF4FF;
  --ink: #101A2E;
  --secondary: #59677B;
  --line: #D4DDE9;
  --blue: #075DDD;
  --amber: #A64B00;
  --green: #187334;
  --red: #B52323;
  --attention: #FFF0EF;
  --warm: #FFF4E4;
  --on-blue: #FFFFFF;
  --muted: #E4EAF3;

  --shadow: 0 1px 2px rgba(16, 26, 46, .04), 0 8px 24px rgba(16, 26, 46, .06);
  --device: #101A2E;
  --device-shadow: 0 32px 64px -24px rgba(16, 26, 46, .35);

  --r-card: 20px;
  --r-button: 16px;
  --r-field: 12px;
  --r-panel: 24px;

  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 40px; --s6: 48px; --s8: 64px; --s12: 96px;
  --gutter: 20px;

  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0D1421;
    --surface: #182335;
    --focus: #142E50;
    --ink: #F4F7FD;
    --secondary: #AEBBD0;
    --line: #394A63;
    --blue: #80B3FF;
    --amber: #FFB64D;
    --green: #69DF95;
    --red: #FF9090;
    --attention: #391F29;
    --warm: #382C1B;
    --on-blue: #0D1421;
    --muted: #293950;
    --shadow: 0 0 0 1px rgba(57, 74, 99, .55);
    --device: #2A3A52;
    --device-shadow: 0 32px 64px -24px rgba(0, 0, 0, .6);
  }
}

@media (min-width: 768px) { :root { --gutter: 32px; } }

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body > main { flex: 1 0 auto; }

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

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible, summary:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 8px;
}

h1, h2, h3 { margin: 0; letter-spacing: -0.02em; text-wrap: balance; }

.wrap { width: 100%; max-width: calc(1088px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--text { max-width: calc(720px + 2 * var(--gutter)); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--surface); padding: var(--s1) var(--s2); border-radius: var(--r-field);
}
.skip:focus { left: var(--s2); top: var(--s2); z-index: 10; }

.nowrap { white-space: nowrap; }

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

.site-header { padding: var(--s2) 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-height: 44px; }

.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); font-weight: 700; font-size: 20px; line-height: 25px; letter-spacing: -0.01em;
}
.wordmark:hover { text-decoration: none; }
.wordmark img { width: 32px; height: 32px; border-radius: 8px; }

.site-nav { display: flex; gap: var(--s3); font-size: 16px; line-height: 21px; }
.site-nav a { color: var(--secondary); padding: 12px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: none; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s1);
  min-height: 52px; padding: 14px var(--s3);
  border-radius: var(--r-button);
  font-weight: 600; font-size: 17px; line-height: 22px;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--muted {
  background: var(--surface); color: var(--secondary);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: default;
}
.btn--primary { background: var(--blue); color: var(--on-blue); }

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

.hero { padding: var(--s3) 0 var(--s8); }
.hero + .section { padding-top: var(--s2); }
.hero .wrap { display: grid; gap: var(--s5); align-items: center; }
.hero h1 { font-size: clamp(34px, 8.6vw, 56px); line-height: 1.1; font-weight: 800; letter-spacing: -0.035em; }
.hero h1 .accent { display: block; color: var(--blue); }
.hero .lede { font-size: 19px; line-height: 1.5; color: var(--secondary); margin: var(--s3) 0 var(--s4); max-width: 34em; }
.hero .meta { margin: var(--s2) 0 0; font-size: 15px; line-height: 20px; color: var(--secondary); }

.device {
  width: min(76vw, 300px);
  margin: 0 auto;
  padding: 10px;
  border-radius: 50px;
  background: var(--device);
  box-shadow: var(--device-shadow);
}
.device img { width: 100%; height: auto; border-radius: 40px; background: var(--canvas); }
.device--sm { width: 100%; padding: 8px; border-radius: 40px; }
.device--sm img { border-radius: 32px; }

@media (min-width: 768px) {
  .hero { padding: var(--s5) 0 var(--s8); }
  .hero + .section { padding-top: var(--s4); }
  .hero .wrap { grid-template-columns: minmax(0, 1fr) 280px; gap: var(--s6); }
  .hero .device { width: 280px; }
}
@media (min-width: 1024px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s8); }
  .hero .device { width: 320px; }
}

/* ---------- Sections ---------- */

.section { padding: var(--s8) 0; }
.section--alt { background: var(--surface); }
.section.section--flush { padding-top: 0; }
.section h2 { font-size: clamp(28px, 6vw, 40px); line-height: 1.15; font-weight: 750; }
.section .intro { color: var(--secondary); margin: var(--s2) 0 var(--s4); max-width: 36em; font-size: 19px; line-height: 1.5; }

@media (min-width: 768px) { .section { padding: var(--s12) 0; } }

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border-radius: var(--r-card);
  padding: var(--s3);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.section--alt .card { background: var(--canvas); box-shadow: none; }
.card h3 { font-size: 20px; line-height: 25px; font-weight: 650; margin: var(--s2) 0 var(--s1); letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--secondary); font-size: 16px; line-height: 1.5; }

.features {
  display: grid; gap: var(--s2); grid-template-columns: 1fr;
  list-style: none; padding: 0; margin: 0;
}
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .features { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); } }

.icon {
  width: 44px; height: 44px; border-radius: var(--r-field);
  display: grid; place-items: center; flex: none;
  background: var(--focus); color: var(--blue);
}
.icon svg { width: 24px; height: 24px; }
.icon--warm { background: var(--warm); color: var(--amber); }
.icon--art { background: var(--focus); }
.icon--art img { width: 36px; height: 36px; }

.cats { display: flex; gap: var(--s1); }
.cats .icon { background: var(--focus); }
.cats img { width: 32px; height: 32px; }

/* ---------- Steps ---------- */

.steps {
  display: grid; gap: var(--s2); grid-template-columns: 1fr;
  list-style: none; padding: 0; margin: 0; counter-reset: step;
}
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); } }
.steps li { counter-increment: step; }
@media (min-width: 640px) and (max-width: 1023.98px) {
  /* One column: the number sits left of the text. */
  .steps li { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: var(--s2); align-items: start; }
  .steps li::before { grid-row: 1 / span 2; }
  .steps li h3 { margin-top: 5px; }
}
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--blue); color: var(--on-blue);
  font-weight: 700; font-size: 17px; line-height: 1;
}
.steps li:last-child::before { background: var(--warm); color: var(--amber); box-shadow: inset 0 0 0 2px var(--amber); }

/* ---------- Screenshots ---------- */

.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: 232px;
  gap: var(--s3); overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 calc(-1 * var(--gutter)); padding: var(--s1) var(--gutter) var(--s2);
  scroll-padding: 0 var(--gutter);
  -webkit-overflow-scrolling: touch;
}
.shots figure { margin: 0; scroll-snap-align: start; }
.shots figcaption { margin-top: var(--s2); text-align: center; font-size: 15px; line-height: 20px; color: var(--secondary); }
.shots figcaption strong { display: block; color: var(--ink); font-weight: 650; font-size: 17px; line-height: 22px; margin-bottom: 4px; }
@media (min-width: 768px) {
  .shots {
    grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 260px)); grid-auto-columns: auto;
    justify-content: center; overflow: visible; margin: 0; padding: 0; gap: var(--s6) var(--s6);
  }
}
@media (min-width: 1024px) {
  .shots { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
}

/* ---------- Privacy promise ---------- */

.promise {
  background: var(--surface); border-radius: var(--r-panel); padding: var(--s4) var(--s3);
  box-shadow: var(--shadow);
  display: grid; gap: var(--s3);
}
.promise h2 { font-size: clamp(26px, 5.5vw, 34px); }
.promise p { margin: 0; color: var(--secondary); }
.promise .promise-lead { margin-top: var(--s2); }
.promise .promise-link { margin-top: var(--s3); }
.promise ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.promise li { display: flex; gap: 12px; align-items: flex-start; }
.promise li svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--green); }
@media (min-width: 768px) {
  .promise { grid-template-columns: 1fr 1fr; padding: var(--s6); gap: var(--s6); align-items: start; }
}

/* ---------- Text pages (privacy, terms, support) ---------- */

.page { padding: var(--s3) 0 var(--s8); }
.prose h1 { font-size: clamp(34px, 8vw, 44px); line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; }
.prose .updated { color: var(--secondary); font-size: 15px; line-height: 20px; margin: var(--s1) 0 var(--s4); }
.prose h2 { font-size: 22px; line-height: 28px; font-weight: 700; margin: var(--s5) 0 var(--s1); letter-spacing: -0.015em; }
.prose h3 { font-size: 17px; line-height: 22px; font-weight: 650; margin: var(--s3) 0 var(--s1); }
.prose p, .prose li { color: var(--ink); }
.prose p { margin: 0 0 var(--s2); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 var(--s2); }
.prose li { margin: 0 0 var(--s1); }
.prose .lead { font-size: 19px; color: var(--secondary); }
.prose .intro-lead { margin-top: var(--s2); }
.prose strong { font-weight: 650; }

.note {
  background: var(--focus); border-radius: var(--r-field); padding: var(--s2); margin: 0 0 var(--s3);
}
.note p:last-child { margin-bottom: 0; }

/* FAQ */
.faq { margin: var(--s2) 0 0; display: grid; gap: var(--s1); }
.faq details {
  background: var(--surface); border-radius: var(--r-card); padding: 0 var(--s3);
  box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer; list-style: none;
  min-height: 56px; padding: var(--s2) var(--s4) var(--s2) 0; position: relative;
  font-weight: 650; font-size: 17px; line-height: 22px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 4px; top: 50%;
  width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--secondary); border-bottom: 2px solid var(--secondary);
  transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
.faq details > div { padding: 0 0 var(--s2); }
.faq details > div p { margin: 0 0 12px; color: var(--secondary); }
.faq details > div p:last-child { margin: 0; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }

/* 404 */
.notfound { text-align: center; padding-top: var(--s8); padding-bottom: var(--s12); }
.notfound .code { font-size: 13px; line-height: 18px; font-weight: 700; color: var(--amber); letter-spacing: .12em; text-transform: uppercase; margin: 0; }
.notfound h1 { font-size: clamp(34px, 8vw, 48px); line-height: 1.1; font-weight: 800; margin: var(--s1) 0 var(--s2); }
.notfound p { color: var(--secondary); margin: 0 auto var(--s4); max-width: 28em; }
.notfound img { width: 72px; height: 72px; margin: 0 auto var(--s3); border-radius: 16px; }

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

.site-footer { border-top: 1px solid var(--line); padding: var(--s4) 0 var(--s5); font-size: 15px; line-height: 20px; color: var(--secondary); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); }
.site-footer a { color: var(--secondary); }
.site-footer a:hover { color: var(--ink); }
.site-footer p { margin: 0; }
