:root {
  --bg:#0b0c10; --bg-soft:#12141a; --card:#151924; --text:#e9eefc; --muted:#9aa6c5;
  --brand:#6366f1; --brand-2:#8b5cf6; --ok:#10b981; --warn:#f59e0b;
  --ring: rgba(99,102,241,.35);

  /* iPhone preview defaults (desktop/tablet) */
  --phone-max: 380px;
  --screen-ar: 9 / 19.5; /* bezel aspect */
  --pad-x: 8px;          /* left/right bezel thickness inside the frame */
  --pad-y: 8px;          /* top/bottom bezel thickness */
  --img-fit: cover;      /* fill vertically on desktop */
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif;
  background:linear-gradient(180deg,var(--bg),#0e1118 40%,#0d1117);
  color:var(--text);
  line-height:1.6;
}

/* Layout */
.container{width:min(1120px,92%);margin-inline:auto}
.grid2{display:grid;gap:2.4rem;grid-template-columns:1.1fr .9fr}
@media (max-width:920px){.grid2{grid-template-columns:1fr}}
.section{padding:72px 0}

/* Header */
.site-header{position:sticky;top:0;background:rgba(11,12,16,.6);backdrop-filter:blur(10px);z-index:50;border-bottom:1px solid #161b22}
.nav{display:flex;align-items:center;justify-content:space-between;padding:14px 0}
.brand{display:flex;align-items:center;gap:.6rem;text-decoration:none;color:var(--text)}
.menu{display:flex;gap:1.2rem;align-items:center}
.menu a{color:var(--muted);text-decoration:none;font-weight:500}
.menu a:hover{color:var(--text)}
.btn{display:inline-flex;align-items:center;gap:.5rem;border:1px solid #2b2f3a;border-radius:12px;padding:.7rem 1rem;text-decoration:none;color:var(--text);transition:.2s}
.btn-outline:hover{border-color:#3a4152}
.btn-primary{background:linear-gradient(135deg,var(--brand),var(--brand-2));border-color:transparent;box-shadow:0 10px 30px var(--ring);color:#fff}
.btn-primary:hover{filter:brightness(1.05)}
.hamburger{display:none;width:36px;height:36px;border-radius:10px;border:1px solid #2b2f3a;background:#111}
@media (max-width:840px){
  .sm-hide{display:none}
  .hamburger{display:inline-flex}
  .menu{display:none}
  .menu.open{
    display:flex;flex-direction:column;position:absolute;right:4%;top:64px;
    background:#0f1320;border:1px solid #20283a;border-radius:14px;padding:12px;z-index:60
  }
}

/* Logo swapping */
.logo{height:28px;display:block}
.logo--light{display:none}
.logo--dark{display:none}
.on-dark .logo--light{display:block}
.on-dark .logo--dark{display:none}
.on-light .logo--light{display:none}
.on-light .logo--dark{display:block}

/* Hero */
.hero{position:relative;padding:72px 0 32px}
.hero .lede{color:var(--muted);max-width:58ch}
.hero .accent{background:linear-gradient(135deg,#fff,var(--brand-2));-webkit-background-clip:text;background-clip:text;color:transparent}
.hero-bg{position:absolute;inset:auto 0 0 0;height:240px;background:radial-gradient(60% 70% at 50% 0,var(--ring),transparent 70%);z-index:0}
.hero .container{position:relative; z-index:1}

.store-row{display:flex;gap:1rem;align-items:center;margin:1rem 0 0}
.store-badge img{display:block}

/* Hero single preview */
.hero-media{display:flex;justify-content:center;align-items:center;position:relative;z-index:1}
.hero-media img{width:min(480px,90%);border-radius:28px;border:1px solid #222;box-shadow:0 20px 60px rgba(0,0,0,.45)}

/* Proof */
.proof{padding:28px 0;border-top:1px solid #141922;border-bottom:1px solid #141922;background:linear-gradient(180deg,#0c1018,#0a0f17)}
.proof-wrap{display:flex;gap:1.4rem;flex-wrap:wrap;align-items:center;justify-content:center}
.proof .stat span{font-weight:800}

/* Running photo band with parallax */
.photo-band{
  position:relative; padding:96px 0; min-height:260px;
  background:#0c1020 url('assets/runner.jpg') center / cover no-repeat;
  background-attachment: fixed; border-top:1px solid #141922; border-bottom:1px solid #141922;
  text-align:center; overflow:hidden;
}
.photo-band::before{
  content:""; position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(12,16,32,.35), rgba(12,16,32,.55)),
              radial-gradient(60% 80% at 50% 10%, rgba(99,102,241,.2), transparent 60%);
  z-index:0; pointer-events:none;
}
.photo-band > *{ position:relative; z-index:1; }
.photo-band h3{ margin:0 0 .25rem 0; font-size:1.6rem }
.photo-band p{ margin:0; color:var(--muted) }
@supports (-webkit-touch-callout: none) {.photo-band{ background-attachment: scroll; }}

/* Cards */
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:1.2rem;margin-top:1.2rem}
.card{background:var(--card);border:1px solid #1b2233;border-radius:16px;padding:1.1rem;transition:.2s}
.card h3{margin-top:0}
.card:hover{border-color:var(--brand)}
@media (max-width:980px){.cards{grid-template-columns:1fr 1fr}}
@media (max-width:640px){.cards{grid-template-columns:1fr}}

/* Steps & integrations */
.steps{padding-left:1.2rem}
.integrations{display:flex;gap:.6rem;align-items:center;margin-top:1rem}

/* Tighter space below the "How it works" section */
#how.section{ padding-bottom:32px; }

/* ---------- iPhone-style previews ---------- */
.iphone{
  width:min(var(--phone-max), 92%);
  margin-inline:auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:.7rem;
}
.iphone--sm{ width:min(360px,92%); }
.iphone--xs{ width:min(300px,92%); }

.iphone .iphone-screen{
  position:relative;
  width:100%;
  aspect-ratio: var(--screen-ar);
  border-radius:34px;
  padding:var(--pad-y) var(--pad-x);
  background:linear-gradient(180deg,#2a2f3b,#181c26);
  box-shadow:0 10px 34px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.05);
  overflow:hidden; /* keep the screenshot inside the bezel */
}
.iphone .iphone-screen img{
  width:100%; height:100%;
  object-fit: var(--img-fit);
  object-position:center;
  border-radius:calc(34px - var(--pad-x)); /* keeps inner corners aligned with bezel */
  display:block;
  background:#000;
}
.iphone .iphone-screen::before{
  content:""; position:absolute; top:6px; left:50%; transform:translateX(-50%);
  width:34%; height:20px; background:#0a0d14; border-bottom-left-radius:14px; border-bottom-right-radius:14px;
  box-shadow:0 1px 0 rgba(255,255,255,.04) inset;
}

/* Captions */
.iphone-caption{text-align:center}
.iphone-caption h3{margin:.15rem 0 .15rem}
.iphone-caption p{margin:0; color:var(--muted); font-size:.96rem}

/* Smaller captions used in the how-phones column */
.iphone-caption--sm h3{ font-size:1.05rem; }
.iphone-caption--sm p{ font-size:.9rem; }

/* Two small phones under "How it works" */
.how-phones{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:1.2rem;
  align-items:start;
  justify-items:center;
}
@media (max-width:980px){
  .how-phones{ grid-template-columns:1fr 1fr; } /* keep two-up on tablets */
}

/* Duo layout for AI + Widget phones */
.preview-duo{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:1.6rem;
  align-items:start;
  justify-content:center;
  border-top:1px solid #1b2233;
  padding-top:48px;
  margin-top:0;
  margin-bottom:72px;
}
@media (max-width:980px){
  .preview-duo{ grid-template-columns:1fr 1fr; } /* two-up on tablets */
}

/* CTA */
.cta{padding:72px 0;background:linear-gradient(135deg,#0e1220,#0c1020)}
.cta-inner{text-align:center}
.cta .store-row{justify-content:center}

/* QR under CTA */
.cta-inner .store-row{
  justify-content: center;
  gap: 1rem;
  margin-bottom: 8px;     /* small gap below buttons */
}

.qr-install{
  margin-top: 24px;       /* space from the buttons */
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  opacity: .95;
}
.qr-install img{
  background: #fff;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid #1b2233;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.qr-install .qr-caption{
  margin-top: .35rem;
  font-size: .85rem;
  color: var(--muted);
}

/* Mobile: keep a touch less padding but still roomy */
@media (max-width: 600px){
  .qr-install{ margin-top: 20px; }
  .qr-install img{ width: 96px; height: 96px; }
}

/* Footer */
.site-footer{border-top:1px solid #161b22;background:#0b0e14;padding:24px 0;margin-top:32px}
.foot-grid{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.foot-links a{color:var(--muted);text-decoration:none;margin-right:1rem;font-size:.9rem}
.muted{color:var(--muted);font-size:.85rem}

/* Doc pages */
.doc .prose{max-width:860px;padding:40px 0}
details{background:#0f1422;border:1px solid #1b2233;border-radius:12px;padding:10px 14px;margin:10px 0}
details summary{cursor:pointer;font-weight:600}

/* Support form */
.support-form input,
.support-form textarea {
  width:100%; max-width:480px; padding:10px; margin-top:6px;
  border:1px solid #2b2f3a; border-radius:8px; background:#f9f9fb; color:#0b0c10; font-size:1rem;
}
.support-form input:focus,
.support-form textarea:focus { outline:none; border-color:var(--brand); box-shadow:0 0 0 2px var(--ring); }
.support-form input::placeholder,
.support-form textarea::placeholder { color:#666; }

/* Links on doc pages (Privacy & Support) */
.doc a { color: var(--brand); text-decoration: underline; transition: color .2s; }
.doc a:hover { color: var(--brand-2); }

/* ====== Mobile (≤600px): smaller, slightly taller, thicker side bezel ====== */
@media (max-width: 600px){
  :root{
    --phone-max: 180px; /* overall size of each phone card */
    --screen-ar: 9 / 18.5; /* taller so the screenshot meets top/bottom */
    --pad-x: 6px;        /* a bit more side bezel so image never touches */
    --pad-y: 6px;        /* slimmer top/bottom bezel */
    --img-fit: cover;    /* keep vertical fill */
  }

  .iphone-caption h3{ font-size:1rem; }
  .iphone-caption p{ font-size:.82rem; }
  .iphone-caption--sm h3{ font-size:.98rem; }
  .iphone-caption--sm p{ font-size:.78rem; }
}
