/* Windfall v2 — Dark Data Surface
 * #0A0F0A base
 * Outfit for headlines, Manrope for body, DM Mono for data
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

:root {
  --bg: #0A0F0A;
  --surface: #111611;
  --surface-2: #181E18;
  --border: rgba(58, 133, 72, 0.12);
  --border-bright: rgba(58, 133, 72, 0.25);
  --text: #E8E6E1;
  --text-2: #9A9285;
  --text-3: #5A5549;
  --green: #3A8548;
  --green-glow: rgba(58, 133, 72, 0.15);
  --green-bright: #4CAF50;
  --amber: #E0A84B;
  --coral: #E07A5F;
  --red: #C0392B;

  --font: 'Manrope', system-ui, sans-serif;
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-mono: 'DM Mono', 'SF Mono', monospace;

  --radius: 8px;
  --radius-lg: 12px;
}

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

body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-bright); }

/* =========================================================================
   Nav
   ========================================================================= */

.nav-dark {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 48px;
  background: linear-gradient(rgba(10,15,10,0.95), rgba(10,15,10,0.6), transparent);
  pointer-events: none;
}

.nav-dark > * { pointer-events: auto; }

.nav-logo {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--text); }

.nav-cta {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: white !important;
  background: var(--green);
  padding: 7px 18px;
  border-radius: 100px;
  transition: background 0.2s;
}

.nav-cta:hover { background: #2E6B3A; }

/* =========================================================================
   Hero — background image + gradient overlay
   ========================================================================= */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('/assets/hero-bg.webp') center/cover no-repeat;
  opacity: 0.55;
  z-index: 1;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,15,10,0.7) 0%, rgba(10,15,10,0.5) 30%, rgba(10,15,10,0.35) 60%, var(--bg) 100%),
    linear-gradient(90deg, rgba(10,15,10,0.6) 0%, rgba(10,15,10,0.2) 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 120px 48px 80px;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 600;
  line-height: 1.35;
  color: #fff;
  max-width: 700px;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.hero-headline .text-green {
  color: var(--green-bright);
  font-weight: 700;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--green);
  margin-bottom: 12px;
}

.hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  max-width: 480px;
  line-height: 1.6;
  margin-bottom: 36px;
}

/* Two-persona cards */
.hero-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 640px;
  margin-bottom: 36px;
}

.hero-card {
  padding: 24px;
  background: rgba(10, 15, 10, 0.7);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  transition: border-color 0.3s;
}

.hero-card:hover {
  border-color: var(--green);
}

.hero-card-icon {
  color: var(--green);
  margin-bottom: 12px;
}

.hero-card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.hero-card-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

.hero-card-desc code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green-bright);
  background: rgba(58, 133, 72, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
}

/* CTAs */
.hero-ctas {
  display: flex;
  gap: 12px;
}

.btn-primary {
  display: inline-block;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: white;
  background: var(--green);
  padding: 13px 30px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s;
}

.btn-primary:hover { background: #2E6B3A; color: white; }

.btn-secondary {
  display: inline-block;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  padding: 13px 30px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid var(--border-bright);
  transition: all 0.2s;
}

.btn-secondary:hover { border-color: var(--text-3); color: white; }

/* =========================================================================
   Content sections
   ========================================================================= */

.content {
  position: relative;
  z-index: 4;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 48px 120px;
}

.section {
  margin-bottom: 100px;
}

.section-eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--green);
  margin-bottom: 10px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.section-sub {
  font-size: 15px;
  color: var(--text-2);
  max-width: 540px;
  line-height: 1.5;
  margin-bottom: 32px;
}

/* =========================================================================
   Comparison Card
   ========================================================================= */

.comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  border: 2px solid var(--border-bright);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  margin-top: 40px;
  margin-bottom: 40px;
}

.comparison-side {
  padding: 48px 40px;
}

.comparison-side.dirty { background: rgba(224, 122, 95, 0.06); }
.comparison-side.green { background: rgba(58, 133, 72, 0.06); }

.comparison-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.comparison-side.dirty .comparison-label { color: var(--coral); }
.comparison-side.green .comparison-label { color: var(--green); }

.comparison-value {
  font-family: var(--font-mono);
  font-size: 56px;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 6px;
}

.comparison-unit {
  font-size: 16px;
  color: var(--text-3);
  margin-top: 4px;
}

.comparison-detail {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 18px;
  line-height: 1.6;
}

.comparison-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: var(--surface-2);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

.comparison-vs span {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-3);
  writing-mode: vertical-lr;
  letter-spacing: 3px;
}

.comparison-delta {
  text-align: center;
  padding: 24px 40px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  grid-column: 1 / -1;
}

.delta-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  color: var(--green);
}

.delta-label {
  font-size: 14px;
  color: var(--text-3);
  margin-top: 6px;
}

/* =========================================================================
   Steps — How it works
   ========================================================================= */

.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: flex;
  gap: 20px;
  padding: 28px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.step:last-child { border-bottom: none; }

.step-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--green);
  min-width: 40px;
  line-height: 1;
}

.step-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.step-desc {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
  max-width: 500px;
}

/* =========================================================================
   Code Block / API
   ========================================================================= */

.code-surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.code-header-dots {
  display: flex;
  gap: 6px;
}

.code-header-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-3);
  opacity: 0.3;
}

.code-header-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

.code-body {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--text-2);
}

.code-body .kw { color: #7EC8E3; }
.code-body .str { color: var(--green-bright); }
.code-body .cmt { color: var(--text-3); }
.code-body .val { color: var(--amber); }

.response-surface {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  background: rgba(58, 133, 72, 0.03);
}

.response-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.response-body {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-2);
}

.response-body .highlight {
  color: var(--green);
  font-weight: 500;
}

/* =========================================================================
   Trust grid
   ========================================================================= */

.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.trust-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.trust-card-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-3);
  margin-bottom: 10px;
}

.trust-card-value {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
}

.trust-card-value.muted {
  color: var(--text-2);
}

/* =========================================================================
   Scope 3 context row
   ========================================================================= */

.scope3-context {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.scope3-item {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.scope3-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--green);
  margin-bottom: 6px;
}

.scope3-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

/* =========================================================================
   Persona grid
   ========================================================================= */

.persona-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.persona-card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.3s;
}

.persona-card:hover {
  border-color: var(--border-bright);
}

.persona-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.persona-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
}

/* =========================================================================
   Footer
   ========================================================================= */

.footer {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 3px;
}

.footer-sub {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 24px;
  font-size: 12px;
}

/* =========================================================================
   Animations
   ========================================================================= */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fade-up 0.6s ease-out forwards;
  opacity: 0;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

.text-green { color: var(--green-bright); }

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 768px) {
  .hero-content { padding: 100px 24px 60px; }
  .hero-headline { font-size: 32px; }
  .hero-cards { grid-template-columns: 1fr; }
  .content { padding: 0 24px 80px; }
  .comparison { grid-template-columns: 1fr; }
  .comparison-vs { display: none; }
  .trust-grid { grid-template-columns: 1fr; }
  .nav-dark { padding: 12px 24px; }
  .nav-links { gap: 16px; }
}

/* =========================================================================
   Shared utility classes (used by console too)
   ========================================================================= */

.mono { font-family: var(--font-mono); }

/* Cost surface table (used in console dashboard) */
.cost-surface {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}

.cost-surface table { width: 100%; border-collapse: collapse; }

.cost-surface thead th {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  padding: 12px 16px;
  text-align: left;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.cost-surface tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 13px;
  white-space: nowrap;
}

.cost-surface tbody tr:hover { background: var(--green-glow); }
.cost-surface tbody tr:last-child td { border-bottom: none; }

.cost-surface .zone-name { font-weight: 600; }
.cost-surface .zone-sub { font-size: 11px; color: var(--text-3); }

.carbon-bar { display: inline-flex; align-items: center; gap: 6px; }
.carbon-bar-fill { height: 4px; border-radius: 2px; min-width: 4px; max-width: 80px; }

.source-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  padding: 2px 6px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 3px;
}
.source-tag.live { color: var(--green); border-color: var(--border); }

.row-greenest { background: rgba(58, 133, 72, 0.06); }

/* GPU grid (used in console) */
.gpu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.gpu-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.gpu-card:hover { border-color: var(--border-bright); }
.gpu-card-model { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.gpu-card-count { font-family: var(--font-mono); font-size: 20px; color: var(--green); }
.gpu-card-meta { font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* GPU Launcher (used in console) */
.launch-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.launch-form { padding: 24px; }

.launch-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.launch-field { display: flex; flex-direction: column; min-width: 140px; flex: 1; }

.launch-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 6px;
}

.launch-select,
.launch-input {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  padding: 10px 12px;
  appearance: none;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.launch-select:focus,
.launch-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px var(--green-glow);
}

.launch-select {
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%235A5549' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.launch-select option { background: var(--surface); color: var(--text); }

.launch-btn {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.launch-btn:hover { border-color: var(--text-3); color: var(--text); }

.launch-btn-green { background: var(--green); border-color: var(--green); color: white; }
.launch-btn-green:hover { background: #2E6B3A; border-color: #2E6B3A; }
.launch-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.launch-result {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  font-size: 13px;
  display: none;
}

.launch-result.visible { display: block; }

.launch-result-routing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 12px;
}

.launch-result-item { display: flex; flex-direction: column; }

.launch-result-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 2px;
}

.launch-result-value { font-family: var(--font-mono); font-size: 15px; color: var(--text); }
.launch-result-reason { font-size: 12px; color: var(--text-3); line-height: 1.5; }
.launch-result-status { font-family: var(--font-mono); font-size: 13px; padding: 12px 0; }
.launch-result-status.success { color: var(--green); }
.launch-result-status.error { color: var(--coral); }
.launch-result-status.pending { color: var(--amber); }

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 4px var(--green); }
  50% { box-shadow: 0 0 12px var(--green); }
}
.curtailment-pulse { animation: pulse-glow 2s ease-in-out infinite; }
