/* Hero: a field of points rolling like a sea under the copy, and three live devices — a
   dashboard, a phone and an editor — floating in 3D and turning toward the pointer. */
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 100svh; display: grid; align-items: center; padding-block: 120px 96px; }
#field { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.aurora { position: absolute; z-index: -2; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.aurora.a1 { width: 760px; height: 760px; right: -200px; top: -260px; background: radial-gradient(circle, rgba(106, 0, 255, 0.5), transparent 65%); animation: drift 16s ease-in-out infinite alternate; }
.aurora.a2 { width: 620px; height: 620px; left: -240px; bottom: -280px; background: radial-gradient(circle, rgba(194, 71, 246, 0.3), transparent 65%); animation: drift 20s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(-120px, 90px) scale(1.15); } }

.hero-grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 1080px) { .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; } }
.hero-copy { display: grid; gap: 26px; justify-items: start; min-width: 0; }
.hero-copy > .chip { animation: up 0.9s var(--ease) calc(var(--intro) + 0.2s) both; }
.hero h1 { font-size: var(--h1); font-weight: 750; letter-spacing: -0.05em; line-height: 0.95; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero h1 .word { display: inline-block; animation: rise 1.1s var(--ease) both; animation-delay: calc(var(--intro) + 0.25s + var(--i) * 70ms); }
.hero h1 em.word { animation: rise 1.1s var(--ease) both, sheen 7s ease-in-out infinite; animation-delay: calc(var(--intro) + 0.25s + var(--i) * 70ms), calc(var(--intro) + 1.5s); font-size: 1.08em; }
@keyframes rise { from { transform: translateY(110%) rotate(5deg); } }
@keyframes up { from { opacity: 0; transform: translateY(18px); } }

.rotator-line { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 0.4em; font: 500 clamp(18px, 1.7vw, 24px)/1.3 var(--display); color: var(--muted); animation: up 0.9s var(--ease) calc(var(--intro) + 0.9s) both; }
.rotator { position: relative; display: inline-grid; height: 1.3em; overflow: hidden; color: var(--ink); vertical-align: bottom; }
.rotator span { grid-area: 1 / 1; white-space: nowrap; font-weight: 650; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; transform: translateY(110%); transition: transform 0.7s var(--ease), opacity 0.7s; opacity: 0; }
.rotator span.on { transform: none; opacity: 1; }
.rotator span.off { transform: translateY(-110%); opacity: 0; }
.no-js .rotator span:first-child, .rotator span:only-child { transform: none; opacity: 1; }
.hero .lede { font-size: clamp(16px, 1.25vw, 19px); animation: up 0.9s var(--ease) calc(var(--intro) + 1s) both; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; animation: up 0.9s var(--ease) calc(var(--intro) + 1.1s) both; }

.scroll-cue { position: absolute; left: 50%; bottom: 26px; translate: -50% 0; width: 26px; height: 42px; border-radius: 99px; box-shadow: inset 0 0 0 1.5px var(--line-2); animation: up 1s var(--ease) calc(var(--intro) + 1.6s) both; }
.scroll-cue span { position: absolute; left: 50%; top: 9px; width: 4px; height: 8px; margin-left: -2px; border-radius: 4px; background: var(--orchid); animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel { 60% { transform: translateY(12px); opacity: 0; } 61% { transform: none; opacity: 0; } }
@media (max-height: 700px), (max-width: 1079px) { .scroll-cue { display: none; } }

/* ---------- the rig ---------- */
.rig-stage { position: relative; height: clamp(380px, 44vw, 600px); perspective: 1800px; min-width: 0; }
.rig { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateY(var(--ry, -14deg)) rotateX(var(--rx, 8deg)); transition: transform 0.9s var(--ease); }
.dev { position: absolute; overflow: hidden; border-radius: 18px; background: rgba(16, 13, 26, 0.86); backdrop-filter: blur(18px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 80px 120px -40px rgba(0, 0, 0, 0.9), 0 0 90px -40px rgba(140, 40, 255, 0.6); }
.dev-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding-inline: 14px; border-bottom: 1px solid var(--line); font: 500 11px/1 var(--mono); color: var(--dim); }
.dev-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.dev-bar i:first-child { background: #ff6b8a; } .dev-bar i:nth-child(2) { background: #ffc46b; } .dev-bar i:nth-child(3) { background: #6bffb0; }
.dev-bar span { margin-left: 10px; padding: 5px 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.04); }

.browser { left: 4%; top: 4%; width: 84%; aspect-ratio: 16 / 10.4; transform: translateZ(-60px); animation: fly 1.4s var(--ease) calc(var(--intro) + 0.3s) both, float 9s ease-in-out calc(var(--intro) + 1.7s) infinite; --z: -60px; }
.phone { right: 0; top: 24%; width: 30%; aspect-ratio: 9 / 18.5; border-radius: 30px; padding: 8px; transform: translateZ(90px); animation: fly 1.4s var(--ease) calc(var(--intro) + 0.5s) both, float 7s ease-in-out calc(var(--intro) + 1.9s) infinite; --z: 90px; }
.code { left: 0; bottom: 0; width: 56%; transform: translateZ(140px); animation: fly 1.4s var(--ease) calc(var(--intro) + 0.7s) both, float 8s ease-in-out calc(var(--intro) + 2.1s) infinite reverse; --z: 140px; }
@keyframes fly { from { transform: translateZ(var(--z)) translateY(160px) rotateX(-35deg); opacity: 0; } }
@keyframes float { 50% { transform: translateZ(var(--z)) translateY(-12px); } }

.dev-screen { display: grid; grid-template-columns: 52px 1fr; height: calc(100% - 34px); }
.side { display: grid; align-content: start; gap: 12px; padding: 16px 14px; border-right: 1px solid var(--line); }
.side b { height: 22px; border-radius: 7px; background: rgba(255, 255, 255, 0.05); }
.side b.on { background: var(--grad); box-shadow: 0 0 18px rgba(170, 60, 255, 0.6); }
.board { display: grid; grid-template-rows: auto 1fr auto; gap: 12px; padding: 16px; min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kpis div { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.035); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.kpis small { display: block; font: 500 10px/1 var(--body); color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; }
.kpis strong { display: block; margin-top: 8px; font: 600 clamp(13px, 1.3vw, 19px)/1 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart { position: relative; min-height: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.02); box-shadow: inset 0 0 0 1px var(--line); padding: 10px 0 0; overflow: hidden; }
.chart svg { width: 100%; height: 100%; display: block; }
.chart .line { stroke-dasharray: 420; stroke-dashoffset: 420; animation: draw 2.4s var(--ease) calc(var(--intro) + 1.2s) forwards; filter: drop-shadow(0 0 6px rgba(194, 71, 246, 0.8)); }
.chart .area { opacity: 0; animation: show 1.2s ease calc(var(--intro) + 2s) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes show { to { opacity: 1; } }
.rows { display: grid; gap: 7px; }
.rows span { height: 10px; border-radius: 5px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)); transform-origin: 0 50%; animation: grow 0.9s var(--ease) both; animation-delay: calc(var(--intro) + 1.4s + var(--i) * 0.12s); }
.rows span:nth-child(2) { width: 82%; } .rows span:nth-child(3) { width: 91%; } .rows span:nth-child(4) { width: 64%; }
@keyframes grow { from { transform: scaleX(0); } }

.notch { position: absolute; top: 14px; left: 50%; translate: -50% 0; width: 34%; height: 16px; border-radius: 99px; background: #000; z-index: 2; }
.app { position: relative; height: 100%; overflow: hidden; border-radius: 23px; background: linear-gradient(180deg, #1b1430, #0f0b1a); padding: 38px 10px 10px; display: grid; grid-template-rows: auto 1fr auto; gap: 10px; }
.app-head { display: grid; gap: 3px; padding-inline: 4px; }
.app-head b { font: 650 13px/1.1 var(--display); }
.app-head small { font-size: 10px; color: var(--muted); }
.feed { display: grid; gap: 8px; align-content: start; overflow: hidden; mask-image: linear-gradient(transparent, #000 8%, #000 85%, transparent); }
.feed { animation: feed 8s var(--ease) calc(var(--intro) + 1s) infinite; }
@keyframes feed { 0%, 30% { transform: none; } 45%, 75% { transform: translateY(-62px); } 90%, 100% { transform: none; } }
.card { display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; gap: 5px 8px; align-items: center; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); }
.card i { grid-row: span 2; width: 26px; height: 26px; border-radius: 8px; background: var(--grad); }
.card.c2 i { background: linear-gradient(135deg, #ff7ad9, #c247f6); } .card.c3 i { background: linear-gradient(135deg, #6bffb0, #3ce0d0); }
.card span { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.18); }
.card span.short { width: 55%; background: rgba(255, 255, 255, 0.08); }
.toast { position: absolute; left: 10px; right: 10px; bottom: 50px; padding: 9px 10px; border-radius: 12px; font: 600 10.5px/1 var(--body); color: #0f2a1c; background: #6bffb0; box-shadow: 0 10px 30px -8px rgba(107, 255, 176, 0.7); text-align: center; animation: toast 8s var(--ease) calc(var(--intro) + 2.2s) infinite; opacity: 0; }
@keyframes toast { 0%, 6% { opacity: 0; transform: translateY(20px) scale(0.9); } 12%, 40% { opacity: 1; transform: none; } 48%, 100% { opacity: 0; transform: translateY(20px); } }
.tabs { display: flex; justify-content: space-around; padding: 9px 6px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); }
.tabs i { width: 16px; height: 16px; border-radius: 5px; background: rgba(255, 255, 255, 0.12); }
.tabs i.on { background: var(--grad); }

.code pre { margin: 0; padding: 14px 16px 18px; min-height: 9.6em; font: 500 clamp(10px, 0.95vw, 12.5px)/1.65 var(--mono); color: #d9d3ea; white-space: pre; overflow: hidden; }
.code .k { color: var(--orchid-hi); } .code .f { color: #7fd8ff; } .code .s { color: #6bffb0; } .code .c { color: var(--dim); } .code .p { color: var(--muted); }
.code .caret { display: inline-block; width: 7px; height: 1.1em; margin-left: 1px; vertical-align: -0.2em; background: var(--orchid); animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }

@media (max-width: 640px) {
  .rig-stage { height: 340px; }
  .browser { width: 92%; left: 0; }
  .phone { width: 36%; top: 30%; }
  .code { width: 74%; }
}
