/* === BASE === */
:root {
  --bg: #0d1b2a;
  --surface: #14233a;
  --surface-2: #1a2d47;
  --border: #1f3350;
  --accent: #00d4aa;
  --accent-dim: rgba(0, 212, 170, 0.15);
  --text: #e8edf4;
  --text-muted: #8a9ab5;
  --text-dim: #4f6280;
  --denied: #e05c5c;
  --denied-bg: rgba(224, 92, 92, 0.1);
  --approved: #00d4aa;
  --approved-bg: rgba(0, 212, 170, 0.1);
  --partial: #f0b429;
  --partial-bg: rgba(240, 180, 41, 0.1);
  --pending: #5b9cf6;
  --pending-bg: rgba(91, 156, 246, 0.1);
  --added: #5dd99a;
  --removed: #e05c5c;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

/* === NAV === */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}

.nav-tagline {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* === HERO === */
.hero {
  padding: 80px 48px 64px;
  max-width: 1400px;
  margin: 0 auto;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 480px;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}

.hero-stat { }

.stat-number {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 160px;
  line-height: 1.4;
}

.hero-stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
}

/* Diff Mockup */
.diff-mockup {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-family: var(--font-body);
}

.diff-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.diff-header-v2 {
  border-top: 1px solid var(--border);
}

.diff-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.diff-status {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
}

.diff-status.denied { background: var(--denied-bg); color: var(--denied); }
.diff-status.pending { background: var(--pending-bg); color: var(--pending); }

.diff-rows { padding: 4px 0; }

.diff-row {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 12px;
  padding: 7px 16px;
  font-size: 13px;
  align-items: center;
}

.diff-row.removed { color: var(--removed); opacity: 0.8; }
.diff-row.added { color: var(--added); }
.diff-row.unchanged { color: var(--text-muted); }

.diff-icon {
  font-family: 'Space Grotesk', monospace;
  font-weight: 700;
  font-size: 16px;
  text-align: center;
}

.diff-code {
  font-family: 'Space Grotesk', monospace;
  font-size: 12px;
}

.diff-amount {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 12px;
}

/* === THE PROBLEM === */
.theproblem {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 48px;
}

.problem-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.problem-label, .hiw-label, .features-label, .diffdemo-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 16px;
}

.problem-headline, .hiw-headline, .features-headline, .diffdemo-headline {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  max-width: 640px;
  line-height: 1.2;
  margin-bottom: 48px;
  letter-spacing: -0.02em;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.problem-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}

.problem-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-dim);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 16px;
}

.problem-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.3;
}

.problem-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* === HOW IT WORKS === */
.howitworks {
  padding: 80px 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.hiw-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 16px;
  align-items: start;
}

.hiw-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}

.step-number {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 16px;
}

.hiw-step h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.3;
}

.hiw-step p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.hiw-arrow {
  display: flex;
  align-items: center;
  padding-top: 80px;
  color: var(--text-dim);
}

/* === FEATURES === */
.features {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 48px;
}

.features-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}

.feature-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* === DIFF DEMO === */
.diffdemo {
  padding: 80px 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.diffdemo-inner { }

.diffdemo-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 580px;
  margin-bottom: 48px;
  line-height: 1.7;
}

.diffdemo-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 24px;
}

.dtable-header, .dtable-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 100px;
  gap: 0;
  align-items: center;
}

.dtable-header {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.dtable-col {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dtable-row { border-bottom: 1px solid var(--border); }
.dtable-row:last-child { border-bottom: none; }

.dtable-row .dtable-col {
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
}

.code-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.code-tag.roof { background: rgba(91, 156, 246, 0.15); color: #5b9cf6; }
.code-tag.interior { background: rgba(240, 180, 41, 0.15); color: #f0b429; }
.code-tag.exterior { background: rgba(0, 212, 170, 0.1); color: var(--accent); }
.code-tag.mechanical { background: rgba(224, 92, 92, 0.1); color: var(--denied); }

.changed-tag { font-size: 11px; color: var(--denied); margin-left: 4px; }
.added-tag { font-size: 11px; color: var(--added); margin-left: 4px; }

.status-chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-chip.approved { background: var(--approved-bg); color: var(--approved); }
.status-chip.partial { background: var(--partial-bg); color: var(--partial); }
.status-chip.pending { background: var(--pending-bg); color: var(--pending); }
.status-chip.denied { background: var(--denied-bg); color: var(--denied); }

.diffdemo-total {
  display: flex;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.total-item {
  flex: 1;
  padding: 20px 24px;
  border-right: 1px solid var(--border);
}

.total-item:last-child { border-right: none; }

.total-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 6px;
}

.total-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.total-value.approved { color: var(--approved); }
.total-value.open { color: var(--pending); }

/* === CLOSING === */
.closing {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 96px 48px;
  text-align: center;
}

.closing-inner { max-width: 720px; margin: 0 auto; }

.closing-headline {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.closing-sub {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.closing-tagline {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 32px;
}

/* === SIGNUP FORM === */
.signup-form {
  max-width: 480px;
  margin: 0 auto;
}

.signup-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.signup-row input[type="email"] {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.signup-row input[type="email"]:focus {
  border-color: var(--accent);
}

.signup-row input[type="email"]::placeholder {
  color: var(--text-dim);
}

.signup-row button {
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 8px;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.signup-row button:hover:not(:disabled) { opacity: 0.88; }
.signup-row button:disabled { opacity: 0.5; cursor: not-allowed; }

.form-error {
  color: var(--denied);
  font-size: 13px;
  margin-top: 10px;
  text-align: left;
}

.form-success {
  color: var(--accent);
  font-size: 13px;
  margin-top: 10px;
  font-weight: 500;
}

@media (max-width: 600px) {
  .signup-row { flex-direction: column; }
  .signup-row button { justify-content: center; }
}

/* === FOOTER === */
.footer {
  padding: 24px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.footer-copy {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-headline { font-size: 36px; }
  .problem-grid { grid-template-columns: 1fr; }
  .hiw-steps { grid-template-columns: 1fr; gap: 12px; }
  .hiw-arrow { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .dtable-header, .dtable-row { grid-template-columns: 2fr 1fr 1fr; }
  .dtable-col:nth-child(4), .dtable-col:nth-child(5) { display: none; }
  .diffdemo-total { flex-direction: column; }
  .total-item { border-right: none; border-bottom: 1px solid var(--border); }
}

@media (max-width: 600px) {
  .hero { padding: 48px 24px 40px; }
  .theproblem, .howitworks, .features, .diffdemo, .closing { padding: 48px 24px; }
  .nav { padding: 16px 24px; }
  .footer { padding: 20px 24px; }
  .hero-headline { font-size: 28px; }
  .problem-headline, .hiw-headline, .features-headline { font-size: 26px; }
  .closing-headline { font-size: 28px; }
}
