.home-hero {
  padding: 3.5rem 0 2rem;
  overflow: hidden;
}

.home-hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.home-hero-copy {
  animation: fadeUp 0.6s ease-out;
}

.home-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(219, 176, 48, 0.14);
  color: var(--accent);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  border: none;
}

.home-hero h1 {
  font-size: clamp(2.5rem, 4.3vw, 4.2rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
  max-width: none;
}

.home-hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.home-hero-line {
  display: block;
}

.home-hero-line-primary {
  white-space: nowrap;
}

.home-hero-copy > p {
  font-size: 1.08rem;
  max-width: 29rem;
  margin-bottom: 1.25rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.home-hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.home-benchmark-summary {
  max-width: 36rem;
  padding: 0.95rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--bg-secondary) 96%, transparent);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.home-benchmark-summary a {
  color: var(--gold-300);
}

.home-hero-visual {
  position: relative;
  padding-right: 3.25rem;
  animation: fadeUp 0.6s ease-out 0.15s both;
}

.home-hero-frame {
  background: linear-gradient(145deg, var(--forest-900) 0%, var(--forest-700) 100%);
  border-radius: 20px;
  aspect-ratio: 5 / 4;
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 60px color-mix(in srgb, var(--bg-primary) 72%, transparent);
  border: 1px solid var(--border);
  z-index: 2;
}

.home-hero-frame::before {
  content: "";
  position: absolute;
  top: -45%;
  right: -28%;
  width: 72%;
  height: 72%;
  background: radial-gradient(circle, rgba(219, 176, 48, 0.2) 0%, transparent 72%);
  z-index: 0;
}

.home-hero-board {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.1rem;
}

.home-hero-board-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
  background: var(--forest-800);
}

.home-hero-board-title {
  margin-left: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.home-hero-board-body {
  flex: 1;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--forest-900);
}

/* Live indicator */
.bench-live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.65rem;
  font-weight: 800;
  color: #68b984;
  letter-spacing: 0.06em;
}

.bench-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #68b984;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(104, 185, 132, 0.5); }
  50% { opacity: 0.5; box-shadow: 0 0 8px 3px rgba(104, 185, 132, 0.35); }
}

/* Metric groups */
.bench-metric + .bench-metric {
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.6rem;
}

.bench-metric-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.bench-metric-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.bench-unit {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.7;
}

.bench-metric-badge {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.bench-badge-good {
  background: rgba(219, 176, 48, 0.18);
  color: var(--gold-300);
}

.bench-badge-bad {
  background: rgba(210, 90, 80, 0.18);
  color: #e07a70;
}

/* Bar rows */
.bench-bar {
  display: grid;
  grid-template-columns: 3.8rem minmax(0, 1fr) 7.25rem;
  gap: 0.5rem;
  align-items: center;
  height: 1.6rem;
}

.bench-bar-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.bench-name-muted {
  color: var(--text-muted);
}

.bench-bar-track {
  height: 100%;
  background: var(--forest-800);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.bench-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.bench-vis-active .bench-bar-fill {
  width: max(var(--pct), 5%);
}

.bench-metric:nth-child(2) .bench-bar-fill { transition-delay: 0.2s; }
.bench-metric:nth-child(3) .bench-bar-fill { transition-delay: 0.4s; }

.bench-fill-good {
  background: linear-gradient(90deg, var(--gold-600) 0%, var(--gold-400) 100%);
  box-shadow: 0 0 8px rgba(219, 176, 48, 0.3);
}

.bench-fill-bad {
  background: linear-gradient(90deg, #8a3a34 0%, #d26a5d 100%);
  box-shadow: 0 0 6px rgba(210, 106, 93, 0.2);
}

.bench-bar-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
  white-space: nowrap;
  min-width: 7.25rem;
}

.bench-val-muted {
  color: var(--text-muted);
}

.home-hero-peeker {
  position: absolute;
  right: calc(-1.65rem + 1px);
  bottom: calc(1.1rem + 1px);
  width: clamp(5.2rem, 13.5vw, 6rem);
  z-index: 4;
  pointer-events: none;
}

.home-hero-peeker img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 1.2rem 1.8rem rgba(0, 0, 0, 0.45));
}

@media (max-width: 1149px) {
  .home-hero-visual {
    padding-right: 0;
  }

  .home-hero-peeker {
    display: none;
  }
}

.home-hero .hero-install {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 1rem;
  width: min(100%, 43rem);
  padding: 0.85rem 1.15rem;
  background: color-mix(in srgb, var(--forest-900) 78%, var(--forest-800) 22%);
  border: 1px solid color-mix(in srgb, var(--forest-500) 45%, var(--forest-700) 55%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.home-hero .hero-install code {
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  font-size: clamp(0.74rem, 0.88vw, 0.92rem);
}

.hero-install-prompt {
  color: var(--forest-200);
}

.hero-install-copy {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--forest-500) 70%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--gold-100);
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.hero-install-copy svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hero-install-copy:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: color-mix(in srgb, var(--accent) 48%, var(--forest-500) 52%);
}

.hero-install-copy.is-copied {
  background: color-mix(in srgb, var(--forest-300) 22%, transparent);
  border-color: color-mix(in srgb, var(--forest-200) 38%, var(--forest-500) 62%);
  color: var(--forest-100);
}

.home-feature-cards {
  padding: 5rem 0;
}

.home-feature-cards .section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.home-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.home-card {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.home-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.home-card:hover::before {
  transform: scaleX(1);
}

.home-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 40px color-mix(in srgb, var(--bg-primary) 78%, transparent);
}

.home-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.home-card p {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.home-proof-strip {
  padding: 2rem 0;
}

.home-proof-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.home-proof-group {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 1.25rem;
  border: 1px solid var(--border);
}

.home-proof-group-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

.home-proof-group-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.home-proof-item {
  background: var(--bg-surface);
  border-radius: 12px;
  padding: 1.5rem 1.25rem;
  border: 1px solid var(--border-subtle);
  text-align: center;
}

.home-proof-number {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.home-proof-number span {
  color: var(--accent);
}

.home-proof-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-wrap: balance;
}

.home-migration {
  padding: 5rem 0;
}

.home-migration .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.home-migration-content h2 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.home-migration-content > p {
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.home-migration-steps {
  list-style: none;
  counter-reset: step;
}

.home-migration-steps li {
  counter-increment: step;
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.home-migration-steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-step-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.home-step-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.home-step-content code {
  display: inline-block;
  background: var(--bg-surface);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-primary);
  margin-top: 0.25rem;
  border: 1px solid var(--border);
}

.home-migration-visual {
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.home-migration-header {
  background: var(--forest-800);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.home-migration-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.home-migration-body .comment { color: var(--text-muted); }
.home-migration-body .old { color: #d26a5d; text-decoration: line-through; opacity: 0.7; }
.home-migration-body .new { color: #6eb28c; font-weight: 600; }
.home-migration-body .key { color: var(--text-primary); }

.home-source {
  padding: 5rem 0;
}

.home-source-box {
  background: linear-gradient(160deg, var(--forest-900) 0%, var(--forest-800) 100%);
  border-radius: 24px;
  padding: 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
}

.home-source-box::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(219, 176, 48, 0.12) 0%, transparent 70%);
}

.home-source-content,
.home-source-stats {
  position: relative;
  z-index: 1;
}

.home-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(219, 176, 48, 0.14);
  color: var(--accent);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.home-source-content h2 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.02;
}

.home-source-content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.home-source-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.home-source-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.home-source-stat {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.home-source-stat-number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.home-source-stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  display: inline-block;
}

.dot.red { background: #ff6f61; }
.dot.yellow { background: #e4b830; }
.dot.green { background: #68b984; }

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .home-hero .container,
  .home-migration .container,
  .home-source-box {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .home-cards-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-proof-grid,
  .home-source-stats {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .home-hero {
    padding: 3rem 0 2rem;
  }

  .home-cards-grid,
  .home-proof-grid,
  .home-source-stats {
    grid-template-columns: 1fr;
  }

  .bench-bar {
    grid-template-columns: 3rem minmax(0, 1fr) 5.6rem;
  }

  .bench-bar-val {
    min-width: 5.6rem;
    font-size: 0.65rem;
  }

  .bench-bar-name {
    font-size: 0.62rem;
  }

  .home-hero-visual {
    padding-bottom: 0;
  }

  .home-hero .hero-install {
    width: 100%;
    grid-template-columns: auto 1fr;
  }

  .hero-install-copy {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .home-hero-actions,
  .home-source-actions {
    flex-direction: column;
  }

  .home-hero-actions .btn,
  .home-source-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .home-source-box {
    padding: 2rem;
  }
}

@media (max-width: 440px) {
  .home-hero {
    padding: 2.5rem 0 1.75rem;
  }

  .home-hero .container {
    gap: 1.5rem;
  }

  .home-hero h1 {
    font-size: clamp(2.15rem, 11vw, 3rem);
    letter-spacing: -0.05em;
  }

  .home-hero-copy > p {
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
  }

  .home-hero-actions {
    gap: 0.75rem;
  }

  .home-hero-frame {
    aspect-ratio: 1 / 1.04;
  }

  .home-hero-board {
    padding: 0.9rem;
  }

  .home-hero-board-header {
    padding: 0.65rem 0.75rem;
  }

  .home-hero-board-body {
    padding: 0.85rem 0.9rem;
  }

  .bench-live {
    font-size: 0.58rem;
  }

  .bench-metric-label {
    font-size: 0.68rem;
  }

  .bench-metric-badge {
    font-size: 0.56rem;
  }

  .bench-bar {
    grid-template-columns: 2.8rem minmax(0, 1fr) 4.9rem;
    gap: 0.35rem;
  }

  .bench-bar-val {
    min-width: 4.9rem;
    font-size: 0.62rem;
  }

  .home-hero .hero-install {
    row-gap: 0.75rem;
    padding: 0.8rem 0.95rem;
  }

  .home-hero .hero-install code {
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: 0.7rem;
    line-height: 1.45;
  }

  .hero-install-copy {
    width: 2.75rem;
    height: 2.75rem;
  }

  .home-proof-group,
  .home-card,
  .home-proof-item,
  .home-source-stat {
    padding: 1.15rem;
  }

  .home-proof-number {
    font-size: 2.1rem;
  }

  .home-migration,
  .home-source {
    padding: 4rem 0;
  }

  .home-source-box {
    padding: 1.5rem;
    gap: 2rem;
  }
}
