/* ── Tokens ─────────────────────────────────────────── */
:root {
  --ink: #0f172a;
  --ink-2: #1e293b;
  --ink-3: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #f8fafc;
  --soft: #eceef0;
  --white: #ffffff;
  --accent: #475569;
  --accent-light: #dbdddf;
  --accent-ink: #0f172a;
  --silk: linear-gradient(120deg, #64748b 0%, #0f172a 60%);
  --radius: 16px;
  --shadow: 0 20px 60px -20px rgba(15, 23, 42, .28);
  --shadow-sm: 0 6px 20px -8px rgba(15, 23, 42, .18);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Fraunces', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
h1, h2 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; }
h2 { font-size: clamp(30px, 4.2vw, 46px); }
h3 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(820px, 100% - 32px); }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-soft { background: var(--soft); }
.section-ink { background: var(--ink); color: #e2e8f0; position: relative; overflow: hidden; }
.section-ink h2, .section-ink h3 { color: #fff; }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head p { color: var(--muted); font-size: 18px; margin-top: 14px; }
.section-ink .section-head p { color: #94a3b8; }

.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .18em; color: var(--accent); margin-bottom: 14px; }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-3); margin-top: 20px; max-width: 580px; }
.lead.light { color: #cbd5e1; }

/* ── Buttons ────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 24px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s; font-family: inherit; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 10px 30px -12px rgba(15, 23, 42, .6); }
.btn-light { background: var(--accent-light); color: var(--ink); }
.btn-light:hover { background: #fff; }
.btn-primary:hover { background: var(--ink-2); }
.btn-ghost { background: var(--white); border-color: var(--line); color: var(--ink); }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }

/* ── Nav ────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(248, 250, 252, .88); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; }
.nav.scrolled { border-color: var(--line); box-shadow: 0 4px 20px -12px rgba(15,23,42,.2); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { border-radius: 10px; background: #fff; border: 1px solid var(--line); padding: 2px; }
.brand span { display: flex; flex-direction: column; line-height: 1.1; }
.brand strong { font-size: 16px; letter-spacing: -.01em; }
.brand small { font-size: 10px; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a:not(.btn) { text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink-3); }
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .3s; }

/* ── Hero ───────────────────────────────────────────── */
.hero { position: relative; padding: clamp(40px, 6vw, 80px) 0 60px; overflow: hidden; }
.hero-weave { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    repeating-linear-gradient(90deg, rgba(71,85,105,.06) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(0deg, rgba(15,23,42,.04) 0 1px, transparent 1px 22px);
  mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 70%); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.6vw, 66px); }
.hero h1 em { font-style: italic; background: var(--silk); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--muted); font-weight: 600; }
.hero-points li::before { content: '✓'; color: var(--accent); margin-right: 6px; font-weight: 800; }
.hero-shot { position: relative; }

.browser { border-radius: 14px; background: var(--white); box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; transform: perspective(1600px) rotateY(-6deg) rotateX(2deg); transition: transform .6s; }
.hero-shot:hover .browser { transform: none; }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #f1f5f9; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.browser-bar i:nth-child(1) { background: #f87171; } .browser-bar i:nth-child(2) { background: #fbbf24; } .browser-bar i:nth-child(3) { background: #34d399; }
.browser-bar span { margin-left: 10px; font-size: 11px; color: var(--muted); font-family: ui-monospace, monospace; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.float-card { position: absolute; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; animation: bob 5s ease-in-out infinite; }
.float-card b { font-size: 22px; font-family: var(--display); }
.float-card span { font-size: 12px; color: var(--muted); }
.fc-1 { left: -22px; bottom: 34px; }
.fc-2 { right: -14px; top: -18px; animation-delay: -2.5s; }
.fc-2 b { color: #047857; }
@keyframes bob { 50% { transform: translateY(-8px); } }

.stats { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 72px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stats div { padding: 22px; text-align: center; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats b { font-family: var(--display); font-size: 36px; display: block; line-height: 1; }
.stats span { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ── Screenshot placeholders ───────────────────────── */
.shot { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; background: var(--soft); }
.shot-ph { width: 100%; aspect-ratio: 16 / 9; display: grid; place-items: center; text-align: center; padding: 20px; color: var(--muted); font-weight: 700; font-size: 15px;
  background: repeating-linear-gradient(135deg, #f8fafc 0 12px, #f1f5f9 12px 24px); }
.shot-ph small { display: block; font-weight: 500; font-size: 12px; margin-top: 4px; }

/* ── Pains ─────────────────────────────────────────── */
.pain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pain { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pain-before { padding: 22px 24px; font-family: var(--display); font-size: 19px; font-style: italic; color: var(--ink-3); background: #f1f5f9; border-bottom: 1px dashed #cbd5e1; }
.pain-after { padding: 22px 24px; color: var(--ink-3); }
.pain-after b { color: var(--ink); }

/* ── Workflow ──────────────────────────────────────── */
.flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; counter-reset: s; }
.flow li { position: relative; padding: 18px 16px 16px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); counter-increment: s; transition: background .25s, border-color .25s, transform .25s; }
.flow li:hover { background: rgba(219,221,223,.08); border-color: rgba(219,221,223,.45); transform: translateY(-3px); }
.flow li::before { content: counter(s, decimal-leading-zero); position: absolute; top: 12px; right: 14px; font-size: 11px; font-weight: 700; color: var(--accent); letter-spacing: .1em; }
.flow .fi { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(219,221,223,.12); color: var(--accent-light); margin-bottom: 12px; }
.flow b { display: block; color: #fff; font-size: 15px; }
.flow span { font-size: 13px; color: #94a3b8; line-height: 1.45; display: block; margin-top: 4px; }

/* ── Features ──────────────────────────────────────── */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: box-shadow .25s, transform .25s, border-color .25s; display: flex; flex-direction: column; }
.feature:hover { box-shadow: var(--shadow-sm); transform: translateY(-3px); border-color: #94a3b8; }
.feature .fi { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--ink); margin-bottom: 16px; border: 1px solid var(--line); }
.feature h3 { font-size: 19px; }
.feature > p { color: var(--muted); font-size: 14.5px; margin-top: 8px; }
.feature ul { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 7px; font-size: 14px; color: var(--ink-3); }
.feature li { padding-left: 20px; position: relative; }
.feature li::before { content: ''; position: absolute; left: 2px; top: 9px; width: 8px; height: 2px; background: var(--accent); border-radius: 2px; }
.feature ul.collapsed li:nth-child(n+6) { display: none; }
.feature .more { margin-top: 14px; align-self: flex-start; background: none; border: 0; padding: 0; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ── Highlights ────────────────────────────────────── */
.highlight { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: center; }
.highlight + .highlight { margin-top: 88px; }
.highlight.reverse .highlight-copy { order: 2; }
.highlight-shot { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 11px; }
.ticks li { padding-left: 30px; position: relative; color: var(--ink-3); }
.ticks li::before { content: '✓'; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: #e2e8f0; color: var(--ink); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.ticks.light li { color: #cbd5e1; }
.ticks.light li::before { background: rgba(219,221,223,.16); color: #fff; }

/* ── Gallery ───────────────────────────────────────── */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tabs button { font: inherit; font-size: 14px; font-weight: 600; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink-3); cursor: pointer; transition: .2s; }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.g-item { background: var(--white); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: zoom-in; text-align: left; padding: 0; font: inherit; color: inherit; transition: box-shadow .25s, transform .25s; animation: fadeUp .4s both; }
.g-item:hover { box-shadow: var(--shadow-sm); transform: translateY(-3px); }
.g-item:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.g-item .shot, .g-item .shot-ph { border-bottom: 1px solid var(--line); }
.g-cap { padding: 14px 16px; }
.g-cap b { display: block; font-size: 15px; }
.g-cap span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }

/* ── Lightbox ──────────────────────────────────────── */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(2,6,23,.92); display: flex; align-items: center; justify-content: center; padding: 24px 64px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 1400px; width: 100%; }
.lightbox img { width: 100%; max-height: 82vh; object-fit: contain; border-radius: 10px; }
.lightbox figcaption { color: #e2e8f0; text-align: center; margin-top: 14px; font-weight: 600; }
.lb-close, .lb-nav { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; border-radius: 50%; width: 46px; height: 46px; font-size: 28px; line-height: 1; cursor: pointer; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.2); }

/* ── Mobile section ────────────────────────────────── */
.mobile-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.phone-stack { display: flex; justify-content: center; }
.phone { width: 290px; border-radius: 40px; padding: 12px; background: #020617; border: 1px solid #334155; box-shadow: 0 40px 80px -20px rgba(0,0,0,.6), 0 0 0 6px #1e293b; }
.phone-screen { border-radius: 30px; background: #f1f5f9; overflow: hidden; color: var(--ink); min-height: 540px; }
.ps-head { display: flex; align-items: center; gap: 8px; padding: 18px 16px 14px; background: #dbdddf; border-bottom: 1px solid #cbd5e1; }
.ps-head img { width: 28px; height: 28px; border-radius: 8px; background: #fff; padding: 1px; }
.ps-head b { font-size: 14px; }
.ps-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
.ps-kpis div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.ps-kpis small { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ps-kpis b { font-size: 18px; }
.ps-kpis .red { color: #dc2626; }
.ps-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 12px 16px; }
.ps-tiles div { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 4px 8px; text-align: center; font-size: 9.5px; font-weight: 600; color: var(--ink-3); }
.ps-tiles svg { display: block; margin: 0 auto 5px; color: var(--ink); }

/* ── Tech ──────────────────────────────────────────── */
.tech-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tech-grid div { background: var(--white); padding: 26px; }
.tech-grid h4 { font-size: 16px; margin-bottom: 8px; }
.tech-grid p { color: var(--muted); font-size: 14.5px; }

/* ── FAQ ───────────────────────────────────────────── */
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; font-weight: 700; font-size: 17px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 12px; font-size: 26px; font-weight: 400; color: var(--accent); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--ink-3); }

/* ── Book demo ─────────────────────────────────────── */
.book-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: start; }
.book-steps { list-style: none; padding: 0; margin: 32px 0; display: grid; gap: 14px; }
.book-steps li { display: flex; align-items: center; gap: 14px; color: #e2e8f0; font-weight: 600; }
.book-steps b { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(219,221,223,.16); color: #fff; flex: none; }
.call-card { background: var(--white); color: var(--ink); border-radius: 20px; padding: clamp(24px, 3.4vw, 40px); box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); display: grid; gap: 14px; }
.call-kicker { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.section-ink .call-card h3, .call-card h3 { color: var(--ink); font-family: var(--display); font-size: clamp(26px, 3vw, 34px); margin: 0; letter-spacing: -.01em; }
.call-card p { margin: 0 0 6px; color: var(--ink-3); }
.call-list { display: grid; gap: 12px; }
.call-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; font-size: 17px; padding-block: 16px; }
.call-mail { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 4px; color: var(--ink-3); font-weight: 600; text-decoration: none; }
.call-mail:hover { color: var(--ink); text-decoration: underline; }

/* ── Footer ────────────────────────────────────────── */
.footer { background: #020617; color: #94a3b8; padding: 32px 0; font-size: 14px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer .brand strong { color: #fff; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; }

.sticky-cta { display: none; }

/* ── Reveal on scroll ──────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .float-card { animation: none; }
  .browser { transform: none; }
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 1024px) {
  .feature-grid, .gallery { grid-template-columns: repeat(2, 1fr); }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .nav-links { position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 16px 18px; transform: translateY(-120%); transition: transform .3s; box-shadow: var(--shadow-sm); }
  .nav-links.open { transform: none; }
  .nav-links a:not(.btn) { padding: 13px 4px; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-links .btn { margin-top: 14px; }
  .nav-toggle { display: block; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hero-grid, .highlight, .mobile-grid, .book-grid { grid-template-columns: 1fr; gap: 40px; }
  .highlight.reverse .highlight-copy { order: 0; }
  .highlight + .highlight { margin-top: 64px; }
  .pain-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stats div:nth-child(3) { border-right: 0; }
  .stats div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .browser { transform: none; }
  .fc-1 { left: 8px; bottom: -18px; }
  .fc-2 { right: 8px; }
  .sticky-cta { display: block; position: fixed; left: 16px; right: 16px; bottom: 14px; z-index: 40; text-align: center; padding: 14px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 800; text-decoration: none; box-shadow: 0 12px 30px -8px rgba(0,0,0,.4); transition: transform .3s, opacity .3s; }
  .sticky-cta.hide { transform: translateY(90px); opacity: 0; }
  .footer { padding-bottom: 90px; }
}
@media (max-width: 600px) {
  .feature-grid, .gallery, .tech-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats div { border-right: 1px solid var(--line) !important; border-bottom: 1px solid var(--line); }
  .stats div:nth-child(2n) { border-right: 0 !important; }
  .stats div:last-child { grid-column: 1 / -1; border-bottom: 0; border-right: 0 !important; }
  .flow { grid-template-columns: 1fr 1fr; }
  .lightbox { padding: 16px; }
  .lb-nav { top: auto; bottom: 18px; transform: none; }
  .float-card { display: none; }
}

/* Final stage spans the row as the "finish line" */
.flow li:last-child { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; background: linear-gradient(90deg, rgba(219,221,223,.16), rgba(219,221,223,.03)); border-color: rgba(219,221,223,.5); }
.flow li:last-child .fi { margin: 0; flex: none; }
.flow li:last-child span { margin-top: 0; }
.flow li:last-child b { margin-right: 6px; }

/* Grey theme: lighter accents on dark sections */
.section-ink .eyebrow { color: #94a3b8; }
.flow li::before { color: #94a3b8; }
.hero h1 em { background: var(--silk); -webkit-background-clip: text; background-clip: text; }
