/*
 * TurnCheckHK static marketing site.
 *
 * Standalone stylesheet — deliberately shares no build step with the v2 React
 * app so these pages stay pure HTML+CSS (zero JS needed to render). The tokens
 * below mirror web/src/styles/globals.css so the marketing pages and the app
 * look like one product.
 *
 * Borders are always drawn from --hairline (a low-alpha ink/white mix), never
 * a flat white or grey rim.
 */

/* ---------- Tokens ---------- */
:root {
  --body: #FAFAF9;
  --surface: #FFFFFF;
  --surface-2: #F4F4F3;
  --ink: #11181C;
  --ink-2: #52605F;
  --ink-3: #78827F;
  --accent: #0e8a6e;
  --accent-ink: #0b6e58;
  --accent-soft: rgba(14, 138, 110, 0.09);
  --hairline: rgba(17, 24, 28, 0.09);
  --hairline-strong: rgba(17, 24, 28, 0.16);
  --elev-1: 0 1px 2px rgba(17, 24, 28, 0.05), 0 2px 6px rgba(17, 24, 28, 0.04);
  --elev-2: 0 12px 30px -10px rgba(17, 24, 28, 0.16);
  --radius: 14px;
  --maxw: 1080px;

  --font: 'Geist Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
          'PingFang HK', 'Noto Sans HK', 'Microsoft JhengHei', 'Helvetica Neue', sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  color-scheme: light;
}

html[data-theme='dark'] {
  --body: #0C0F0E;
  --surface: #151A18;
  --surface-2: #1B211E;
  --ink: #ECEFEE;
  --ink-2: #A3ADAA;
  --ink-3: #7C8683;
  --accent: #10b981;
  --accent-ink: #34d3a0;
  --accent-soft: rgba(16, 185, 129, 0.12);
  --hairline: rgba(255, 255, 255, 0.07);
  --hairline-strong: rgba(255, 255, 255, 0.14);
  --elev-1: 0 1px 2px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.022);
  --elev-2: 0 18px 44px -14px rgba(0, 0, 0, 0.62);

  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--body);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
}

html[data-theme='dark'] body {
  background-image: radial-gradient(1100px 480px at 50% -8%, rgba(16, 185, 129, 0.06), transparent 70%);
  background-attachment: fixed;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.22;
  letter-spacing: -0.02em;
  font-weight: 650;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.35rem + 2.8vw, 3.15rem); }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.1rem); }
h3 { font-size: 1.16rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--ink);
  padding: 10px 16px; border-radius: 10px; box-shadow: var(--elev-2);
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
section { padding-block: clamp(48px, 7vw, 84px); }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 12px;
}
.lede { color: var(--ink-2); font-size: 1.06rem; max-width: 62ch; }
.section-head { margin-bottom: clamp(28px, 4vw, 44px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--body) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 16px;
  height: 62px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav a {
  color: var(--ink-2); padding: 7px 11px; border-radius: 9px; font-size: 0.92rem;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.nav a[aria-current='page'] { color: var(--ink); background: var(--surface-2); }
@media (max-width: 760px) {
  .nav a.nav-hide-sm { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 11px; font-size: 0.95rem; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--elev-1); }
.btn-primary:hover { background: var(--accent-ink); box-shadow: var(--elev-2); }
html[data-theme='dark'] .btn-primary { color: #06231B; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--hairline); box-shadow: var(--elev-1); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 8px 15px; font-size: 0.89rem; border-radius: 9px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(52px, 8vw, 96px) clamp(40px, 5vw, 64px); }
.hero h1 { margin-bottom: 18px; }
.hero .lede { font-size: clamp(1.02rem, 0.97rem + 0.3vw, 1.18rem); margin-bottom: 28px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: 0.83rem; font-weight: 600; margin-bottom: 20px;
}
.badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex: none;
}

/* ---------- Stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--hairline); border-radius: var(--radius); overflow: hidden;
  margin-top: 40px; box-shadow: var(--elev-1);
}
.stats div { background: var(--surface); padding: 20px 16px; text-align: center; }
.stats dt { font-size: 0.8rem; color: var(--ink-3); margin-top: 4px; }
.stats dd {
  margin: 0; font-size: clamp(1.4rem, 1.1rem + 1.1vw, 1.9rem);
  font-weight: 680; letter-spacing: -0.03em; color: var(--ink);
}
@media (max-width: 620px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--elev-1);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-2); font-size: 0.96rem; }
.card ul { margin: 14px 0 0; padding: 0; list-style: none; }
.card li {
  position: relative; padding-inline-start: 22px; margin-bottom: 7px;
  color: var(--ink-2); font-size: 0.92rem;
}
.card li::before {
  content: ''; position: absolute; inset-inline-start: 2px; top: 0.62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.card-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px; margin-bottom: 14px;
  background: var(--accent-soft); color: var(--accent-ink);
  font-family: var(--mono); font-weight: 600; font-size: 0.95rem;
}

/* ---------- Trust strip ---------- */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.trust div { padding: 18px 20px; border-radius: var(--radius); background: var(--surface-2); }
.trust strong { display: block; font-size: 0.98rem; margin-bottom: 3px; }
.trust span { color: var(--ink-2); font-size: 0.88rem; }
@media (max-width: 900px) { .trust { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .trust { grid-template-columns: 1fr; } }

/* ---------- Table ---------- */
.table-scroll { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--elev-1); }
table {
  width: 100%; border-collapse: collapse; background: var(--surface);
  font-size: 0.95rem; min-width: 520px;
}
th, td { padding: 14px 18px; text-align: start; border-bottom: 1px solid var(--hairline); }
thead th {
  background: var(--surface-2); font-size: 0.82rem; font-weight: 600;
  color: var(--ink-2); letter-spacing: 0.02em; white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
td.yes { color: var(--accent-ink); font-weight: 600; }
td.no { color: var(--ink-3); }

/* ---------- Pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .price-grid { grid-template-columns: 1fr; } }
.price-card { position: relative; display: flex; flex-direction: column; }
.price-card.featured { border-color: color-mix(in srgb, var(--accent) 42%, var(--hairline)); }
.price-tag {
  display: flex; align-items: baseline; gap: 4px; margin: 6px 0 4px;
  font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.5rem);
  font-weight: 680; letter-spacing: -0.035em;
}
.price-tag .cur { font-size: 1rem; font-weight: 600; color: var(--ink-2); }
.price-unit { color: var(--ink-3); font-size: 0.87rem; margin-bottom: 16px; }
.price-card .btn { margin-top: auto; }
.pill {
  position: absolute; top: 16px; inset-inline-end: 16px;
  padding: 4px 10px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent-ink); font-size: 0.74rem; font-weight: 650;
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); box-shadow: var(--elev-1);
  overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 18px 22px; font-weight: 600; font-size: 1rem;
  list-style: none; display: flex; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; margin-inline-start: auto; color: var(--accent-ink);
  font-size: 1.3rem; font-weight: 400; line-height: 1; flex: none;
  transition: transform 0.18s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { background: var(--surface-2); }
.faq .answer { padding: 0 22px 20px; color: var(--ink-2); font-size: 0.96rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 20px; padding: clamp(32px, 5vw, 56px); text-align: center;
  box-shadow: var(--elev-2);
}
.cta-band h2 { margin-bottom: 10px; }
.cta-band .lede { margin-inline: auto; margin-bottom: 26px; }
.cta-band .btn-row { justify-content: center; }

/* ---------- Article ---------- */
.article { max-width: 720px; margin-inline: auto; }
.article h2 { margin-top: 2em; }
.article h3 { margin-top: 1.6em; }
.article p, .article li { color: var(--ink-2); }
.article ul, .article ol { padding-inline-start: 22px; margin: 0 0 1em; }
.article li { margin-bottom: 6px; }
.article strong { color: var(--ink); font-weight: 650; }
.article blockquote {
  margin: 1.4em 0; padding: 16px 22px;
  background: var(--surface-2); border-radius: 12px;
  border-inline-start: 3px solid var(--accent);
  color: var(--ink-2);
}
.article .table-scroll { margin: 1.4em 0; }
.meta { color: var(--ink-3); font-size: 0.87rem; font-family: var(--mono); }

.post-list { display: grid; gap: 16px; }
.post-list article {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--elev-1);
  transition: box-shadow 0.15s ease, transform 0.12s ease;
}
.post-list article:hover { box-shadow: var(--elev-2); transform: translateY(-2px); }
.post-list h2 { font-size: 1.24rem; margin-bottom: 8px; }
.post-list h2 a { color: var(--ink); }
.post-list p { color: var(--ink-2); font-size: 0.96rem; margin-bottom: 10px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 40px 48px;
  margin-top: clamp(40px, 6vw, 72px);
  color: var(--ink-2); font-size: 0.9rem;
}
.footer-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
@media (max-width: 760px) { .footer-cols { grid-template-columns: 1fr 1fr; } .footer-cols > :first-child { grid-column: 1 / -1; } }
.footer-cols h4 { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li { margin-bottom: 8px; }
.footer-cols a { color: var(--ink-2); }
.footer-cols a:hover { color: var(--ink); }
.disclaimer { color: var(--ink-3); font-size: 0.82rem; line-height: 1.6; max-width: 68ch; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: transparent; border: 1px solid var(--hairline);
  color: var(--ink-2); cursor: pointer; padding: 0;
}
.theme-toggle:hover { background: var(--surface-2); color: var(--ink); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-dark { display: none; }
html[data-theme='dark'] .theme-toggle .icon-dark { display: block; }
html[data-theme='dark'] .theme-toggle .icon-light { display: none; }

/* ---------- Breadcrumb ---------- */
.crumbs { font-size: 0.86rem; color: var(--ink-3); margin-bottom: 18px; }
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--ink-2); }
.crumbs span { margin-inline: 7px; }

/* ============================================================
 * LANDING HERO — static port of web/src/pages/LandingPage.tsx
 *
 * The React landing gets its look from WebGL (Aurora/ogl) and framer-motion.
 * Neither can run here: this page must render fully before any JS, or the
 * Googlebot fix it exists for is undone. So every effect below is either pure
 * CSS or degrades to a finished, static layout when landing.js never loads.
 *
 * Colour stops are copied from the React components so the two pages read as
 * the same product: Aurora #0e8a6e/#10b981/#6ee7b7, GradientText's 5-stop
 * emerald ramp, and the report mockup's fixed "paper" palette.
 * ============================================================ */

:root {
  --paper: #FFFFFF;
  --paper-ink: #1f1f23;
  --paper-sub: #5b5b62;
  --paper-line: #E8E6E1;
  --paper-panel: #F8F7F4;
  --paper-track: #EEEDEA;
  --ai-green: #0F9D58;
  --sim-red: #E64A4A;
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; inset-inline: 0; top: 0; height: 3px; z-index: 1300;
  transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 40%, transparent));
}
/* Native scroll-driven animation where supported — no JS, no jank. */
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    animation: sp-grow linear both;
    animation-timeline: scroll(root block);
  }
  @keyframes sp-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* ---------- Hero shell ---------- */
.hero-v2 {
  position: relative;
  overflow: hidden;
  padding-block: clamp(40px, 7vw, 96px) clamp(52px, 6vw, 80px);
  isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: -1; }

/* Aurora: three drifting emerald blooms. The WebGL original warps a simplex
   noise field; at this scale and blur the difference isn't legible. */
.aurora {
  position: absolute; inset: -25% -10% auto -10%; height: 78%;
  opacity: 0.4; filter: blur(56px);
  background:
    radial-gradient(38% 60% at 22% 55%, #0e8a6e 0%, transparent 70%),
    radial-gradient(42% 65% at 52% 42%, #10b981 0%, transparent 72%),
    radial-gradient(40% 62% at 80% 58%, #6ee7b7 0%, transparent 70%);
  animation: aurora-drift 18s ease-in-out infinite alternate;
}
html[data-theme='dark'] .aurora { opacity: 0.5; }
@keyframes aurora-drift {
  0%   { transform: translate3d(-3%, 0, 0) scaleY(1); }
  50%  { transform: translate3d(2%, 2%, 0) scaleY(1.12); }
  100% { transform: translate3d(4%, -1%, 0) scaleY(0.96); }
}

/* Dot grid, masked to an ellipse behind the headline. */
.dotgrid {
  position: absolute; inset: 0; opacity: 0.35;
  background-image: radial-gradient(color-mix(in srgb, var(--accent) 28%, transparent) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
html[data-theme='dark'] .dotgrid { opacity: 0.5; }

/* Cursor spotlight — landing.js only updates the two coordinate vars. */
.spotlight {
  position: absolute; inset: 0;
  --sx: 50%; --sy: 30%;
  background: radial-gradient(520px circle at var(--sx) var(--sy),
              color-mix(in srgb, var(--accent) 13%, transparent) 0%, transparent 55%);
  transition: background 240ms ease-out;
}
html[data-theme='dark'] .spotlight {
  background: radial-gradient(520px circle at var(--sx) var(--sy),
              color-mix(in srgb, var(--accent) 18%, transparent) 0%, transparent 55%);
}

/* ---------- Hero layout ---------- */
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 4vw, 48px);
  align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 34px; } }

.hero-title {
  font-size: clamp(2.5rem, 1.6rem + 4.2vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin-bottom: 18px;
}
.hero-v2 .lede { font-size: clamp(1rem, 0.95rem + 0.35vw, 1.125rem); line-height: 1.7; margin-bottom: 26px; }

/* Animated gradient wordmark — GradientText's exact ramp and 8s cycle. */
.gradient-text {
  background-image: linear-gradient(90deg, #0e8a6e, #34d399, #10b981, #6ee7b7, #0e8a6e);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: gt-pan 8s linear infinite;
}
@keyframes gt-pan { to { background-position: 300% 0; } }

/* BlurText's per-letter reveal. Letters are pre-split at build time and the
   stagger is a CSS variable, so with JS off every letter is simply visible. */
.reveal-letters > span {
  display: inline-block;
  animation: letter-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i) * 40ms);
}
@keyframes letter-in {
  from { opacity: 0; filter: blur(8px); transform: translateY(-16px); }
  to   { opacity: 1; filter: blur(0);   transform: translateY(0); }
}

/* Magnetic button — landing.js sets --mx/--my on hover. */
.btn-magnetic {
  --mx: 0px; --my: 0px;
  transform: translate3d(var(--mx), var(--my), 0);
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease, background 0.15s ease;
}
.btn-magnetic:hover { transform: translate3d(var(--mx), var(--my), 0); }

/* ---------- Hero stats strip ---------- */
.stats-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: clamp(44px, 6vw, 80px) 0 0;
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--hairline);
}
.stats-strip > div { padding-inline: 20px; }
.stats-strip > div + div { border-inline-start: 1px solid var(--hairline); }
.stats-strip dd {
  margin: 0; font-weight: 700; line-height: 1.05; letter-spacing: -0.025em;
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.375rem);
  font-variant-numeric: tabular-nums;
}
.stats-strip dt {
  margin-top: 8px; font-size: 0.75rem; color: var(--ink-3);
  letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500;
}
@media (max-width: 900px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
  .stats-strip > div { padding-inline: 12px; }
  /* Only the in-row neighbour keeps a rule, or row 2 col 1 gets a stray one. */
  .stats-strip > div + div { border-inline-start: none; }
  .stats-strip > div:nth-child(even) { border-inline-start: 1px solid var(--hairline); }
}

/* ---------- Turnitin report mockup ---------- */
.paper-stack {
  position: relative; max-width: 540px; margin-inline: auto;
  perspective: 1400px;
}
.paper-tilt {
  position: relative;
  transform-style: preserve-3d;
  --rx: 0deg; --ry: 0deg;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
.paper {
  background: var(--paper); color: var(--paper-ink);
  border: 1px solid var(--paper-line); border-radius: 16px;
}
.paper-back {
  position: absolute; top: 24px; left: 24px; right: 12px; bottom: -16px;
  transform: rotate(3deg); opacity: 0.94; padding: 19px;
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.18);
}
html[data-theme='dark'] .paper-back { box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.8); }
.paper-front {
  position: relative; padding: clamp(21px, 2.4vw, 27px); min-height: 400px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.22);
}
html[data-theme='dark'] .paper-front { box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.85); }

.paper-head { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.paper-head .rule { flex: 1; height: 1px; background: var(--paper-line); }
.paper-head .label {
  font-size: 11px; color: var(--paper-sub); font-weight: 600; letter-spacing: 0.04em;
  white-space: nowrap;
}

.bar-track { height: 10px; border-radius: 999px; background: #F0EFEC; overflow: hidden; margin-bottom: 12px; }
.bar-fill {
  height: 100%; border-radius: 999px; background: var(--sim-red);
  width: var(--w, 0%);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.paper-strong { font-size: 13px; font-weight: 700; margin: 0 0 12px; }
.skeleton { display: grid; gap: 6px; }
.skeleton i { display: block; height: 8px; border-radius: 4px; background: var(--paper-track); }
.skeleton i.hit { background: rgba(230, 74, 74, 0.25); }

.ai-score {
  padding: 19px; border-radius: 12px; margin-bottom: 16px;
  background: var(--paper-panel); border: 1px solid var(--paper-line);
  display: flex; align-items: baseline; gap: 12px;
}
.ai-score .num {
  font-size: 56px; font-weight: 700; line-height: 1; color: var(--ai-green);
  font-variant-numeric: tabular-nums;
}
.ai-score .meta { display: grid; gap: 2px; padding-bottom: 4px; }
.ai-score .meta b { font-size: 13px; font-weight: 600; }
.ai-score .meta span { font-size: 11px; color: var(--paper-sub); display: flex; align-items: center; gap: 5px; }
.ai-score .meta span::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ai-green); flex: none;
}

.groups-label {
  font-size: 11px; color: var(--paper-sub); font-weight: 700;
  letter-spacing: 0.08em; margin: 0 0 8px;
}
.group-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.group-row .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.group-row .name { font-size: 13px; flex: 1; }
.group-row .track { width: 120px; height: 6px; background: var(--paper-track); border-radius: 999px; overflow: hidden; flex: none; }
.group-row .track i {
  display: block; height: 100%; border-radius: 999px; width: var(--w, 0%);
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.group-row .pct {
  font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums;
  min-width: 28px; text-align: end;
}

.paper-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--paper-line);
  font-size: 11px; color: var(--paper-sub);
}
.paper-foot .page { font-family: var(--mono); }

.scan-badge {
  position: absolute; top: -14px; inset-inline-end: 18px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 999px;
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--accent) 60%, transparent);
}
.scan-badge svg { width: 14px; height: 14px; }

/* ---------- Scroll reveal ---------- */
/* Opt-in via .js-reveal, which landing.js adds to <html>. Without JS the
   content is simply visible — never hidden behind an observer that never runs. */
.js-reveal .reveal { opacity: 0; transform: translateY(40px); }
.js-reveal .reveal.in {
  opacity: 1; transform: none;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Spotlight cards ---------- */
.card-spot { position: relative; overflow: hidden; }
.card-spot::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  opacity: 0; transition: opacity 0.4s ease;
  background: radial-gradient(320px circle at var(--tc-x, 50%) var(--tc-y, 50%),
              color-mix(in srgb, var(--accent) 18%, transparent), transparent 62%);
}
.card-spot:hover::before { opacity: 1; }
.card-spot > * { position: relative; }

@media (prefers-reduced-motion: reduce) {
  .aurora, .gradient-text { animation: none; }
  .reveal-letters > span { animation: none; opacity: 1; filter: none; transform: none; }
  .js-reveal .reveal { opacity: 1; transform: none; }
  .paper-tilt, .btn-magnetic { transform: none; }
}

/* ============================================================
 * LANDING SECTIONS — remaining parity with LandingPage.tsx
 * ============================================================ */

/* WebGL took over: drop the CSS stand-in so the two don't stack. */
.aurora.aurora-gl { background: none; filter: none; animation: none; }
.aurora.aurora-gl canvas { width: 100%; height: 100%; }

/* Landing sections run taller than the rest of the site (py 64/112). */
.sec-lg { padding-block: clamp(64px, 8vw, 112px); }
.sec-rule-top { border-top: 1px solid var(--hairline); }
.sec-rule-both { border-block: 1px solid var(--hairline); }

/* ---------- Centred section heading ---------- */
.sec-head {
  max-width: 720px; margin: 0 auto clamp(40px, 5vw, 64px);
  text-align: center; display: grid; gap: 11px;
}
.sec-head .eyebrow {
  margin: 0; font-family: var(--font); font-weight: 700; font-size: 0.75rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3);
}
.sec-head h2 {
  margin: 0; font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.625rem);
  font-weight: 700; letter-spacing: -0.025em;
}
.sec-head p { margin: 4px 0 0; color: var(--ink-2); font-size: clamp(0.94rem, 0.9rem + 0.3vw, 1.06rem); line-height: 1.7; }

/* ---------- Shared: accent icon tile ---------- */
.icon-tile {
  border-radius: 12px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent-ink);
  width: 40px; height: 40px;
}
.icon-tile svg { width: 20px; height: 20px; }
.icon-tile.lg { width: 56px; height: 56px; border-radius: 19px; margin-bottom: 19px; }
.icon-tile.lg svg { width: 28px; height: 28px; }

/* ---------- Tilt (TiltCard) ---------- */
.tilt {
  --rx: 0deg; --ry: 0deg; --sc: 1;
  height: 100%;
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) scale(var(--sc));
  transform-style: preserve-3d;
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Trust bar ---------- */
.trust-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .trust-bar { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .trust-bar { grid-template-columns: 1fr; } }
.trust-card {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 18px; border-radius: 16px; height: 100%;
  border: 1px solid var(--hairline); background: var(--surface);
}
.trust-card strong { display: block; font-size: 0.875rem; font-weight: 700; margin-bottom: 3px; }
.trust-card span { color: var(--ink-2); font-size: 0.75rem; line-height: 1.5; }

/* ---------- Features zigzag ---------- */
.zigzag { display: grid; gap: 72px; margin-top: clamp(48px, 5vw, 80px); }
.zz-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 4vw, 64px); align-items: center; }
.zz-row.rev > .zz-copy { order: 2; }
.zz-row.rev > .zz-art  { order: 1; }
@media (max-width: 900px) {
  .zigzag { gap: 56px; }
  .zz-row, .zz-row.rev { grid-template-columns: 1fr; gap: 28px; }
  .zz-row.rev > .zz-copy, .zz-row.rev > .zz-art { order: initial; }
}
.zz-copy h3 {
  font-size: clamp(1.625rem, 1.2rem + 1.8vw, 2.25rem);
  font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px;
}
.zz-copy > p { color: var(--ink-2); font-size: clamp(0.94rem, 0.9rem + 0.35vw, 1.06rem); line-height: 1.7; margin-bottom: 20px; }
.zz-bullets { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.zz-bullets li { display: flex; align-items: center; gap: 10px; font-size: 0.94rem; }
.zz-bullets li::before {
  content: ''; width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: color-mix(in srgb, var(--accent) 12%, transparent) no-repeat center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e8a6e' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 13px 13px;
}
html[data-theme='dark'] .zz-bullets li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334d3a0' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

/* Feature visuals */
.fv {
  padding: 24px; border-radius: 22px;
  background: var(--surface); border: 1px solid var(--hairline);
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.12);
}
html[data-theme='dark'] .fv { box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.7); }

.fv-src { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.fv-src:last-child { margin-bottom: 0; }
.fv-src .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.fv-src .nm { color: var(--ink-3); font-size: 0.75rem; width: 150px; flex: none; }
.fv-src .track { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.fv-src .track i { display: block; height: 100%; border-radius: 999px; width: var(--w, 0%); transition: width 1s cubic-bezier(0.16, 1, 0.3, 1); }
.fv-src .pc { font-size: 0.75rem; font-weight: 600; width: 32px; text-align: end; flex: none; }
@media (max-width: 520px) { .fv-src .nm { width: 92px; } }

.fv-donut { display: grid; place-items: center; padding-block: 32px; }
.fv-donut .ring { position: relative; width: 200px; height: 200px; }
.fv-donut svg { width: 200px; height: 200px; }
.fv-donut .track { fill: none; stroke: var(--hairline-strong); stroke-width: 6; }
.fv-donut .val {
  fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 213.6; stroke-dashoffset: 213.6;
  transform: rotate(-90deg); transform-origin: 50% 50%;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.fv-donut .ring.in .val { stroke-dashoffset: 192.2; }
.fv-donut .mid {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 3px;
}
.fv-donut .mid b { font-size: 2.75rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.fv-donut .mid span { color: var(--ink-3); font-size: 0.75rem; }

.fv-files { position: relative; min-height: 280px; overflow: hidden; }
.fv-files .doc {
  position: absolute; width: 180px; height: 220px; border-radius: 12px; padding: 16px;
  background: #fff; border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.12);
}
.fv-files .doc h4 { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; color: #1f1f23; margin: 0 0 12px; }
.fv-files .doc h4 svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.fv-files .doc i { display: block; height: 6px; border-radius: 999px; background: #EEEDEA; margin-bottom: 8px; }

/* ---------- How it works ---------- */
.steps-wrap { position: relative; margin-top: clamp(48px, 5vw, 64px); }
.steps-wrap::before {
  content: ''; position: absolute; top: 28px; left: 16.6667%; right: 16.6667%; height: 2px; z-index: 0;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent) 40%, transparent),
    color-mix(in srgb, var(--accent) 10%, transparent),
    color-mix(in srgb, var(--accent) 40%, transparent));
}
@media (max-width: 900px) { .steps-wrap::before { display: none; } }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; position: relative; z-index: 1; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; gap: 44px; } }
.step {
  position: relative; margin-top: 28px; padding: 40px 27px 27px;
  border-radius: 22px; height: calc(100% - 28px); text-align: center;
  background: var(--surface); border: 1px solid var(--hairline);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
.step:hover { transform: translateY(-6px); }
.step .n {
  position: absolute; top: -28px; left: 50%; transform: translateX(-50%);
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--accent);
  display: grid; place-items: center;
  font-size: 1.375rem; font-weight: 700; color: var(--accent-ink);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 8%, transparent);
}
.step .icon-tile { margin: 0 auto 13px; }
.step h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 6px; }
.step p { color: var(--ink-2); font-size: 0.875rem; line-height: 1.7; }

/* ---------- Comparison ---------- */
.cmp-shell {
  border: 1px solid var(--hairline); border-radius: 22px; overflow: hidden;
  background: var(--surface); box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.08);
  margin-top: clamp(40px, 4vw, 56px);
}
html[data-theme='dark'] .cmp-shell { box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.7); }
.cmp-shell .table-scroll { border-radius: 0; box-shadow: none; }
.cmp-shell table { font-size: 0.875rem; }
.cmp-shell thead tr { background: var(--surface-2); }
.cmp-shell th:first-child { width: 28%; }
.cmp-shell .ours-col { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.cmp-shell tbody .ours-col { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.cmp-brand { display: flex; align-items: center; gap: 8px; color: var(--accent-ink); font-weight: 700; }
.cmp-brand img { width: 20px; height: 20px; }
.cmp-cell { display: flex; align-items: center; gap: 8px; }
.cmp-cell svg { width: 18px; height: 18px; flex: none; }
.tone-good { color: var(--accent-ink); }
.tone-warn { color: #F59E0B; }
.tone-bad  { color: var(--ink-3); }

/* ---------- Pricing ---------- */
.price-grid-lg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: clamp(32px, 3vw, 40px); align-items: stretch; }
@media (max-width: 900px) { .price-grid-lg { grid-template-columns: 1fr; } }
.plan {
  position: relative; padding: 32px; border-radius: 22px; height: 100%;
  display: flex; flex-direction: column;
  border: 2px solid var(--hairline); background: var(--surface);
  box-shadow: 0 6px 20px -10px rgba(0, 0, 0, 0.05);
}
.plan.popular {
  border-color: var(--accent);
  box-shadow: 0 26px 60px -28px color-mix(in srgb, var(--accent) 50%, transparent);
}
.plan .tag {
  position: absolute; top: -12px; inset-inline-start: 24px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 0.75rem;
  height: 24px; padding-inline: 10px; border-radius: 999px; display: grid; place-items: center;
}
.plan .nm { color: var(--ink-3); font-weight: 600; text-transform: uppercase; font-size: 0.6875rem; letter-spacing: 0.08em; margin: 0; }
.plan .amt { display: flex; align-items: baseline; gap: 4px; margin: 8px 0 0; }
.plan .amt .cur { color: var(--ink-3); font-size: 0.875rem; }
.plan .amt b { font-size: 3rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.plan .cr { color: var(--ink-3); font-size: 0.875rem; margin: 8px 0 0; }
.plan ul { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; flex: 1; }
.plan li { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; }
.plan li svg { width: 16px; height: 16px; color: var(--accent-ink); flex: none; }
.plan .btn { margin-top: 20px; width: 100%; }

/* ---------- FAQ (landing width) ---------- */
.faq-narrow { max-width: 768px; margin-inline: auto; }
.faq-narrow details {
  border-radius: 16px; border: 1px solid var(--hairline);
  box-shadow: none; background: var(--surface);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.faq-narrow details[open] { border-color: var(--ink); }
.faq-narrow summary { padding: 21px; font-size: 1rem; }
.faq-narrow summary::after { font-size: 1.5rem; font-weight: 300; color: var(--ink-3); }
.faq-narrow .answer { padding: 0 21px 21px; font-size: 0.875rem; line-height: 1.75; }

/* ---------- CTA band ---------- */
.cta-glow {
  position: relative; overflow: hidden; border-radius: 28px; text-align: center;
  padding: clamp(32px, 5vw, 64px);
  --gx: 80%; --gy: 20%;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 14%, transparent) 0%,
    color-mix(in srgb, var(--accent) 4%, transparent) 100%);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
html[data-theme='dark'] .cta-glow {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent) 20%, transparent) 0%,
    color-mix(in srgb, var(--accent) 5%, transparent) 100%);
}
.cta-glow::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; filter: blur(40px);
  background: radial-gradient(420px circle at var(--gx) var(--gy),
              color-mix(in srgb, var(--accent) 32%, transparent) 0%, transparent 60%);
}
html[data-theme='dark'] .cta-glow::before {
  background: radial-gradient(420px circle at var(--gx) var(--gy),
              color-mix(in srgb, var(--accent) 45%, transparent) 0%, transparent 60%);
}
.cta-glow > * { position: relative; }
.cta-glow h2 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.625rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }
.cta-glow .lede { margin-inline: auto; margin-bottom: 26px; }
.cta-glow .btn-row { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  .tilt, .step:hover { transform: none; }
  .fv-donut .val { transition: none; stroke-dashoffset: 192.2; }
}

/* Icons inside buttons/links inherit colour and stay optically balanced. */
.btn svg { width: 17px; height: 17px; flex: none; }

/* Visually hidden but readable by assistive tech — the comparison table's
   first header cell is blank by design, but must not be blank to a screen
   reader trying to announce the row header. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* The back sheet hangs 16px below the front one and the "AI scanned" pill sits
   14px above it — both sit outside the flow, so reserve the room here or they
   collide with the stats strip below and the badge clips on mobile. */
.paper-stack { padding: 20px 0 24px; min-height: 460px; }
@media (min-width: 901px) { .paper-stack { min-height: 500px; } }
@media (max-width: 900px) { .paper-stack { margin-top: 8px; } }

/* ============================================================
 * LOCALISATION — language switcher + RTL
 * ============================================================ */

/* A <details> menu rather than a scripted dropdown: it opens with JS off, and
   every entry is a crawlable <a>, which is how Google finds the alternates. */
.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 9px;
  border: 1px solid var(--hairline); color: var(--ink-2);
  font-size: 0.86rem; white-space: nowrap;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover { background: var(--surface-2); color: var(--ink); }
.lang-switch summary svg { width: 15px; height: 15px; flex: none; }
@media (max-width: 640px) { .lang-switch summary span { display: none; } }

.lang-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 60;
  min-width: 190px; max-height: 60vh; overflow-y: auto;
  display: grid; gap: 2px; padding: 6px;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 12px; box-shadow: var(--elev-2);
}
.lang-menu a {
  padding: 7px 10px; border-radius: 8px;
  color: var(--ink-2); font-size: 0.88rem; white-space: nowrap;
}
.lang-menu a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.lang-menu a[aria-current='true'] { color: var(--accent-ink); font-weight: 600; background: var(--accent-soft); }

.plan-feats { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 7px; }
.plan-feats li {
  position: relative; padding-inline-start: 22px;
  color: var(--ink-2); font-size: 0.92rem;
}
.plan-feats li::before {
  content: ''; position: absolute; inset-inline-start: 2px; top: 0.62em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}

/* ---------- RTL ----------
   Layout already uses logical properties (margin-inline, inset-inline,
   padding-inline), so direction mostly takes care of itself. These are the
   handful of places that hard-code a physical direction. */
[dir='rtl'] .crumbs span { transform: scaleX(-1); display: inline-block; }
[dir='rtl'] .faq summary::after { margin-inline-start: auto; }
[dir='rtl'] .skip-link { left: auto; right: 12px; }
[dir='rtl'] .stats-strip > div + div { border-inline-start: 1px solid var(--hairline); }
/* Arrows in CTA labels point the wrong way once mirrored. */
[dir='rtl'] .btn { unicode-bidi: plaintext; }
