/* Cover My SaaS — design system */
:root {
  --bg: #0a0a0a;
  --bg-card: #111111;
  --bg-elevated: #181818;
  --fg: #f5f5f5;
  --fg-muted: #888888;
  --fg-subtle: #555555;
  --accent: #f59e0b;
  --accent-dim: rgba(245, 158, 11, 0.15);
  --green: #22c55e;
  --green-dim: rgba(34, 197, 94, 0.12);
  --yellow: #eab308;
  --yellow-dim: rgba(234, 179, 8, 0.12);
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.12);
  --border: #222222;
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 8px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #0a0a0a;
}
.btn-primary:hover { background: #fbbf24; }
.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--fg); border-color: #444; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── HERO (landing) ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 24px 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse 60% 50% at 70% 50%, rgba(245,158,11,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero-eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero-title em { font-style: normal; color: var(--accent); }
.hero-desc {
  font-size: 1.1rem;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 36px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero right — mockup card */
.hero-visual {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
}
.hero-visual::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(245,158,11,0.2) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}
.visual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.visual-title { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; }
.visual-badge {
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.visual-rows { display: flex; flex-direction: column; gap: 10px; }
.visual-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.visual-row-icon { font-size: 1.1rem; width: 28px; text-align: center; }
.visual-row-name { flex: 1; font-size: 0.875rem; font-weight: 500; }
.visual-row-meta { font-size: 0.75rem; color: var(--fg-muted); }
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.green { background: var(--green); }
.status-dot.yellow { background: var(--yellow); }
.status-dot.red { background: var(--red); box-shadow: 0 0 6px rgba(239,68,68,0.5); }

/* ── FEATURES SECTION ── */
.features {
  padding: 100px 24px;
  border-top: 1px solid var(--border);
}
.features-inner { max-width: 1200px; margin: 0 auto; }
.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 60px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s;
}
.feature-card:hover { border-color: #333; }
.feature-icon { font-size: 1.6rem; margin-bottom: 16px; }
.feature-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
}
.feature-desc { font-size: 0.875rem; color: var(--fg-muted); line-height: 1.6; }

/* ── FOUNDER SECTION ── */
.founder-section {
  padding: 80px 24px;
  border-top: 1px solid var(--border);
  background: radial-gradient(ellipse 50% 60% at 50% 100%, rgba(245,158,11,0.05) 0%, transparent 70%);
}
.founder-inner {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.founder-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--accent-dim);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 28px;
}
.founder-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.founder-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: var(--fg);
}
.founder-tagline {
  font-size: 1.05rem;
  color: var(--fg-muted);
  line-height: 1.75;
}
.founder-tagline strong {
  color: var(--fg);
  font-weight: 600;
}

/* ── DASHBOARD PAGE ── */
.page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 90px 24px 60px;
}
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-subtitle { font-size: 0.875rem; color: var(--fg-muted); margin-top: 4px; }

/* Summary cards */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.summary-label { font-size: 0.75rem; color: var(--fg-muted); font-weight: 500; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.06em; }
.summary-value { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; letter-spacing: -0.02em; }
.summary-value.green { color: var(--green); }
.summary-value.red { color: var(--red); }
.summary-value.accent { color: var(--accent); }
.summary-change { font-size: 0.75rem; color: var(--fg-subtle); margin-top: 4px; }

/* Platform table */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}
.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.table-title { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; }
.table-actions { display: flex; gap: 8px; }

table { width: 100%; border-collapse: collapse; }
thead tr { border-bottom: 1px solid var(--border); }
th {
  text-align: left;
  padding: 10px 16px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
td {
  padding: 14px 16px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-elevated); }

.platform-cell { display: flex; align-items: center; gap: 10px; }
.platform-icon { font-size: 1.2rem; width: 32px; text-align: center; }
.platform-name { font-weight: 500; }
.platform-workspace { font-size: 0.75rem; color: var(--fg-muted); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
}
.badge-green { background: var(--green-dim); color: var(--green); }
.badge-yellow { background: var(--yellow-dim); color: var(--yellow); }
.badge-red { background: var(--red-dim); color: var(--red); }
.badge-muted { background: #1a1a1a; color: var(--fg-subtle); }

.savings-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--red-dim);
  color: var(--red);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Digest panel */
.digest-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.digest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.digest-body { padding: 20px 22px; }
.digest-text {
  font-family: 'DM Mono', 'Courier New', monospace;
  font-size: 0.8rem;
  line-height: 1.8;
  color: var(--fg-muted);
  white-space: pre-wrap;
  background: var(--bg-elevated);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  backdrop-filter: blur(4px);
}
.modal-overlay.hidden { display: none; }
.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 480px;
}
.modal-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 20px;
}
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.8rem; color: var(--fg-muted); margin-bottom: 6px; font-weight: 500; }
.form-input, .form-select {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus { border-color: var(--accent); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
select option { background: var(--bg-elevated); }

/* Spinner */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(245,158,11,0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideIn 0.2s ease;
  min-width: 240px;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* Empty state */
.empty-state {
  padding: 60px 24px;
  text-align: center;
}
.empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-title { font-family: var(--font-display); font-weight: 700; margin-bottom: 8px; }
.empty-desc { color: var(--fg-muted); font-size: 0.875rem; }

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, #222 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
}
