/* CatchTeX website - shared styles (light + dark). System fonts only: no font downloads, no third-party requests. */
:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --panel: #ffffff;
  --text: #16202e;
  --text-2: #4f5b6b;
  --muted: #7a8595;
  --line: #e2e7ef;
  --brand: #1f4fa8;
  --brand-2: #256ad6;
  --brand-ink: #ffffff;
  --accent: #ffca28;
  --code-bg: #0f1726;
  --code-text: #dbe4f3;
  --code-key: #7fb2ff;
  --code-str: #ffd866;
  --code-com: #7d8aa0;
  --ok: #1f8a4c;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .08);
  --maxw: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1219;
    --bg-soft: #121925;
    --panel: #161e2b;
    --text: #e6ebf2;
    --text-2: #aab4c3;
    --muted: #7f8a9b;
    --line: #253043;
    --brand: #4c8dff;
    --brand-2: #6aa1ff;
    --brand-ink: #0b1220;
    --code-bg: #0a0f18;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    --ok: #4cc38a;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre { font-family: "Cascadia Code", "Cascadia Mono", Consolas, "SF Mono", monospace; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--text-2); font-size: .95rem; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--brand-ink); }
@media (max-width: 720px) { .nav a:not(.btn) { display: none; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px;
  border-radius: 10px; font-weight: 600; font-size: 1rem; border: 1px solid transparent;
  cursor: pointer; transition: transform .08s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-2); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-small { padding: 8px 14px; font-size: .9rem; }
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn svg { width: 18px; height: 18px; }

/* hero */
.hero { padding: 72px 0 56px; background:
  radial-gradient(1200px 400px at 80% -10%, color-mix(in srgb, var(--brand) 14%, transparent), transparent),
  var(--bg); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 920px) { .hero .wrap { grid-template-columns: 1fr; } }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .04em;
  color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 16px;
}
h1 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.12; margin: 0 0 16px; letter-spacing: -.02em; }
h1 .hl { background: linear-gradient(transparent 64%, color-mix(in srgb, var(--accent) 65%, transparent) 64%); }
@media (prefers-color-scheme: dark) { h1 .hl { background: linear-gradient(transparent 70%, color-mix(in srgb, var(--accent) 35%, transparent) 70%); } }
.lead { font-size: 1.15rem; color: var(--text-2); margin: 0 0 28px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.fine { color: var(--muted); font-size: .88rem; margin-top: 14px; }

/* demo window */
.demo {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.demo-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.chips { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.chip { font-size: .72rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.demo-body { display: grid; grid-template-columns: 1fr; }
.demo-src { padding: 18px 18px 8px; position: relative; }
.demo-src .snip { border: 2px dashed var(--brand); border-radius: 6px; padding: 10px 12px; font-family: "Times New Roman", Times, serif; }
.demo-src .cap { font-size: .85rem; margin-bottom: 6px; }
.paper-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.paper-table th, .paper-table td { padding: 3px 8px; text-align: center; }
.paper-table thead tr:first-child th { border-top: 1.5px solid currentColor; }
.paper-table thead tr:last-child th { border-bottom: 1px solid currentColor; }
.paper-table tbody tr:last-child td { border-bottom: 1.5px solid currentColor; }
.paper-table td:first-child, .paper-table th:first-child { text-align: left; }
.arrow { text-align: center; color: var(--muted); font-size: .8rem; padding: 4px 0; }
pre.code {
  margin: 0; background: var(--code-bg); color: var(--code-text); padding: 16px 18px;
  font-size: .8rem; line-height: 1.55; overflow-x: auto;
}
.code .k { color: var(--code-key); } .code .s { color: var(--code-str); } .code .c { color: var(--code-com); }

/* sections */
section { padding: 72px 0; }
section.soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 44em; margin-bottom: 36px; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin: 0 0 10px; letter-spacing: -.01em; line-height: 1.2; }
.section-head p { color: var(--text-2); margin: 0; font-size: 1.05rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step::before {
  counter-increment: s; content: counter(s); display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #1b1b1b;
  font-weight: 700; margin-bottom: 12px;
}
.step h3 { margin: 0 0 6px; font-size: 1.1rem; }
.step p { margin: 0; color: var(--text-2); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card .ico { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); margin-bottom: 12px; }
.card .ico svg { width: 20px; height: 20px; }
.card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.card .to { font-family: "Cascadia Code", Consolas, "SF Mono", monospace; font-size: .8rem; color: var(--muted); margin-bottom: 8px; }
.card p { margin: 0; color: var(--text-2); font-size: .95rem; }

.why { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 40px; }
@media (max-width: 820px) { .why { grid-template-columns: 1fr; } }
.why > div { display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
.why svg { width: 22px; height: 22px; color: var(--ok); margin-top: 3px; }
.why h3 { margin: 0 0 2px; font-size: 1.05rem; }
.why p { margin: 0; color: var(--text-2); }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 380px)); gap: 20px; justify-content: center; }
@media (max-width: 820px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.plan h3 { margin: 0; font-size: 1.2rem; }
.price { font-size: 2.4rem; font-weight: 700; margin: 10px 0 2px; letter-spacing: -.02em; }
.price small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.plan .sub { color: var(--text-2); margin: 0 0 18px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.plan li { padding: 6px 0 6px 26px; position: relative; color: var(--text-2); }
.plan li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 12px; height: 7px;
  border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.plan .btn { justify-content: center; }
/* Prices by country (script at the end of index.html): <html class="in"> = visitor in India */
.cur-inr { display: none; }
html.in .cur-usd { display: none; }
html.in span.cur-inr { display: inline; }
html.in li.cur-inr { display: list-item; }
.note { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 18px; }

/* download */
.download { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 820px) { .download { grid-template-columns: 1fr; } }
.spec { width: 100%; border-collapse: collapse; }
.spec td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec td:first-child { color: var(--muted); width: 42%; padding-right: 12px; }
.callout { background: color-mix(in srgb, var(--accent) 16%, var(--panel)); border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line));
  border-radius: 10px; padding: 14px 16px; font-size: .93rem; color: var(--text); margin-top: 18px; }

/* faq */
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--text-2); margin: 10px 0 0; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--text-2); }

/* legal pages */
.legal { max-width: 780px; margin: 0 auto; padding: 48px 16px 72px; }
.legal h1 { font-size: 2rem; }
.legal .muted { color: var(--muted); }
.legal h2 { font-size: 1.2rem; margin-top: 2em; }
.legal table { border-collapse: collapse; width: 100%; font-size: .95em; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px; border-bottom: 1px solid var(--line); }
.legal pre.eula { white-space: pre-wrap; font-size: .9rem; line-height: 1.55; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 10px; padding: 20px; color: var(--text); }
