/*
 * Loci website. Follows Apple's Human Interface Guidelines where they apply
 * to the web: the system font (SF on Apple devices), iOS text styles,
 * semantic light/dark colors, 44pt touch targets, visible focus, Reduce
 * Motion, and Apple's App Store marketing rules (official badge, no Apple
 * logo in our own buttons, trademark notice).
 * Icons: Lucide (ISC license).
 */

/* Layout: one centered 1080px column; sections stack, grids collapse to one column on phones. */
:root {
  --bg: #FFFFFF;
  --bg-grouped: #F2F2F7;
  --card: #FFFFFF;
  --label: #000000;
  --label-2: rgba(60, 60, 67, 0.72);
  --label-3: rgba(60, 60, 67, 0.45);
  --separator: rgba(60, 60, 67, 0.2);
  --fill: rgba(118, 118, 128, 0.12);
  --glass: rgba(255, 255, 255, 0.72);
  --accent: #4C7A00;          /* Loci green, 4.5:1 on white */
  --accent-strong: #3A5E00;
  --accent-soft: rgba(76, 122, 0, 0.1);
  --brand: #C8F07A;           /* Loci lime, from the app icon */
  --brand-deep: #1F3A0C;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.06);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 12px;
  --radius-lg: 22px;
  --tap: 44px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-grouped: #000000;
    --card: #1C1C1E;
    --label: #FFFFFF;
    --label-2: rgba(235, 235, 245, 0.7);
    --label-3: rgba(235, 235, 245, 0.4);
    --separator: rgba(84, 84, 88, 0.65);
    --fill: rgba(118, 118, 128, 0.24);
    --glass: rgba(22, 22, 24, 0.72);
    --accent: #C8F07A;
    --accent-strong: #DAF7A0;
    --accent-soft: rgba(200, 240, 122, 0.14);
    --shadow: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font: 400 17px/1.47 var(--font);
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.icon { width: 24px; height: 24px; flex: none; }

.wrap { max-width: 1080px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--card); padding: 10px 14px; border-radius: 10px; }
.skip:focus { left: 12px; }

/* ---------- navigation bar (translucent, like iOS bars) ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--separator); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--label); font: 600 19px/1 var(--font-display); letter-spacing: -0.02em; min-height: var(--tap); }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav ul a { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 12px; border-radius: 10px; color: var(--label-2); font-size: 15px; }
.nav ul a:hover, .nav ul a[aria-current="page"] { color: var(--label); text-decoration: none; background: var(--fill); }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
.large-title { font-size: clamp(40px, 7vw, 72px); line-height: 1.05; font-weight: 700; letter-spacing: -0.035em; }
.title-1 { font-size: clamp(30px, 4.4vw, 44px); line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; }
.title-3 { font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: -0.02em; }
.lead { font-size: clamp(19px, 2.2vw, 22px); line-height: 1.4; color: var(--label-2); max-width: 36ch; }
.eyebrow { font-size: 15px; font-weight: 600; color: var(--accent); letter-spacing: -0.01em; margin: 0 0 10px; }
.footnote { font-size: 13px; line-height: 1.4; color: var(--label-2); letter-spacing: -0.006em; }
.accent { color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding-block: 72px 24px; text-align: center; }
.hero .app-icon { width: 120px; height: 120px; border-radius: 27px; margin: 0 auto 28px; box-shadow: 0 10px 30px rgba(31, 58, 12, 0.28); }
.hero .lead { margin: 20px auto 0; }
.get { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 32px; }
.badge { display: inline-block; line-height: 0; border-radius: 9px; }
.badge img { height: 54px; width: auto; }   /* Apple: at least 40px tall on screen */
.badge:hover { opacity: 0.85; }
.shots { display: flex; justify-content: center; align-items: flex-end; gap: 24px; margin-top: 56px; }
.shot { width: 260px; border-radius: 38px; overflow: hidden; border: 1px solid var(--separator); box-shadow: var(--shadow); background: #000; flex: none; }
.shot.side { width: 220px; opacity: 0.95; }
.shot img { width: 100%; height: auto; aspect-ratio: 390 / 844; }

/* ---------- sections ---------- */
.section { padding-block: 88px; }
.section.grouped { background: var(--bg-grouped); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { margin: 14px 0 0; color: var(--label-2); font-size: 19px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.steps li { background: var(--card); border-radius: var(--radius-lg); padding: 24px; counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 15px; margin-bottom: 16px; }
.steps p { margin: 6px 0 0; color: var(--label-2); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
.feature .tile { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px; color: #fff; }
.feature .tile .icon { width: 24px; height: 24px; }
.feature p { margin: 6px 0 0; color: var(--label-2); }
.t-green { background: #34C759; } .t-blue { background: #007AFF; } .t-orange { background: #FF9500; }
.t-purple { background: #AF52DE; } .t-teal { background: #30B0C7; } .t-red { background: #FF3B30; }

.gallery { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-width: thin; }
.gallery figure { margin: 0; flex: none; width: 240px; scroll-snap-align: start; }
.gallery .shot { width: 100%; border-radius: 34px; }
.gallery figcaption { margin-top: 12px; font-size: 15px; color: var(--label-2); }
.gallery figcaption b { display: block; color: var(--label); font-weight: 600; }

/* ---------- pricing (inset grouped lists) ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.plan { background: var(--card); border-radius: var(--radius-lg); padding: 24px; border: 1px solid var(--separator); }
.plan.featured { border-color: var(--accent); }
.plan .price { font: 700 34px/1.1 var(--font-display); letter-spacing: -0.03em; margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.plan .per { color: var(--label-2); font-size: 15px; }
.plan ul { list-style: none; margin: 18px 0 0; padding: 0; border-top: 0.5px solid var(--separator); }
.plan li { display: flex; gap: 10px; align-items: flex-start; padding: 11px 0; border-bottom: 0.5px solid var(--separator); font-size: 15px; }
.plan li .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--accent); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; padding: 3px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); vertical-align: middle; margin-left: 6px; }
.plans-note { margin-top: 20px; }

.privacy-card { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; background: var(--card); border-radius: var(--radius-lg); padding: 28px; }
.privacy-card .tile { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: #007AFF; color: #fff; }
.privacy-card p { margin: 8px 0 0; color: var(--label-2); }

.cta { text-align: center; padding-block: 96px; }
.cta .app-icon { width: 88px; height: 88px; border-radius: 20px; margin: 0 auto 20px; }
.cta .lead { margin: 12px auto 0; }

/* ---------- documents (privacy, terms, support) ---------- */
.doc { max-width: 720px; padding-block: 56px 88px; }
.doc .large-title { font-size: clamp(34px, 5vw, 48px); }
.doc .updated { margin: 10px 0 36px; }
.doc h2 { font-size: 22px; line-height: 1.3; font-weight: 700; letter-spacing: -0.02em; margin: 36px 0 8px; }
.doc p, .doc li { color: var(--label-2); }
.doc p { margin: 0 0 12px; }
.doc ul { padding-left: 22px; margin: 0 0 12px; }
.doc strong { color: var(--label); font-weight: 600; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 40px; }
.card { background: var(--bg-grouped); border-radius: var(--radius-lg); padding: 20px; }
@media (prefers-color-scheme: dark) { .card { background: var(--card); } }
.card .icon { color: var(--accent); margin-bottom: 10px; }
.card h3 { font-size: 17px; font-weight: 600; }
.card p { margin: 6px 0 0; font-size: 15px; }
details { border-bottom: 0.5px solid var(--separator); }
details:first-of-type { border-top: 0.5px solid var(--separator); }
summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; padding-block: 10px; font-weight: 600; color: var(--label); }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--label-3); border-bottom: 2px solid var(--label-3); transform: rotate(45deg); margin-right: 6px; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(-135deg); }
details p { margin: 0 0 16px; }

/* ---------- footer ---------- */
.footer { border-top: 0.5px solid var(--separator); padding-block: 32px 48px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 14px; }
.footer nav a { color: var(--label-2); font-size: 14px; display: inline-flex; align-items: center; min-height: var(--tap); }
.footer p { margin: 4px 0; }

/* ---------- phones and tablets ---------- */
@media (max-width: 900px) {
  .features, .plans, .steps, .cards { grid-template-columns: 1fr; }
  .features { gap: 28px; }
  .shot.side { display: none; }
}
@media (max-width: 560px) {
  .nav ul a { padding: 0 9px; }
  .nav .hide-sm { display: none; }
  .hero { padding-top: 48px; }
  .section { padding-block: 64px; }
  .privacy-card { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
