/* =========================================================
   TortScale AI — marketing site styles
   ========================================================= */

:root {
  --navy-900: #07122b;
  --navy-800: #0b1b3b;
  --navy-700: #112450;
  --navy-600: #1a3066;
  --ink: #0c1730;
  --slate: #4a5a7a;
  --muted: #6b7a99;
  --line: #e3e8f2;
  --bg: #ffffff;
  --bg-soft: #f5f7fc;
  --bg-tint: #eef2fb;

  --blue: #3b6fe0;
  --blue-bright: #5b8def;
  --teal: #2dd4bf;
  --grad: linear-gradient(120deg, #5b8def 0%, #2dd4bf 100%);
  --grad-dark: linear-gradient(135deg, #0b1b3b 0%, #112450 60%, #143a5a 100%);

  --pass: #16a34a;
  --pass-bg: #e7f6ec;
  --review: #b8860b;
  --review-bg: #fbf3da;
  --fail: #dc2626;
  --fail-bg: #fbe9e9;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 3px rgba(12, 23, 48, .08), 0 1px 2px rgba(12, 23, 48, .04);
  --shadow: 0 10px 30px rgba(12, 23, 48, .10);
  --shadow-lg: 0 24px 60px rgba(12, 23, 48, .18);

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Sora', var(--font-body);
  --maxw: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; color: var(--ink); margin: 0 0 .4em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 700; }
h3 { font-size: 1.22rem; font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--blue); text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--navy-800); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 200;
}
.skip-link:focus { left: 0; }

.grad-text {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--blue);
  background: var(--bg-tint); padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn-lg { padding: 14px 28px; font-size: 1.02rem; }
.btn-primary { background: var(--grad); color: #07122b; box-shadow: 0 8px 22px rgba(45, 212, 191, .25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(45, 212, 191, .35); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.site-header .btn-ghost { color: #dbe4f5; border-color: rgba(255,255,255,.22); }
.site-header .btn-ghost:hover { color: #fff; border-color: var(--teal); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8, 18, 43, .78); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: #fff; letter-spacing: -.02em; }
.brand-ai { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-left: 2px; }
.nav-links { display: flex; gap: 26px; margin-left: 12px; flex: 1; }
.nav-links a { color: #c4d0e6; font-weight: 500; font-size: .95rem; position: relative; }
.nav-links a:hover { color: #fff; }
.nav-links a::after { content:''; position:absolute; left:0; bottom:-6px; width:0; height:2px; background: var(--grad); transition: width .2s ease; }
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--grad-dark); color: #eaf0fb; overflow: hidden; padding: 80px 0 90px; }
.hero-glow { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(560px circle at 78% 18%, rgba(45,212,191,.22), transparent 60%),
    radial-gradient(620px circle at 12% 80%, rgba(91,141,239,.20), transparent 60%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero-copy .eyebrow { background: rgba(91,141,239,.16); color: #9ec1ff; }
.hero h1 { color: #fff; }
.lede { font-size: 1.18rem; color: #c6d2e8; max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 16px; }
.hero-note { font-size: .9rem; color: #8fa1c2; }

.hero-card {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px; padding: 18px; backdrop-filter: blur(8px);
  box-shadow: var(--shadow-lg);
}
.hc-head { display: flex; align-items: center; gap: 10px; padding: 6px 6px 16px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 14px; }
.hc-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(45,212,191,.2); }
.hc-title { font-size: .85rem; font-weight: 600; color: #cdd9ef; letter-spacing: .02em; }
.hc-row { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-radius: 12px; transition: background .2s; }
.hc-row:hover { background: rgba(255,255,255,.04); }
.hc-avatar { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: .82rem; color: #07122b; background: var(--grad); flex: none; }
.hc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hc-body strong { font-size: .92rem; color: #f0f4fc; }
.hc-body span { font-size: .8rem; color: #93a3c4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { font-size: .76rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; white-space: nowrap; flex: none; }
.badge-pass { background: rgba(45,212,191,.18); color: #5ce6cf; }
.badge-review { background: rgba(245,200,80,.16); color: #f3d27a; }
.badge-fail { background: rgba(248,113,113,.16); color: #f8a4a4; }
.hc-foot { display: flex; justify-content: space-between; align-items: center; padding: 14px 8px 4px; margin-top: 8px; border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem; color: #a7b6d4; }
.hc-foot strong { color: #fff; }
.hc-live { color: var(--teal); font-weight: 600; }

/* ---------- Trust bar ---------- */
.trustbar { background: var(--navy-900); border-bottom: 1px solid rgba(255,255,255,.06); padding: 8px 0 34px; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: center; padding: 20px 8px; }
.stat-num { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { display: block; font-size: .9rem; color: #93a3c4; margin-top: 4px; }

/* ---------- Sections ---------- */
.section { padding: 86px 0; }
.section-head { max-width: 720px; margin: 0 auto 52px; }
.section-sub { font-size: 1.1rem; color: var(--slate); }
.section-problem { background: var(--bg-soft); }
.section-problem h2 { max-width: 18ch; margin-left: auto; margin-right: auto; }

/* ---------- Agents ---------- */
.agent-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.agent-card {
  position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.agent-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cfdaf0; }
.agent-card.featured { grid-column: span 2; background: linear-gradient(180deg, #fff 0%, #f8fbff 100%); border-color: #cfe0ff; }
.agent-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem;
  background: var(--bg-tint); margin-bottom: 18px; }
.agent-card.featured .agent-icon { background: var(--grad); }
.agent-tag { position: absolute; top: 22px; right: 22px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--pass); background: var(--pass-bg); padding: 5px 11px; border-radius: 999px; }
.agent-tag.muted { color: var(--muted); background: var(--bg-soft); }
.agent-card p { color: var(--slate); }
.agent-points { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 9px; }
.agent-points li { position: relative; padding-left: 26px; font-size: .94rem; color: var(--ink); }
.agent-points li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--teal); font-weight: 800; }
.agent-link { font-weight: 600; }
.agent-card.featured { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0 40px; align-items: start; }
.agent-card.featured .agent-icon { grid-row: 1; }
.agent-card.featured h3 { grid-column: 1; }
.agent-card.featured > p { grid-column: 1; }
.agent-card.featured .agent-points { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
.agent-card.featured .agent-link { grid-column: 1; }

/* ---------- Demo ---------- */
.section-demo { background: var(--grad-dark); color: #eaf0fb; }
.section-demo .eyebrow { background: rgba(45,212,191,.14); color: #6fe7d4; }
.section-demo h2 { color: #fff; }
.section-demo .section-sub { color: #b9c6e0; }
.demo-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; max-width: 1000px; margin: 0 auto; }
.demo-form, .demo-result {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 28px;
}
.demo-result { min-height: 420px; display: flex; }
.field { display: flex; flex-direction: column; margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label, .check-field legend { font-size: .85rem; font-weight: 600; color: #c4d0e6; margin-bottom: 7px; padding: 0; }
.field input, .field select {
  font-family: var(--font-body); font-size: .96rem; color: #fff;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16);
  border-radius: var(--radius-sm); padding: 11px 13px; transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder { color: #7e8eaf; }
.field input:focus, .field select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(45,212,191,.18); }
.field select option { color: #0c1730; }
.hint { font-size: .78rem; color: #8fa1c2; margin: 6px 0 0; min-height: 1em; }
.check-field { border: none; padding: 0; margin: 0 0 20px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; font-weight: 500; color: #d4deef; margin-bottom: 10px; cursor: pointer; }
.check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--teal); flex: none; }
.demo-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.section-demo .btn-ghost { color: #dbe4f5; border-color: rgba(255,255,255,.22); }
.section-demo .btn-ghost:hover { color: #fff; border-color: var(--teal); }

.result-empty { margin: auto; text-align: center; color: #8fa1c2; }
.result-empty-icon { font-size: 2.4rem; opacity: .5; margin-bottom: 12px; }

/* result render */
.report { width: 100%; animation: fadeUp .4s ease both; }
.report-verdict { display: flex; align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 18px; }
.verdict-score { width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; flex: none; }
.verdict-meta { flex: 1; }
.verdict-label { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.verdict-sub { font-size: .88rem; color: #b9c6e0; }
.v-pass .verdict-score { background: rgba(45,212,191,.16); color: #5ce6cf; border: 2px solid #2dd4bf; }
.v-pass .verdict-label { color: #5ce6cf; }
.v-review .verdict-score { background: rgba(245,200,80,.14); color: #f3d27a; border: 2px solid #e6bf5c; }
.v-review .verdict-label { color: #f3d27a; }
.v-fail .verdict-score { background: rgba(248,113,113,.14); color: #f8a4a4; border: 2px solid #f06c6c; }
.v-fail .verdict-label { color: #f8a4a4; }

.report-section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: #8fa1c2; font-weight: 700; margin: 18px 0 10px; }
.criteria { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 8px; }
.criteria li { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; color: #dbe4f5; }
.crit-ico { flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 800; margin-top: 2px; }
.crit-yes { background: rgba(45,212,191,.2); color: #5ce6cf; }
.crit-no { background: rgba(248,113,113,.2); color: #f8a4a4; }
.crit-warn { background: rgba(245,200,80,.2); color: #f3d27a; }
.report-tier { display: inline-flex; align-items: center; gap: 8px; background: rgba(91,141,239,.16); color: #9ec1ff; font-weight: 600; font-size: .9rem; padding: 8px 14px; border-radius: 10px; }
.report-reason { font-size: .92rem; color: #c6d2e8; background: rgba(255,255,255,.04); border-left: 3px solid var(--teal); padding: 12px 14px; border-radius: 0 10px 10px 0; }
.report-actions { margin-top: 16px; font-size: .9rem; color: #dbe4f5; }
.report-actions strong { color: #fff; }

.disclaimer { text-align: center; font-size: .82rem; color: #8fa1c2; max-width: 720px; margin: 26px auto 0; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.step-num { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.step h3 { margin-top: 12px; }
.step p { color: var(--slate); margin: 0; }

/* ---------- Security ---------- */
.section-security { background: var(--bg-soft); }
.security-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.security-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; }
.security-list li { position: relative; padding-left: 30px; color: var(--slate); }
.security-list li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--grad); color: #07122b; font-weight: 800; font-size: .75rem; display: grid; place-items: center; }
.security-list strong { color: var(--ink); }
.security-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sec-badge { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: var(--shadow-sm); }
.sec-ico { font-size: 1.8rem; display: block; margin-bottom: 10px; }
.sec-badge strong { display: block; font-family: var(--font-display); font-size: 1.1rem; }
.sec-badge span { font-size: .85rem; color: var(--muted); }

/* ---------- Quote ---------- */
.section-quote { background: var(--navy-800); color: #eaf0fb; }
.section-quote blockquote { margin: 0; }
.section-quote p { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.3rem, 2.6vw, 1.9rem); line-height: 1.35; color: #fff; }
.section-quote footer { color: #9ec1ff; font-size: .95rem; }
.quote-note { color: #6f80a3; font-weight: 400; }

/* ---------- CTA ---------- */
.section-cta { padding-top: 40px; }
.cta-card { background: var(--grad-dark); border-radius: 28px; padding: 52px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; color: #eaf0fb; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.cta-card::before { content:''; position:absolute; inset:0; background: radial-gradient(500px circle at 85% 10%, rgba(45,212,191,.18), transparent 60%); pointer-events:none; }
.cta-copy h2 { color: #fff; }
.cta-copy p { color: #c6d2e8; margin: 0; }
.cta-form { position: relative; display: grid; gap: 4px; }
.cta-form .field input { color: #fff; }
.cta-form .btn { margin-top: 8px; }
.cta-status { font-size: .88rem; color: var(--teal); min-height: 1.2em; margin: 8px 0 0; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq-item { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 20px; box-shadow: var(--shadow-sm); }
.faq-item summary { cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; padding: 16px 30px 16px 0; list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; position: absolute; right: 2px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--blue); font-weight: 400; transition: transform .2s; }
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p { color: var(--slate); margin: 0 0 16px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #aebbd6; padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { font-size: .92rem; color: #8fa1c2; max-width: 30ch; }
.footer-col h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer-col a { display: block; color: #aebbd6; font-size: .92rem; padding: 5px 0; }
.footer-col a:hover { color: var(--teal); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 24px; font-size: .82rem; color: #6f80a3; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 920px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-card { max-width: 460px; }
  .security-inner { grid-template-columns: 1fr; gap: 36px; }
  .demo-wrap { grid-template-columns: 1fr; }
  .cta-card { grid-template-columns: 1fr; gap: 28px; padding: 36px; }
  .agent-card.featured { grid-template-columns: 1fr; }
  .agent-card.featured .agent-points { grid-column: 1; grid-row: auto; }
}

@media (max-width: 760px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0;
    background: var(--navy-800); padding: 18px 24px 24px; gap: 4px; border-bottom: 1px solid rgba(255,255,255,.1);
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open a { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
  .nav { position: relative; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .agent-grid { grid-template-columns: 1fr; }
  .agent-card.featured { grid-column: auto; }
  .steps { grid-template-columns: 1fr; }
  .security-badges { grid-template-columns: 1fr 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .section { padding: 60px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 440px) {
  .footer-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 56px 0 64px; }
}
