/* ============================================================
   Pinch — product site
   Static, dependency-free. Deployable to Cloudflare Pages as-is.
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --bg-ink: #0d0f24;
  --ink: #11132a;
  --ink-soft: #3a3f5c;
  --muted: #6b7088;
  --line: #e8eaf3;
  --line-soft: #f0f1f8;

  --brand: #4f46e5;
  --brand-2: #7c5cff;
  --flame: #ff6a3d;
  --flame-2: #ff9d4d;
  --mint: #18b07b;

  --grad-brand: linear-gradient(135deg, #6d5cff 0%, #4f46e5 100%);
  --grad-flame: linear-gradient(135deg, #ff9d4d 0%, #ff5a5f 100%);
  --grad-text: linear-gradient(110deg, #4f46e5 0%, #7c5cff 45%, #ff6a3d 100%);

  --shadow-sm: 0 1px 2px rgba(17, 19, 42, .06), 0 2px 8px rgba(17, 19, 42, .05);
  --shadow-md: 0 12px 32px rgba(17, 19, 42, .10);
  --shadow-lg: 0 30px 70px rgba(40, 31, 120, .22);
  --shadow-phone: 0 40px 80px rgba(24, 18, 80, .28), 0 8px 24px rgba(24, 18, 80, .18);

  --radius: 18px;
  --radius-lg: 28px;
  --maxw: 1160px;
  --nav-h: 68px;

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
section { position: relative; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand);
}
.eyebrow.flame { color: var(--flame); }
.gradient-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: inherit; font-weight: 700; font-size: 15px;
  padding: 13px 22px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: 0 8px 22px rgba(79, 70, 229, .35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(79, 70, 229, .42); }
.btn-ghost { background: rgba(17, 19, 42, .04); color: var(--ink); }
.btn-ghost:hover { background: rgba(17, 19, 42, .08); transform: translateY(-1px); }
.btn-lg { padding: 16px 30px; font-size: 16.5px; }

/* App Store badge */
.appstore {
  display: inline-flex; align-items: center; gap: 12px;
  background: #0d0f24; color: #fff; border-radius: 14px;
  padding: 11px 20px 11px 18px; box-shadow: var(--shadow-md);
  transition: transform .18s ease;
}
.appstore:hover { transform: translateY(-2px); }
.appstore svg { width: 26px; height: 26px; flex: none; }
.appstore .as-text { display: flex; flex-direction: column; line-height: 1.15; }
.appstore .as-small { font-size: 10.5px; opacity: .8; letter-spacing: .02em; }
.appstore .as-big { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.appstore .as-tag {
  margin-left: 6px; font-size: 10px; font-weight: 800; letter-spacing: .08em;
  background: var(--grad-flame); color: #fff; padding: 3px 8px; border-radius: 999px; align-self: center;
}

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.nav.scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 24px rgba(17, 19, 42, .05); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 800; font-size: 21px; letter-spacing: -.02em; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad-brand);
  display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px rgba(79, 70, 229, .4);
}
.brand .logo svg { width: 20px; height: 20px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a.link { font-weight: 600; font-size: 15px; color: var(--ink-soft); transition: color .15s ease; }
.nav-links a.link:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.menu-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; transition: .25s; }

/* ---------- hero ---------- */
.hero { padding: calc(var(--nav-h) + 70px) 0 90px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -200px 0 auto 0; height: 900px; z-index: -1;
  background:
    radial-gradient(620px 420px at 78% 8%, rgba(255, 106, 61, .16), transparent 60%),
    radial-gradient(680px 520px at 12% 0%, rgba(124, 92, 255, .20), transparent 60%),
    radial-gradient(700px 500px at 60% 60%, rgba(24, 176, 123, .10), transparent 60%);
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(38px, 6vw, 62px); font-weight: 800; margin: 18px 0 0; }
.hero .lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--ink-soft); margin-top: 22px; max-width: 540px; }
.hero-actions { display: flex; align-items: center; gap: 16px; margin-top: 34px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.hero-note .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(24, 176, 123, .15); }

/* hero phones */
.hero-art { position: relative; height: 620px; display: grid; place-items: center; }
.hero-art .glow {
  position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: var(--grad-brand); filter: blur(90px); opacity: .28; z-index: -1;
}
.phone-main { z-index: 3; animation: float 7s ease-in-out infinite; }
.phone-back {
  position: absolute; left: 8%; bottom: 6%; transform: rotate(-7deg) scale(.78);
  z-index: 2; opacity: .96; animation: float 7s ease-in-out infinite .8s;
}

/* ---------- device frame ---------- */
.device {
  width: 290px; border-radius: 44px; background: #0c0d1d; padding: 11px;
  box-shadow: var(--shadow-phone); position: relative;
}
.device::before {
  content: ""; position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 26px; background: #0c0d1d; border-radius: 999px; z-index: 4;
}
.device .screen { border-radius: 34px; overflow: hidden; background: #fff; position: relative; }
.device .screen img { width: 100%; display: block; }
.device.sm { width: 240px; border-radius: 38px; }
.device.sm::before { width: 78px; height: 22px; top: 15px; }
.device.sm .screen { border-radius: 28px; }

/* ---------- logo strip / stats ---------- */
.stats { padding: 8px 0 4px; }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { text-align: center; padding: 22px 14px; }
.stat .n { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -.03em; }
.stat .l { font-size: 13.5px; color: var(--muted); margin-top: 4px; font-weight: 600; }

/* ---------- problem band ---------- */
.band {
  margin: 30px auto; max-width: var(--maxw); border-radius: var(--radius-lg);
  background: var(--bg-ink); color: #fff; padding: 56px 48px; overflow: hidden; position: relative;
}
.band::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px;
  background: var(--grad-flame); filter: blur(80px); opacity: .35; border-radius: 50%;
}
.band h2 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; max-width: 760px; }
.band p { color: rgba(255, 255, 255, .72); margin-top: 18px; max-width: 620px; font-size: 18px; }

/* ---------- sections ---------- */
.section { padding: 92px 0; }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; margin-top: 14px; }
.section-head p { color: var(--ink-soft); margin-top: 16px; font-size: 18px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { background: var(--bg-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 32px 28px; }
.step .num {
  width: 42px; height: 42px; border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm);
  display: grid; place-items: center; font-weight: 800; color: var(--brand); font-size: 18px; margin-bottom: 18px;
}
.step h3 { font-size: 20px; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 15.5px; }

/* feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.feature .ic {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px; color: #fff;
}
.feature .ic svg { width: 26px; height: 26px; }
.ic.i1 { background: var(--grad-brand); }
.ic.i2 { background: linear-gradient(135deg, #ff9d4d, #ff5a5f); }
.ic.i3 { background: linear-gradient(135deg, #18b07b, #0e9e8e); }
.ic.i4 { background: linear-gradient(135deg, #7c5cff, #b06bff); }
.ic.i5 { background: linear-gradient(135deg, #f5a623, #ff6a3d); }
.ic.i6 { background: linear-gradient(135deg, #4f46e5, #2bb0ed); }
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { color: var(--ink-soft); font-size: 15px; }

/* showcase + horizontal gallery */
.showcase { background: var(--bg-soft); padding: 92px 0 40px; overflow: hidden; }
.showcase .section-head { margin-bottom: 40px; }

/* default (no-GSAP / mobile) fallback: native horizontal scroll */
.hpin { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hpin::-webkit-scrollbar { display: none; }
.htrack {
  display: inline-flex; align-items: center; gap: 40px;
  padding: 20px max(24px, calc((100vw - var(--maxw)) / 2)) 40px;
}
.htrack-intro { flex: none; width: 300px; padding-right: 10px; }
.htrack-intro .num { font-size: 64px; font-weight: 800; letter-spacing: -.04em; line-height: 1; display: block; }
.htrack-intro p { color: var(--ink-soft); font-size: 18px; margin-top: 14px; }
.shot { flex: none; text-align: center; }
.shot .cap { margin-top: 20px; font-weight: 700; font-size: 16px; }
.shot .cap span { display: block; font-weight: 500; font-size: 14px; color: var(--muted); margin-top: 2px; }

/* GSAP desktop pin mode (class added by JS only at >=941px) */
.gsap-h .showcase { padding-bottom: 0; }
.gsap-h .hpin { overflow: hidden; height: 100vh; display: flex; align-items: center; }
.gsap-h .htrack { padding: 0 8vw; will-change: transform; }
.gsap-h .htrack .device { width: 264px; }
.gsap-h .htrack-intro { width: 340px; }

/* WebGL hero canvas */
#webgl {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: -1; pointer-events: none; opacity: .92;
}
.hero { isolation: isolate; }
.hero::before { z-index: -2; }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; max-width: 880px; margin: 0 auto; }
.plan { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 38px 34px; background: #fff; position: relative; }
.plan.pro { background: var(--bg-ink); color: #fff; border-color: transparent; box-shadow: var(--shadow-lg); overflow: hidden; }
.plan.pro::after {
  content: ""; position: absolute; left: -100px; bottom: -120px; width: 360px; height: 360px;
  background: var(--grad-brand); filter: blur(80px); opacity: .4; border-radius: 50%;
}
.plan .tier { font-size: 14px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
.plan.pro .tier { color: var(--flame-2); }
.plan .price { font-size: 44px; font-weight: 800; letter-spacing: -.03em; margin: 14px 0 2px; }
.plan .price small { font-size: 16px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan.pro .price small { color: rgba(255, 255, 255, .65); }
.plan .price-sub { font-size: 14.5px; color: var(--muted); }
.plan.pro .price-sub { color: rgba(255, 255, 255, .65); }
.plan ul { list-style: none; padding: 0; margin: 26px 0 30px; display: grid; gap: 13px; position: relative; z-index: 1; }
.plan li { display: flex; gap: 11px; align-items: flex-start; font-size: 15.5px; }
.plan li svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--mint); }
.plan.pro li svg { color: var(--flame-2); }
.plan .btn { width: 100%; position: relative; z-index: 1; }
.badge-pop {
  position: absolute; top: 26px; right: 28px; font-size: 11px; font-weight: 800; letter-spacing: .06em;
  background: var(--grad-flame); color: #fff; padding: 5px 11px; border-radius: 999px;
}

/* final CTA */
.cta {
  margin: 0 auto 90px; max-width: var(--maxw); border-radius: var(--radius-lg);
  background: var(--grad-brand); color: #fff; padding: 64px 40px; text-align: center; overflow: hidden; position: relative;
}
.cta::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background: radial-gradient(400px 240px at 80% 20%, rgba(255, 157, 77, .5), transparent 60%);
}
.cta h2 { font-size: clamp(30px, 4.5vw, 46px); font-weight: 800; position: relative; }
.cta p { margin: 16px auto 30px; max-width: 520px; color: rgba(255, 255, 255, .88); font-size: 18px; position: relative; }
.cta .appstore { position: relative; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 56px 0 40px; }
.footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer .brand { margin-bottom: 14px; }
.footer .blurb { color: var(--muted); font-size: 14.5px; max-width: 320px; }
.footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 14px; }
.footer a.fl { display: block; color: var(--ink-soft); font-size: 15px; padding: 5px 0; transition: color .15s; }
.footer a.fl:hover { color: var(--brand); }
.footer .legal { grid-column: 1 / -1; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }

/* ---------- legal / doc pages ---------- */
.doc { padding: calc(var(--nav-h) + 60px) 0 80px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(32px, 5vw, 46px); font-weight: 800; }
.doc .updated { color: var(--muted); font-size: 14.5px; margin-top: 12px; }
.doc h2 { font-size: 23px; font-weight: 700; margin: 40px 0 12px; }
.doc h3 { font-size: 18px; font-weight: 700; margin: 26px 0 8px; }
.doc p, .doc li { color: var(--ink-soft); font-size: 16.5px; }
.doc ul { padding-left: 22px; margin: 12px 0; display: grid; gap: 8px; }
.doc a { color: var(--brand); font-weight: 600; }
.doc a:hover { text-decoration: underline; }
.doc .card { background: var(--bg-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 24px 26px; margin: 24px 0; }
.doc .back { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 600; font-size: 14.5px; margin-bottom: 8px; }

/* FAQ */
.faq { display: grid; gap: 12px; margin: 24px 0; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; transition: box-shadow .2s ease; }
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 700; font-size: 16.5px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; font-weight: 600; color: var(--brand); transition: transform .25s ease; line-height: 1; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 22px 20px; color: var(--ink-soft); font-size: 16px; }
.support-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; }

/* ---------- animations ---------- */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
.phone-back { animation-name: floatBack; }
@keyframes floatBack { 0%, 100% { transform: rotate(-7deg) translateY(0) scale(.78); } 50% { transform: rotate(-7deg) translateY(-12px) scale(.78); } }

[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: .08s; }
[data-reveal][data-delay="2"] { transition-delay: .16s; }
[data-reveal][data-delay="3"] { transition-delay: .24s; }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .nav-links { display: none; }
  .menu-toggle { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: rgba(255, 255, 255, .98); backdrop-filter: blur(14px); padding: 22px 24px; gap: 18px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero-actions, .hero-note { justify-content: center; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .hero-art { height: 540px; margin-top: 20px; }
  .steps, .features { grid-template-columns: 1fr; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr; }
  .footer .wrap { grid-template-columns: 1fr 1fr; }
  .band { padding: 40px 28px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .feature, .step { padding: 26px 22px; }
  .footer .wrap { grid-template-columns: 1fr; }
  .band, .cta { border-radius: 22px; }
  .device { width: 250px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}
