:root {
  color-scheme: dark;
  --bg: #030508;
  --text: #eef7ff;
  --muted: #9fb3c1;
  --soft: #d7e9f5;
  --line: rgba(255, 255, 255, 0.15);
  --line-strong: rgba(138, 235, 255, 0.34);
  --panel: rgba(5, 11, 18, 0.66);
  --panel-strong: rgba(7, 14, 22, 0.88);
  --cyan: #77edff;
  --green: #a6ffca;
  --violet: #9d8cff;
  --orange: #ffb35f;
  --danger: #ff6f8f;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-page="home"] .account,
body[data-page="home"] .admin {
  display: none;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(3, 5, 8, 0.72), rgba(3, 5, 8, 0.24) 48%, rgba(3, 5, 8, 0.52)),
    linear-gradient(180deg, rgba(2, 7, 12, 0.08), rgba(3, 5, 8, 0.84) 78%),
    radial-gradient(circle at 50% 0%, rgba(119, 237, 255, 0.12), transparent 42%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(3, 5, 8, 0.82), rgba(3, 5, 8, 0.5) 48%, rgba(3, 5, 8, 0.72)),
    linear-gradient(180deg, rgba(3, 5, 8, 0.24), rgba(3, 5, 8, 0.88) 82%);
}

#liquid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  opacity: 0.96;
  filter: saturate(1.28) contrast(1.08);
}

.topbar,
main,
.footer {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 58px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 5, 8, 0.62);
  backdrop-filter: blur(20px);
}

.brand,
.nav,
.actions,
.trust-row,
.footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(119, 237, 255, 0.55);
  background: rgba(119, 237, 255, 0.1);
  box-shadow: 0 0 32px rgba(119, 237, 255, 0.16);
  color: var(--cyan);
}

.nav {
  gap: 4px;
}

.nav a {
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover {
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.topbar-login {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(119, 237, 255, 0.34);
  border-radius: 999px;
  background: rgba(119, 237, 255, 0.08);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.section {
  width: min(1200px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 112px 0;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.section.is-visible,
.hero,
.account {
  opacity: 1;
  transform: translateY(0);
}

.hero {
  display: grid;
  min-height: auto;
  grid-template-columns: minmax(0, 0.9fr) minmax(480px, 1.1fr);
  align-items: center;
  gap: clamp(34px, 5vw, 76px);
  padding-top: 122px;
  padding-bottom: 76px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 20px;
  font-size: clamp(42px, 6.7vw, 82px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  max-width: 880px;
  font-size: clamp(34px, 5.6vw, 66px);
  line-height: 0.98;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 21px;
  line-height: 1.18;
}

.lead {
  max-width: 720px;
  color: var(--soft);
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.48;
}

.actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 47px;
  align-items: center;
  justify-content: center;
  padding: 0 19px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
}

.button[hidden] {
  display: none;
}

.button.primary {
  border-color: rgba(119, 237, 255, 0.48);
  background: linear-gradient(135deg, rgba(119, 237, 255, 0.98), rgba(166, 255, 202, 0.94));
  color: #031017;
  box-shadow: 0 18px 58px rgba(119, 237, 255, 0.2);
}

.button.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.trust-row {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.trust-row span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.055);
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}

.app-hero,
.screen-card,
.card,
.step,
.price-card,
.account-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 28px 110px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(24px);
}

.app-hero {
  position: relative;
  overflow: hidden;
  border-color: var(--line-strong);
  border-radius: 8px;
  transform: perspective(1400px) rotateY(-7deg) rotateX(3deg);
  box-shadow:
    0 34px 120px rgba(0, 0, 0, 0.52),
    0 0 80px rgba(119, 237, 255, 0.16);
}

.app-hero::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 18%, transparent 70%, rgba(119, 237, 255, 0.12)),
    linear-gradient(180deg, transparent 64%, rgba(2, 5, 8, 0.64));
}

.app-hero img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: left top;
}

.hero-stat {
  position: absolute;
  z-index: 2;
  width: min(230px, 46%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(3, 7, 12, 0.76);
  padding: 13px 14px;
  backdrop-filter: blur(18px);
}

.hero-stat.top {
  top: 18px;
  right: 18px;
}

.hero-stat.bottom {
  left: 18px;
  bottom: 18px;
}

.hero-stat b {
  display: block;
  color: var(--cyan);
  font-size: 18px;
}

.hero-stat span {
  color: var(--muted);
  font-size: 12px;
}

.section-head {
  margin-bottom: 34px;
}

.section-head p:not(.eyebrow),
.card p,
.step span,
.price-card p,
figcaption span {
  color: var(--muted);
  line-height: 1.6;
}

.showcase .section-head {
  max-width: 930px;
}

.screen-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 16px;
}

.screen-card {
  overflow: hidden;
  margin: 0;
  border-radius: 8px;
}

.screen-card.large {
  grid-row: span 3;
}

.screen-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: left top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.screen-card.large img {
  aspect-ratio: 16 / 10.5;
}

figcaption {
  display: grid;
  gap: 4px;
  padding: 16px 18px 18px;
}

figcaption b {
  font-size: 17px;
}

.cards,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.card {
  min-height: 266px;
  padding: 22px;
  border-radius: 8px;
}

.icon {
  display: inline-flex;
  margin-bottom: 34px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.split {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 40px;
  align-items: start;
}

.sticky-copy {
  position: sticky;
  top: 108px;
}

.timeline {
  display: grid;
  gap: 14px;
}

.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 118px;
  padding: 20px;
  border-radius: 8px;
}

.step b {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(119, 237, 255, 0.42);
  background: rgba(119, 237, 255, 0.08);
  color: var(--cyan);
}

.pricing {
  padding-top: 80px;
}

.price-card {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 26px;
  align-items: center;
  padding: 28px;
  border-radius: 8px;
  background: var(--panel-strong);
}

.price {
  min-width: 165px;
  text-align: right;
}

.price span,
.price small {
  display: block;
  color: var(--muted);
}

.price b {
  display: block;
  color: var(--green);
  font-size: 44px;
}

.pricing-actions {
  display: grid;
  justify-items: stretch;
  gap: 8px;
}

.download-link {
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.download-link:hover {
  color: var(--cyan);
}

.download-meta {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  text-align: center;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1.22fr);
  gap: 16px;
  align-items: stretch;
}

.account-panel {
  display: grid;
  gap: 18px;
  align-content: start;
  min-height: 100%;
  padding: 24px;
  border-radius: 8px;
  background: var(--panel-strong);
}

.account-panel h3,
.account-panel h4 {
  margin-bottom: 8px;
}

.account-panel h4 {
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-panel label {
  display: grid;
  gap: 8px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 800;
}

.account-panel input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  padding: 0 13px;
  font: inherit;
  outline: none;
}

.account-panel input:focus {
  border-color: rgba(119, 237, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(119, 237, 255, 0.12);
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.form-message.error {
  color: var(--danger);
}

.form-message.success {
  color: var(--green);
}

.profile-card[data-state="active"] {
  border-color: rgba(166, 255, 202, 0.36);
}

.profile-card[data-state="expired"],
.profile-card[data-state="past_due"] {
  border-color: rgba(255, 179, 95, 0.42);
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.profile-stats div {
  min-height: 92px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.profile-stats dt {
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-stats dd {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 850;
}

.profile-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.profile-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 12px 13px;
  color: var(--soft);
}

.profile-list span {
  color: var(--muted);
}

.device-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.device-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 12px 13px;
}

.device-list b,
.device-list span {
  display: block;
}

.device-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.device-revoke {
  min-height: 34px;
  border: 1px solid rgba(255, 111, 143, 0.36);
  border-radius: 8px;
  background: rgba(255, 111, 143, 0.08);
  color: #ffb6c6;
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.device-revoke:hover:not(:disabled) {
  border-color: rgba(255, 111, 143, 0.72);
  background: rgba(255, 111, 143, 0.16);
}

.device-revoke:disabled {
  cursor: wait;
  opacity: 0.6;
}

.admin-shell {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  gap: 16px;
}

.admin-shell .account-panel {
  min-height: 0;
}

.admin-login-panel[hidden],
.admin-workspace[hidden] {
  display: none;
}

.admin-workspace {
  display: grid;
  gap: 16px;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.admin-toolbar label {
  flex: 1 1 240px;
}

.admin-toolbar .button {
  min-height: 46px;
}

.subscription-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.subscription-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 13px;
}

.subscription-list b,
.subscription-list span {
  display: block;
}

.subscription-list span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.subscription-actions {
  display: flex;
  gap: 8px;
}

.subscription-actions button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.subscription-actions .revoke {
  border-color: rgba(255, 111, 143, 0.42);
  color: #ffb6c6;
}

.issued-key {
  border: 1px solid rgba(166, 255, 202, 0.32);
  border-radius: 8px;
  background: rgba(166, 255, 202, 0.07);
  padding: 13px;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.admin-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-grid .card {
  min-height: 220px;
}

.footer {
  justify-content: space-between;
  width: min(1200px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 34px 0 48px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 980px) {
  .topbar {
    position: absolute;
  }

  .nav {
    display: none;
  }

  .hero,
  .split,
  .price-card,
  .screen-grid,
  .account-grid {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .app-hero {
    transform: none;
  }

  .cards,
  .admin-grid,
  .profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sticky-copy {
    position: static;
  }
}

@media (max-width: 640px) {
  .section {
    width: min(100vw - 24px, 1200px);
    padding: 84px 0;
  }

  .hero {
    padding-top: 112px;
  }

  .cards,
  .admin-grid,
  .profile-stats {
    grid-template-columns: 1fr;
  }

  .card,
  .admin-grid .card {
    min-height: auto;
  }

  .step {
    grid-template-columns: 1fr;
  }

  .price,
  .price-card {
    text-align: left;
  }

  .pricing-actions {
    justify-items: start;
  }

  .download-link,
  .download-meta {
    text-align: left;
  }

  .hero-stat {
    position: static;
    width: auto;
    margin: 10px;
  }
}
