/* Homepage shared styles — escape marketing site */
:root {
  /* synced with iOS app — Escape/Utilities/EscapeColors.swift */
  --bg: #0B0B0E;
  --bg-elev: #15151A;
  --bg-blog: #1A1A1E;
  --bg-overlay: rgba(11, 11, 14, 0.72);
  --ink-1: #FFFFFF;
  --ink-2: #A1A1AA;
  --ink-3: #6B6B75;
  --ink-4: #4A4A52;
  --ink-blog: #EDE8DC;
  --ink-blog-2: #B8B3A8;
  --blue: #4DA3FF;
  --blue-hi: #7CBCFF;
  --amber: #F59E0B;
  --green: #4ADE80;
  --warn: #F87171;
  --line-1: #1F1F26;
  --line-2: rgba(255,255,255,0.10);
  --line-3: rgba(255,255,255,0.14);
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', system-ui, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Iowan Old Style', 'Apple Garamond', Charter, Georgia, 'Times New Roman', serif;
  --container: 1180px;
  --reading: 640px;
  --nav-h: 72px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink-1);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: opacity 180ms var(--ease); }
a:hover { opacity: 0.7; }
::selection { background: var(--blue); color: var(--bg); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.hairline { height: 1px; background: var(--line-1); border: 0; margin: 0; }

/* ---------- type primitives ---------- */
.display {
  font-size: clamp(2.5rem, 6.4vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
}
.h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; letter-spacing: -0.02em; font-weight: 500; margin: 0; text-wrap: balance; }
.h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.2; letter-spacing: -0.01em; font-weight: 500; margin: 0; text-wrap: balance; }
.h3 { font-size: 1.375rem; line-height: 1.3; font-weight: 500; margin: 0; }
.body-lg { font-size: 1.125rem; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; margin: 0; }
.body { font-size: 1rem; line-height: 1.6; color: var(--ink-2); margin: 0; }
.small { font-size: 0.875rem; line-height: 1.4; color: var(--ink-3); margin: 0; }
.eyebrow {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-3); margin: 0;
}
.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background 240ms var(--ease), border-color 240ms var(--ease), backdrop-filter 240ms var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: var(--bg-overlay);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom-color: var(--line-1);
}
.nav-inner {
  width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 6px; overflow: hidden; }
.brand-mark img { width: 100%; height: 100%; }
.brand-name { font-weight: 600; font-size: 16px; letter-spacing: -0.015em; color: var(--ink-1); }

.nav-links {
  display: flex; align-items: center; justify-content: center;
  gap: 4px;
}
.nav-links a {
  position: relative;
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 8px 14px;
  font-size: 13px; font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 8px;
  transition: color 200ms ease, background 200ms ease;
}
.nav-links a:hover { color: var(--ink-1); background: rgba(255,255,255,0.025); }
.nav-links a.is-active { color: var(--ink-1); background: rgba(77,163,255,0.08); }
.nav-links a.is-active::after {
  content: ''; position: absolute;
  left: 14px; right: 14px; bottom: -1px;
  height: 1px; background: #4DA3FF;
}
.nav-label { font-weight: 500; }
.nav-hint {
  font-size: 10px; color: var(--ink-4);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  margin-left: 2px;
}
.nav-hint::before { content: '·'; margin-right: 6px; color: var(--ink-4); opacity: 0.7; }
.nav-links a:hover .nav-hint { color: var(--ink-3); }

.nav-getapp {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 12px;
  border-radius: 999px;
  background: var(--ink-1);
  color: #0B0B0E;
  font-size: 13px; font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: transform 200ms ease, background 200ms ease;
}
.nav-getapp:hover { transform: translateY(-1px); background: #fff; }
.nav-getapp-glyph { display: inline-flex; }

@media (max-width: 900px) {
  .nav-links a { padding: 8px 10px; }
  .nav-hint { display: none; }
}
@media (max-width: 720px) {
  .nav-inner { grid-template-columns: auto auto; gap: 12px; }
  .nav-links { display: none; }
  .nav-getapp { padding: 7px 12px; font-size: 12px; }
}

/* ---------- buttons ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-1);
  font: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: border-color 200ms var(--ease), background 200ms var(--ease);
}
.pill:hover { border-color: var(--line-3); background: rgba(255,255,255,0.02); }
.pill .arrow { display: inline-block; transition: transform 240ms var(--ease); }
.pill:hover .arrow { transform: translateX(3px); }
.text-link { color: var(--blue); font-size: 14px; font-weight: 500; }
.text-link:hover { opacity: 0.7; }

/* ---------- app store badge ---------- */
.appstore { height: 52px; display: inline-block; }
.appstore img { height: 100%; width: auto; }

/* ---------- reveals ---------- */
.reveal {
  opacity: 1; transform: none;
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}
.js .reveal { opacity: 0; transform: translateY(12px); }
.js .reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- atmospheric backgrounds ---------- */
.atmos {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  z-index: 0;
}
.atmos::before, .atmos::after {
  content: ''; position: absolute; inset: -10%;
  background: radial-gradient(40% 40% at 18% 8%, rgba(59,130,246,0.08), transparent 60%);
}
.atmos::after {
  background: radial-gradient(50% 50% at 85% 90%, rgba(245,158,11,0.04), transparent 60%);
}

/* ---------- film grain ---------- */
.grain {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  z-index: 0;
}

/* ---------- section spacing ---------- */
.section { padding: clamp(80px, 12vw, 160px) 0; position: relative; }
.section-tight { padding: clamp(60px, 8vw, 96px) 0; position: relative; }

/* ---------- footer ---------- */
.footer { padding: 80px 0 40px; border-top: 1px solid var(--line-1); margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer h6 { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin: 0 0 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: var(--ink-2); font-size: 14px; }
.footer .meta { color: var(--ink-3); font-size: 13px; max-width: 320px; line-height: 1.6; margin-top: 12px; }
.footer .bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 32px; margin-top: 56px; border-top: 1px solid var(--line-1); color: var(--ink-3); font-size: 12px; }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer .brand-col { grid-column: span 2; }
  .footer .bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ============================================================
   Footer (.promise) — global, used on every page
   ============================================================ */
.promise { background: var(--bg, #0B0B0E); padding: 96px 24px 56px; border-top: 1px solid var(--line-1); margin-top: 80px; }
.promise-inner { max-width: 1100px; margin: 0 auto; }
.promise-mark { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.promise-mark img { width: 28px; height: 28px; border-radius: 6px; display: block; }
.promise-name { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink-1); }
.promise-h { font-size: clamp(1.4rem, 2.8vw, 1.875rem); font-weight: 500; letter-spacing: -0.022em; line-height: 1.3; color: var(--ink-1); max-width: 720px; margin: 0 0 56px; text-wrap: balance; }
.promise-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; padding: 36px 0 0; border-top: 1px solid var(--line-1); }
.promise-cols .eyebrow { font-size: 11px; letter-spacing: 0.10em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin: 0 0 16px; }
.promise-cols a { display: block; font-size: 14px; color: var(--ink-2); text-decoration: none; padding: 7px 0; line-height: 1.4; transition: color 200ms ease; }
.promise-cols a:hover { color: var(--ink-1); opacity: 1; }
.promise-foot { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line-1); display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; font-size: 12px; color: var(--ink-4); letter-spacing: 0.02em; }
.promise-foot-dot { color: var(--ink-4); opacity: 0.55; }
@media (max-width: 720px) {
  .promise { padding: 72px 24px 48px; margin-top: 56px; }
  .promise-cols { grid-template-columns: 1fr 1fr; gap: 32px; }
  .promise-h { margin-bottom: 40px; }
}
@media (max-width: 480px) {
  .promise-cols { grid-template-columns: 1fr; gap: 24px; }
}

