.hero-shell {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  padding: 0 !important;
  background: #08080d;
}
.hero-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(128, 128, 128, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(128, 128, 128, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
}

@media (max-width: 760px) {
  .hero-visual-layer {
    display: none;
  }
  .hero-status-corner {
    display: none;
  }
  .hero-copy {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .hero-shell { min-height: 360px; }
}
.hero-visual-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero-visual-layer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(8, 8, 13, 0.82) 0%,
    rgba(8, 8, 13, 0.60) 25%,
    rgba(8, 8, 13, 0.20) 50%,
    rgba(8, 8, 13, 0.00) 65%
  );
  pointer-events: none;
  z-index: 1;
}
#aw-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: auto;
  display: block;
  width: 100%;
  height: 100%;
}
.hero-copy {
  position: relative;
  z-index: 3;
  padding: var(--space-6) var(--space-4);
  max-width: 50vw;
  width: min(60%, 55vw);
  text-align: left;
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.08;
  margin: 0 0 var(--space-3);
}
.hero-copy .section-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.4rem;
  margin-bottom: var(--space-3);
  line-height: 1;
}
.hero-title,
.hero-subtitle {
  transition: opacity 400ms ease-in-out;
}
.hero-title.fading,
.hero-subtitle.fading {
  opacity: 0;
}
.hero-title.fading-in,
.hero-subtitle.fading-in {
  opacity: 1;
  transition: opacity 600ms ease-in-out;
}
.hero-subtitle,
.hero-grounding {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: inherit;
}
.hero-subtitle {
  margin-bottom: var(--space-5);
}
.hero-grounding {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: calc(-1 * var(--space-1));
  margin-bottom: var(--space-4);
}
.hero-status-corner {
  position: absolute;
  z-index: 4;
  right: var(--space-4);
  bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.6);
}
.aw-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-3);
}
.aw-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a3a3a;
  flex-shrink: 0;
  transition: background 0.6s ease;
  position: relative;
}
.aw-status-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: 0;
  animation: aw-pulse 2.2s ease-out infinite;
}
@keyframes aw-pulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(2.4); opacity: 0; }
}
.aw-status-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.08em;
  transition: color 0.4s ease;
}
.platform-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-2) 0 var(--space-4);
  align-items: center;
}
.platform-card {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.45rem 0.85rem;
  border: 1px solid #000000;
  background: #8f8f8f;
  color: #000000;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.16s ease, filter 0.16s ease;
}
.platform-card:hover,
.platform-card:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.04);
}
.platform-card:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}
.platform-card-linux {
  background: #eeff55;
}
.platform-card-coming::after {
  content: attr(data-hover-text);
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  padding: 0.3rem 0.45rem;
  border: 1px solid #000000;
  background: #eeff55;
  color: #000000;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}
.platform-card-coming:hover::after,
.platform-card-coming:focus-visible::after {
  opacity: 1;
}
.cta-row {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

@media (max-width: 640px) {
  .hero-shell {
    min-height: 360px;
  }
  .hero-copy {
    width: 100%;
    max-width: 100%;
    padding: var(--space-4) var(--space-3);
  }
  .hero-title {
    font-size: clamp(2rem, 8vw, 3.6rem);
  }
  .hero-subtitle,
  .hero-grounding {
    margin-left: 0;
  }
  .cta-row {
    width: 100%;
    justify-content: stretch;
  }
  .cta-row .button {
    width: 100%;
    text-align: center;
  }
}

/*
 * Light-theme hero pin: keep hero copy/light elements on dark values
 * regardless of the rest of the page switching to light mode.
 */
html[data-theme="light"] .hero-shell {
  --ink: #f1f2f4;
  --ink-soft: #d0d6de;
  --text-primary: #f1f2f4;
  --text-secondary: #d0d6de;
  --text-accent: #eeff55;
  --action-bg: #000000;
  --action-fg: #eeff55;
  --action-bg-alt: #eeff55;
  --action-fg-alt: #000000;
  --action-hover: #141414;
  --border-default: #4a515c;
  --link-color: #eeff55;
}

html[data-theme="light"] .hero-shell,
html[data-theme="light"] .hero-title,
html[data-theme="light"] .hero-subtitle,
html[data-theme="light"] .hero-grounding {
  color: #f1f2f4;
}

html[data-theme="light"] .hero-shell .section-label {
  background: #eeff55;
  color: #000000;
  border-color: #eeff55;
}

html[data-theme="light"] .hero-shell .button {
  background: #000000;
  color: #eeff55;
  border-color: #4a515c;
}

html[data-theme="light"] .hero-shell .button:hover,
html[data-theme="light"] .hero-shell .button:focus-visible {
  background: #141414;
  border-color: #eeff55;
}

html[data-theme="light"] .hero-shell .button.secondary {
  background: #eeff55;
  color: #000000;
  border-color: #eeff55;
}

html[data-theme="light"] .hero-shell .button.secondary:hover,
html[data-theme="light"] .hero-shell .button.secondary:focus-visible {
  background: #e1f241;
  color: #000000;
}

@media (max-width: 768px) {
  .hero-status-corner {
    display: none;
  }
  .hero-visual-layer::after {
    background: linear-gradient(
      to bottom,
      rgba(8, 8, 13, 0.85) 0%,
      rgba(8, 8, 13, 0.60) 40%,
      rgba(8, 8, 13, 0.00) 70%
    );
  }
}

/* ── Intermediate viewport: canvas bleeds over copy ─────────────────────────
   Between 760px (art disappears) and ~1000px the instrument can grow large
   enough to overlap the left-column copy. Keep the dark cover extended and
   tighten copy width to maintain a clear buffer.
   ─────────────────────────────────────────────────────────────────────────── */
@media (min-width: 761px) and (max-width: 1000px) {
  .hero-visual-layer::after {
    background: linear-gradient(
      to right,
      rgba(8, 8, 13, 0.96) 0%,
      rgba(8, 8, 13, 0.90) 30%,
      rgba(8, 8, 13, 0.70) 45%,
      rgba(8, 8, 13, 0.20) 60%,
      rgba(8, 8, 13, 0.00) 72%
    );
  }

  .hero-copy {
    max-width: 48vw;
    width: min(52%, 48vw);
  }
}
