#content:has(> .hero) { max-width: 1100px; margin-inline: auto; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2.25rem, 6vw, 4.25rem) clamp(1.25rem, 4vw, 3rem) clamp(1.75rem, 4vw, 2.75rem);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
  border-radius: 22px;
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--accent) 11%, var(--bg)) 0%,
    var(--bg) 55%,
    color-mix(in srgb, var(--accent-2) 9%, var(--bg)) 100%);
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(color-mix(in srgb, var(--text) 7%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--text) 7%, transparent) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 25%, transparent 75%);
}
.hero-glow {
  position: absolute;
  inset: -20%;
  z-index: -2;
  background:
    radial-gradient(closest-side at 30% 30%, color-mix(in srgb, #10b981 35%, transparent), transparent),
    radial-gradient(closest-side at 72% 62%, color-mix(in srgb, #14b8a6 28%, transparent), transparent);
  filter: blur(40px);
  opacity: .55;
  animation: glow-drift 16s ease-in-out infinite alternate;
}
@keyframes glow-drift {
  from { transform: translate(-4%, -3%) scale(1); }
  to   { transform: translate(5%, 4%) scale(1.08); }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  padding: .35rem .85rem;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(6px);
  color: var(--text);
  font-size: .85rem;
  font-weight: 500;
}
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .6);
  animation: live-pulse 1.8s ease-out infinite;
}
@keyframes live-pulse {
  70%  { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-title {
  margin: .45em 0 .3em;
  font-size: clamp(2.7rem, 7.5vw, 5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.035em;
}
.hero-grad {
  background: linear-gradient(90deg, #059669, #0d9488, #16a34a, #059669);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 7s linear infinite;
}
@media (prefers-color-scheme: dark) {
  .hero-grad { background-image: linear-gradient(90deg, #34d399, #2dd4bf, #4ade80, #34d399); }
}
@keyframes shimmer { to { background-position: 300% 0; } }

.hero-sub {
  max-width: 60ch;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  line-height: 1.55;
}
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.75rem; }
.hero-btn {
  display: inline-block;
  padding: .8rem 1.45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.hero-btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.hero-btn-primary {
  border-color: transparent;
  background: var(--grad-accent);
  color: var(--on-accent);
  box-shadow: 0 10px 28px -10px color-mix(in srgb, var(--accent) 85%, transparent);
}
.hero-btn-primary:hover { box-shadow: 0 14px 34px -10px color-mix(in srgb, var(--accent) 95%, transparent); }

.rung-demo {
  --wire: #3b4654;
  --power: #22c55e;
  --spark: #dcfce7;
  --stop: #f87171;
  --label: #d1d5db;
  --mn: #64748b;
  --loop: 9s;
  margin: 2.5rem auto 0;
  max-width: 820px;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, .28);
  border-radius: 14px;
  background: linear-gradient(180deg, #0e1a16, #070d0b);
  box-shadow: 0 32px 64px -34px rgba(5, 150, 105, .7), inset 0 1px 0 rgba(255, 255, 255, .04);
  text-align: left;
}
.rung-chrome {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .55rem .9rem;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  background: rgba(255, 255, 255, .025);
  color: #94a3b8;
  font: 12px/1 ui-monospace, Menlo, monospace;
}
.chrome-dots { display: flex; gap: 6px; }
.chrome-dots i { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; opacity: .75; }
.chrome-dots i:nth-child(2) { background: #f59e0b; }
.chrome-dots i:nth-child(3) { background: #22c55e; }
.chrome-motor { display: flex; align-items: center; gap: .35rem; margin-left: auto; animation: motor-text var(--loop) infinite; }
.chrome-motor .gear { transform-box: fill-box; transform-origin: center; animation: gear-spin var(--loop) infinite; }
.chrome-run {
  display: flex; align-items: center; gap: .35rem;
  padding: .2rem .5rem;
  border-radius: 4px;
  background: rgba(34, 197, 94, .14);
  color: #4ade80;
  font-weight: 700;
  letter-spacing: .06em;
}
.chrome-run i { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }

.rung-svg { display: block; width: 100%; height: auto; padding: .35rem 0 0; }
.rung-svg .rail { stroke: var(--wire); stroke-width: 4; stroke-linecap: round; }
.rung-svg .rail-live { stroke: var(--power); filter: drop-shadow(0 0 4px rgba(34, 197, 94, .6)); }
.rung-svg .wire { fill: none; stroke: var(--wire); stroke-width: 3; stroke-linecap: round; }
.rung-svg .pwr-line {
  fill: none; stroke: var(--power); stroke-width: 3.5; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 0;
  filter: drop-shadow(0 0 3px rgba(34, 197, 94, .7));
}
.rung-svg .pwr-flow {
  fill: none; stroke: var(--spark); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 3 15;
  animation: current .55s linear infinite;
}
@keyframes current { from { stroke-dashoffset: 18; } to { stroke-dashoffset: 0; } }

.rung-svg .contact { stroke: var(--label); stroke-width: 3.5; stroke-linecap: round; }
.rung-svg .contact.slash { stroke-width: 2.5; }
.rung-svg .contact-fill { fill: var(--power); opacity: 0; }
.rung-svg .coil { fill: none; stroke: var(--label); stroke-width: 3.5; stroke-linecap: round; }
.rung-svg .coil-glow { fill: var(--power); opacity: 0; }
.rung-svg text { text-anchor: middle; font-family: system-ui, sans-serif; }
.rung-svg .tag { fill: var(--label); font-size: 15px; font-weight: 600; }
.rung-svg .mnemonic { fill: var(--mn); font: 11px ui-monospace, Menlo, monospace; letter-spacing: .08em; }

.pwr-1 { opacity: 1; }
.pwr-2 { animation: on-2 var(--loop) infinite; }
.pwr-3 { animation: on-3 var(--loop) infinite; }
.pwr-4 { animation: on-4 var(--loop) infinite; }
.pwr-2 .pwr-line { animation: draw-2 var(--loop) infinite; }
.pwr-3 .pwr-line { animation: draw-3 var(--loop) infinite; }
.pwr-4 .pwr-line { animation: draw-4 var(--loop) infinite; }
.pwr-2 .pwr-flow { animation: current .55s linear infinite, flow-2 var(--loop) infinite; }
.pwr-3 .pwr-flow { animation: current .55s linear infinite, flow-3 var(--loop) infinite; }
.pwr-4 .pwr-flow { animation: current .55s linear infinite, flow-4 var(--loop) infinite; }

@keyframes on-2 { 0%, 12.4% { opacity: 0; } 12.5%, 92% { opacity: 1; } 92.5%, 100% { opacity: 0; } }
@keyframes on-3 { 0%, 22.9% { opacity: 0; } 23%, 72.4% { opacity: 1; } 72.5%, 100% { opacity: 0; } }
@keyframes on-4 { 0%, 36.9% { opacity: 0; } 37%, 72.4% { opacity: 1; } 72.5%, 100% { opacity: 0; } }
@keyframes draw-2 { 0%, 12.5% { stroke-dashoffset: 1; } 22%, 100% { stroke-dashoffset: 0; } }
@keyframes draw-3 { 0%, 23% { stroke-dashoffset: 1; } 36%, 100% { stroke-dashoffset: 0; } }
@keyframes draw-4 { 0%, 37% { stroke-dashoffset: 1; } 41%, 100% { stroke-dashoffset: 0; } }
@keyframes flow-2 { 0%, 21.9% { opacity: 0; } 22%, 92% { opacity: 1; } 92.5%, 100% { opacity: 0; } }
@keyframes flow-3 { 0%, 35.9% { opacity: 0; } 36%, 72.4% { opacity: 1; } 72.5%, 100% { opacity: 0; } }
@keyframes flow-4 { 0%, 40.9% { opacity: 0; } 41%, 72.4% { opacity: 1; } 72.5%, 100% { opacity: 0; } }

.xic .contact, .xic .tag { animation: xic-on var(--loop) infinite; }
.xic .contact-fill { animation: xic-fill var(--loop) infinite; }
@keyframes xic-on {
  0%, 12.4%, 92.5%, 100% { stroke: var(--label); fill: var(--label); }
  12.5%, 92% { stroke: var(--power); fill: var(--power); }
}
@keyframes xic-fill { 0%, 12.4%, 92.5%, 100% { opacity: 0; } 12.5%, 92% { opacity: .22; } }

.xio .contact, .xio .tag { animation: xio-state var(--loop) infinite; }
.xio .contact-fill { animation: xio-fill var(--loop) infinite; }
@keyframes xio-state {
  0%, 21.9%, 92.5%, 100% { stroke: var(--label); fill: var(--label); }
  22%, 72.4% { stroke: var(--power); fill: var(--power); }
  72.5%, 92% { stroke: var(--stop); fill: var(--stop); }
}
@keyframes xio-fill {
  0%, 21.9%, 92.5%, 100% { opacity: 0; fill: var(--power); }
  22%, 72.4% { opacity: .22; fill: var(--power); }
  72.5%, 92% { opacity: .2; fill: var(--stop); }
}

.ote .coil, .ote .tag { animation: coil-on var(--loop) infinite; }
.ote .coil-glow { animation: coil-glow var(--loop) infinite; }
@keyframes coil-on {
  0%, 36.9%, 72.5%, 100% { stroke: var(--label); fill: var(--label); }
  37%, 72.4% { stroke: var(--power); fill: var(--power); }
}
@keyframes coil-glow {
  0%, 36.9%, 72.5%, 100% { opacity: 0; }
  37% { opacity: .5; } 46% { opacity: .25; } 55% { opacity: .5; } 64% { opacity: .25; } 72.4% { opacity: .45; }
}
@keyframes motor-text { 0%, 36.9%, 72.5%, 100% { color: #64748b; } 37%, 72.4% { color: #4ade80; } }
@keyframes gear-spin {
  0%, 37% { transform: rotate(0deg); }
  72.5%, 100% { transform: rotate(1080deg); }
}

.rung-caption {
  display: grid;
  padding: .55rem 1.1rem 1rem;
  color: #a7f3d0;
  font-size: .95rem;
}
.cap { grid-area: 1 / 1; display: flex; align-items: center; gap: .55rem; opacity: 0; }
.cap b {
  display: inline-grid; place-items: center;
  width: 1.4rem; height: 1.4rem; flex: none;
  border-radius: 50%;
  background: rgba(52, 211, 153, .18);
  color: #6ee7b7;
  font-size: .75rem;
}
.cap code { padding: .05em .35em; border-radius: 4px; background: rgba(52, 211, 153, .12); color: #6ee7b7; font-size: .9em; }
.cap-1 { animation: cap-1 var(--loop) infinite; }
.cap-2 { animation: cap-2 var(--loop) infinite; }
.cap-3 { animation: cap-3 var(--loop) infinite; }
.cap-4 { animation: cap-4 var(--loop) infinite; }
@keyframes cap-1 { 0%, 11.5% { opacity: 1; } 12.5%, 92% { opacity: 0; } 93%, 100% { opacity: 1; } }
@keyframes cap-2 { 0%, 12% { opacity: 0; } 13%, 36% { opacity: 1; } 37%, 100% { opacity: 0; } }
@keyframes cap-3 { 0%, 36.5% { opacity: 0; } 37.5%, 71.5% { opacity: 1; } 72.5%, 100% { opacity: 0; } }
@keyframes cap-4 { 0%, 72% { opacity: 0; } 73%, 91.5% { opacity: 1; } 92.5%, 100% { opacity: 0; } }

.home-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.feature {
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(170deg, color-mix(in srgb, var(--accent) 7%, var(--bg)), var(--bg) 60%);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.feature:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 18px 36px -24px color-mix(in srgb, var(--accent) 80%, transparent);
}
.feature-icon {
  display: inline-grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--grad-accent);
  color: var(--on-accent);
  font: 700 1.05rem ui-monospace, Menlo, monospace;
  white-space: pre;
}
.feature h3 { margin: .85rem 0 .4rem; font-size: 1.08rem; }
.feature p { margin: 0; color: var(--muted); line-height: 1.55; font-size: .95rem; }

.home-cta {
  margin: 0 0 2rem;
  padding: 2.5rem 1.25rem;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  border-radius: 20px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 12%, var(--bg)), color-mix(in srgb, var(--accent-2) 6%, var(--bg)));
  text-align: center;
}
#content .home-cta h2 { margin: 0 0 .4rem; font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: -.02em; }
.home-cta > p { margin: 0 auto 1.25rem; max-width: 52ch; color: var(--muted); }
.home-cta .home-cta-links { margin: 1rem auto 0; font-size: .9rem; }

@media (prefers-reduced-motion: reduce) {
  .hero-glow, .hero-grad, .live-dot, .chrome-run i, .chrome-motor, .chrome-motor .gear,
  .rung-demo *, .feature, .hero-btn { animation: none !important; transition: none !important; }
  .pwr-2, .pwr-3, .pwr-4 { opacity: 1; }
  .rung-svg .pwr-flow { opacity: 0; }
  .xic .contact, .xic .tag, .xio .contact, .xio .tag, .ote .coil, .ote .tag { stroke: var(--power); fill: var(--power); }
  .ote .coil-glow { opacity: .4; }
  .cap-3 { opacity: 1; }
  .chrome-motor { color: #4ade80; }
}

@media (max-width: 560px) {
  .chrome-title { display: none; }
  .rung-caption { font-size: .85rem; }
}

.home-learn { max-width: 800px; margin: 3rem auto; }
.home-learn h2 { margin-bottom: .5rem; }
