:root {
  --bg: #070b14;
  --bg-soft: #0c1220;
  --panel: rgba(16, 24, 42, .82);
  --panel-solid: #111a2c;
  --text: #f5f7fb;
  --muted: #9ca9bd;
  --line: rgba(162, 181, 214, .16);
  --blue: #6aa9ff;
  --violet: #9b86ff;
  --amber: #f5b85c;
  --good: #6dd6ac;
  --danger: #ff8e9a;
  --shadow: 0 26px 90px rgba(0, 0, 0, .38);
  --radius: 22px;
  --max: 1220px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 78% 8%, rgba(93, 114, 255, .14), transparent 26rem),
    radial-gradient(circle at 22% 26%, rgba(245, 184, 92, .07), transparent 24rem),
    linear-gradient(180deg, #080c16 0%, #060a12 55%, #090d16 100%);
  font: 16px/1.55 "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
}
a { color: inherit; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 26px;
  background: rgba(7, 11, 20, .73);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(22px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  text-decoration: none;
  font-weight: 720;
  letter-spacing: -.02em;
}
.brand-mark {
  display: grid;
  grid-template-columns: repeat(3, 5px);
  gap: 3px;
  width: 25px;
  height: 25px;
  padding: 4px;
  border: 1px solid rgba(106,169,255,.45);
  border-radius: 7px;
  transform: skewX(-8deg);
}
.brand-mark i {
  display: block;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--blue), var(--violet));
}
.topbar nav { display: flex; gap: 24px; }
.topbar nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
}
.topbar nav a:hover { color: var(--text); }
.topbar > .button { justify-self: end; }

.button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, opacity .18s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button-primary {
  color: #07101d;
  font-weight: 760;
  background: linear-gradient(120deg, #8fc4ff, #b5a7ff 68%, #f2c982);
  box-shadow: 0 10px 34px rgba(106,169,255,.18);
}
.button-ghost {
  color: var(--text);
  background: rgba(255,255,255,.045);
  border: 1px solid var(--line);
}
.button-quiet {
  color: #d8e3f6;
  background: rgba(106,169,255,.09);
  border: 1px solid rgba(106,169,255,.19);
}
.button-wide { width: 100%; margin-top: 4px; }

.hero {
  max-width: var(--max);
  margin: 0 auto;
  min-height: 710px;
  padding: 100px 26px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(380px, .98fr);
  align-items: center;
  gap: 68px;
  overflow: hidden;
}
.eyebrow {
  margin: 0 0 12px;
  color: #91a2bc;
  text-transform: uppercase;
  letter-spacing: .18em;
  font: 650 11px/1.3 "Cascadia Mono", "SFMono-Regular", monospace;
}
.hero h1, .section-head h2 {
  margin: 0;
  font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  letter-spacing: -.052em;
  line-height: .99;
}
.hero h1 { font-size: clamp(52px, 6.1vw, 91px); font-weight: 730; }
.hero h1 span {
  color: transparent;
  background: linear-gradient(105deg, #a9ccff 4%, #b7a9ff 52%, #efc17a 98%);
  background-clip: text;
}
.hero-lead {
  max-width: 700px;
  margin: 30px 0 0;
  color: #b7c2d3;
  font-size: clamp(17px, 1.6vw, 21px);
}
.hero-actions { display: flex; gap: 12px; margin-top: 34px; }
.trust-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 32px;
  color: #78879e;
  font-size: 12px;
}
.trust-line span::before { content: "•"; color: var(--good); margin-right: 8px; }

.film-stage {
  position: relative;
  min-height: 490px;
  perspective: 1000px;
  transform-style: preserve-3d;
}
.lens {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 150px;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) translateZ(90px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 38% 34%, rgba(255,255,255,.24), transparent 12%),
    radial-gradient(circle, #172c4c 0 23%, #0c1525 25% 42%, #25375a 43% 45%, #080c14 47% 63%, #4a5570 64% 66%, #090d17 68%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 30px 90px rgba(0,0,0,.55);
}
.lens span {
  font: 800 18px "Cascadia Mono", monospace;
  letter-spacing: .12em;
  color: #bdd7ff;
}
.film-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 610px;
  display: flex;
  gap: 16px;
  transform-style: preserve-3d;
  animation: drift 9s ease-in-out infinite alternate;
}
.orbit-a { transform: translate(-50%, -50%) rotate(-12deg) rotateY(23deg) translateZ(-10px); }
.orbit-b { transform: translate(-50%, -50%) rotate(61deg) rotateY(-27deg) translateZ(-100px); animation-delay: -4s; }
.frame {
  flex: 0 0 180px;
  min-height: 112px;
  padding: 22px 16px;
  border: 1px solid rgba(159,181,219,.22);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(22,33,56,.94), rgba(9,14,25,.93));
  box-shadow: 0 18px 50px rgba(0,0,0,.33);
}
.frame::before, .frame::after {
  content: "";
  display: block;
  height: 4px;
  margin: -15px 0 16px;
  background: repeating-linear-gradient(90deg, rgba(191,207,234,.32) 0 8px, transparent 8px 17px);
}
.frame::after { margin: 16px 0 -15px; }
.frame b {
  display: block;
  font: 700 14px "Cascadia Mono", monospace;
  color: #d8e6ff;
}
.frame small { color: #8090a8; font-size: 11px; }

@keyframes drift {
  from { margin-top: -10px; }
  to { margin-top: 12px; }
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 88px 26px;
}
.section-head { max-width: 760px; margin-bottom: 38px; }
.section-head h2 { font-size: clamp(36px, 4.5vw, 64px); font-weight: 680; }
.flow-grid, .pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.flow-grid article, .price-card, .panel, .auth-panel {
  background: linear-gradient(150deg, rgba(18,27,47,.88), rgba(10,15,27,.88));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.flow-grid article {
  min-height: 230px;
  padding: 26px;
  border-radius: var(--radius);
}
.flow-grid strong {
  font: 650 12px "Cascadia Mono", monospace;
  color: var(--amber);
}
.flow-grid h3, .panel h3, .auth-panel h3 {
  margin: 42px 0 8px;
  font-size: 21px;
  letter-spacing: -.025em;
}
.flow-grid p, .price-card p, .auth-panel p { color: var(--muted); }

.price-card {
  position: relative;
  padding: 28px;
  min-height: 375px;
  border-radius: var(--radius);
}
.price-card.featured {
  border-color: rgba(140,169,255,.37);
  transform: translateY(-10px);
}
.badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(106,169,255,.12);
  color: #adccff;
  font: 600 10px "Cascadia Mono", monospace;
}
.plan { margin: 0 0 8px !important; color: #dfe8f8 !important; font-weight: 720; }
.price {
  margin: 0 0 22px !important;
  color: var(--text) !important;
  font-size: 34px;
  font-weight: 760;
  letter-spacing: -.035em;
}
.price small { color: var(--muted); font-size: 12px; font-weight: 500; margin-left: 4px; }
.price-card ul {
  list-style: none;
  padding: 20px 0 0;
  margin: 22px 0 0;
  border-top: 1px solid var(--line);
  color: #b6c3d8;
}
.price-card li { padding: 7px 0; }
.price-card li::before { content: "✓"; color: var(--good); margin-right: 8px; }

.app-section { padding-top: 110px; }
.auth-panel {
  border-radius: 28px;
  padding: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.auth-panel h3 { margin: 0 0 4px; }
.auth-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.email-login-form {
  display: flex;
  gap: 8px;
  min-width: min(100%, 430px);
}
.email-login-form input { min-width: 220px; }

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
  gap: 16px;
}
.dashboard-grid.lower { margin-top: 16px; grid-template-columns: 1fr 1fr; }
.panel {
  border-radius: 24px;
  padding: 27px;
  min-width: 0;
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 23px;
}
.panel-title h3 { margin: 0; }
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #aebbd0;
  background: rgba(255,255,255,.035);
  font-size: 11px;
  white-space: nowrap;
}
.pill.online { color: #a6f0d1; border-color: rgba(109,214,172,.27); background: rgba(109,214,172,.08); }
.pill.offline { color: #c2aeb1; }

label {
  display: grid;
  gap: 8px;
  color: #aab8ce;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .01em;
}
input, select {
  width: 100%;
  min-height: 49px;
  border: 1px solid rgba(160,180,214,.18);
  border-radius: 13px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(6,10,18,.72);
}
input::placeholder { color: #56647a; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 13px 0; }
#download-form > label { margin-bottom: 13px; }
.field-note { color: #75849a; font-size: 12px; margin: 10px 0; }
.status { min-height: 24px; color: #a9b8cf; font-size: 13px; }
.status.error { color: var(--danger); }
.status.success { color: var(--good); }

.text-button, .text-link {
  color: #9fc4ff;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  font-size: 12px;
}
.facts { margin: 0; }
.facts > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt { color: #7888a0; }
.facts dd { margin: 0; text-align: right; color: #d9e3f3; }

.job-list, .device-list { display: grid; gap: 9px; }
.job-row, .device-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(5,9,17,.38);
}
.row-main { min-width: 0; }
.row-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.row-main small { color: #74849a; }
.state { font: 600 10px "Cascadia Mono", monospace; color: #9aacc5; }
.billing-panel { margin-top: 16px; }
.billing-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.billing-product {
  border: 1px solid var(--line);
  background: rgba(5,9,17,.4);
  border-radius: 15px;
  padding: 16px;
}
.billing-product b, .billing-product span { display: block; }
.billing-product span { margin: 5px 0 13px; color: #96a7bd; font-size: 12px; }

footer {
  max-width: var(--max);
  margin: 60px auto 0;
  padding: 36px 26px 48px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #68778e;
  font-size: 12px;
}

@media (max-width: 980px) {
  .topbar { grid-template-columns: 1fr auto; }
  .topbar nav { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 72px; }
  .film-stage { min-height: 360px; transform: scale(.85); }
  .flow-grid, .pricing-grid { grid-template-columns: 1fr 1fr; }
  .price-card.featured { transform: none; }
  .dashboard-grid, .dashboard-grid.lower { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .topbar { height: 62px; padding-inline: 16px; }
  .hero, .section { padding-left: 16px; padding-right: 16px; }
  .hero { min-height: auto; padding-top: 58px; gap: 24px; }
  .hero h1 { font-size: clamp(43px, 14vw, 62px); }
  .hero-actions, .auth-actions { flex-direction: column; }
  .film-stage { min-height: 270px; transform: scale(.68); margin-inline: -70px; }
  .flow-grid, .pricing-grid, .billing-products, .form-row { grid-template-columns: 1fr; }
  .flow-grid article { min-height: 180px; }
  .flow-grid h3 { margin-top: 26px; }
  .auth-panel { align-items: stretch; flex-direction: column; padding: 24px; }
  .panel { padding: 20px; }
  footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .film-stage { perspective: none; transform: none; }
  .orbit-a, .orbit-b { transform: translate(-50%, -50%) rotate(-8deg); }
  .orbit-b { transform: translate(-50%, -50%) rotate(55deg); }
}
