/* Latch site. Warm neutrals from the app (App/Support/Theme.swift); Apple system type (SF Pro on Apple devices). */
:root {
  --bg: #EFECE8;
  --bg-2: #E6E2DD;
  --card: #F8F6F3;
  --ink: #1C1B1A;
  --muted: #6E6A66;
  --line: rgba(28, 27, 26, 0.12);
  --fill: #1C1B1A;
  --on-fill: #F3F1EE;
  --glow: rgba(255, 255, 255, 0.9);
  --accent: #2F6B4F;
  --on-accent: #F3F1EE;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141312; --bg-2: #1B1A18; --card: #21201E; --ink: #EDEAE6; --muted: #9C9893;
    --line: rgba(237, 234, 230, 0.12); --fill: #EDEAE6; --on-fill: #141312; --glow: rgba(245, 235, 221, 0.35); --accent: #6FBF8F; --on-accent: #0E1A13;
  }
}
:root[data-theme="dark"] {
  --bg: #141312; --bg-2: #1B1A18; --card: #21201E; --ink: #EDEAE6; --muted: #9C9893;
  --line: rgba(237, 234, 230, 0.12); --fill: #EDEAE6; --on-fill: #141312; --glow: rgba(245, 235, 221, 0.35); --accent: #6FBF8F; --on-accent: #0E1A13;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.47 var(--sans); letter-spacing: -0.022em; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav { display: flex; gap: 22px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .nav .hide-sm { display: none; } }

/* Type */
h1, h2, h3 { font-family: var(--sans); font-weight: 600; letter-spacing: -0.028em; line-height: 1.07; margin: 0; }
h1 { font-size: clamp(40px, 7vw, 72px); letter-spacing: -0.035em; }
h2 { font-size: clamp(32px, 5vw, 48px); }
h3 { font-size: 21px; letter-spacing: -0.02em; line-height: 1.2; }
h1 em, h2 em { font-style: normal; color: var(--accent); }
.eyebrow { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--muted); margin: 0 0 10px; }
.lede { font-size: 21px; line-height: 1.38; color: var(--muted); max-width: 36ch; margin: 20px 0 0; letter-spacing: -0.02em; }
.muted { color: var(--muted); }
section { padding: 88px 0; }
@media (max-width: 640px) { section { padding: 64px 0; } }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head p { color: var(--muted); font-size: 18px; margin: 14px 0 0; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 22px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 16px; border: 1px solid var(--line); }
.btn.fill { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn .small { display: block; font-size: 11px; font-weight: 500; opacity: 0.7; line-height: 1; }
.btn .big { display: block; font-size: 17px; line-height: 1.2; }

/* Hero */
.hero { padding: 56px 0 72px; }
.hero .wrap { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.05fr 1fr; } }
.hero .wrap > * { min-width: 0; }
.scene { position: relative; width: 100%; max-width: 480px; aspect-ratio: 1 / 1.04; margin: 0 auto; }
.scene .path { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene .path path { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 2 10; stroke-linecap: round; fill: none; vector-effect: non-scaling-stroke; opacity: 0.7; animation: walk 1.6s linear infinite; }
@keyframes walk { to { stroke-dashoffset: -24; } }
.scene .steps { position: absolute; left: 60%; top: 40%; font-size: 13px; color: var(--muted); background: var(--bg); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.scene .phone-slot { position: absolute; left: 2%; bottom: 0; width: 47%; }
.scene .key-slot { position: absolute; right: 2%; top: 4%; width: 30%; }
@media (prefers-reduced-motion: reduce) { .scene .path path { animation: none !important; } }

/* Phone frame around real screenshots */
.phone { position: relative; aspect-ratio: 1206 / 2622; border-radius: 13% / 6%; background: #000; padding: 3.2%; box-shadow: 0 40px 70px -35px rgba(0,0,0,0.55), inset 0 0 0 1.5px #3a3a3c; }
.phone img { display: block; width: 100%; height: 100%; }
.phone .shot-dark { display: none; }
.phone img { border-radius: 10.5% / 4.9%; object-fit: cover; }
.phone::before { content: ""; position: absolute; z-index: 1; top: 4.6%; left: 50%; transform: translateX(-50%); width: 29%; height: 3.5%; border-radius: 999px; background: #000; }

/* Key objects */
.sticker { aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #EDEAE6 60%, #DAD5CF); box-shadow: 0 18px 30px -16px rgba(0,0,0,0.45), inset 0 0 0 1px rgba(0,0,0,0.06); display: grid; place-items: center; color: #1C1B1A; }
.sticker svg { width: 40%; }
.qr-card { background: #FBFAF8; color: #1C1B1A; border-radius: 14px; padding: 12%; box-shadow: 0 18px 30px -16px rgba(0,0,0,0.45); transform: rotate(-4deg); }
.qr-card .cap { font-size: 12px; font-weight: 600; margin-top: 10px; text-align: center; letter-spacing: 0.02em; }
.qr-card .cap span { display: block; font-weight: 400; color: #6E6A66; font-size: 11px; }

/* Steps */
.steps-grid { display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 820px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--card); border-radius: 24px; padding: 28px; }
.step .n { font-size: 40px; font-weight: 600; line-height: 1; color: var(--muted); letter-spacing: -0.03em; }
.step h3 { margin: 18px 0 8px; }
.step p { margin: 0; color: var(--muted); }

/* Keys */
.keys { display: grid; gap: 16px; }
@media (min-width: 820px) { .keys { grid-template-columns: 1fr 1fr; } }
.key-card { background: var(--card); border-radius: 28px; padding: 32px; display: grid; grid-template-columns: 120px 1fr; gap: 24px; align-items: center; }
@media (max-width: 480px) { .key-card { grid-template-columns: 1fr; } .key-card .obj { width: 120px; } }
.key-card h3 { margin-bottom: 8px; }
.key-card p { margin: 0; color: var(--muted); }
.key-card .spec { margin-top: 14px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }

/* Places */
.places { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.places span { border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 15px; }
.band { background: var(--bg-2); }

/* Features */
.features { display: grid; gap: 0; border-top: 1px solid var(--line); }
@media (min-width: 820px) { .features { grid-template-columns: 1fr 1fr; column-gap: 48px; } }
.feature { display: grid; grid-template-columns: 28px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.feature svg { width: 24px; height: 24px; margin-top: 3px; color: var(--ink); }
.feature b { display: block; font-weight: 600; margin-bottom: 2px; }
.feature span { color: var(--muted); font-size: 16px; }

/* Pricing */
.plans { display: grid; gap: 16px; }
@media (min-width: 820px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { background: var(--card); border-radius: 28px; padding: 32px; }
.plan.pro { background: var(--accent); color: var(--on-accent); }
.plan.pro .muted, .plan.pro li::before { color: color-mix(in srgb, var(--on-accent) 70%, transparent); }
.plan .price { font-size: 48px; font-weight: 600; letter-spacing: -0.035em; line-height: 1; margin: 12px 0 4px; }
.plan ul { list-style: none; padding: 0; margin: 24px 0 0; }
.plan li { padding: 8px 0 8px 28px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--muted); }

/* Privacy */
.privacy { display: grid; gap: 32px; align-items: center; }
@media (min-width: 820px) { .privacy { grid-template-columns: 1fr 1fr; } }
.privacy ul { margin: 0; padding: 0; list-style: none; }
.privacy li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.privacy li b { display: block; }
.privacy li span { color: var(--muted); font-size: 16px; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { cursor: pointer; font-size: 19px; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 300; font-size: 24px; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 12px 0 0; max-width: 64ch; }

/* Closing + footer */
.closing { text-align: center; }
.closing h2 { max-width: 16ch; margin: 0 auto; }
.closing .actions { justify-content: center; }
footer { border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; justify-content: space-between; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }

/* Document pages (privacy, support, key) */
.doc { max-width: 720px; padding: 64px 16px 88px; margin: 0 auto; }
.doc h1 { font-size: clamp(40px, 7vw, 64px); margin-bottom: 12px; }
.doc h2 { font-size: 26px; margin: 44px 0 10px; }
.doc p, .doc li { font-size: 17px; }
.doc .card { background: var(--card); border-radius: 24px; padding: 24px; margin: 28px 0; }

/* Screens gallery */
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 16px 24px; margin: 0 -16px; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery figure { margin: 0; scroll-snap-align: center; }
.gallery figcaption { margin-top: 18px; }
.gallery figcaption b { display: block; font-weight: 600; }
.gallery figcaption span { color: var(--muted); font-size: 15px; }
@media (max-width: 720px) { .gallery { grid-auto-columns: 62%; } }


/* Appearance toggle */
.top-actions { display: flex; align-items: center; gap: 18px; }
.theme-toggle { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; padding: 0; }
.theme-toggle:hover { background: var(--card); }
.theme-toggle .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
  :root:not([data-theme="light"]) .phone .shot-light { display: none; }
  :root:not([data-theme="light"]) .phone .shot-dark { display: block; }
}
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .phone .shot-light { display: none; }
:root[data-theme="dark"] .phone .shot-dark { display: block; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
