/* ============================================================
   RankLens landing page — promotional design (dark & light)
   v2: full mobile adaptation + visual polish
   ============================================================ */

:root {
  --bg: #060a17;
  --bg-soft: #0b1122;
  --panel: #0e1628;
  --card-grad: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  --hero-card-bg: linear-gradient(180deg, rgba(21, 29, 52, 0.94), rgba(10, 15, 28, 0.97));
  --text: #e9eefb;
  --text-strong: #ffffff;
  --muted: #93a0bd;
  --muted2: #6e7c99;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.2);
  --blue: #6ea8ff;
  --violet: #a98cff;
  --cyan: #62e6ff;
  --teal: #35d0a5;
  --acc-1: #4f83ff;
  --acc-2: #8a5cff;
  --grad-main: linear-gradient(110deg, #4f83ff 5%, #a98cff 45%, #62e6ff 72%, #a98cff 100%);
  --chip-bg: rgba(255, 255, 255, 0.03);
  --glass: rgba(7, 11, 22, 0.6);
  --glass-strong: rgba(6, 10, 23, 0.82);
  --nav-line: rgba(255, 255, 255, 0.07);
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 14px 44px rgba(8, 20, 60, 0.35);
  --card-inset: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --nav-text: #c3cde3;
  --btn-ghost-bg: rgba(255, 255, 255, 0.04);
  --tooltip-bg: #080d18;
  --scrollbar: rgba(255, 255, 255, 0.16);
  --menu-bg: #0d1322;
}

:root[data-theme="light"] {
  --bg: #f3f6fd;
  --bg-soft: #eaf0fb;
  --panel: #ffffff;
  --card-grad: linear-gradient(180deg, #ffffff, #f8faff);
  --hero-card-bg: linear-gradient(180deg, #ffffff, #f3f6ff);
  --text: #1b2440;
  --text-strong: #0d1226;
  --muted: #56617e;
  --muted2: #8a94ad;
  --line: rgba(23, 35, 74, 0.12);
  --line-strong: rgba(23, 35, 74, 0.3);
  --blue: #2f6bff;
  --violet: #7b4dff;
  --cyan: #0aa8c9;
  --teal: #0ea77e;
  --grad-main: linear-gradient(110deg, #3d6ef5 5%, #7b4dff 45%, #0aa8c9 72%, #7b4dff 100%);
  --chip-bg: rgba(61, 110, 245, 0.05);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.9);
  --nav-line: rgba(23, 35, 74, 0.08);
  --shadow-lg: 0 30px 80px rgba(40, 60, 140, 0.16);
  --shadow-sm: 0 16px 44px rgba(40, 60, 140, 0.14);
  --card-inset: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --nav-text: #3d4866;
  --btn-ghost-bg: rgba(61, 110, 245, 0.05);
  --tooltip-bg: #101a33;
  --scrollbar: rgba(23, 35, 74, 0.2);
  --menu-bg: #ffffff;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 "Noto Sans SC", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.25s ease, color 0.25s ease;
}

body.menu-open { overflow: hidden; }

::selection { background: rgba(79, 131, 255, 0.35); color: inherit; }

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 8px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--line-strong); }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

.wrap { width: min(1180px, calc(100% - 40px)); margin: auto; }

section[id] { scroll-margin-top: 86px; }

h1, h2 { text-wrap: balance; }

/* ---------------- decorative background ---------------- */

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line, rgba(255, 255, 255, 0.025)) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line, rgba(255, 255, 255, 0.025)) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
}

:root[data-theme="light"] .bg-grid {
  --grid-line: rgba(23, 35, 74, 0.05);
}

.aurora {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(100px);
}

.aurora-a {
  width: 640px; height: 640px;
  top: -260px; left: -180px;
  background: radial-gradient(circle, rgba(79, 131, 255, 0.32), transparent 65%);
  animation: drift-a 24s ease-in-out infinite alternate;
}

.aurora-b {
  width: 720px; height: 720px;
  top: 16%; right: -280px;
  background: radial-gradient(circle, rgba(160, 106, 255, 0.26), transparent 65%);
  animation: drift-b 28s ease-in-out infinite alternate;
}

.aurora-c {
  width: 560px; height: 560px;
  bottom: -280px; left: 28%;
  background: radial-gradient(circle, rgba(98, 230, 255, 0.14), transparent 65%);
  animation: drift-c 32s ease-in-out infinite alternate;
}

:root[data-theme="light"] .aurora { opacity: 0.55; }

@keyframes drift-a { to { transform: translate(70px, 40px) scale(1.08); } }
@keyframes drift-b { to { transform: translate(-80px, -36px) scale(1.1); } }
@keyframes drift-c { to { transform: translate(56px, -56px); } }

main, footer { position: relative; z-index: 1; }

/* ---------------- nav ---------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid var(--nav-line);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav.scrolled,
.nav.menu-open {
  background: var(--glass-strong);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

:root[data-theme="light"] .nav.scrolled,
:root[data-theme="light"] .nav.menu-open { box-shadow: 0 12px 40px rgba(40, 60, 140, 0.12); }

.nav-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-family: "Sora", "Noto Sans SC", sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 17px;
  color: var(--text-strong);
  flex: none;
}

.brand img { width: 30px; height: 30px; border-radius: 9px; }

.nav-links { display: flex; align-items: center; gap: 26px; color: var(--nav-text); font-size: 14px; }

.nav-links > a:not(.btn) { position: relative; transition: color 0.2s ease; }

.nav-links > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad-main);
  transition: right 0.25s ease;
}

.nav-links > a:not(.btn):hover { color: var(--text-strong); }
.nav-links > a:not(.btn):hover::after { right: 0; }

.nav-cta { padding: 9px 16px; border-radius: 999px; font-size: 13px; }

.nav-actions { display: flex; align-items: center; gap: 10px; flex: none; }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--btn-ghost-bg);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  flex: none;
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.theme-toggle:active { transform: scale(0.94); }

.theme-toggle .moon { display: none; }
.theme-toggle .sun { display: block; }

:root[data-theme="light"] .theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }

/* --- hamburger button (mobile only) --- */

.menu-btn {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--btn-ghost-bg);
  cursor: pointer;
  flex: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.menu-btn .bar {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.28s ease, opacity 0.2s ease, top 0.28s ease;
}

.menu-btn .bar:nth-child(1) { top: 13px; }
.menu-btn .bar:nth-child(2) { top: 19px; }
.menu-btn .bar:nth-child(3) { top: 25px; }

.menu-btn.open .bar:nth-child(1) { top: 19px; transform: rotate(45deg); }
.menu-btn.open .bar:nth-child(2) { opacity: 0; transform: scaleX(0.4); }
.menu-btn.open .bar:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* --- mobile dropdown menu --- */

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 2px 20px 20px;
  background: var(--menu-bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 30px 60px rgba(2, 6, 20, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
}

:root[data-theme="light"] .mobile-menu { box-shadow: 0 30px 60px rgba(40, 60, 140, 0.18); }

.mobile-menu.open { opacity: 1; visibility: visible; transform: none; }

.mm-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.mm-links a:active { color: var(--blue); padding-left: 10px; }

.mm-links a::after {
  content: "→";
  font-size: 14px;
  color: var(--muted2);
  transition: transform 0.2s ease, color 0.2s ease;
}

.mm-links a:active::after { color: var(--blue); transform: translateX(3px); }

.mm-actions { display: grid; gap: 10px; margin-top: 18px; }

.mm-actions .btn { justify-content: center; padding: 14px 20px; font-size: 15px; }

/* ---------------- hero ---------------- */

.hero {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 64px;
  align-items: center;
  padding: 88px 0 96px;
  min-height: min(780px, 92vh);
}

.eyebrow, .section-head > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--chip-bg);
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}

.eyebrow::before, .section-head > span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 10px var(--blue);
  animation: pulse-dot 2.4s ease-in-out infinite;
  flex: none;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.78); }
}

h1 {
  font-family: "Sora", "Noto Sans SC", sans-serif;
  font-size: clamp(42px, 5.4vw, 70px);
  line-height: 1.06;
  letter-spacing: -0.045em;
  margin: 22px 0 26px;
  max-width: 780px;
  color: var(--text-strong);
}

h1 span {
  background: var(--grad-main);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 7s linear infinite;
}

@keyframes shimmer {
  to { background-position: -220% 0; }
}

.lead {
  font-size: 18.5px;
  color: var(--muted);
  max-width: 620px;
  margin: 0 0 30px;
}

.lead strong { color: var(--text); }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid var(--line);
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease, background 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn.primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--acc-1), var(--acc-2));
  color: #fff;
  border: 0;
  box-shadow: 0 12px 32px rgba(79, 131, 255, 0.32);
}

/* sweeping light on the primary button */
.btn.primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 45%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: translateX(-140%) skewX(-18deg);
  animation: sheen 5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes sheen {
  0%, 55% { transform: translateX(-140%) skewX(-18deg); }
  90%, 100% { transform: translateX(280%) skewX(-18deg); }
}

.btn.primary:hover { box-shadow: 0 16px 42px rgba(79, 131, 255, 0.45); }

.btn:hover { transform: translateY(-2px); }

.btn:active { transform: scale(0.97); }

.btn.ghost { background: var(--btn-ghost-bg); color: var(--text); }

.btn.ghost:hover { border-color: var(--line-strong); }

.mini-note {
  margin-top: 20px;
  color: var(--muted2);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 4px;
}

.mini-note span { display: inline-flex; align-items: center; }

.mini-note span + span::before {
  content: "·";
  margin: 0 9px;
  opacity: 0.65;
}

/* ---------------- hero stage / mockup ---------------- */

.hero-stage { position: relative; padding: 26px 30px; }

.hero-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(79, 131, 255, 0.4), rgba(160, 106, 255, 0.2) 50%, transparent 72%);
  filter: blur(48px);
  z-index: 0;
  pointer-events: none;
}

.hero-card {
  position: relative;
  z-index: 1;
  background: var(--hero-card-bg);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 0 20px 20px;
  box-shadow: var(--shadow-lg);
  transform: perspective(1400px) rotateY(-7deg) rotateX(2.5deg);
  transition: transform 0.55s ease;
}

.hero-stage:hover .hero-card { transform: perspective(1400px) rotateY(-2deg) rotateX(1deg); }

.hero-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(140deg, rgba(132, 187, 255, 0.6), transparent 38%, rgba(182, 156, 255, 0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

:root[data-theme="light"] .hero-card::before {
  background: linear-gradient(140deg, rgba(61, 110, 245, 0.55), transparent 38%, rgba(122, 69, 240, 0.36));
}

.window-bar {
  height: 46px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted2);
  font-size: 11px;
}

.window-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); flex: none; }

.win-url {
  margin-left: 10px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.win-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(53, 208, 165, 0.1);
  border: 1px solid rgba(53, 208, 165, 0.32);
  color: var(--teal);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  flex: none;
}

.win-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
  animation: pulse-dot 2s ease-in-out infinite;
}

.paper-list { display: grid; gap: 14px; padding-top: 14px; }

.paper-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card-grad);
}

.paper-card.dim { opacity: 0.62; }

.paper-title { font-weight: 800; line-height: 1.35; margin-bottom: 6px; color: var(--text-strong); }

.paper-meta { font-size: 13px; color: var(--muted2); }

.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

/* badge pills — same colors the extension renders */
.badge {
  font-size: 12px;
  font-weight: 800;
  border-radius: 7px;
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.01em;
}

.badge i {
  font-style: normal;
  font-size: 10px;
  padding: 0 4px;
  border-radius: 4px;
  box-shadow: 0 0 0 1.5px rgba(255, 203, 110, 0.85) inset;
}

.ccf { background: #e15f37; color: #fff; }
.ccf.b { background: #f0ad4e; color: #232323; }
.sci { background: #d63031; color: #fff; }
.sci.z2 { background: #e17055; color: #fff; }
.xr { background: #6c5ce7; color: #fff; }
.ei { background: #087f8c; color: #fff; }
.ei.stop { background: #6c757d; }

.tooltip {
  margin-top: 18px;
  padding: 13px 14px;
  border-radius: 12px;
  background: var(--tooltip-bg);
  border: 1px solid var(--line);
  display: flex;
  gap: 8px;
  flex-direction: column;
  color: var(--muted);
  font-size: 12px;
}

.tooltip b { color: #ffffff; display: inline-flex; align-items: center; gap: 7px; }

.tooltip b::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grad-main);
  flex: none;
}

:root[data-theme="light"] .tooltip { color: #c6d2ea; }

/* floating chips around the mockup */
.float-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 16px 36px rgba(8, 14, 40, 0.5);
  animation: bob 6s ease-in-out infinite;
}

.fc-a { top: 3%; left: -18px; background: linear-gradient(135deg, #e15f37, #ff8c5a); }
.fc-b { top: 36%; right: -22px; background: linear-gradient(135deg, #d63031, #ff7675); animation-delay: 0.8s; }
.fc-c { bottom: 4%; left: -10px; background: linear-gradient(135deg, #6c5ce7, #a29bfe); animation-delay: 1.6s; }
.fc-d { bottom: 28%; right: -6px; background: linear-gradient(135deg, #087f8c, #00b894); animation-delay: 2.4s; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* entrance animations */
.hero-copy > * { animation: rise 0.85s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.12s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.2s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.28s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.36s; }
.hero-stage { animation: rise 1s 0.22s both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

/* scroll-reveal pop-in, applied via .in from app.js */
.in { animation: pop-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

@keyframes pop-in {
  from { opacity: 0; transform: translateY(18px); }
}

/* fallback when the host webview never advances the animation clock
   (html.no-anim is set by app.js); also honor reduced-motion users */
.no-anim *,
.no-anim *::before,
.no-anim *::after {
  animation: none !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------------- metrics ---------------- */

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 28px 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card-grad);
  box-shadow: var(--shadow-sm), var(--card-inset);
}

.metrics div { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 16px; }

.metrics strong {
  font-family: "Sora", "Noto Sans SC", sans-serif;
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  background: var(--grad-main);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.metrics span { color: var(--muted2); font-size: 13px; text-align: center; }

@media (min-width: 901px) {
  .metrics div + div { border-left: 1px solid var(--line); }
}

/* ---------------- sections ---------------- */

.section { padding: 104px 0; }

.section-head { text-align: center; margin: 0 auto 52px; max-width: 780px; }

.section-head h2 {
  font-family: "Sora", "Noto Sans SC", sans-serif;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin: 16px 0 14px;
  color: var(--text-strong);
}

.section-head p { color: var(--muted); font-size: 16.5px; margin: 0; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.feature-grid article {
  position: relative;
  padding: 28px 26px;
  border-radius: 20px;
  background: var(--card-grad);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--card-inset);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.feature-grid article::before,
.step-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14%;
  right: 14%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110, 168, 255, 0.65), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.feature-grid article::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(260px circle at 75% 0%, rgba(110, 168, 255, 0.14), transparent 62%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.feature-grid article:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm), var(--card-inset);
}

.feature-grid article:hover::after,
.feature-grid article:hover::before,
.step-card:hover::before { opacity: 1; }

.feature-grid h3 { margin: 18px 0 8px; font-size: 18px; color: var(--text-strong); }

.feature-grid p { color: var(--muted); margin: 0; font-size: 14px; }

.icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-weight: 900;
  font-size: 14px;
  background: linear-gradient(135deg, rgba(78, 134, 255, 0.16), rgba(159, 107, 255, 0.16));
  border: 1px solid rgba(123, 143, 255, 0.35);
  color: var(--blue);
  box-shadow: 0 8px 22px rgba(30, 60, 140, 0.14);
}

.icon.ccf-ic { color: #e15f37; border-color: rgba(225, 95, 55, 0.4); background: linear-gradient(135deg, rgba(225, 95, 55, 0.16), rgba(255, 160, 90, 0.12)); box-shadow: 0 8px 22px rgba(225, 95, 55, 0.18); }
.icon.sci-ic { color: #d63031; border-color: rgba(214, 48, 49, 0.4); background: linear-gradient(135deg, rgba(214, 48, 49, 0.16), rgba(255, 120, 100, 0.12)); box-shadow: 0 8px 22px rgba(214, 48, 49, 0.18); }
.icon.xr-ic { color: #6c5ce7; border-color: rgba(108, 92, 231, 0.4); background: linear-gradient(135deg, rgba(108, 92, 231, 0.16), rgba(160, 140, 255, 0.12)); box-shadow: 0 8px 22px rgba(108, 92, 231, 0.18); }
.icon.ei-ic { color: #087f8c; border-color: rgba(8, 127, 140, 0.4); background: linear-gradient(135deg, rgba(8, 127, 140, 0.16), rgba(80, 190, 200, 0.12)); box-shadow: 0 8px 22px rgba(8, 127, 140, 0.18); }

/* ---------------- how it works ---------------- */

.how { padding-top: 60px; }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.step-card {
  position: relative;
  padding: 32px 28px;
  border-radius: 20px;
  background: var(--card-grad);
  border: 1px solid var(--line);
  box-shadow: var(--card-inset);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.step-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm), var(--card-inset);
}

/* dashed connector between steps, desktop only */
@media (min-width: 901px) {
  .step-card:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -15px;
    width: 8px;
    height: 8px;
    border-top: 2px solid var(--muted2);
    border-right: 2px solid var(--muted2);
    transform: translateY(-50%) rotate(45deg);
    opacity: 0.55;
  }
}

.step-num {
  font-family: "Sora", sans-serif;
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--blue);
  opacity: 0.9;
}

:root[data-theme="light"] .step-num { -webkit-text-stroke: 1.5px var(--acc-1); }

.step-card h3 { margin: 18px 0 8px; font-size: 18px; color: var(--text-strong); }

.step-card p { color: var(--muted); margin: 0; font-size: 14px; }

/* ---------------- supported sites ---------------- */

.supported { padding-top: 60px; }

.site-cloud { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.site-cloud span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--chip-bg);
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.site-cloud span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dot, var(--blue));
  box-shadow: 0 0 9px var(--dot, var(--blue));
  flex: none;
}

.site-cloud span:nth-child(4n + 2) { --dot: var(--violet); }
.site-cloud span:nth-child(4n + 3) { --dot: var(--cyan); }
.site-cloud span:nth-child(4n)     { --dot: var(--teal); }

.site-cloud span:hover {
  color: var(--text-strong);
  border-color: var(--line-strong);
  background: linear-gradient(135deg, rgba(79, 131, 255, 0.14), rgba(160, 106, 255, 0.12));
  transform: translateY(-2px);
}

.site-cloud span:active { transform: scale(0.96); }

/* ---------------- final CTA ---------------- */

.cta {
  position: relative;
  text-align: center;
  margin-bottom: 84px;
  padding: 78px 40px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card-grad);
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% -40%, rgba(79, 131, 255, 0.3), transparent 58%),
    radial-gradient(circle at 88% 130%, rgba(160, 106, 255, 0.24), transparent 55%);
  pointer-events: none;
}

.cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  mask-image: radial-gradient(circle at 50% 0%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000, transparent 75%);
}

.cta > * { position: relative; }

.cta h2 {
  font-family: "Sora", "Noto Sans SC", sans-serif;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.04em;
  line-height: 1.12;
  color: var(--text-strong);
  margin: 0 0 12px;
}

.cta p { color: var(--muted); font-size: 16.5px; margin: 0 0 28px; }

.cta .cta-row { justify-content: center; }

.cta .mini-note { margin-top: 22px; justify-content: center; }

/* ---------------- footer ---------------- */

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 32px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted2);
}

footer p { font-size: 13px; margin: 6px 0 0; }

.brand.small img { width: 24px; height: 24px; }

.brand.small span { color: var(--text-strong); }

.footer-links { display: flex; gap: 18px; font-size: 13px; }

.footer-links a { transition: color 0.2s ease; }

.footer-links a:hover { color: var(--text-strong); }

.copyright { margin: 0; font-size: 12.5px; color: var(--muted2); }

/* ---------------- touch devices: no sticky hover ---------------- */

@media (hover: none) {
  .btn:hover,
  .btn.primary:hover,
  .theme-toggle:hover,
  .feature-grid article:hover,
  .step-card:hover,
  .site-cloud span:hover { transform: none; }

  .hero-stage:hover .hero-card { transform: none; }
}

/* ---------------- responsive ---------------- */

@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; min-height: auto; gap: 56px; padding: 64px 0 80px; }
  .hero-stage { max-width: 620px; margin: 0 auto; width: 100%; }
}

@media (max-width: 900px) {
  .nav-links > a:not(.btn) { display: none; }
  .menu-btn { display: block; }
  .mobile-menu { display: block; }
  .hero-stage { padding: 20px 8px; }
  .float-chip { display: none; }
  .hero-card { transform: none; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .steps-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .metrics { grid-template-columns: 1fr 1fr; padding: 6px 0; }
  .metrics div { padding: 20px 12px; }
  .metrics div:nth-child(even) { border-left: 1px solid var(--line); }
  .metrics div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* tablets: keep two chips, moved inside the safe zone */
@media (max-width: 900px) and (min-width: 621px) {
  .fc-a, .fc-b { display: inline-flex; }
  .fc-a { top: -16px; left: 6px; }
  .fc-b { top: auto; bottom: -16px; right: 6px; }
}

@media (max-width: 620px) {
  .wrap { width: min(100% - 28px, 1180px); }
  .nav-inner { height: 62px; }
  .nav-links { display: none; }
  .mobile-menu { padding: 2px 14px 18px; }
  section[id] { scroll-margin-top: 74px; }
  .hero { gap: 44px; padding: 44px 0 60px; }
  h1 { font-size: clamp(34px, 9.6vw, 46px); margin: 18px 0 20px; }
  .lead { font-size: 15.5px; margin-bottom: 24px; }
  .cta-row .btn { flex: 1 1 auto; }
  .section { padding: 68px 0; }
  .section-head { margin-bottom: 38px; }
  .section-head h2 { font-size: clamp(26px, 7.4vw, 34px); }
  .section-head p { font-size: 15px; }
  .feature-grid { grid-template-columns: 1fr; gap: 12px; }
  .feature-grid article { padding: 24px 22px; }
  .step-card { padding: 26px 22px; }
  .metrics { border-radius: 18px; }
  .metrics strong { font-size: 30px; }
  .metrics span { font-size: 12px; }
  .hero-stage::before { filter: blur(38px); opacity: 0.8; }
  .hero-card { padding: 0 13px 13px; border-radius: 18px; }
  .hero-card::before { border-radius: 18px; }
  .window-bar { height: 42px; font-size: 10px; }
  .paper-list { gap: 12px; padding-top: 12px; }
  .paper-card { padding: 16px 15px; }
  .badges { margin-top: 13px; }
  .badge { font-size: 11.5px; padding: 4px 8px; }
  .tooltip { margin-top: 14px; padding: 11px 12px; font-size: 11.5px; }
  .eyebrow, .section-head > span { white-space: normal; line-height: 1.7; }
  .cta { padding: 52px 22px; margin-bottom: 56px; border-radius: 22px; }
  .cta h2 { font-size: clamp(26px, 7.4vw, 34px); }
  .cta p { font-size: 15px; }
  .mini-note { font-size: 12px; line-height: 1.7; }
  footer { flex-direction: column; align-items: center; text-align: center; gap: 18px; padding: 28px 0 36px; }
  .aurora { filter: blur(70px); }
  .aurora-a { width: 420px; height: 420px; }
  .aurora-b { width: 480px; height: 480px; right: -220px; }
  .aurora-c { width: 380px; height: 380px; }
}

@media (max-width: 400px) {
  .eyebrow, .section-head > span { font-size: 10.5px; letter-spacing: 0.09em; padding: 6px 12px; }
  .metrics strong { font-size: 26px; }
  .mini-note { font-size: 11.5px; }
  .site-cloud { gap: 9px; }
  .site-cloud span { padding: 8px 12px; font-size: 12.5px; }
}
