:root {
  color-scheme: light;
  --primary: #6577ff;
  --primary-strong: #4657e8;
  --secondary: #66d7ff;
  --accent: #b46dff;
  --rose: #ff8ebb;
  --mint: #4fd6a3;
  --ink: #19223a;
  --muted: #65708e;
  --page: #f7faff;
  --paper: #ffffff;
  --surface: rgba(255, 255, 255, 0.84);
  --surface-soft: rgba(255, 255, 255, 0.64);
  --line: rgba(83, 99, 184, 0.14);
  --shadow: 0 28px 80px rgba(60, 76, 150, 0.16);
  --shadow-soft: 0 14px 38px rgba(60, 76, 150, 0.12);
  --hero-bg: linear-gradient(132deg, #ffffff 0%, #f6fbff 42%, #f3f0ff 74%, #fbfdff 100%);
  --hero-band: linear-gradient(110deg, rgba(102, 215, 255, 0.34), rgba(180, 109, 255, 0.22), rgba(255, 142, 187, 0.18));
  --button-ink: #ffffff;
  --glass-blur: blur(24px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --primary: #91a0ff;
    --primary-strong: #c5ccff;
    --secondary: #72ddff;
    --accent: #c99aff;
    --rose: #ffa2ca;
    --mint: #79e8bc;
    --ink: #eef3ff;
    --muted: #aeb8d4;
    --page: #0d1220;
    --paper: #141b2d;
    --surface: rgba(20, 27, 45, 0.82);
    --surface-soft: rgba(22, 31, 52, 0.62);
    --line: rgba(157, 174, 255, 0.18);
    --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
    --shadow-soft: 0 14px 38px rgba(0, 0, 0, 0.26);
    --hero-bg: linear-gradient(132deg, #11182a 0%, #0c1426 45%, #18142b 76%, #0d1220 100%);
    --hero-band: linear-gradient(110deg, rgba(102, 215, 255, 0.14), rgba(180, 109, 255, 0.18), rgba(255, 142, 187, 0.1));
    --button-ink: #091020;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --primary: #91a0ff;
  --primary-strong: #c5ccff;
  --secondary: #72ddff;
  --accent: #c99aff;
  --rose: #ffa2ca;
  --mint: #79e8bc;
  --ink: #eef3ff;
  --muted: #aeb8d4;
  --page: #0d1220;
  --paper: #141b2d;
  --surface: rgba(20, 27, 45, 0.82);
  --surface-soft: rgba(22, 31, 52, 0.62);
  --line: rgba(157, 174, 255, 0.18);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 14px 38px rgba(0, 0, 0, 0.26);
  --hero-bg: linear-gradient(132deg, #11182a 0%, #0c1426 45%, #18142b 76%, #0d1220 100%);
  --hero-band: linear-gradient(110deg, rgba(102, 215, 255, 0.14), rgba(180, 109, 255, 0.18), rgba(255, 142, 187, 0.1));
  --button-ink: #091020;
}

:root[data-theme="light"] {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(180deg, var(--page) 0%, color-mix(in srgb, var(--page), var(--secondary) 5%) 52%, var(--page) 100%);
  font-family: Inter, ui-rounded, "Segoe UI", system-ui, sans-serif;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(102, 215, 255, 0.09) 18% 28%, transparent 28% 100%),
    linear-gradient(65deg, transparent 0 56%, rgba(180, 109, 255, 0.08) 56% 66%, transparent 66% 100%);
}

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

a,
button {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--secondary), white 26%);
  outline-offset: 3px;
}

.topbar {
  position: fixed;
  z-index: 10;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1120px, calc(100% - 28px));
  min-height: 64px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  animation: topbar-enter 720ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-size: 20px;
  font-weight: 900;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  filter: drop-shadow(0 10px 20px rgba(102, 119, 255, 0.18));
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

nav a,
.primary,
.secondary,
.status-band a,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  font-weight: 800;
  transition:
    transform 220ms ease,
    background 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    color 220ms ease;
}

nav a,
.primary,
.secondary,
.status-band a {
  padding: 0 18px;
}

nav a {
  color: var(--muted);
}

nav a:hover,
.secondary:hover,
.status-band a:hover {
  color: var(--primary-strong);
  background: color-mix(in srgb, var(--primary), transparent 88%);
  transform: translateY(-1px);
}

.theme-toggle {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--primary);
  cursor: pointer;
}

.theme-toggle:hover {
  transform: translateY(-1px) rotate(-5deg);
  box-shadow: var(--shadow-soft);
}

.theme-toggle span {
  position: relative;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: inset -6px -4px 0 var(--paper);
  transition:
    transform 260ms ease,
    background 260ms ease,
    box-shadow 260ms ease;
}

:root[data-theme="dark"] .theme-toggle span,
.theme-toggle[data-active-theme="dark"] span {
  background: #ffd86d;
  box-shadow:
    0 0 0 5px rgba(255, 216, 109, 0.16),
    0 0 24px rgba(255, 216, 109, 0.35);
  transform: rotate(30deg);
}

.hero {
  min-height: 92vh;
  padding: 128px max(24px, calc((100vw - 1120px) / 2)) 72px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: var(--hero-bg);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 8% -10% auto -10%;
  height: 58%;
  transform: rotate(-8deg);
  background: var(--hero-band);
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.8;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--paper), transparent 82%) 1px, transparent 1px),
    linear-gradient(180deg, color-mix(in srgb, var(--paper), transparent 84%) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(120deg, transparent 0%, black 18%, transparent 62%);
  opacity: 0.24;
}

.hero-mark {
  position: absolute;
  right: max(-60px, calc((100vw - 1120px) / 2));
  bottom: 2vh;
  width: min(55vw, 660px);
  max-height: 72vh;
  object-fit: contain;
  opacity: 0.86;
  filter: drop-shadow(0 36px 80px rgba(102, 119, 255, 0.24));
  animation: hero-float 7s ease-in-out infinite;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 650px;
  animation: copy-enter 820ms 90ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--primary-strong);
  font-weight: 900;
}

h1 {
  margin: 0;
  font-size: clamp(72px, 12vw, 154px);
  line-height: 0.9;
  letter-spacing: 0;
}

.lead {
  max-width: 560px;
  margin: 26px 0 30px;
  color: var(--muted);
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.34;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary {
  color: var(--button-ink);
  background: linear-gradient(135deg, var(--secondary), var(--primary) 48%, var(--accent));
  box-shadow: 0 18px 36px rgba(102, 119, 255, 0.28);
}

.primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 24px 48px rgba(102, 119, 255, 0.34);
}

.secondary {
  background: var(--surface);
  border: 1px solid var(--line);
}

.status-band,
.features,
.plans,
footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.status-band {
  transform: translateY(-30px);
  min-height: 72px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  animation: card-enter 720ms 260ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.status-band div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-band a {
  background: color-mix(in srgb, var(--primary), transparent 88%);
  color: var(--primary-strong);
}

.status-dot {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--mint), transparent 84%);
  animation: status-pulse 1.9s ease-in-out infinite;
}

.status-band[data-status="offline"] .status-dot {
  background: #ffa85c;
  box-shadow: 0 0 0 8px rgba(255, 168, 92, 0.18);
}

.status-band[data-status="maintenance"] .status-dot {
  background: var(--rose);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--rose), transparent 82%);
}

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 20px 0 64px;
}

.features article,
.plans,
.plan-grid article,
.legal-doc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
}

.features article {
  min-height: 220px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  animation: card-enter 760ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
  transition:
    transform 240ms ease,
    border-color 240ms ease,
    box-shadow 240ms ease;
}

.features article:nth-child(1) {
  animation-delay: 340ms;
}

.features article:nth-child(2) {
  animation-delay: 420ms;
}

.features article:nth-child(3) {
  animation-delay: 500ms;
}

.features article:nth-child(4) {
  animation-delay: 580ms;
}

.features article::after,
.plan-grid article::after {
  content: "";
  position: absolute;
  inset: auto 18px 14px 18px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--secondary), var(--primary), var(--accent));
  transform: scaleX(0.24);
  transform-origin: left;
  opacity: 0.68;
  transition: transform 240ms ease, opacity 240ms ease;
}

.features article:hover,
.plan-grid article:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary), transparent 56%);
  box-shadow: 0 30px 76px rgba(74, 88, 178, 0.2);
}

.features article:hover::after,
.plan-grid article:hover::after {
  transform: scaleX(1);
  opacity: 1;
}

.features span {
  color: var(--primary-strong);
  font-weight: 900;
}

.features h2,
.plans h2 {
  margin: 12px 0;
  letter-spacing: 0;
}

.features p {
  color: var(--muted);
  line-height: 1.55;
}

.plans {
  padding: 28px;
  position: relative;
  overflow: hidden;
  animation: card-enter 760ms 660ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.plans::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, color-mix(in srgb, var(--secondary), transparent 90%), transparent 32%),
    linear-gradient(295deg, color-mix(in srgb, var(--accent), transparent 88%), transparent 42%);
  pointer-events: none;
}

.section-head,
.plan-grid {
  position: relative;
}

.section-head {
  max-width: 680px;
}

.plans h2 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.02;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.plan-grid article {
  padding: 20px;
  display: grid;
  gap: 10px;
  position: relative;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface), var(--paper) 20%);
  transition:
    transform 240ms ease,
    border-color 240ms ease,
    box-shadow 240ms ease;
}

.plan-grid b {
  color: var(--primary-strong);
}

.plan-grid strong {
  font-size: 30px;
}

.plan-grid span {
  color: var(--muted);
}

footer {
  padding: 36px 0 54px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  color: var(--muted);
}

footer a:hover {
  color: var(--primary-strong);
}

.legal-page {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

.legal-brand {
  width: max-content;
  margin-bottom: 28px;
}

.legal-doc {
  padding: 28px;
}

.legal-doc h1 {
  font-size: clamp(42px, 8vw, 88px);
}

.legal-doc p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

@keyframes topbar-enter {
  from {
    opacity: 0;
    transform: translate(-50%, -14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@keyframes copy-enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hero-float {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-16px) rotate(1.4deg);
  }
}

@keyframes status-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.82);
  }
}

@media (max-width: 980px) {
  .features,
  .plan-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .topbar {
    align-items: stretch;
    border-radius: 28px;
    flex-direction: column;
  }

  nav {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  nav a,
  .primary,
  .secondary,
  .status-band a {
    padding: 0 15px;
    white-space: nowrap;
  }

  .hero {
    min-height: 88vh;
    align-items: flex-start;
  }

  .hero-mark {
    width: 92vw;
    right: -28vw;
    bottom: 1vh;
    opacity: 0.44;
  }

  .features,
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .status-band,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .topbar {
    top: 10px;
    width: calc(100% - 20px);
  }

  .brand span {
    font-size: 18px;
  }

  .hero {
    padding-top: 150px;
  }

  h1 {
    font-size: clamp(58px, 19vw, 88px);
  }

  .lead {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
