/* ─────────────────────────────────────────────────────────────
   proximitii.app — shared design system (2026-07 site redo)
   World: "warmth in the dark" — a living dark map, light finding light.
   Type: Fraunces (feeling) · Inter (interface) · Space Mono (coordinates)
   ───────────────────────────────────────────────────────────── */

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

:root {
  --bg: #080605;
  --bg-2: #0e0b09;
  --surface: rgba(255, 238, 214, 0.045);
  --surface-2: rgba(255, 238, 214, 0.08);
  --border: rgba(255, 238, 214, 0.11);
  --border-soft: rgba(255, 238, 214, 0.07);
  --text: #f6f1ea;
  --text-2: rgba(246, 241, 234, 0.66);
  --text-3: rgba(246, 241, 234, 0.42);
  --y: #ffeb3b; --o: #ff9800; --r: #ff5722; --p: #e91e63;
  --grad: linear-gradient(135deg, var(--y), var(--o) 38%, var(--r) 72%, var(--p));
  --grad-soft: linear-gradient(135deg, rgba(255,235,59,.16), rgba(255,152,0,.16), rgba(233,30,99,.16));
  --ios-blue: #4b9bff;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --serif: 'Fraunces', 'Georgia', serif;
  --mono: 'Space Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --nav-h: 64px;
  --wrap: 1120px;
}

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

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(255, 152, 0, 0.32); color: #fff; }

/* The living-map backdrop (drawn by site.js) */
#bgmap {
  position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%;
  background:
    radial-gradient(1200px 700px at 78% -8%, rgba(255, 100, 30, 0.06), transparent 62%),
    radial-gradient(1000px 640px at -12% 22%, rgba(255, 160, 20, 0.045), transparent 60%),
    var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--o); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Type ─────────────────────────────────────────────── */

h1, h2 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.01em; line-height: 1.06; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6vw, 4.1rem); }
h2 { font-size: clamp(1.85rem, 3.8vw, 2.7rem); }
h3 { font-size: 1.12rem; font-weight: 650; letter-spacing: -0.01em; }
h1 em, h2 em, .g {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
h1 em, h2 em { font-style: italic; font-weight: 540; }

.ache { font-family: var(--serif); font-style: italic; font-weight: 480; letter-spacing: -0.005em; }

p { color: var(--text-2); }
.lede { font-size: 1.14rem; max-width: 58ch; }
.mono { font-family: var(--mono); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3);
}
.eyebrow::before { content: ''; width: 20px; height: 2px; background: var(--grad); border-radius: 2px; }

/* ── Layout ───────────────────────────────────────────── */

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
section { padding: clamp(64px, 9vw, 116px) 0; position: relative; }
.band { max-width: 700px; margin-bottom: clamp(30px, 5vw, 52px); }
.band h2 { margin: 16px 0 14px; }

/* Scroll reveal */
.rv { opacity: 0; transform: translateY(20px); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } }

/* ── Nav ──────────────────────────────────────────────── */

nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(8, 6, 5, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
nav.site-nav.scrolled { border-bottom-color: var(--border-soft); background: rgba(8, 6, 5, 0.86); }
.nav-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; height: var(--nav-h); display: flex; align-items: center; gap: 28px; }

.logo { font-weight: 700; font-size: 1.14rem; letter-spacing: -0.03em; color: var(--text); text-decoration: none; display: inline-flex; align-items: baseline; }
.logo:hover { text-decoration: none; }
.logo .ii { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.nav-links { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.nav-links a { color: var(--text-2); font-size: 0.92rem; font-weight: 500; text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
/* the in-menu CTA only exists for the mobile dropdown — desktop uses the standalone one */
.nav-links .btn { display: none; }

.nav-menu-btn { display: none; margin-left: auto; background: none; border: 0; color: var(--text); padding: 10px; cursor: pointer; }

@media (max-width: 780px) {
  .nav-links {
    display: none;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(10, 8, 6, 0.97);
    -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    padding: 8px 0 14px;
  }
  .nav-links a { padding: 13px 26px; font-size: 1.02rem; }
  .nav-links .btn { margin: 10px 24px 0; justify-content: center; }
  nav.site-nav.menu-open .nav-links { display: flex; }
  .nav-menu-btn { display: block; }
  .nav-inner .btn { display: none; }
  nav.site-nav .nav-links .btn { display: inline-flex; }
}

/* ── Buttons ──────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--sans); font-weight: 650; font-size: 0.98rem; letter-spacing: -0.005em;
  padding: 15px 28px; border-radius: 999px; border: 0; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: transform 0.22s cubic-bezier(.2,.7,.2,1), box-shadow 0.22s, background 0.22s, border-color 0.22s;
}
.btn:hover { text-decoration: none; }
.btn-grad {
  background: var(--grad); color: #200a00;
  box-shadow: 0 10px 34px rgba(255, 110, 30, 0.28), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn-grad:hover { transform: translateY(-2px); box-shadow: 0 16px 44px rgba(255, 110, 30, 0.38), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-ghost {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: var(--surface-2); border-color: rgba(255, 238, 214, 0.2); transform: translateY(-2px); }
.btn-sm { padding: 10px 20px; font-size: 0.88rem; }

/* ── Cards & grids ────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  padding: 28px;
}
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 16px; }

.check-list { list-style: none; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 12px; color: var(--text-2); }
.check-list li::before {
  content: '✓'; position: absolute; left: 0; top: 0;
  font-weight: 800; font-size: 0.9rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ── Device frame (real screenshots) ──────────────────── */

.device {
  display: block; width: 100%; max-width: 330px;
  padding: 9px; border-radius: 52px;
  background: linear-gradient(160deg, #262019, #12100d 40%, #1d1813);
  border: 1px solid rgba(255, 238, 214, 0.14);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55), 0 4px 18px rgba(0,0,0,.4);
}
.device img { border-radius: 43px; width: 100%; }
.device-glow { position: relative; }
.device-glow::before {
  content: ''; position: absolute; inset: -12% -18%;
  background: radial-gradient(closest-side, rgba(255, 120, 30, 0.16), rgba(233, 30, 99, 0.07) 55%, transparent 75%);
  filter: blur(20px); z-index: -1; border-radius: 50%;
}

/* Screenshot gallery (scroll-snap) */
.gallery { display: flex; gap: 26px; overflow-x: auto; padding: 26px 24px 34px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery .shot { scroll-snap-align: center; flex: 0 0 auto; width: min(280px, 72vw); }
.gallery .shot figcaption { margin-top: 16px; text-align: center; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.gallery .shot figcaption b { color: var(--text-2); font-weight: 400; }

/* ── FAQ ──────────────────────────────────────────────── */

.faq { max-width: 760px; }
.faq details {
  border-bottom: 1px solid var(--border-soft);
  padding: 6px 0;
}
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 18px;
  padding: 16px 0; font-weight: 620; font-size: 1.04rem; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pl { font-family: var(--mono); color: var(--text-3); transition: transform 0.3s; flex-shrink: 0; }
.faq details[open] summary .pl { transform: rotate(45deg); }
.faq .a { padding: 0 0 20px; color: var(--text-2); max-width: 62ch; }

/* ── CTA band ─────────────────────────────────────────── */

.cta-band {
  position: relative; overflow: hidden; text-align: center;
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: clamp(56px, 8vw, 92px) 28px;
  background: var(--bg-2);
}
.cta-band::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(560px 300px at 50% 118%, rgba(255, 100, 30, 0.22), transparent 70%),
    radial-gradient(800px 420px at 50% 130%, rgba(233, 30, 99, 0.12), transparent 75%);
  pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band h2 { margin: 14px 0 10px; }
.cta-band .dek { color: var(--text-3); font-size: 0.9rem; margin-top: 18px; font-family: var(--mono); }

/* ── Breadcrumbs ──────────────────────────────────────── */

.crumbs { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 26px; }
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--text-2); text-decoration: none; }
.crumbs .sep { margin: 0 8px; opacity: 0.5; }

/* ── Page hero (spoke pages) ──────────────────────────── */

.page-hero { padding-top: calc(var(--nav-h) + clamp(44px, 7vw, 84px)); padding-bottom: clamp(40px, 6vw, 72px); }
.hero-split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero-split .device { justify-self: center; }
@media (max-width: 860px) { .hero-split { grid-template-columns: 1fr; } }
.page-hero h1 { margin: 16px 0 18px; font-size: clamp(2.3rem, 5vw, 3.4rem); }
.page-hero .lede { margin-bottom: 30px; }

/* Related-feature chips */
.related { display: flex; flex-wrap: wrap; gap: 10px; }
.related a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-soft);
  color: var(--text-2); font-size: 0.9rem; font-weight: 550; text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.related a:hover { border-color: rgba(255, 152, 0, 0.4); color: var(--text); }
.related a::after { content: '→'; color: var(--text-3); }

/* ── Footer ───────────────────────────────────────────── */

footer.site-footer { border-top: 1px solid var(--border-soft); padding: clamp(48px, 7vw, 76px) 0 40px; background: rgba(10, 8, 6, 0.5); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 36px; margin-bottom: 48px; }
@media (max-width: 780px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-brand .tagline { font-family: var(--serif); font-style: italic; font-size: 1.5rem; margin-top: 14px; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.foot-brand p { font-size: 0.9rem; color: var(--text-3); margin-top: 10px; max-width: 30ch; }
.foot-col h5 { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); font-weight: 400; margin-bottom: 16px; }
.foot-col a { display: block; color: var(--text-2); font-size: 0.93rem; text-decoration: none; padding: 5px 0; }
.foot-col a:hover { color: var(--text); }
.foot-legal { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; padding-top: 24px; border-top: 1px solid var(--border-soft); font-size: 0.82rem; color: var(--text-3); }
.foot-legal a { color: var(--text-3); text-decoration: none; }
.foot-legal a:hover { color: var(--text-2); }
.foot-legal .spacer { flex: 1; }

/* ── Beta / live states (html.is-live set by site.js) ─── */

.live-only { display: none; }
html.is-live .live-only { display: revert; }
html.is-live .beta-only { display: none; }

/* ── Misc ─────────────────────────────────────────────── */

.microline { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em; color: var(--text-3); text-transform: uppercase; }
.divider-dot { color: var(--text-3); margin: 0 8px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--bg-2); color: var(--text); padding: 10px 18px; z-index: 200; }
.skip-link:focus { left: 12px; top: 12px; }

:focus-visible { outline: 2px solid var(--o); outline-offset: 3px; border-radius: 4px; }
