/* Pusharoo — layout density layer (desktop, tablet and phones). Loaded LAST on every public page
   (after site.css, guides.css, mobile.css). Owns: wrap width, nav height, section rhythm, hero height,
   first-fold density on home, docs, guides, privacy and the try-it demo.
   Floors kept on purpose: body text and inputs >= 16px, tap targets >= 44px, safe-area insets.
   Rebuilds keep this file: build/common.py and build/seo/build_guides.py link it after mobile.css. */

/* ---------- Width: use more of wide screens ---------- */
:root{--max:1180px}
@media(min-width:1360px){:root{--max:1240px}}
@media(min-width:1680px){:root{--max:1320px}}

/* ---------- Nav: 56px desktop, 52px phones ---------- */
.nav .wrap{height:56px}
html{scroll-padding-top:64px}

/* ---------- Section rhythm (was 72–128px top and bottom) ---------- */
section{padding:clamp(40px,4.6vw,64px) 0}
.mt{margin-top:clamp(24px,3vw,40px)}
.kicker{margin-bottom:8px}
.flow,.pipe,.platforms{margin-top:clamp(24px,3vw,40px)}
.steps3{margin-top:clamp(24px,3vw,36px)}
.faq{margin-top:clamp(20px,2.6vw,32px)}
.browsers{margin-top:24px}
.final .btns{margin-top:22px}
.stats{margin-top:clamp(20px,2.8vw,36px)}
.stat{padding:16px 18px}
.chips{margin-top:18px}

/* ---------- Desktop + tablet (not phone landscape): hero, try-it, docs grid ---------- */
@media(min-width:861px) and (min-height:501px){
  .lead{margin-top:12px}
  /* Home hero: headline, value, CTAs AND the stat strip in the first screen */
  .hero{padding-top:clamp(20px,3vw,44px);padding-bottom:clamp(20px,2.4vw,32px)}
  .hero h1{font-size:clamp(40px,5.4vw,70px);margin-top:12px;line-height:1.03}
  .hero .lead{margin-top:14px;font-size:clamp(18px,1.6vw,21px);line-height:1.42}
  .hero-ctas{margin-top:22px}
  .hero-meta{margin-top:14px}
  .hero .hero-grid{gap:clamp(24px,4vw,56px)}
  .hero-art svg{max-height:min(46vh,440px);width:auto;margin:0 auto}
  /* Try-it: the #try jump lands on the card, not on 128px of padding */
  #try{padding-top:clamp(20px,2.2vw,32px)}
  .demo{padding:clamp(24px,3.4vw,44px)}
  .demo-steps{margin-top:16px}
  .demo-panel{padding:20px;gap:12px}
}
@media(min-width:901px){
  .docs{grid-template-columns:220px minmax(0,1fr);gap:clamp(28px,3vw,40px)}
  .docs aside{top:72px}
  .docs article{max-width:860px}
}

/* ---------- Docs / privacy / guide articles ---------- */
.docs{padding-top:clamp(14px,2vw,28px);padding-bottom:clamp(48px,5vw,72px)}
.docs article h1[style],.docs article .eyebrow+h1{margin-top:10px!important}
.docs article .lead{margin-top:12px}
.docs article h2{margin:40px 0 12px}
.callout{margin:14px 0}

/* Guides: breadcrumb and the category pill share one row; tighter intro and TL;DR */
.g-crumbs{display:inline-flex;margin:0 12px 0 0;vertical-align:middle}
.g-intro .eyebrow,.g-hub .eyebrow{vertical-align:middle}
.docs.g-page article h1{margin-top:6px}
.g-ctas{margin-top:18px}
.g-meta{margin-top:12px}
.g-tldr{margin:20px 0 4px;padding:18px 22px}
.g-fig{margin:24px 0}
.g-cta{margin-top:36px}
.g-hub{padding-top:clamp(12px,2vw,28px);padding-bottom:clamp(44px,5vw,72px)}
.g-hub h1[style]{margin-top:8px!important}
.g-hub .g-cards{margin-top:28px}
.g-hub h2.g-sec{margin-top:36px}
.g-hub h2.g-sec:first-of-type{margin-top:28px}

/* ---------- Tablet portrait (601–860px) ---------- */
@media(min-width:601px) and (max-width:860px) and (min-height:501px){
  .hero{padding-top:24px;padding-bottom:40px}
  .hero h1{margin-top:12px}
  .hero-ctas{margin-top:22px}
  #try{padding-top:28px}
  .demo{padding:28px}
}

/* ---------- Phones ---------- */
@media(max-width:860px){
  .nav .wrap{height:52px}
  html{scroll-padding-top:60px}
  .nav-links{top:calc(52px + env(safe-area-inset-top));max-height:calc(100dvh - 52px - env(safe-area-inset-top))}
}
@media(max-width:600px){
  section{padding:40px 0}
  .hero{padding-top:12px;padding-bottom:32px}
  .hero h1{margin-top:10px}
  .hero .lead{margin-top:10px}
  .hero-ctas{margin-top:16px}
  .hero-meta{margin-top:12px}
  .stats{margin-top:20px}
  #try{padding-top:24px}
  .demo{padding:20px 18px}
  .demo-steps{margin-top:14px}
  .docs{padding-top:10px;padding-bottom:48px}
  .docs article h2{margin:32px 0 10px}
  .docs.g-page{padding-top:4px}
  .g-crumbs{margin-right:8px}
  .g-intro .eyebrow,.g-hub .eyebrow{font-size:13px;padding:5px 11px}
  .g-tldr{margin-top:16px;padding:16px 18px}
  .docs.g-page aside{margin-top:14px}
  .g-hub{padding-top:6px}
  .g-hub .g-cards{margin-top:20px}
  .g-hub h2.g-sec{margin-top:28px}
}
/* Phone landscape */
@media(orientation:landscape) and (max-height:500px){
  section{padding:32px 0}
  .nav .wrap{height:48px}
  html{scroll-padding-top:56px}
  #try{padding-top:16px}
  .demo{padding:20px 22px;grid-template-columns:1.1fr .9fr;gap:20px;align-items:start}
  .demo h2{font-size:28px}
  .demo-steps{margin-top:12px}
}
@media(orientation:landscape) and (max-height:500px) and (max-width:860px){.nav-links{top:calc(48px + env(safe-area-inset-top))}}

/* ---------- Browser + OS logo rows (replaces the .browsers card grid) ---------- */
.logos{margin-top:clamp(28px,3.4vw,44px);text-align:center}
.logos-h{font-size:24px}
.logos-sub{margin-top:22px;font-size:15px;font-weight:600;color:var(--ink3)}
.logo-row{list-style:none;padding:0;margin:16px auto 0;display:flex;flex-wrap:wrap;justify-content:center;gap:16px clamp(16px,2.6vw,34px);max-width:980px}
.logo-row li{display:flex;flex-direction:column;align-items:center;gap:8px;width:84px;font-size:14px;font-weight:600;line-height:1.2;color:var(--ink2)}
.logo-row img{display:block;width:44px;height:44px;object-fit:contain}
.logo-row.os{margin-top:12px}
.logo-row.os img{width:38px;height:38px}
.logos-note{margin-top:16px;font-size:13px;color:var(--ink3)}

/* ---------- Guides hub: section + .wrap both padded the sides (double gutter on phones) ---------- */
section.g-hub{padding-left:0;padding-right:0}

/* ---------- Phones + tablets: no dead space in feature / use-case cards (icon beside the title) ---------- */
@media(max-width:980px){
  #features .card,.uses .card{display:grid;grid-template-columns:40px minmax(0,1fr);column-gap:14px;align-items:center;align-content:start;padding:16px 18px}
  #features .card{align-items:start}
  #features .card h3{padding-top:8px}
  #features .card .sym,.uses .card .sym{width:40px;height:40px;border-radius:12px}
  #features .card .sym svg,.uses .card .sym svg{width:22px;height:22px}
  #features .card h3,.uses .card h3{margin:0;font-size:18px;line-height:1.25}
  #features .card .sym{grid-row:span 2;align-self:start;margin-top:2px}
  #features .card p{grid-column:2;margin-top:2px;font-size:15px;line-height:1.45}
  .uses .card .notif{grid-column:1/-1;margin-top:12px}
}

/* ---------- Phones: no dead space in cards (icon beside the title, not above it) ---------- */
@media(max-width:640px){
  .grid{gap:12px}
  .steps3 .card{display:grid;grid-template-columns:34px minmax(0,1fr);column-gap:12px;align-items:center;padding:16px 18px}
  .steps3 .card h3{margin:0;font-size:18px;line-height:1.25}
  .steps3 .card>p,.steps3 .card>.code,.steps3 .card>.btn{grid-column:1/-1}
  .steps3{gap:12px}
  .steps3 .card>p{margin-top:8px;font-size:15px}
  .steps3 .card>.btn{justify-self:start;margin-top:12px!important}
  .step-n{width:34px;height:34px}

  /* Hero stats: number beside its label, 2×2 */
  .stats{gap:8px}
  .stat{display:flex;align-items:center;gap:10px;text-align:left;padding:12px 14px;border-radius:16px}
  .stat b{font-size:28px;flex:0 0 auto;min-width:30px;text-align:center}
  .stat span{margin-top:0;font-size:13.5px;line-height:1.25}
  .chips{gap:8px}
  .chip{padding:7px 12px;font-size:14px;gap:6px}

  /* Pricing: smaller $0, checklist in two columns */
  .free-top{gap:14px}
  .big-zero{font-size:72px}
  .check-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;font-size:15px}
  .check-list li{display:flex;align-items:flex-start;line-height:1.3}
  .check-list li::before{flex:0 0 20px;width:20px;height:20px;font-size:12px;margin-right:8px}

  /* Phones & tablets: three iPhone steps side by side instead of three full-size phones stacked */
  .plat{padding:20px}
  .plat > p{font-size:16px}
  .phones{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-width:none;margin-top:18px}
  .phones.one{grid-template-columns:1fr;max-width:150px}
  .phone-step b{font-size:13px;line-height:1.25;margin-top:8px}
  .phone-step span{font-size:12px;line-height:1.3}
  .note{margin-top:16px;padding:14px 16px}
  .pipe{padding:16px}
  .pipe .narrow{max-width:300px}

  /* Logo rows: 4 across, both rows */
  .logos-h{font-size:22px}
  .logo-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 6px;margin-top:14px}
  .logo-row.os{grid-template-columns:repeat(5,minmax(0,1fr))}
  .logo-row li{width:auto;font-size:12.5px;gap:6px}
  .logo-row img{width:40px;height:40px}
  .logo-row.os img{width:32px;height:32px}
  .logos-sub{margin-top:18px;font-size:14px}
  .logos-note{font-size:12.5px;margin-top:12px}

  /* Guides hub cards */
  .g-cards{gap:10px}
  .g-cards .card{padding:16px 18px}
}
