/* Newcompa flagship theme — combines Aurora's engineered-dark polish,
   Stripe's institutional trust cues, Notion's approachable spacing, and
   Linear's precise minimalism into one simplified, well-established-company look. */
:root {
  --bg: #0A1424;
  --surface: #101F33;
  --surface-elevated: #16263B;
  --text: #E7EBF3;
  --text-muted: #93A0B8;
  --text-faint: #5C6880;
  --accent: #E8A200;
  --accent-glow: #FFB81C;
  --accent-soft: rgba(232,162,0,0.14);
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.16);
  --success: #34D399;
  --danger: #F87171;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Geist', 'Inter', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 16px; line-height: 1.6; font-weight: 400;
}
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 100; background: rgba(10,14,23,0.82);
  backdrop-filter: blur(14px); box-shadow: 0 1px 0 0 var(--border);
}
header.site .bar { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.logo { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.logo .dot { color: var(--accent-glow); }
nav.main { display: flex; align-items: center; gap: 26px; }
nav.main a { font-size: 14.5px; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
nav.main a:hover, nav.main a.active { color: var(--text); }
.nav-cta { background: var(--accent); color: var(--bg) !important; padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; }
.nav-cta:hover { background: var(--accent-glow); color: var(--bg) !important; }

.nav-drop { position: relative; }
.nav-drop > a { display: inline-flex; align-items: center; gap: 5px; }
.nav-drop .chev { opacity: 0.7; transition: transform 0.15s ease; }
.nav-drop:hover .chev { transform: rotate(180deg); }
.dropdown {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%);
  background: var(--surface-elevated); border-radius: var(--radius-md); box-shadow: 0 0 0 1px var(--border), 0 16px 40px rgba(0,0,0,0.45);
  padding: 10px; min-width: 260px; display: none; flex-direction: column; gap: 2px;
}
.nav-drop:hover .dropdown { display: flex; }
.dropdown a { padding: 9px 12px; border-radius: var(--radius-sm); font-size: 13.5px; color: var(--text-muted); }
.dropdown a:hover { background: var(--surface); color: var(--text); }

/* ---------- Hero / sections ---------- */
.hero { padding: 100px 0 84px; }
.hero.center { text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-glow); font-family: var(--mono);
  font-size: 13px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 22px;
  background: var(--accent-soft); padding: 6px 14px; border-radius: 9999px; }
h1 { font-family: var(--font-display); font-size: 54px; font-weight: 700; line-height: 1.06;
  letter-spacing: -0.04em; margin-bottom: 22px; }
.hero.center h1 { max-width: 820px; margin-inline: auto; }
h1 .accent { color: var(--accent-glow); }
.lede { font-size: 18.5px; color: var(--text-muted); line-height: 1.65; max-width: 640px; }
.hero.center .lede { margin-inline: auto; }
.cta-row { display: flex; gap: 14px; margin-top: 38px; }
.hero.center .cta-row { justify-content: center; }
.trust-row { display: flex; gap: 40px; margin-top: 56px; flex-wrap: wrap; }
.hero.center .trust-row { justify-content: center; }
.trust-row .t { text-align: left; }
.trust-row .t .val { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--text); }
.trust-row .t .lab { color: var(--text-faint); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 13px 22px; border-radius: var(--radius-sm);
  font-size: 14.5px; font-weight: 600; border: none; cursor: pointer; transition: all 0.15s ease; }
.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-glow); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--text-muted); box-shadow: 0 0 0 1px var(--border); }
.btn-ghost:hover { background: var(--surface-elevated); color: var(--text); box-shadow: 0 0 0 1px var(--border-strong); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-danger { background: var(--danger); color: #fff; }

section { padding: 96px 0; box-shadow: 0 -1px 0 0 var(--border) inset; }
section:first-of-type { box-shadow: none; }
section.tight { padding: 56px 0; }
h2 { font-family: var(--font-display); font-size: 36px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 12px; }
.section-lede { color: var(--text-muted); font-size: 16px; max-width: 620px; margin-bottom: 48px; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } h1 { font-size: 36px; } section { padding: 60px 0; } nav.main { gap: 16px; } .dropdown { left: 0; transform: none; } .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { nav.main a:not(.nav-cta):not(.active) { display: none; } .nav-drop { display: none; } .footer-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border-radius: var(--radius-md); padding: 28px;
  box-shadow: 0 0 0 1px var(--border);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover { background: var(--surface-elevated); box-shadow: 0 0 0 1px var(--border-strong); transform: translateY(-2px); }
.card .tag { font-family: var(--mono); font-size: 12px; color: var(--accent-glow); font-weight: 500;
  margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.card h3 { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 14.5px; line-height: 1.65; }

.metric-row { display: flex; gap: 30px; flex-wrap: wrap; margin: 22px 0; }
.metric .val { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--success);
  letter-spacing: -0.02em; }
.metric .lab { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }

.pill { display: inline-block; padding: 6px 12px; border-radius: 9999px; background: var(--surface-elevated);
  color: var(--success); font-family: var(--mono); font-size: 12px; font-weight: 500; }
.pill.blue { color: var(--accent-glow); }

.step { display: flex; gap: 20px; padding: 26px 0; box-shadow: 0 1px 0 0 var(--border); }
.step:last-child { box-shadow: none; }
.step-num { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface-elevated); color: var(--accent-glow); font-weight: 700; font-size: 15px;
  display: flex; align-items: center; justify-content: center; font-family: var(--font-display); box-shadow: 0 0 0 1px var(--border); }
.step h4 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: 14.5px; }

.logo-strip { display: flex; gap: 44px; flex-wrap: wrap; align-items: center; opacity: 0.6; margin-top: 20px; }
.logo-strip span { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--text-faint); letter-spacing: -0.01em; }

/* ---------- Forms ---------- */
form.contact, .auth-card { max-width: 560px; }
.field { margin-bottom: 18px; }
label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 7px; font-weight: 500; }
/* Scoped to .field-legacy only (auth/admin pages) — new flagship marketing
   pages use Tailwind form classes directly and must NOT inherit this dark
   theme, which was blacking out the contact/demo forms. */
.field-legacy input, .field-legacy textarea, .field-legacy select { width: 100%; background: var(--surface); box-shadow: 0 0 0 1px var(--border);
  border: none; border-radius: var(--radius-sm); padding: 12px 14px; color: var(--text); font-size: 14.5px;
  font-family: inherit; }
.field-legacy input:focus, .field-legacy textarea:focus, .field-legacy select:focus { outline: none; box-shadow: 0 0 0 1.5px var(--accent); }
.field-legacy textarea { min-height: 120px; resize: vertical; }
#formMsg, .form-msg { margin-top: 14px; font-size: 14px; }
#formMsg.ok, .form-msg.ok { color: var(--success); }
#formMsg.err, .form-msg.err { color: var(--danger); }
.field-hint { font-size: 12.5px; color: var(--text-faint); margin-top: 6px; }

.auth-wrap { padding: 88px 0 120px; display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: var(--radius-lg);
  padding: 40px 36px; box-shadow: 0 0 0 1px var(--border); }
.auth-card h1 { font-size: 28px; margin-bottom: 8px; }
.auth-card .lede { font-size: 14.5px; margin-bottom: 30px; }
.auth-switch { margin-top: 22px; font-size: 13.5px; color: var(--text-muted); text-align: center; }
.auth-switch a { color: var(--accent-glow); font-weight: 500; }

/* ---------- Badges / status ---------- */
.badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 9999px; font-size: 11.5px;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.badge-pending { background: rgba(251,191,36,0.14); color: #FBBF24; }
.badge-approved { background: rgba(52,211,153,0.14); color: var(--success); }
.badge-admin { background: rgba(232,162,0,0.16); color: var(--accent-glow); }
.badge-member { background: var(--surface-elevated); color: var(--text-muted); box-shadow: 0 0 0 1px var(--border); }

/* ---------- Tables (admin) ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; color: var(--text-faint); font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 10px 14px; border-bottom: 1px solid var(--border); }
table.data td { padding: 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
table.data td.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.table-wrap { background: var(--surface); border-radius: var(--radius-md); box-shadow: 0 0 0 1px var(--border); overflow-x: auto; }

/* ---------- Locked content ---------- */
.locked-box { background: var(--surface); border-radius: var(--radius-md); box-shadow: 0 0 0 1px var(--border);
  padding: 40px; text-align: center; }
.locked-box .lock-icon { font-size: 32px; margin-bottom: 14px; }

/* ---------- Footer ---------- */
footer.site { padding: 68px 0 0; color: var(--text-muted); font-size: 13.5px; box-shadow: 0 1px 0 0 var(--border) inset; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.2fr; gap: 32px; padding-bottom: 48px; }
.fcol h5 { font-size: 12.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 16px; }
.fcol a { display: block; color: var(--text-muted); font-size: 13.5px; margin-bottom: 11px; }
.fcol a:hover { color: var(--text); }
.fcol-brand .logo { font-size: 17px; margin-bottom: 14px; display: inline-block; }
.fdesc { color: var(--text-faint); font-size: 13px; line-height: 1.6; margin-bottom: 16px; max-width: 260px; }
.fsocial { display: flex; gap: 10px; }
.fsocial a { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-elevated); box-shadow: 0 0 0 1px var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; margin: 0; }
.flogout { margin-top: 4px; }
.flogout button { background: none; border: none; color: var(--text-muted); font-size: 13.5px; cursor: pointer; padding: 0; font-family: inherit; }
.flogout button:hover { color: var(--danger); }
.fnews { display: flex; gap: 8px; }
.fnews input { padding: 10px 12px; font-size: 13px; }
.fnews button { background: var(--accent); color: var(--bg); border: none; border-radius: var(--radius-sm); padding: 0 16px; font-size: 13px; font-weight: 600; cursor: pointer; }
.fbottom { display: flex; justify-content: space-between; align-items: center; padding: 22px 0; box-shadow: 0 1px 0 0 var(--border) inset;
  color: var(--text-faint); font-size: 12.5px; flex-wrap: wrap; gap: 10px; }
.fbottom-links a { margin-left: 20px; }
.fbottom-links a:hover { color: var(--text-muted); }

.page-header { padding: 68px 0 48px; text-align: left; }
.page-header h1 { font-size: 42px; }

/* ---------- Deploy toggle (home) ---------- */
.deploy-toggle { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 8px; }
.deploy-card { background: var(--surface); border-radius: var(--radius-md); padding: 26px;
  box-shadow: 0 0 0 1px var(--border); transition: background .15s, box-shadow .15s; }
.deploy-card:hover { background: var(--surface-elevated); box-shadow: 0 0 0 1px var(--border-strong); }
.deploy-card h3 { font-family: var(--font-display); font-size: 19px; font-weight: 600; margin: 10px 0 10px; letter-spacing: -0.015em; }
.deploy-card p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.deploy-card .pill { margin-top: 16px; }
.deploy-card--strong { background: var(--surface-elevated); box-shadow: 0 0 0 1px var(--accent); }
.deploy-card--strong h3 { color: var(--accent-glow); }
@media (max-width: 900px) { .deploy-toggle { grid-template-columns: 1fr; } }

/* ---------- Data boundary diagram (private-ai) ---------- */
.boundary { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: stretch; margin-top: 8px; }
.plane { border-radius: var(--radius-md); padding: 22px; box-shadow: 0 0 0 1px var(--border); }
.plane-client { background: var(--surface); }
.plane-ours { background: var(--surface); }
.plane-head { font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--text); margin-bottom: 16px; }
.plane-sub { color: var(--text-faint); text-transform: none; letter-spacing: 0; font-size: 11px; }
.plane-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.plane-list li { font-size: 14px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface-elevated);
  box-shadow: 0 0 0 1px var(--border); color: var(--text-muted); }
.plane-list li.stays { box-shadow: 0 0 0 1px rgba(248,113,113,0.35); }
.plane-list li.runs { box-shadow: 0 0 0 1px var(--accent); color: var(--text); }
.plane-list li.meta { }
.crossing { display: flex; flex-direction: column; justify-content: center; gap: 14px; min-width: 230px; }
.cross { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--radius-sm);
  background: var(--surface-elevated); box-shadow: 0 0 0 1px var(--border); }
.cross .arrow { font-size: 18px; color: var(--accent-glow); line-height: 1.2; }
.cross strong { font-size: 13.5px; color: var(--text); }
.cross small { color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.cross-note { font-size: 12px; color: var(--text-faint); text-align: center; }
@media (max-width: 900px) { .boundary { grid-template-columns: 1fr; } .crossing { min-width: 0; } }

/* ---------- Phases (how-it-works) ---------- */
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.phase-step { background: var(--surface); border-radius: var(--radius-md); padding: 20px; box-shadow: 0 0 0 1px var(--border); }
.phase-num { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-elevated); color: var(--accent-glow);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-display);
  box-shadow: 0 0 0 1px var(--border); margin-bottom: 12px; }
.phase-step h4 { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.phase-step p { color: var(--text-muted); font-size: 13px; line-height: 1.55; }
@media (max-width: 1100px) { .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-5 { grid-template-columns: 1fr; } }

/* ---------- Bullets / price cards ---------- */
.bullets { list-style: none; margin: 14px 0 0; display: flex; flex-direction: column; gap: 9px; }
.bullets li { font-size: 13.5px; color: var(--text-muted); padding-left: 22px; position: relative; line-height: 1.5; }
.bullets li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.price-card .price { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--accent-glow);
  margin: 8px 0 12px; letter-spacing: -0.02em; }
.card-strong { background: var(--surface-elevated); box-shadow: 0 0 0 1px var(--accent); }
.card.card-strong h3, .card.card-strong .price { color: var(--text); }
.card.card-strong .price { color: var(--accent-glow); }

/* ---------- Misc blocks ---------- */
.pullquote { font-family: var(--font-display); font-size: 26px; font-weight: 600; line-height: 1.3;
  letter-spacing: -0.02em; color: var(--text); border-left: 3px solid var(--accent); padding: 6px 0 6px 22px; margin: 8px 0 20px; }
.notice { background: var(--surface); border-radius: var(--radius-md); padding: 28px; box-shadow: 0 0 0 1px var(--border); }
.notice h4 { font-family: var(--font-display); font-size: 17px; margin-bottom: 10px; }
.notice p { color: var(--text-muted); font-size: 14px; line-height: 1.65; }
.legal { max-width: 820px; }
.legal h3 { font-family: var(--font-display); font-size: 19px; font-weight: 600; margin: 28px 0 10px; letter-spacing: -0.015em; }
.legal p { color: var(--text-muted); font-size: 14.5px; line-height: 1.7; }
.legal ul { margin: 6px 0 0; padding-left: 20px; }
.legal li { color: var(--text-muted); font-size: 14.5px; line-height: 1.7; margin-bottom: 6px; }
.legal code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-elevated); padding: 2px 6px; border-radius: 4px; color: var(--accent-glow); }

/* ---------- Index cards that are links (solutions / resources / articles) ---------- */
a.card.sol-index, a.card.res-index, a.card.article-card { color: inherit; text-decoration: none; display: block; }
.sol-link { display: inline-block; margin-top: 14px; color: var(--accent-glow); font-weight: 600; font-size: 14px; }
a.card.sol-index:hover .sol-link, a.card.res-index:hover .sol-link, a.card.article-card:hover .sol-link { text-decoration: underline; }
.article-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: 12.5px; color: var(--text-faint); font-family: var(--mono); }

/* ---------- Status page ---------- */
.status-grid { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border-radius: var(--radius-md); box-shadow: 0 0 0 1px var(--border); overflow: hidden; }
.status-row { display: grid; grid-template-columns: 1.4fr 24px 1fr 2fr; align-items: center; gap: 16px; padding: 18px 22px; box-shadow: 0 1px 0 0 var(--border) inset; }
.status-row:last-child { box-shadow: none; }
.status-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.status-dot { width: 11px; height: 11px; border-radius: 50%; }
.status-dot.ok { background: var(--success); box-shadow: 0 0 0 4px rgba(52,211,153,0.16); }
.status-dot.degraded { background: #FBBF24; box-shadow: 0 0 0 4px rgba(251,191,36,0.16); }
.status-dot.down { background: var(--danger); box-shadow: 0 0 0 4px rgba(248,113,113,0.16); }
.status-state { font-size: 13.5px; font-weight: 600; }
.status-state.ok { color: var(--success); } .status-state.degraded { color: #FBBF24; } .status-state.down { color: var(--danger); }
.status-meta { color: var(--text-muted); font-size: 13px; }
@media (max-width: 720px) { .status-row { grid-template-columns: 1fr 20px; row-gap: 4px; } .status-state, .status-meta { grid-column: 1 / -1; } }
