/* ResidencyLog landing page: index.html only. support.html and privacy.html use style.css.
   Standard: Projects/team/playbooks/landing-pages.md. White canvas, near-black ink, one accent
   (the app's own blue-black, ResidencyLog/DESIGN.md §2.1 `accent`). */
:root{
  --canvas:#fff;
  --ink:#111;
  --muted:#666;
  --accent:#1f3a5f;
  --wrap:1080px;
  --gutter:24px;
}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{margin:0;background:var(--canvas);color:var(--ink);font:17px/1.5 -apple-system,BlinkMacSystemFont,"Inter","Segoe UI",Roboto,sans-serif;-webkit-font-smoothing:antialiased}
img{display:block;max-width:100%;height:auto}
a{color:inherit}
a:focus-visible{outline:2px solid var(--accent);outline-offset:4px;border-radius:4px}
::selection{background:rgba(31,58,95,.16)}
.nb{white-space:nowrap}

/* 1. Top navigation */
.nav{max-width:var(--wrap);height:80px;margin:0 auto;padding:0 var(--gutter);display:flex;align-items:center;justify-content:space-between;gap:16px}
.brand{display:inline-flex;align-items:center;gap:11px;font-size:19px;font-weight:600;letter-spacing:-.01em;text-decoration:none;white-space:nowrap}
.brand img{width:38px;height:38px;border-radius:9px}
.links{display:flex;align-items:center;gap:30px}
.links a,.foot-links a{padding:14px 0;font-size:12px;font-weight:500;letter-spacing:.12em;text-transform:uppercase;text-decoration:none;white-space:nowrap;color:var(--muted);transition:color .15s}
.links a:hover,.foot-links a:hover{color:var(--ink)}

/* 2. Hero: copy left, phone right */
.hero{max-width:var(--wrap);margin:0 auto;padding:56px var(--gutter) 112px;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);align-items:center;gap:48px}
h1{margin:0;font-size:clamp(40px,4.6vw,56px);font-weight:700;line-height:1.06;letter-spacing:-.03em}
.sub{max-width:27em;margin:24px 0 0;font-size:20px;line-height:1.5;color:var(--muted);text-wrap:balance}
.hero .store-row{margin-top:36px}

/* Store row. Before launch it is one line of text; on approval day each line becomes
   <a class="store-btn">Download ResidencyLog on the App Store</a> <span class="store-note">…</span>
   (_tools/app-live/switch.mjs, rule 2b). */
.store-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px 16px;margin:0;font-size:16px;line-height:1.4}
.store-row strong{display:inline-flex;align-items:center;gap:10px;font-weight:600}
.store-row strong::before{content:"";flex:none;width:7px;height:7px;border-radius:50%;background:var(--accent)}
.store-btn{display:inline-flex;align-items:center;min-height:52px;padding:0 24px;border-radius:12px;background:var(--ink);color:#fff;font-size:16px;font-weight:600;text-decoration:none;transition:background .15s,transform .15s}
.store-btn:hover{background:#000;transform:translateY(-1px)}
.store-note{font-size:13px;color:var(--muted)}

/* iPhone frame: 10px bezel, 44px outer and 34px screen corners, one soft shadow.
   The screen's fill is the app's paper, so nothing flashes white while a screenshot loads. */
.phone{position:relative;width:310px;max-width:100%;margin:0 auto;border:10px solid #111;border-radius:44px;background:#111;box-shadow:0 24px 60px rgba(0,0,0,.12)}
.phone img{width:100%;aspect-ratio:680/1477;border-radius:34px;background:#f7f4ec}
.phone::before{content:"";position:absolute;z-index:1;top:1.5%;left:50%;width:28.4%;aspect-ratio:125/37;border-radius:999px;background:#111;transform:translateX(-50%)}

/* The one accent rule, between the hero and the walkthrough */
.rule{width:calc(100% - 2*var(--gutter));max-width:calc(var(--wrap) - 2*var(--gutter));height:1px;margin:0 auto;border:0;background:var(--accent)}

/* 3. Walkthrough: one centered column, one phone per stop */
.tour{max-width:720px;margin:0 auto;padding:120px var(--gutter) 136px;text-align:center}
.tour h2{margin:0;font-size:clamp(30px,4vw,40px);font-weight:700;line-height:1.1;letter-spacing:-.025em;text-wrap:balance}
.feature{margin:112px 0 0}
.tour h2 + .feature{margin-top:72px}
.feature figcaption{max-width:560px;margin:0 auto 44px;font-size:20px;line-height:1.5;text-wrap:balance}
/* The key phrase stays on one line (the longest is 225px at 18px, inside a 280px column) */
.feature em{font-style:italic;white-space:nowrap}
.feature .phone{width:300px}

/* 4. Footer */
.foot{max-width:var(--wrap);margin:0 auto;padding:0 var(--gutter) 72px;text-align:center}
.foot .store-row{justify-content:center}
.foot-links{display:flex;flex-wrap:wrap;justify-content:center;gap:0 36px;margin-top:36px}
.fine{margin:28px 0 0;font-size:12px;line-height:1.6;color:var(--muted);text-wrap:balance}

/* Tablet and phone: one centered column */
@media (max-width:860px){
  .hero{grid-template-columns:minmax(0,1fr);gap:56px;padding:32px var(--gutter) 88px;text-align:center}
  h1{font-size:clamp(34px,7.4vw,52px);text-wrap:balance}
  .sub{margin-left:auto;margin-right:auto}
  .hero .store-row{justify-content:center}
  .tour{padding:88px var(--gutter) 96px}
  .feature{margin-top:88px}
  .tour h2 + .feature{margin-top:56px}
}
@media (max-width:560px){
  :root{--gutter:20px}
  .nav{height:72px}
  .brand{font-size:18px}
  .brand img{width:36px;height:36px}
  .links{gap:18px}
  .links a{font-size:11px;letter-spacing:.1em}
  .sub,.feature figcaption{font-size:18px}
  .feature figcaption{margin-bottom:36px}
  .foot-links{gap:0 26px}
}
/* Narrowest phones: the headline's second line no longer fits whole, so it wraps where it balances */
@media (max-width:374px){
  h1 .lg{display:none}
  .links .opt{display:none}
}
