/* ===================================================================
   Build Cost Index - Landing Page (Split-Screen Archetype)
   Colors: #1c1917 (stone-900), #f59e0b (amber), #22c55e (green), #ef4444 (red)
   =================================================================== */

/* ===== VARIABLES ===== */
:root {
  --bg: #1c1917;
  --bg-elevated: #292524;
  --bg-muted: #44403c;
  --bg-light: #f5f0eb;
  --text: #fafaf9;
  --text-secondary: #a8a29e;
  --text-muted: #78716c;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --amber-light: #fbbf24;
  --green: #22c55e;
  --green-bg: rgba(34, 197, 94, 0.15);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.15);
  --cyan: #06b6d4;
  --border: #44403c;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.4);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --max-w: 1200px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(28, 25, 23, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(68, 64, 60, 0.5);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-text {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.header-nav a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.header-nav a:hover { color: var(--amber); }
.header-nav .skip-link {
  color: var(--bg);
  background: var(--amber);
  padding: 7px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.8rem;
  transition: background 0.2s;
}
.header-nav .skip-link:hover { background: var(--amber-dark); }

/* ===== HERO (Split Screen) ===== */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  padding-top: 60px;
}
.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 56px 80px 64px;
  background: var(--bg);
}
.hero-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 48px;
  background: linear-gradient(135deg, #292524 0%, #1c1917 60%, rgba(245, 158, 11, 0.06) 100%);
  border-left: 1px solid var(--border);
}
.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
  width: fit-content;
}
.hero-headline {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  max-width: 520px;
}
.text-amber { color: var(--amber); }
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
  max-width: 480px;
}
.hero-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 480px;
}

/* ===== FORMS ===== */
.form-row {
  display: flex;
  gap: 10px;
  max-width: 440px;
}
.form-row input[type="email"] {
  flex: 1;
  padding: 14px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.925rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-row input[type="email"]:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}
.form-row input[type="email"]::placeholder { color: var(--text-muted); }
.btn-cta {
  padding: 14px 28px;
  background: var(--amber);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-size: 0.925rem;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-cta:hover { background: var(--amber-dark); transform: translateY(-1px); }
.btn-cta:active { transform: translateY(0); }
.btn-cta:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.spinner-sm {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--bg);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero-form-status, .bottom-form-status {
  font-size: 0.8125rem;
  min-height: 20px;
  margin-top: 8px;
}
.status-success { color: var(--green); }
.status-error { color: var(--red); }

.hero-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.hero-skip, .bottom-skip {
  display: inline-block;
  margin-top: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.hero-skip:hover, .bottom-skip:hover { color: var(--amber); }

/* ===== DASHBOARD MOCK ===== */
.dashboard-mock {
  width: 100%;
  max-width: 440px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.mock-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(68, 64, 60, 0.3);
  border-bottom: 1px solid var(--border);
}
.mock-dots {
  display: flex;
  gap: 6px;
}
.mock-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-muted);
}
.mock-dots span:first-child { background: #ef4444; }
.mock-dots span:nth-child(2) { background: #f59e0b; }
.mock-dots span:last-child { background: #22c55e; }
.mock-title {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}
.mock-body { padding: 20px; }

/* Ticker */
.mock-ticker {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.ticker-item {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 10px;
  text-align: center;
}
.ticker-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.ticker-price {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text);
}
.ticker-change {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-mono);
  margin-top: 2px;
}
.ticker-change.up { color: var(--green); }
.ticker-change.down { color: var(--red); }

/* Mock chart */
.mock-chart {
  margin-bottom: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px 8px;
}
.mock-chart-svg {
  width: 100%;
  height: 80px;
}
.mock-chart-labels {
  display: flex;
  justify-content: space-between;
  padding: 6px 4px 0;
  font-size: 0.6rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Mock regions */
.mock-regions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.mock-region {
  font-size: 0.65rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.mock-region.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--amber);
  color: var(--amber);
}

/* ===== PROOF BAR ===== */
.proof-bar {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.proof-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}
.proof-item { text-align: center; }
.proof-number {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--amber);
  line-height: 1.2;
}
.proof-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 2px;
}
.proof-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ===== SECTIONS (shared) ===== */
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 32px;
}
.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--amber);
  margin-bottom: 12px;
}
.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
  max-width: 600px;
}

/* ===== PROBLEM SECTION ===== */
.problem-section {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.problem-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: border-color 0.2s;
}
.problem-card:hover { border-color: var(--red); }
.problem-icon {
  margin-bottom: 16px;
  width: 48px;
  height: 48px;
  background: var(--red-bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.problem-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.problem-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== HOW IT WORKS ===== */
.how-section {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.steps-grid {
  display: flex;
  align-items: flex-start;
  gap: 0;
}
.step-card {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: border-color 0.2s;
}
.step-card:hover { border-color: var(--amber); }
.step-number {
  font-size: 2rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: var(--amber);
  opacity: 0.7;
  margin-bottom: 16px;
  line-height: 1;
}
.step-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.step-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.step-connector {
  display: flex;
  align-items: center;
  padding: 0 12px;
  padding-top: 40px;
  flex-shrink: 0;
}

/* ===== FEATURES ===== */
.features-section {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover { border-color: var(--amber); transform: translateY(-2px); }
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-icon.amber { background: rgba(245, 158, 11, 0.12); color: var(--amber); }
.feature-icon.green { background: rgba(34, 197, 94, 0.12); color: var(--green); }
.feature-icon.red { background: rgba(239, 68, 68, 0.12); color: var(--red); }
.feature-icon.cyan { background: rgba(6, 182, 212, 0.12); color: var(--cyan); }
.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== ANCHOR / PRICING COMPARE ===== */
.anchor-section {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.anchor-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 56px;
}
.anchor-strike {
  font-size: 3rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: var(--red);
  text-decoration-thickness: 3px;
  line-height: 1.1;
}
.anchor-strike span {
  font-size: 1.25rem;
  font-weight: 600;
}
.anchor-free {
  font-size: 3rem;
  font-weight: 900;
  font-family: var(--font-mono);
  color: var(--green);
  line-height: 1.1;
}
.anchor-compare {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 8px;
  max-width: 200px;
}
.anchor-divider {
  width: 1px;
  height: 80px;
  background: var(--border);
}
.anchor-left, .anchor-right { text-align: center; }

/* ===== BOTTOM CTA ===== */
.bottom-cta {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.bottom-cta .section-inner { text-align: center; }
.bottom-cta .section-title {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.bottom-cta-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: -24px auto 36px;
  line-height: 1.6;
}
.bottom-form {
  max-width: 460px;
  margin: 0 auto;
}
.bottom-form .form-row {
  max-width: 100%;
  justify-content: center;
}
.bottom-skip {
  margin-top: 16px;
}

/* ===== FAQ ===== */
.faq-section {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.faq-list {
  max-width: 720px;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s;
}
.faq-question:hover { color: var(--amber); }
.faq-chevron {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: var(--text-muted);
}
.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--amber);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.open .faq-answer {
  max-height: 300px;
  padding-bottom: 20px;
}
.faq-answer p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg);
  padding: 40px 32px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.footer-copy {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.footer-legal {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-left {
    padding: 100px 32px 48px;
    order: 1;
  }
  .hero-right {
    padding: 0 32px 48px;
    border-left: none;
    order: 2;
  }
  .hero-headline { font-size: 2.4rem; }
  .anchor-card { gap: 40px; padding: 40px 32px; }
}

@media (max-width: 768px) {
  .header-nav a:not(.skip-link) { display: none; }
  .hero-left { padding: 88px 24px 40px; }
  .hero-right { padding: 0 24px 40px; }
  .hero-headline { font-size: 2rem; }
  .section-title { font-size: 1.75rem; }
  .section-inner { padding: 56px 24px; }
  .problem-grid { grid-template-columns: 1fr; }
  .steps-grid { flex-direction: column; gap: 16px; }
  .step-connector { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .anchor-card {
    flex-direction: column;
    gap: 24px;
    padding: 32px 24px;
  }
  .anchor-divider {
    width: 80px;
    height: 1px;
  }
  .proof-inner {
    flex-wrap: wrap;
    gap: 20px;
  }
  .proof-divider { display: none; }
  .proof-item { min-width: 100px; }
  .form-row { flex-direction: column; }
  .btn-cta { width: 100%; justify-content: center; }
  .mock-ticker { gap: 6px; }
  .ticker-price { font-size: 0.95rem; }
}

@media (max-width: 480px) {
  .hero-headline { font-size: 1.75rem; }
  .section-title { font-size: 1.5rem; }
  .anchor-strike, .anchor-free { font-size: 2.25rem; }
}
