:root {
  color-scheme: dark;

  --bg-0: #041018;
  --bg-1: #071824;
  --bg-2: #0a1f2f;
  --panel: rgba(8, 26, 38, 0.78);
  --panel-strong: rgba(9, 30, 44, 0.92);
  --panel-soft: rgba(7, 22, 32, 0.66);
  --input-bg: rgba(4, 18, 28, 0.9);

  --surface-1: rgba(36, 229, 208, 0.05);
  --surface-2: rgba(36, 229, 208, 0.08);
  --surface-3: rgba(36, 229, 208, 0.13);

  --brand: #25e5d0;
  --brand-2: #1fbfd7;
  --brand-3: #70fff0;
  --brand-soft: rgba(37, 229, 208, 0.12);
  --brand-glow: rgba(37, 229, 208, 0.22);

  --text-main: #eafefd;
  --text-soft: #bfdedc;
  --text-muted: #89acae;
  --text-faint: #5f8387;

  --border: rgba(76, 230, 218, 0.16);
  --border-strong: rgba(76, 230, 218, 0.36);
  --border-soft: rgba(255, 255, 255, 0.06);

  --success: #4fe0b3;
  --warning: #ffd27a;
  --danger: #ff788a;

  --shadow-sm: 0 12px 30px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 22px 60px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.42);
  --glow-sm: 0 0 0 1px rgba(37, 229, 208, 0.06), 0 0 24px rgba(37, 229, 208, 0.08);
  --glow-md: 0 0 0 1px rgba(37, 229, 208, 0.12), 0 0 36px rgba(37, 229, 208, 0.12);
  --ring: 0 0 0 4px rgba(37, 229, 208, 0.14);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --page-max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--text-main);
  background:
    radial-gradient(circle at 50% -10%, rgba(37, 229, 208, 0.16), transparent 38%),
    radial-gradient(circle at 85% 15%, rgba(31, 191, 215, 0.09), transparent 22%),
    radial-gradient(circle at 20% 85%, rgba(37, 229, 208, 0.06), transparent 28%),
    linear-gradient(180deg, #081722 0%, #06111a 52%, #040d14 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background:
    radial-gradient(circle at 50% 35%, rgba(37, 229, 208, 0.08), transparent 20%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: auto, 44px 44px, 44px 44px;
  opacity: 0.18;
  mask-image: radial-gradient(circle at center, black 35%, transparent 85%);
}

body::after {
  background:
    radial-gradient(circle at center, rgba(37, 229, 208, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 18%);
}

#matrix-particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.08;
  filter: blur(0.2px) saturate(0.9);
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-3);
}

button,
a,
input,
textarea,
select,
.card,
.app-card,
.metric-card,
.form-panel,
.hero-card,
.shell {
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease;
}

.page-wrap {
  width: min(var(--page-max), calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 44px;
  position: relative;
  z-index: 1;
}

.hero-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.shell,
.card,
.app-card,
.metric-card,
.form-panel,
.hero-card,
.app-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
    linear-gradient(180deg, var(--panel), var(--panel-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sm), var(--glow-sm);
}

.shell::before,
.card::before,
.app-card::before,
.metric-card::before,
.form-panel::before,
.hero-card::before,
.app-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(140deg, rgba(112, 255, 240, 0.08), transparent 24%, transparent 76%, rgba(31, 191, 215, 0.08)),
    radial-gradient(circle at top right, rgba(37, 229, 208, 0.08), transparent 28%);
}

.shell {
  width: min(980px, 100%);
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 14px 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(8, 24, 36, 0.9), rgba(6, 20, 30, 0.72));
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 18px;
  flex: 0 0 auto;
  position: relative;
  background:
    url("./logo.png") center/84% no-repeat,
    linear-gradient(180deg, #061c27, #051620);
  border: 1px solid rgba(95, 250, 233, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 24px rgba(0, 0, 0, 0.3),
    0 0 24px rgba(37, 229, 208, 0.12);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 100%, rgba(37, 229, 208, 0.14), transparent 55%);
  pointer-events: none;
}

.brand-copy {
  min-width: 0;
}

.brand-copy strong,
.brand-copy span {
  display: block;
}

.brand-copy strong {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-main);
}

.brand-copy span {
  margin-top: 3px;
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 60ch;
}

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

h1,
.hero-title {
  font-size: clamp(2rem, 4.2vw, 3.45rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 0.9rem;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

p,
.subtitle,
.lead,
.muted,
.meta,
.notice,
label,
.brand-copy span {
  overflow-wrap: anywhere;
}

.subtitle,
.lead {
  max-width: 72ch;
  font-size: 1.02rem;
  color: var(--text-soft);
  margin-bottom: 1.5rem;
}

.muted,
.meta {
  color: var(--text-muted);
}

.badge,
.kicker,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(112, 255, 240, 0.2);
  background: linear-gradient(180deg, rgba(37, 229, 208, 0.1), rgba(37, 229, 208, 0.04));
  color: var(--brand-3);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.chip.danger,
.danger {
  color: #ffb4be;
  border-color: rgba(255, 120, 138, 0.3);
  background: linear-gradient(180deg, rgba(255, 120, 138, 0.13), rgba(255, 120, 138, 0.05));
}

.grid-2,
.grid-3,
.grid-auto,
.apps-grid,
.metrics-grid {
  display: grid;
  gap: 1.1rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3,
.apps-grid,
.metrics-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card,
.app-card,
.metric-card {
  padding: 1.35rem;
}

.form-panel,
.hero-card,
.app-hero {
  padding: 2rem 1.4rem 1.4rem;
}

.card:hover,
.app-card:hover,
.metric-card:hover,
.form-panel:hover,
.hero-card:hover,
.app-hero:hover,
.shell:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md), var(--glow-md);
  transform: translateY(-2px);
}

.actions,
.row,
.inline-meta,
.app-card .meta,
.app-store-title,
.split-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.app-store-title,
.split-header {
  justify-content: space-between;
  align-items: flex-start;
}

.btn,
button {
  appearance: none;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 0.86rem 1.12rem;
  min-height: 46px;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn,
.btn-secondary,
button.secondary,
.btn-ghost,
button.ghost {
  background: linear-gradient(180deg, rgba(14, 38, 52, 0.84), rgba(8, 25, 35, 0.84));
  color: var(--text-main);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.btn-primary,
button,
button.primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #04202a;
  border-color: rgba(112, 255, 240, 0.36);
  box-shadow: 0 10px 26px rgba(37, 229, 208, 0.18);
}

.btn-danger,
button.danger {
  background: linear-gradient(180deg, rgba(255, 120, 138, 0.12), rgba(255, 120, 138, 0.05));
  color: #ffafbb;
  border-color: rgba(255, 120, 138, 0.34);
}

.btn:hover,
button:hover {
  border-color: rgba(112, 255, 240, 0.42);
  box-shadow: 0 12px 30px rgba(37, 229, 208, 0.12);
  transform: translateY(-1px);
}

.btn-primary:hover,
button.primary:hover,
button:hover {
  filter: brightness(1.04);
}

.btn:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 1.15rem;
}

.stack {
  display: grid;
  gap: 0.9rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

label {
  font-size: 0.82rem;
  color: var(--text-soft);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(6, 23, 33, 0.96), rgba(4, 18, 27, 0.96));
  color: var(--text-main);
  padding: 0.92rem 1rem;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

input::placeholder,
textarea::placeholder {
  color: rgba(191, 222, 220, 0.52);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: var(--ring);
}

textarea {
  min-height: 118px;
  resize: vertical;
}

.notice {
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(37, 229, 208, 0.1), rgba(37, 229, 208, 0.04));
  color: var(--text-soft);
}

.notice.error {
  background: linear-gradient(180deg, rgba(255, 120, 138, 0.12), rgba(255, 120, 138, 0.05));
  border-color: rgba(255, 120, 138, 0.35);
  color: #ffbac3;
}

.notice.success {
  background: linear-gradient(180deg, rgba(79, 224, 179, 0.13), rgba(79, 224, 179, 0.05));
  border-color: rgba(79, 224, 179, 0.3);
  color: #dffdf3;
}

.hidden {
  display: none !important;
}

.mono,
.metric-value {
  font-family: var(--font-mono);
  word-break: break-word;
}

.metric-card {
  min-height: 100%;
}

.metric-value {
  color: var(--brand-3);
  font-size: 0.95rem;
  text-shadow: 0 0 18px rgba(37, 229, 208, 0.12);
  overflow-wrap: anywhere;
}

.section-heading {
  margin-bottom: 0.9rem;
}

hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(112, 255, 240, 0.22), transparent);
  margin: 1.2rem 0;
}

@media (max-width: 860px) {
  .form-layout {
    grid-template-columns: 1fr;
  }

  .shell {
    padding: 1.3rem;
  }

  .page-wrap {
    width: min(var(--page-max), calc(100% - 24px));
  }
}

@media (max-width: 640px) {
  .page-wrap,
  .hero-shell {
    padding: 0.95rem;
  }

  .shell,
  .hero-card,
  .form-panel,
  .app-hero,
  .card,
  .app-card,
  .metric-card {
    padding: 1.1rem;
  }

  .topbar {
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.95rem;
  }

  .brand {
    gap: 0.8rem;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .brand-copy strong {
    font-size: 0.94rem;
  }

  .brand-copy span,
  .muted,
  .lead,
  .subtitle {
    font-size: 0.92rem;
  }

  h1,
  .hero-title {
    font-size: clamp(1.7rem, 8vw, 2.2rem);
    letter-spacing: -0.03em;
  }

  .badge,
  .kicker,
  .chip {
    font-size: 0.67rem;
    letter-spacing: 0.08em;
    padding: 0.32rem 0.56rem;
  }

  .actions,
  .row,
  .inline-meta,
  .app-card .meta,
  .app-store-title,
  .split-header {
    gap: 0.6rem;
  }

  .actions > .btn,
  .actions > button,
  .actions > a.btn,
  .btn,
  button {
    width: 100%;
  }

  input,
  textarea,
  select {
    min-height: 44px;
    padding: 0.85rem 0.9rem;
    font-size: 16px;
  }

  .metrics-grid,
  .apps-grid,
  .grid-2,
  .grid-3,
  .grid-auto {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  #matrix-particles {
    opacity: 0.12;
  }
}

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

  #matrix-particles {
    display: none;
  }
}
