/* =========================================================================
   Ratioris — precision cloud-software aesthetic
   Swiss-minimal, numbers-first. NO instrument panels, gauges, telemetry.
   ========================================================================= */

:root {
  --deep: #0F172A;      /* deep slate */
  --deep-2: #1E293B;
  --cyan: #0284C7;      /* metric cyan — sound surface / primary data */
  --amber: #F59E0B;     /* ratio amber — defect / key metric */
  --red: #DC2626;       /* alert — high-risk only */
  --lab: #F8FAFC;       /* lab white / light surface */
  --text: #0F172A;
  --muted: #475569;
  --muted-light: #94A3B8;
  --border: #E2E8F0;
  --white: #FFFFFF;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  --maxw: 1180px;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; color: var(--text); }
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin: 0 0 1rem; }
h3 { font-size: 1.15rem; margin: 0 0 .5rem; }
p { margin: 0 0 1rem; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 780px; }
.section { padding: 88px 0; }
.section.dark { background: var(--deep); color: var(--lab); }
.section.dark h2, .section.dark h3 { color: var(--white); }

.eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 .75rem;
}
.lede { font-size: 1.18rem; color: var(--muted); max-width: 62ch; }
.dark .lede, .dark .contact-sub { color: var(--muted-light); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--deep); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip:focus { left: 0; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .72rem 1.3rem; border-radius: var(--radius);
  font-weight: 600; font-size: .95rem; line-height: 1;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--amber); color: #1f1200; }
.btn-primary:hover { background: #e08c00; }
.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text); }
.dark .btn-ghost { border-color: #334155; color: var(--white); }
.dark .btn-ghost:hover { border-color: var(--white); }
.btn-block { width: 100%; }
.cta-row { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.5rem 0 1.25rem; }

/* ---- header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  height: 68px; display: flex; align-items: center; gap: 1.5rem;
}
.brand { display: inline-flex; flex: 0 0 auto; }
.brand img { height: 34px; width: auto; }
.nav-links { display: flex; gap: 1.35rem; flex: 1; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: .9rem; }
.lang-select {
  appearance: none; background: transparent; border: 1px solid var(--border);
  border-radius: 8px; padding: .4rem .5rem; font-size: .85rem; font-weight: 600;
  color: var(--text); cursor: pointer;
}
.nav-toggle { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---- hero ---- */
.hero { background: var(--deep); color: var(--lab); padding: 72px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero .eyebrow { color: var(--amber); }
.hero h1 { color: #fff; }
.hero .lede { color: #CBD5E1; }
.hero-figure { position: relative; margin: 0; }
.hero-figure img { border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.ratio-card {
  position: absolute; right: 16px; bottom: 16px;
  background: rgba(15, 23, 42, .82); border: 1px solid rgba(148,163,184,.25);
  border-radius: 12px; padding: 14px 16px; backdrop-filter: blur(6px);
  display: flex; flex-direction: column; gap: 2px; min-width: 200px;
}
.ratio-card-label { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: #7DD3FC; }
.ratio-card-metric { font-family: var(--font-mono); font-size: .8rem; color: #CBD5E1; }
.ratio-card-value { font-family: var(--font-mono); font-size: 1.7rem; color: var(--amber); font-weight: 700; }
.trust-bar { font-family: var(--font-mono); font-size: .82rem; color: #94A3B8; margin: 0; }

/* ---- truth ---- */
.truth { background: var(--white); }
.truth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin: 2rem 0 1.5rem; }
.truth-cards { display: flex; flex-direction: column; gap: 14px; }
.truth-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
.truth-num { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; background: rgba(2,132,199,.1); color: var(--cyan); font-family: var(--font-mono); font-weight: 700; display: grid; place-items: center; }
.truth-card p { margin: 0; }
.truth-figure { margin: 0; }
.truth-figure img { border-radius: var(--radius); }
.truth-close { font-size: 1.3rem; font-weight: 700; color: var(--amber); text-align: center; margin: 2rem 0 0; }

/* ---- cards ---- */
.card-grid { display: grid; gap: 20px; margin-top: 2rem; }
.card-grid.four { grid-template-columns: repeat(4, 1fr); }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card p { margin: 0; color: var(--muted); }
.card h3 { color: var(--text); }

/* ---- method ---- */
.method { background: var(--lab); }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-top: 2rem; }
.formula {
  font-family: var(--font-mono); font-size: 1.15rem; font-weight: 600;
  padding: 18px; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
}
.formula .cy { color: var(--cyan); }
.formula .am { color: var(--amber); }
.boundary { font-weight: 700; font-size: 1.05rem; color: var(--text); margin: 1.25rem 0 .5rem; }
.legend { font-family: var(--font-mono); font-size: .85rem; color: var(--muted); margin: 0; }
.method-figure { margin: 0; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.method-figure img { border-radius: 6px; }

/* ---- workflow ---- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 2rem 0 0; padding: 0; counter-reset: step; }
.steps li { padding: 24px; border: 1px solid #1E293B; border-radius: var(--radius); background: var(--deep-2); }
.step-num { font-family: var(--font-mono); color: var(--cyan); font-weight: 700; display: block; margin-bottom: .5rem; }
.steps h3 { color: #fff; }
.steps p { color: #94A3B8; margin: 0; }
.workflow-figure { margin: 2rem 0 0; }
.workflow-figure img { border-radius: var(--radius); }
.problem-figure { margin: 2rem 0 0; }
.problem-figure img, .product-figure img { border-radius: var(--radius); }
.product-figure { margin: 2rem 0 0; }
.product-figure img { box-shadow: var(--shadow); }
.product-caption { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); margin: .75rem 0 0; text-align: center; }

/* ---- report / defects ---- */
.defect-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 2rem; }
.defect { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); text-align: center; }
.defect h3 { margin: 0; }
.defect-figure { margin: 2rem 0 0; }
.defect-figure img { border-radius: var(--radius); }
.report-note { color: var(--muted); margin: 1.25rem 0 0; max-width: 62ch; }
.report-sample { margin-top: 4rem; }
.report-sample h3 { font-size: 1.5rem; }
.report-figure { margin: 1.5rem 0 0; }
.report-figure img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---- tech ---- */
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 2rem; }
.metric { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
.metric strong { display: block; font-family: var(--font-mono); font-size: 1.7rem; color: var(--deep); letter-spacing: -0.01em; }
.metric span { display: block; font-family: var(--font-mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); margin: .35rem 0 .5rem; }
.metric p { margin: 0; font-size: .9rem; color: var(--muted); }
.pipeline { font-family: var(--font-mono); font-size: .85rem; color: var(--muted); margin: 1.5rem 0 0; }
.tech-note { font-size: .82rem; color: var(--muted); margin: .75rem 0 0; max-width: 70ch; }
.limits { margin-top: 2rem; padding: 18px 20px; border: 1px solid var(--border); border-left: 3px solid var(--cyan); border-radius: var(--radius); background: var(--white); }
.limits h3 { font-size: 1rem; margin: 0 0 .4rem; }
.limits ul { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: .92rem; }

/* ---- trust ---- */
.trust { background: var(--lab); }
.seal { font-family: var(--font-mono); font-size: .85rem; letter-spacing: .05em; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); padding: 10px 16px; display: inline-block; margin: 0 0 2rem; }

/* ---- FAQ ---- */
.faq { background: var(--white); }
.faq-list { margin-top: 1.5rem; border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { cursor: pointer; list-style: none; padding: 1.1rem 0; font-weight: 600; color: var(--text); display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-mono); font-size: 1.2rem; color: var(--cyan); margin-left: 1rem; transition: transform .15s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 0 1.25rem; margin: 0; color: var(--muted); max-width: 68ch; }

/* ---- forms ---- */
.lead-form { margin-top: 1.5rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field label, .field .field-label { font-size: .85rem; font-weight: 600; color: var(--text); }
.dark .field label, .dark .field .field-label { color: #E2E8F0; }
.field input, .field select, .field textarea {
  padding: .7rem .85rem; border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: .95rem; color: var(--text); background: var(--white);
}
.dark .field input, .dark .field select, .dark .field textarea {
  background: var(--deep-2); border-color: #334155; color: var(--lab);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--cyan); outline-offset: 1px; border-color: transparent; }
.form-status { margin: .75rem 0 0; min-height: 1.2em; font-size: .9rem; }
.form-status.ok { color: #16a34a; }
.form-status.err { color: var(--red); }
.disclaimer { font-size: .8rem; color: var(--muted-light); margin-top: 1rem; }
.contact-sub { color: var(--muted); font-size: 1.05rem; }
.contact-email-line { color: #CBD5E1; }
.contact-email-line a { color: var(--amber); }
.contact-response { color: var(--muted); margin-top: 2rem; }
.form-heading { margin-top: 0; }

/* ---- pricing ---- */
.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 2rem; }
.plan { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; position: relative; display: flex; flex-direction: column; }
.plan-topup { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 20px; }
.plan-name { font-size: 1.05rem; margin: 0 0 .5rem; }
.plan-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 1rem; }
.plan-price strong { font-family: var(--font-mono); font-size: 2.1rem; color: var(--deep); letter-spacing: -0.02em; }
.plan-price span { color: var(--muted); font-size: .9rem; }
.plan-desc { color: var(--muted); }
.plan ul { list-style: none; margin: 0 0 1.25rem; padding: 0; flex: 1; }
.plan li { padding: .4rem 0 .4rem 1.25rem; position: relative; color: var(--muted); font-size: .95rem; }
.plan li::before { content: "—"; position: absolute; left: 0; color: var(--cyan); font-family: var(--font-mono); }
.plan .btn { margin-top: auto; }
.plan-featured { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), var(--shadow); }
.plan-badge { position: absolute; top: -12px; right: 16px; background: var(--cyan); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.pricing-footnote { font-size: .82rem; color: var(--muted); margin-top: 2rem; text-align: center; }
.compare { margin-top: 2.5rem; overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.compare-table th, .compare-table td { padding: .7rem 1rem; text-align: center; border-bottom: 1px solid var(--border); }
.compare-table thead th { background: var(--deep); color: #fff; font-weight: 600; }
.compare-table tbody th { text-align: left; font-weight: 600; color: var(--text); background: var(--lab); }
.compare-table td { color: var(--muted); }
.compare-note { font-size: .82rem; color: var(--muted); margin: .75rem 0 0; }
.screening-note { font-size: .8rem; color: var(--muted); margin: 1rem auto 0; text-align: center; max-width: 62ch; }
.field-hint { font-size: .78rem; color: var(--muted-light); }
.file-control { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.file-input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; opacity: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.file-btn { cursor: pointer; }
.file-status { font-size: .85rem; color: var(--muted); word-break: break-all; }
.dark .file-status { color: var(--muted-light); }

/* ---- legal prose ---- */
.page-head { padding: 64px 0 32px; border-bottom: 1px solid var(--border); }
.page-head.dark { background: var(--deep); border-bottom: 0; }
.page-head.dark h1 { color: #fff; }
.page-head .eyebrow { margin-bottom: .5rem; }
.updated { color: var(--muted); font-size: .85rem; }
.prose { font-size: 1rem; color: var(--muted); }
.prose h2 { font-size: 1.3rem; margin: 2.25rem 0 .75rem; color: var(--text); }
.prose p { max-width: 68ch; }

/* ---- footer ---- */
.site-footer { background: var(--deep); color: #94A3B8; padding: 56px 0 32px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand img { height: 34px; width: auto; }
.footer-tagline { margin: 1rem 0 .25rem; color: #CBD5E1; max-width: 32ch; }
.footer-email { color: var(--amber); }
.footer-col { display: flex; flex-direction: column; gap: .6rem; }
.footer-col h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .25rem; }
.footer-col a { color: #94A3B8; font-size: .92rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { max-width: var(--maxw); margin: 40px auto 0; padding: 24px 24px 0; border-top: 1px solid #1E293B; }
.footer-disclaimer { font-size: .8rem; color: #64748B; }
.footer-fine { font-size: .78rem; color: #64748B; }
.footer-copy { font-size: .82rem; color: #64748B; margin: 0; }

/* ---- responsive ---- */
@media (max-width: 960px) {
  .hero-grid, .truth-grid, .method-grid { grid-template-columns: 1fr; }
  .card-grid.four, .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid.three, .defect-grid, .steps { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    flex-direction: column; gap: 0; padding: 8px 24px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
}
@media (max-width: 560px) {
  .section { padding: 64px 0; }
  .card-grid.four, .metric-grid, .pricing-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
