/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep:    #0d1f1a;
  --bg-mid:     #0a1f18;
  --bg-card:    #112821;
  --bg-card-alt:#0e2320;
  --fg-primary: #f0faf5;
  --fg-muted:   #7aa98e;
  --fg-dim:     #3d6b54;
  --accent:     #d4a847;
  --accent-dim: #a88838;
  --positive:   #4ade80;
  --border:     rgba(74, 222, 128, 0.12);
  --border-mid: rgba(74, 222, 128, 0.06);
  --font-head:  'Space Grotesk', system-ui, sans-serif;
  --font-body:  'DM Sans', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

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

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 31, 26, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-mid);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--fg-primary);
  text-decoration: none;
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

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

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

/* === HERO === */
.hero {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  background: var(--bg-deep);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% 50%, rgba(74, 222, 128, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  width: 100%;
}

.hero-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(212, 168, 71, 0.12);
  border: 1px solid rgba(212, 168, 71, 0.25);
  padding: 5px 10px;
  border-radius: 4px;
  margin-bottom: 24px;
}

.hero-headline {
  font-family: var(--font-head);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -1.5px;
  color: var(--fg-primary);
  margin-bottom: 24px;
}

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

.hero-stats {
  display: flex;
  gap: 32px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  color: var(--fg-primary);
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 12px;
  color: var(--fg-dim);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* === PORTFOLIO WIDGET === */
.portfolio-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 0 60px rgba(74, 222, 128, 0.06), 0 24px 48px rgba(0,0,0,0.4);
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.widget-title {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
}

.widget-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--positive);
  background: rgba(74, 222, 128, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
}

.widget-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--positive);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.widget-total {
  border-bottom: 1px solid var(--border-mid);
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.widget-total .widget-label {
  display: block;
  font-size: 12px;
  color: var(--fg-dim);
  margin-bottom: 4px;
}

.widget-total .widget-value {
  display: block;
  font-family: var(--font-head);
  font-size: 32px;
  font-weight: 700;
  color: var(--fg-primary);
  letter-spacing: -0.5px;
}

.widget-total .widget-change {
  display: block;
  font-size: 13px;
  color: var(--positive);
  font-weight: 500;
  margin-top: 4px;
}

.widget-allocation {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.alloc-row {
  display: grid;
  grid-template-columns: 1fr 80px 40px;
  align-items: center;
  gap: 10px;
}

.alloc-name {
  font-size: 12px;
  color: var(--fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alloc-bar {
  height: 4px;
  background: linear-gradient(90deg, rgba(74,222,128,0.3), rgba(74,222,128,0.1));
  border-radius: 2px;
  width: var(--w);
}

.alloc-pct {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-primary);
  text-align: right;
}

.widget-apy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(212, 168, 71, 0.08);
  border: 1px solid rgba(212, 168, 71, 0.2);
  border-radius: 10px;
  padding: 14px 18px;
}

.apy-label {
  font-size: 12px;
  color: var(--fg-muted);
}

.apy-value {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

/* === LIVE FEED === */
.live-feed {
  background: var(--bg-mid);
  border-top: 1px solid var(--border-mid);
  border-bottom: 1px solid var(--border-mid);
  padding: 40px 32px;
}

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

.feed-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 24px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--positive);
  animation: pulse 2s infinite;
}

.feed-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: 10px;
  padding: 16px;
}

.feed-time {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-dim);
  font-family: var(--font-head);
  white-space: nowrap;
  margin-top: 2px;
}

.feed-text {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.5;
}

/* === MECHANICS === */
.mechanics {
  padding: 100px 32px;
  background: var(--bg-deep);
}

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

.section-heading {
  font-family: var(--font-head);
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--fg-primary);
  margin-bottom: 12px;
}

.section-sub {
  font-size: 16px;
  color: var(--fg-muted);
  max-width: 540px;
  margin-bottom: 64px;
}

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

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 40px 32px;
  position: relative;
}

.step-card:first-child { border-radius: 12px 0 0 12px; }
.step-card:last-child { border-radius: 0 12px 12px 0; }

.step-num {
  font-family: var(--font-head);
  font-size: 48px;
  font-weight: 700;
  color: rgba(74, 222, 128, 0.12);
  margin-bottom: 20px;
  letter-spacing: -2px;
}

.step-card h3 {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 600;
  color: var(--fg-primary);
  margin-bottom: 12px;
}

.step-card p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.7;
}

/* === CAPABILITIES === */
.capabilities {
  padding: 100px 32px;
  background: var(--bg-mid);
}

.capabilities-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.cap-col .section-heading {
  margin-bottom: 12px;
}

.cap-col .section-sub {
  margin-bottom: 40px;
}

.cap-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.cap-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.cap-icon {
  font-size: 10px;
  color: var(--positive);
  margin-top: 4px;
  flex-shrink: 0;
}

.cap-icon-warn { color: var(--accent); }

.cap-list li strong {
  display: block;
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-primary);
  margin-bottom: 4px;
}

.cap-list li p {
  font-size: 13px;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* === CLOSING === */
.closing {
  padding: 100px 32px;
  background: var(--bg-deep);
}

.closing-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 80px;
  align-items: start;
}

.closing-quote {
  border-left: 3px solid var(--accent);
  padding-left: 28px;
}

.closing-quote p {
  font-family: var(--font-head);
  font-size: 20px;
  font-style: italic;
  color: var(--fg-muted);
  line-height: 1.6;
}

.closing-body h2 {
  font-family: var(--font-head);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.8px;
  color: var(--fg-primary);
  margin-bottom: 20px;
}

.closing-body p {
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.75;
  max-width: 540px;
}

.closing-body p + p { margin-top: 16px; }

/* === FOOTER === */
.site-footer {
  background: var(--bg-mid);
  border-top: 1px solid var(--border-mid);
  padding: 80px 32px 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 64px;
  margin-bottom: 64px;
}

.footer-logo {
  display: block;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--fg-primary);
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--fg-dim);
  line-height: 1.7;
  max-width: 280px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 13px;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--fg-primary); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border-mid);
}

.footer-bottom span {
  font-size: 12px;
  color: var(--fg-dim);
  line-height: 1.6;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding: 60px 24px; gap: 48px; }
  .hero-right { order: -1; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .feed-items { grid-template-columns: 1fr; }
  .step-grid { grid-template-columns: 1fr; }
  .step-card:first-child { border-radius: 12px 12px 0 0; }
  .step-card:last-child { border-radius: 0 0 12px 12px; }
  .capabilities-inner { grid-template-columns: 1fr; gap: 64px; }
  .closing-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .nav-links { display: none; }
}

@media (max-width: 480px) {
  .hero-headline { font-size: 36px; }
  .widget-value { font-size: 24px; }
  .footer-inner { grid-template-columns: 1fr; }
}