/*
Theme Name: Suparank
Theme URI: https://suparank.io
Description: Marketing/landing theme for Suparank — chat-first AI SEO/GEO visibility. ChatGPT-flat design system with the Suparank purple gradient accent. Single-file CSS, push-to-deploy.
Author: Suparank
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: suparank
*/

/* ─────────────────────────────────────────────────────────────────────────
   Tokens — mirror src/app/globals.css (ChatGPT-exact) + brand gradient
   ───────────────────────────────────────────────────────────────────────── */
:root {
  --bg: #ffffff;
  --ink: #0d0d0d;
  --ink-2: #5d5d5d;
  --muted: #8f8f8f;
  --surface: #f9f9f9;
  --surface-2: #f0f0f0;
  --hairline: #ececec;
  --hairline-2: #e3e3e3;

  /* Brand gradient (from public/branding/icon.svg) */
  --brand-1: #c86cc2;
  --brand-2: #681c64;
  --grad: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 100%);

  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(13, 13, 13, 0.04);
  --shadow: 0 4px 24px rgba(13, 13, 13, 0.06);
  --shadow-lg: 0 24px 60px -20px rgba(13, 13, 13, 0.18);

  --container: 1120px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ─── Reset / base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 640; letter-spacing: -0.02em; line-height: 1.08; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; border-radius: 4px; }

/* ─── Layout helpers ───────────────────────────────────────────────────── */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: 96px; }
@media (max-width: 760px) { .section { padding-block: 64px; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 560; letter-spacing: 0.02em;
  color: var(--ink-2);
  padding: 6px 12px; border: 1px solid var(--hairline); border-radius: 999px;
  background: var(--bg);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--grad); }
.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); }
.section-head p { margin-top: 16px; font-size: 18px; color: var(--ink-2); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ─── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 560; line-height: 1;
  padding: 13px 20px; border-radius: 999px; border: 1px solid transparent;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; box-shadow: var(--shadow); }
.btn-ghost { background: var(--bg); color: var(--ink); border-color: var(--hairline); }
.btn-ghost:hover { background: var(--surface); border-color: var(--hairline-2); }
.btn-lg { padding: 16px 26px; font-size: 16px; }
.btn .gicon { width: 16px; height: 16px; }

/* ─── Header / nav ─────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.72); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease, background .2s ease;
}
.site-header.is-scrolled { border-color: var(--hairline); background: rgba(255,255,255,0.85); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { height: 24px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { padding: 8px 12px; border-radius: 999px; font-size: 15px; color: var(--ink-2); transition: color .15s, background .15s; }
.nav-links a:hover { color: var(--ink); background: var(--surface); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; border: 1px solid var(--hairline); border-radius: 10px; background: var(--bg); }
.nav-toggle span { position: relative; width: 16px; height: 1.5px; background: var(--ink); }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; width: 16px; height: 1.5px; background: var(--ink); }
.nav-toggle span::before { top: -5px; } .nav-toggle span::after { top: 5px; }
@media (max-width: 880px) {
  .nav-links, .nav .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; }
}
/* mobile drawer */
.mobile-menu { display: none; border-top: 1px solid var(--hairline); padding: 16px 24px 24px; }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 12px 4px; font-size: 17px; color: var(--ink); border-bottom: 1px solid var(--hairline); }
.mobile-menu .btn { width: 100%; margin-top: 16px; }

/* ─── Hero (centered, product-below — Clay / StackAI / Mixpanel) ────────── */
.hero { position: relative; overflow: hidden; padding-block: 76px 0; text-align: center; }
.hero::before {
  content: ""; position: absolute; inset: -20% 0 auto 0; height: 700px; z-index: -1;
  background: radial-gradient(700px 440px at 50% -6%, rgba(200,108,194,0.20), rgba(104,28,100,0.05) 46%, transparent 72%);
  pointer-events: none;
}
.hero .eyebrow { margin-bottom: 22px; }
.hero h1 { font-size: clamp(44px, 7.2vw, 82px); letter-spacing: -0.042em; }
.hero .sub { margin: 22px auto 0; max-width: 600px; font-size: clamp(17px, 1.7vw, 21px); color: var(--ink-2); }
.hero .cta-row { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero .trust { margin-top: 16px; font-size: 13.5px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.hero .trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero .trust svg { width: 14px; height: 14px; color: var(--brand-2); }

/* Product window — pure-CSS "screenshot" that bleeds toward the next section */
.product { position: relative; margin-top: 56px; }
.product-glow { position: absolute; inset: 24px 12% auto 12%; height: 220px; background: var(--grad); filter: blur(90px); opacity: .16; z-index: -1; border-radius: 100px; }
.product-window {
  max-width: 980px; margin: 0 auto; text-align: left;
  background: var(--bg); border: 1px solid var(--hairline); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.pw-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--hairline); background: var(--surface); }
.pw-bar .dots { display: flex; gap: 6px; }
.pw-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--surface-2); }
.pw-url { margin: 0 auto; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); background: var(--bg); border: 1px solid var(--hairline); border-radius: 999px; padding: 4px 16px; }
.pw-body { display: grid; grid-template-columns: 196px 1fr; min-height: 372px; }
.pw-side { border-right: 1px solid var(--hairline); background: var(--surface); padding: 16px 12px; display: flex; flex-direction: column; gap: 3px; }
.pw-side .item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px; font-size: 13.5px; color: var(--ink-2); }
.pw-side .item.active { background: var(--bg); color: var(--ink); border: 1px solid var(--hairline); font-weight: 540; }
.pw-side .item .d { width: 16px; height: 16px; border-radius: 5px; background: var(--surface-2); flex: none; }
.pw-side .item.active .d { background: var(--grad); }
.pw-main { padding: 22px; display: grid; gap: 14px; align-content: start; }
.bubble { font-size: 14px; line-height: 1.5; border-radius: 16px; padding: 11px 14px; max-width: 80%; }
.bubble.user { justify-self: end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.bubble.ai { justify-self: start; background: var(--surface); color: var(--ink); border-bottom-left-radius: 6px; border: 1px solid var(--hairline); }
.pw-panel { border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 18px; background: var(--bg); }
.pw-panel .ph { display: flex; align-items: center; gap: 16px; }
.score-ring { --pct: 78; width: 60px; height: 60px; border-radius: 50%; flex: none; background: conic-gradient(var(--brand-1) calc(var(--pct) * 1%), var(--surface-2) 0); display: grid; place-items: center; }
.score-ring i { width: 47px; height: 47px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-weight: 680; font-size: 16px; }
.score-meta b { display: block; font-size: 14px; }
.score-meta span { font-size: 12.5px; color: var(--muted); }
.vis-bars { margin-top: 16px; display: grid; gap: 10px; }
.vis-bar { display: grid; grid-template-columns: 78px 1fr 30px; align-items: center; gap: 12px; font-size: 12.5px; color: var(--ink-2); }
.vis-bar .track { height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.vis-bar .fill { height: 100%; border-radius: 999px; background: var(--grad); }
.vis-bar b { text-align: right; font-weight: 580; color: var(--ink); }
@media (max-width: 720px) {
  .pw-body { grid-template-columns: 1fr; }
  .pw-side { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--hairline); }
  .pw-side .item { white-space: nowrap; }
}

/* ─── Engine strip ─────────────────────────────────────────────────────── */
.engines { border-block: 1px solid var(--hairline); background: var(--bg); padding-block: 48px 36px; }
.engines .lead { text-align: center; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.engine-row { display: flex; align-items: center; justify-content: center; gap: 14px 28px; flex-wrap: wrap; }
.engine { display: inline-flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 560; color: var(--ink); }
.engine .g { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; border: 1px solid var(--hairline); background: var(--surface); font-size: 13px; font-weight: 700; }
.engine-row .sep { width: 1px; height: 22px; background: var(--hairline); }
.engines .connected { text-align: center; margin-top: 18px; font-size: 14px; color: var(--ink-2); }
.engines .connected b { font-weight: 580; color: var(--ink); }

/* ─── Generic feature grid / cards ─────────────────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 920px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }
.card {
  background: var(--bg); border: 1px solid var(--hairline); border-radius: var(--radius-xl);
  padding: 28px; box-shadow: var(--shadow-sm); transition: box-shadow .2s ease, transform .2s ease, border-color .2s;
}
.card:hover { box-shadow: var(--shadow); border-color: var(--hairline-2); transform: translateY(-2px); }
.card .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--hairline); margin-bottom: 18px; }
.card .ic svg { width: 22px; height: 22px; color: var(--brand-2); }
.card h3 { font-size: 20px; }
.card p { margin-top: 10px; color: var(--ink-2); font-size: 15.5px; }

/* ─── Problem band ─────────────────────────────────────────────────────── */
.band { background: var(--surface); border-block: 1px solid var(--hairline); }
.problem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 920px) { .problem-grid { grid-template-columns: 1fr; gap: 32px; } }
.problem h2 { font-size: clamp(26px, 3.6vw, 38px); }
.problem p { margin-top: 18px; font-size: 17px; color: var(--ink-2); }
.problem .list { margin-top: 22px; display: grid; gap: 12px; }
.problem .list li { list-style: none; display: flex; gap: 12px; align-items: flex-start; font-size: 15.5px; }
.problem .list svg { width: 20px; height: 20px; flex: none; color: var(--brand-2); margin-top: 1px; }

/* ─── How it works ─────────────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
@media (max-width: 920px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 28px; border: 1px solid var(--hairline); border-radius: var(--radius-xl); background: var(--bg); }
.step .num { font-family: var(--font-mono); font-size: 13px; color: #fff; background: var(--grad); width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; margin-bottom: 16px; font-weight: 600; }
.step h3 { font-size: 19px; } .step p { margin-top: 8px; color: var(--ink-2); font-size: 15px; }

/* ─── Comparison ───────────────────────────────────────────────────────── */
.compare { max-width: 760px; margin-inline: auto; border: 1px solid var(--hairline); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-sm); }
.compare table { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--hairline); font-size: 15px; }
.compare thead th { background: var(--surface); font-weight: 560; font-size: 13.5px; letter-spacing: .01em; }
.compare thead th:nth-child(2) { color: var(--brand-2); }
.compare td:first-child { color: var(--ink-2); }
.compare td.col-mark { text-align: center; width: 150px; font-weight: 560; }
.compare tr:last-child td { border-bottom: 0; }
.mark-yes { color: #18794e; } .mark-no { color: var(--muted); }
.compare .featured { background: linear-gradient(180deg, rgba(200,108,194,0.05), transparent); }

/* ─── Pricing ──────────────────────────────────────────────────────────── */
.price-wrap { max-width: 720px; margin-inline: auto; }
.price-card { border: 1px solid var(--hairline); border-radius: var(--radius-xl); padding: 36px; text-align: center; background: var(--bg); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.price-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.price-card h3 { font-size: 24px; }
.price-card .amt { margin-top: 14px; font-size: 44px; font-weight: 680; letter-spacing: -0.03em; }
.price-card .amt .ph { background: var(--surface-2); color: var(--ink-2); border-radius: 8px; padding: 0 10px; font-size: 26px; }
.price-card .amt small { font-size: 16px; color: var(--muted); font-weight: 500; }
.price-card .desc { margin-top: 10px; color: var(--ink-2); }
.price-card ul { margin: 24px auto 0; max-width: 360px; display: grid; gap: 12px; padding: 0; }
.price-card li { list-style: none; display: flex; gap: 10px; align-items: center; font-size: 15px; text-align: left; }
.price-card li svg { width: 18px; height: 18px; color: var(--brand-2); flex: none; }
.price-card .btn { margin-top: 28px; }
.price-note { text-align: center; margin-top: 16px; font-size: 13.5px; color: var(--muted); }

/* ─── FAQ ──────────────────────────────────────────────────────────────── */
.faq { max-width: 760px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--hairline); padding: 6px 0; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 4px; font-size: 17px; font-weight: 520; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { position: relative; width: 18px; height: 18px; flex: none; }
.faq summary .plus::before, .faq summary .plus::after { content: ""; position: absolute; background: var(--ink-2); transition: transform .2s ease; }
.faq summary .plus::before { top: 8px; left: 0; width: 18px; height: 1.5px; }
.faq summary .plus::after { left: 8px; top: 0; width: 1.5px; height: 18px; }
.faq details[open] summary .plus::after { transform: rotate(90deg); opacity: 0; }
.faq details p { padding: 0 4px 20px; color: var(--ink-2); font-size: 15.5px; }

/* ─── Final CTA ────────────────────────────────────────────────────────── */
.final { position: relative; overflow: hidden; }
.final-card {
  position: relative; border-radius: var(--radius-xl); padding: 72px 32px; text-align: center;
  background: var(--ink); color: #fff; overflow: hidden;
}
.final-card::before { content: ""; position: absolute; inset: -40% -10% auto -10%; height: 360px; background: radial-gradient(540px 300px at 50% 0, rgba(200,108,194,0.5), transparent 70%); opacity: .7; }
.final-card h2 { position: relative; font-size: clamp(30px, 4.4vw, 46px); }
.final-card p { position: relative; margin-top: 16px; color: rgba(255,255,255,0.72); font-size: 18px; }
.final-card .cta-row { position: relative; margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.final-card .btn-primary { background: #fff; color: var(--ink); }
.final-card .btn-primary:hover { background: #f0f0f0; }
.final-card .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.25); }
.final-card .btn-ghost:hover { background: rgba(255,255,255,0.08); }
.final-card .trust { position: relative; margin-top: 16px; font-size: 13px; color: rgba(255,255,255,0.55); }

/* ─── Footer ───────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--hairline); padding-block: 56px 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
.footer-brand img { height: 22px; }
.footer-brand p { margin-top: 14px; font-size: 14px; color: var(--ink-2); max-width: 260px; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 560; }
.footer-col a { display: block; margin-top: 12px; font-size: 14.5px; color: var(--ink-2); }
.footer-col a:hover { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--hairline); font-size: 13.5px; color: var(--muted); }

/* ─── Entrance (pure CSS, on load) ─────────────────────────────────────────
   Gated behind html.js so content is ALWAYS visible without JS / to crawlers /
   in full-page renders. Animation runs to opacity:1, so it can never leave
   content hidden — no scroll/observer dependency. */
.js .reveal { opacity: 0; transform: translateY(16px); animation: reveal-up .6s cubic-bezier(.2,.6,.2,1) forwards; }
@keyframes reveal-up { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; animation: none; } }
