/* TeXEq marketing site — self-contained, no external assets */
:root {
  --ink: #0b1020;
  --ink-2: #111a33;
  --text: #1f2937;
  --muted: #667085;
  --line: #e5e9f2;
  --bg: #ffffff;
  --bg-soft: #f6f8fc;
  --brand: #4f46e5;
  --brand-2: #0ea5e9;
  --brand-soft: #eef2ff;
  --amber: #f59e0b;
  --green: #10b981;
  --radius: 16px;
  --shadow: 0 20px 50px rgba(15, 23, 42, .12);
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, .08);
  --max: 1120px;
}
* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
.hero-copy, .hero-visual, .feature-copy, .feature-media, .window-card, .vector-demo, .convert-demo { min-width: 0; max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 12px; letter-spacing: -.01em; }
h1 { font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 750; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 720; }
h3 { font-size: 1.18rem; font-weight: 680; }
p { margin: 0 0 14px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #f1f5f9; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.container { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 12px; font-weight: 650; font-size: 15px;
  border: 1px solid transparent; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 12px 28px rgba(79, 70, 229, .28); }
.btn-primary:hover { box-shadow: 0 16px 34px rgba(79, 70, 229, .36); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: #c7d2fe; background: #f8faff; }
.btn-small { padding: 9px 16px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }

/* Announcement */
.announce {
  background: var(--ink); color: #cbd5e1; font-size: 13px;
  padding: 9px 20px; text-align: center;
}
.announce .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 8px; box-shadow: 0 0 0 4px rgba(16, 185, 129, .16); }
.announce a { color: #fff; text-decoration: underline; text-underline-offset: 3px; margin-left: 6px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px rgba(15, 23, 42, .05); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 750; font-size: 18px; color: var(--ink); letter-spacing: -.02em; }
.brand img { border-radius: 9px; box-shadow: 0 4px 12px rgba(15, 23, 42, .18); }
.nav { display: flex; gap: 24px; align-items: center; }
.nav a { color: #475467; font-size: 14.5px; font-weight: 520; }
.nav a:hover { color: var(--brand); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--line); background: #fff; border-radius: 10px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.nav-toggle span { display: block; width: 17px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--ink); color: #e2e8f0; padding: 84px 0 96px; }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(900px 500px at 82% 10%, rgba(14, 165, 233, .22), transparent 60%),
    radial-gradient(700px 500px at 10% 90%, rgba(79, 70, 229, .28), transparent 60%),
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: auto, auto, 56px 56px, 56px 56px;
  mask-image: linear-gradient(180deg, #000 55%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.02fr .98fr; gap: 56px; align-items: center; }
.eyebrow { font-size: 13px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-2); margin-bottom: 14px; }
.hero .eyebrow { color: #7dd3fc; }
.grad { background: linear-gradient(100deg, #a5b4fc, #7dd3fc 55%, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: #aab6cc; font-size: clamp(1rem, 1.4vw, 1.12rem); max-width: 540px; margin-bottom: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.hero .btn-ghost { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.18); color: #e2e8f0; }
.hero .btn-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.32); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { font-size: 12.5px; color: #c7d2e8; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.045); padding: 6px 11px; border-radius: 999px; }
.hero-visual { position: relative; }
.window-card { background: #0f172a; border: 1px solid rgba(255,255,255,.12); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 80px rgba(2, 6, 23, .55); }
.hero .window-card { transform: perspective(1200px) rotateY(-3deg) rotateX(1.5deg); }
.window-bar { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: #0b1222; border-bottom: 1px solid rgba(255,255,255,.08); }
.window-bar i { width: 9px; height: 9px; border-radius: 50%; background: #334155; display: block; }
.window-bar i:nth-child(1) { background: #f87171; }
.window-bar i:nth-child(2) { background: #fbbf24; }
.window-bar i:nth-child(3) { background: #34d399; }
.window-bar span { margin-left: 8px; font-size: 11.5px; color: #93a4c0; }
.window-card img { width: 100%; height: auto; }
.float-card { position: absolute; background: #fff; color: var(--ink); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; line-height: 1.35; }
.float-card strong { font-size: 13px; }
.float-card span { font-size: 11.5px; color: var(--muted); }
.float-1 { left: -26px; bottom: 34px; }
.float-2 { right: -18px; top: 26px; }
.float-2 strong { color: var(--brand); font-family: ui-monospace, Menlo, monospace; }

/* Stats */
.stats-band { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 34px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 8px 22px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat strong { font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -.03em; color: var(--ink); }
.stat span { color: #475467; font-size: 13.5px; line-height: 1.5; }
.stat small { color: var(--muted); font-size: 12px; }

/* Sections */
.section { padding: 84px 0; }
.section-alt { background: var(--bg-soft); }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .lead { color: var(--muted); font-size: 16.5px; }
.lead.narrow { max-width: 640px; }
.section-head .eyebrow { color: var(--brand); }

/* Cards */
.cards.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: 0 1px 2px rgba(15, 23, 42, .03); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: #d9e0ee; }
.card p { color: var(--muted); font-size: 14.5px; margin-bottom: 0; }
.card .icon { width: 42px; height: 42px; border-radius: 11px; background: var(--brand-soft); display: grid; place-items: center; margin-bottom: 16px; }
.card .icon svg { width: 22px; height: 22px; fill: none; stroke: var(--brand); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card.soft { background: #fff; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 34px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 34px; }
.fact { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(15, 23, 42, .03); }
.fact strong { display: block; font-size: clamp(1.25rem, 1.8vw, 1.6rem); color: var(--brand); letter-spacing: -.02em; }
.fact span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.5; }

/* Feature rows */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-top: 64px; }
.feature-row:first-of-type { margin-top: 0; }
.feature-row.reverse .feature-media { order: 2; }
.feature-row.reverse .feature-copy { order: 1; }
.feature-copy h2 { margin-bottom: 12px; }
.feature-copy h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); margin-bottom: 10px; }
.feature-copy p { color: var(--muted); font-size: 15.5px; }
.feature-no { display: inline-block; font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--brand); background: var(--brand-soft); border-radius: 6px; padding: 2px 8px; margin-bottom: 12px; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 9px; }
.ticks li { position: relative; padding-left: 26px; color: #344054; font-size: 14.5px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 16px; height: 16px; border-radius: 50%;
  background: #e8f7f1 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/10px no-repeat;
}
.feature-media .window-card { border-color: var(--line); box-shadow: var(--shadow); background: #fff; }
.feature-media .window-bar { background: #f8fafc; border-bottom-color: var(--line); }
.feature-media .window-bar span { color: var(--muted); }
.window-card.small { border-radius: 14px; }
.note { font-size: 13px; color: var(--muted); margin-top: 12px; }

/* Compare table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); background: #fff; }
.compare { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 14.5px; }
.compare th, .compare td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.compare thead th { background: #f8fafc; font-size: 13.5px; color: #475467; font-weight: 650; }
.compare tbody td:first-child { color: #475467; font-weight: 600; white-space: nowrap; }
.compare td.hl, .compare th.hl { background: #f5f3ff; color: var(--ink); font-weight: 600; }
.compare tbody tr:last-child td { border-bottom: 0; }

/* Compatibility */
.compat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.compat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.compat h3 { font-size: 15px; color: var(--brand); margin-bottom: 8px; }
.compat p { margin: 0; font-size: 14px; color: #344054; }
.compat .muted { color: var(--muted); font-size: 13px; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); gap: 22px; justify-content: center; }
.price-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.price-card.featured { border-color: #c7d2fe; box-shadow: 0 20px 50px rgba(79, 70, 229, .16); }
.price-card .badge { position: absolute; top: -12px; right: 22px; background: var(--ink); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.price-head { margin-bottom: 8px; }
.price-head h3 { font-size: 18px; margin-bottom: 6px; }
.price { display: flex; align-items: baseline; gap: 8px; margin: 0 0 4px; color: var(--ink); font-weight: 750; }
.price:not(.small) { font-size: 44px; letter-spacing: -.04em; }
.price .cur { font-size: 22px; font-weight: 650; }
.price .old { font-size: 16px; font-weight: 500; color: var(--muted); text-decoration: line-through; }
.price .small { font-size: 15px; }
.price-card .ticks { flex: 1; margin-bottom: 22px; }
.purchase-box { margin-top: 34px; display: flex; align-items: center; justify-content: space-between; gap: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; }
.purchase-box h3 { font-size: 17px; margin-bottom: 6px; }
.purchase-box p { margin: 0; color: var(--muted); font-size: 14px; max-width: 560px; }
.purchase-action { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.purchase-action .btn { min-width: 150px; }
.qr-grid { display: flex; gap: 14px; justify-content: flex-end; }
.qr-grid[hidden] { display: none; }
.qr { margin: 0; text-align: center; }
.qr img { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 6px; }
.qr figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.support-note { margin-top: 34px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; }
.support-note h3 { font-size: 17px; margin-bottom: 8px; }
.support-note p { margin: 0; color: var(--muted); font-size: 14px; max-width: 760px; }
.support-note p + p { margin-top: 8px; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 620; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 20px; color: var(--muted); font-weight: 400; transition: transform .2s ease; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 16px; color: var(--muted); font-size: 14.5px; margin: 0; }

/* CTA */
.cta-box { display: flex; align-items: center; justify-content: space-between; gap: 32px; background: linear-gradient(120deg, #0b1020, #1e1b4b 70%, #0c4a6e); color: #e2e8f0; border-radius: 24px; padding: 44px; box-shadow: var(--shadow); }
.cta-copy { max-width: 620px; }
.cta-copy .eyebrow { color: #7dd3fc; }
.cta-copy h2 { color: #fff; }
.cta-copy p { color: #b7c2d8; margin-bottom: 0; }
.cta-action { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex-shrink: 0; }
.cta-action .muted { color: #94a3b8; }
.cta-action a:not(.btn) { color: #c7d2fe; text-decoration: underline; text-underline-offset: 2px; }

/* Footer */
.site-footer { background: var(--ink); color: #94a3b8; padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 34px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.09); }
.footer-brand .brand { color: #fff; margin-bottom: 12px; }
.footer-brand p { font-size: 13.5px; line-height: 1.7; margin: 0; }
.footer-links { display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.footer-links h4 { color: #e2e8f0; font-size: 13px; margin-bottom: 4px; letter-spacing: .04em; }
.footer-links a { color: #94a3b8; }
.footer-links a:hover { color: #fff; }
.footer-links span { color: #64748b; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 22px; font-size: 12.5px; color: #64748b; flex-wrap: wrap; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 13.5px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 100; max-width: calc(100% - 40px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .btn, .card { transition: none !important; }
}

/* Responsive */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero .window-card { transform: none; }
  .float-1 { left: 10px; bottom: -18px; }
  .float-2 { right: 10px; top: -16px; }
  .feature-row { grid-template-columns: 1fr; gap: 28px; margin-top: 48px; }
  .feature-row.reverse .feature-media, .feature-row.reverse .feature-copy { order: 0; }
  .compat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-grid > :last-child { display: none; }
}
@media (max-width: 760px) {
  .container { width: calc(100% - 36px); }
  .announce { font-size: 12px; line-height: 1.5; }
  .nav { position: absolute; top: 68px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 18px 14px; display: none; box-shadow: 0 18px 30px rgba(15,23,42,.08); }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; width: 100%; font-size: 15px; }
  .nav-toggle { display: flex; }
  .header-actions .btn { display: none; }
  .hero { padding: 56px 0 70px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .stat { border-left: 0; padding: 0; }
  .cards.three { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 60px 0; }
  .compat-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .purchase-box, .cta-box { flex-direction: column; align-items: flex-start; padding: 26px; }
  .purchase-action, .cta-action { align-items: flex-start; }
  .qr-grid { justify-content: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; }
}

/* Vector vs bitmap demo */
.vector-demo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.vd-panel { position: relative; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.vd-panel svg { width: 100%; height: auto; display: block; background: #fff; border-radius: 8px; }
.vd-panel.bad svg { image-rendering: pixelated; }
.vd-tag { font-size: 11.5px; font-weight: 650; color: var(--muted); letter-spacing: .06em; }
.vd-panel.good .vd-tag { color: var(--brand); }
.vd-note { font-size: 12px; color: var(--muted); }
.vd-panel.bad .vd-note { color: #b91c1c; opacity: .75; }

/* Old formula conversion demo */
.convert-demo { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.cv-panel { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cv-tag { font-size: 11.5px; font-weight: 650; color: var(--muted); letter-spacing: .06em; }
.cv-tag.good { color: var(--brand); }
.cv-img { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.cv-img img { width: 100%; height: auto; display: block; }
.cv-img.blur img { filter: grayscale(1) blur(1.6px); opacity: .62; }
.cv-note { font-size: 12px; color: var(--muted); }
.cv-arrow { font-size: 22px; color: var(--brand); font-weight: 700; }
@media (max-width: 760px) {
  .vector-demo { grid-template-columns: 1fr; }
  .convert-demo { grid-template-columns: 1fr; }
  .cv-arrow { transform: rotate(90deg); justify-self: center; }
}
