/* KPG Predictor — Traction Layer AI brand styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --brand-blue: #1B9FD4;
  --brand-blue-hover: #1689b8;
  --dark-bg: #0F0F1A;
  --dark-card: #1a1a2e;
  --dark-border: rgba(255,255,255,0.08);
  --dark-text: #FFFFFF;
  --dark-muted: #A0A3B1;
  --white-bg: #FFFFFF;
  --light-bg: #F5F6FA;
  --white-text: #1A1A2E;
  --white-body: #4A4B5C;
  --white-border: rgba(0,0,0,0.06);
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body { font-family:'Inter',system-ui,-apple-system,sans-serif; font-size:16px; line-height:1.6; color:var(--white-text); background:var(--white-bg); }

/* ---- Nav ---- */
.nav { position:sticky; top:0; z-index:100; background:var(--dark-bg); border-bottom:1px solid var(--dark-border); padding:0 24px; }
.nav-inner { max-width:1200px; margin:0 auto; display:flex; align-items:center; justify-content:space-between; height:60px; }
.nav-logo img { height:32px; }
.nav-links { display:flex; gap:4px; }
.nav-links a { color:var(--dark-muted); text-decoration:none; font-size:14px; font-weight:500; padding:8px 14px; border-radius:6px; transition:all .2s; }
.nav-links a:hover, .nav-links a.active { color:#fff; background:rgba(27,159,212,0.12); }
.nav-links a.active { border-bottom:2px solid var(--brand-blue); }

/* ---- Sections ---- */
.section-dark { background:var(--dark-bg); color:var(--dark-text); padding:80px 24px; }
.section-white { background:var(--white-bg); color:var(--white-text); padding:80px 24px; }
.section-light { background:var(--light-bg); color:var(--white-text); padding:60px 24px; }
.container { max-width:1200px; margin:0 auto; }

/* ---- Hero ---- */
.hero { text-align:center; padding:100px 24px 80px; }
.hero h1 { font-size:42px; font-weight:700; margin-bottom:16px; }
.hero h1 span { color:var(--brand-blue); }
.hero p { font-size:18px; color:var(--dark-muted); max-width:700px; margin:0 auto 32px; }
.hero-buttons { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
.btn { display:inline-flex; align-items:center; gap:8px; padding:12px 24px; border-radius:var(--radius); font-weight:600; font-size:15px; text-decoration:none; border:none; cursor:pointer; transition:all .2s; font-family:inherit; }
.btn-primary { background:var(--brand-blue); color:#fff; }
.btn-primary:hover { background:var(--brand-blue-hover); transform:translateY(-1px); }
.btn-outline { background:transparent; color:#fff; border:1px solid rgba(255,255,255,0.2); }
.btn-outline:hover { border-color:var(--brand-blue); color:var(--brand-blue); }
.stat-cards { display:flex; gap:20px; justify-content:center; margin-top:48px; flex-wrap:wrap; }
.stat-card { background:var(--dark-card); border:1px solid var(--dark-border); border-radius:var(--radius); padding:20px 32px; text-align:center; }
.stat-card .num { font-size:28px; font-weight:700; color:var(--brand-blue); }
.stat-card .label { font-size:13px; color:var(--dark-muted); margin-top:4px; }

/* ---- Feature cards ---- */
.features-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:24px; }
.feature-card { background:var(--white-bg); border:1px solid var(--white-border); border-radius:var(--radius); padding:28px; transition:all .2s; text-decoration:none; color:inherit; display:block; }
.feature-card:hover { border-color:var(--brand-blue); box-shadow:0 4px 16px rgba(27,159,212,0.1); transform:translateY(-2px); }
.feature-card .icon { font-size:28px; margin-bottom:12px; }
.feature-card h3 { font-size:18px; font-weight:600; margin-bottom:8px; }
.feature-card p { font-size:14px; color:var(--white-body); }

/* ---- Page header ---- */
.page-header { padding:48px 24px; text-align:center; }
.page-header h1 { font-size:32px; font-weight:700; margin-bottom:8px; }
.page-header p { color:var(--dark-muted); font-size:16px; }

/* ---- Forms ---- */
.form-section { padding:40px 24px 60px; }
.form-card { background:var(--white-bg); border:1px solid var(--white-border); border-radius:var(--radius); padding:32px; max-width:800px; margin:0 auto; box-shadow:var(--shadow); }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px 24px; }
.form-group { display:flex; flex-direction:column; gap:6px; }
.form-group.full { grid-column:1/-1; }
.form-label { font-size:13px; font-weight:600; color:var(--white-text); }
.form-input, .form-select { padding:10px 14px; border:1px solid #d1d5db; border-radius:6px; font-size:14px; font-family:inherit; background:#fff; transition:border-color .2s; }
.form-input:focus, .form-select:focus { outline:none; border-color:var(--brand-blue); box-shadow:0 0 0 3px rgba(27,159,212,0.12); }
.form-toggle { display:flex; gap:4px; background:var(--light-bg); border-radius:6px; padding:3px; margin-bottom:16px; }
.form-toggle button { flex:1; padding:8px; border:none; border-radius:4px; font-size:13px; font-weight:500; cursor:pointer; background:transparent; color:var(--white-body); font-family:inherit; transition:all .2s; }
.form-toggle button.active { background:#fff; color:var(--white-text); box-shadow:var(--shadow); }
.advanced-toggle { font-size:13px; color:var(--brand-blue); cursor:pointer; margin:16px 0 8px; font-weight:500; }
.advanced-fields { display:none; }
.advanced-fields.open { display:grid; }
.form-submit { margin-top:24px; text-align:center; }
.form-submit .btn { padding:14px 40px; font-size:16px; width:100%; max-width:400px; }

/* ---- Results ---- */
.results-section { padding:40px 24px 80px; display:none; }
.results-section.visible { display:block; }
.metrics-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:16px; margin-bottom:32px; }
.metric-card { background:var(--white-bg); border:1px solid var(--white-border); border-radius:var(--radius); padding:20px 24px; text-align:center; box-shadow:var(--shadow); }
.metric-card .metric-value { font-size:32px; font-weight:700; color:var(--brand-blue); }
.metric-card .metric-label { font-size:12px; color:var(--white-body); margin-top:4px; text-transform:uppercase; letter-spacing:0.5px; }
.metric-card .metric-unit { font-size:14px; color:var(--white-body); }

.results-table { width:100%; border-collapse:collapse; margin-bottom:24px; }
.results-table th { text-align:left; font-size:12px; font-weight:600; color:var(--white-body); text-transform:uppercase; letter-spacing:0.5px; padding:10px 16px; border-bottom:2px solid var(--light-bg); }
.results-table td { padding:12px 16px; border-bottom:1px solid var(--light-bg); font-size:14px; }
.results-table tr:hover { background:var(--light-bg); }
.results-table .best { color:var(--brand-blue); font-weight:600; }
.results-table .rank-1 { border-left:3px solid var(--brand-blue); }

/* ---- Alerts ---- */
.alert { padding:16px 20px; border-radius:var(--radius); margin-bottom:20px; font-size:14px; }
.alert-error { background:#fef2f2; border:1px solid #fecaca; color:#991b1b; }
.alert-success { background:#f0fdf4; border:1px solid #bbf7d0; color:#166534; }
.alert-info { background:#eff6ff; border:1px solid #bfdbfe; color:#1e40af; }
.alert-warning { background:#fffbeb; border:1px solid #fde68a; color:#92400e; }

/* ---- Loading ---- */
.loading-overlay { position:fixed; inset:0; background:rgba(15,15,26,0.7); display:none; align-items:center; justify-content:center; z-index:200; flex-direction:column; gap:16px; }
.loading-overlay.visible { display:flex; }
.spinner { width:40px; height:40px; border:4px solid rgba(27,159,212,0.2); border-top-color:var(--brand-blue); border-radius:50%; animation:spin .8s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.loading-text { color:#fff; font-size:15px; }

/* ---- Embed ---- */
.embed-container { width:100%; border:1px solid var(--white-border); border-radius:var(--radius); overflow:hidden; margin-top:16px; }
.embed-container iframe { width:100%; border:none; min-height:600px; }

/* ---- Footer ---- */
.footer { background:var(--dark-bg); color:var(--dark-muted); padding:40px 24px; text-align:center; font-size:13px; border-top:1px solid var(--dark-border); }
.footer a { color:var(--brand-blue); text-decoration:none; }

/* ---- Responsive ---- */
@media (max-width:768px) {
  .hero h1 { font-size:28px; }
  .form-grid { grid-template-columns:1fr; }
  .nav-links { gap:0; }
  .nav-links a { padding:8px 8px; font-size:12px; }
  .metrics-row { grid-template-columns:1fr 1fr; }
}
