:root {
  color-scheme: dark;
  --bg: #050816;
  --bg-soft: #090e20;
  --panel: rgba(13, 20, 42, 0.82);
  --panel-solid: #0d142a;
  --panel-light: #131d38;
  --line: rgba(145, 171, 228, 0.16);
  --line-strong: rgba(34, 211, 238, 0.35);
  --text: #f4f7ff;
  --muted: #91a4c6;
  --cyan: #22d3ee;
  --blue: #4f8cff;
  --purple: #9966ff;
  --green: #4ade80;
  --yellow: #facc15;
  --red: #fb7185;
  --gradient: linear-gradient(120deg, var(--cyan), var(--blue) 52%, var(--purple));
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --radius: 22px;
  font-family: Inter, Geist, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.08), transparent 34rem),
    radial-gradient(circle at 85% 8%, rgba(153, 102, 255, 0.11), transparent 32rem),
    var(--bg);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.18;
  background-image: linear-gradient(rgba(118, 146, 200, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(118, 146, 200, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -0.035em; }
p { color: var(--muted); line-height: 1.7; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 1000;
  padding: .75rem 1rem;
  color: #04101a;
  background: var(--cyan);
  border-radius: 12px;
}
.skip-link:focus { top: 1rem; }
.container { width: min(1180px, calc(100% - 2rem)); margin-inline: auto; }
.section { padding: 4.75rem 0; }
.section-tight { padding: 2.4rem 0; }
.stack { display: grid; gap: 1rem; }
.row { display: flex; align-items: center; gap: .8rem; }
.row-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: .85rem;
  color: var(--cyan);
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--gradient); border-radius: 10px; }
.gradient-text {
  color: transparent;
  background: var(--gradient);
  background-clip: text;
  -webkit-background-clip: text;
}
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1.2rem; margin-bottom: 1.55rem; }
.section-head h2 { margin-bottom: .35rem; font-size: clamp(1.65rem, 4vw, 2.65rem); }
.section-head p { margin-bottom: 0; }

.button {
  min-height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .72rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 780;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, opacity .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.button-primary { color: #03101a; background: var(--gradient); box-shadow: 0 12px 35px rgba(34, 211, 238, .18); }
.button-secondary { border-color: var(--line); background: rgba(255,255,255,.035); }
.button-secondary:hover { border-color: var(--line-strong); background: rgba(34,211,238,.07); }
.button-danger { border-color: rgba(251,113,133,.25); color: #fecdd3; background: rgba(251,113,133,.08); }
.button-small { min-height: 36px; padding: .5rem .72rem; border-radius: 11px; font-size: .84rem; }
.button-block { width: 100%; }
.icon-button { width: 42px; height: 42px; padding: 0; border-radius: 13px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.card {
  border: 1px solid var(--line);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(18, 28, 55, .88), rgba(8, 13, 29, .92));
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(34,211,238,.28); box-shadow: 0 20px 50px rgba(0,0,0,.28); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  width: max-content;
  padding: .36rem .58rem;
  border: 1px solid rgba(34,211,238,.22);
  border-radius: 999px;
  color: #b8f5ff;
  background: rgba(34,211,238,.1);
  font-size: .72rem;
  font-weight: 800;
}
.badge-purple { color: #e4d7ff; border-color: rgba(153,102,255,.25); background: rgba(153,102,255,.11); }
.badge-yellow { color: #fef08a; border-color: rgba(250,204,21,.22); background: rgba(250,204,21,.08); }
.badge-green { color: #bbf7d0; border-color: rgba(74,222,128,.22); background: rgba(74,222,128,.08); }
.badge-red { color: #fecdd3; border-color: rgba(251,113,133,.25); background: rgba(251,113,133,.08); }

.field { display: grid; gap: .46rem; }
.field label, .field-label { color: #cbd7ef; font-size: .82rem; font-weight: 720; }
.input, .select, .textarea {
  width: 100%;
  min-height: 46px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: rgba(7, 12, 28, .78);
  padding: .72rem .86rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.textarea { min-height: 110px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,211,238,.11); }
.input::placeholder, .textarea::placeholder { color: #617395; }
.help { color: #7185aa; font-size: .78rem; line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.span-2 { grid-column: 1 / -1; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(145,171,228,.1);
  background: rgba(5, 8, 22, .82);
  backdrop-filter: blur(18px);
}
.nav { min-height: 72px; display: flex; align-items: center; gap: 1.1rem; }
.brand { display: flex; align-items: center; gap: .72rem; font-weight: 900; letter-spacing: -.04em; white-space: nowrap; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #03101a;
  border-radius: 14px;
  background: var(--gradient);
  box-shadow: 0 0 28px rgba(34,211,238,.2);
  font-size: .72rem;
  letter-spacing: -.04em;
}
.brand-name { font-size: 1.05rem; }
.brand-name span { color: var(--cyan); }
.nav-links { display: flex; align-items: center; gap: .15rem; margin-left: auto; }
.nav-link { padding: .66rem .78rem; color: var(--muted); border-radius: 11px; font-size: .88rem; font-weight: 650; }
.nav-link:hover, .nav-link.active { color: var(--text); background: rgba(255,255,255,.05); }
.menu-button { display: none; margin-left: auto; }

.site-footer { margin-top: 4rem; border-top: 1px solid var(--line); background: rgba(5, 8, 19, .72); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; padding: 3.2rem 0; }
.footer-grid h3 { font-size: .88rem; letter-spacing: 0; }
.footer-links { display: grid; gap: .65rem; color: var(--muted); font-size: .9rem; }
.footer-bottom { padding: 1rem 0 1.6rem; border-top: 1px solid var(--line); color: #687a9c; font-size: .8rem; }

.toast-region { position: fixed; z-index: 150; right: 1rem; top: 86px; display: grid; gap: .6rem; width: min(370px, calc(100% - 2rem)); }
.toast { padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: #10182f; box-shadow: var(--shadow); animation: toast-in .22s ease both; }
.toast.success { border-color: rgba(74,222,128,.3); }
.toast.error { border-color: rgba(251,113,133,.35); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

.page-loader { min-height: 65vh; display: flex; justify-content: center; align-items: center; gap: .45rem; }
.page-loader span { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); animation: bounce 1s ease-in-out infinite; }
.page-loader span:nth-child(2) { animation-delay: .12s; background: var(--blue); }
.page-loader span:nth-child(3) { animation-delay: .24s; background: var(--purple); }
@keyframes bounce { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-8px); opacity: 1; } }
.skeleton { position: relative; overflow: hidden; border-radius: 12px; background: rgba(145,171,228,.08); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

.empty-state, .error-state { padding: 3rem 1.25rem; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); background: rgba(12,18,38,.5); }
.empty-icon { width: 56px; height: 56px; display: grid; place-items: center; margin: 0 auto 1rem; border-radius: 18px; color: var(--cyan); background: rgba(34,211,238,.09); font-size: 1.5rem; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; background: rgba(1,4,13,.74); backdrop-filter: blur(9px); }
.modal { width: min(680px, 100%); max-height: calc(100vh - 2rem); overflow: auto; padding: 1.25rem; border: 1px solid var(--line); border-radius: 22px; background: #0b1227; box-shadow: 0 30px 100px rgba(0,0,0,.55); }
.modal-wide { width: min(920px, 100%); }
.modal-head { position: sticky; top: -1.25rem; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: -1.25rem -1.25rem 1rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line); background: rgba(11,18,39,.96); }
.modal-head h2 { margin: 0; font-size: 1.25rem; }

@media (max-width: 860px) {
  .nav { min-height: 64px; }
  .menu-button { display: inline-grid; place-items: center; }
  .nav > .button-primary { display: none; }
  .nav-links { position: fixed; inset: 65px 1rem auto; display: none; padding: .7rem; border: 1px solid var(--line); border-radius: 18px; background: rgba(9,14,32,.98); box-shadow: var(--shadow); }
  .nav-links.open { display: grid; }
  .nav-link { padding: .8rem; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 1.2rem, 1180px); }
  .section { padding: 3.2rem 0; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .section-head { align-items: start; flex-direction: column; }
  .brand-name { font-size: .98rem; }
  .brand-mark { width: 38px; height: 38px; border-radius: 12px; }
}

@media (max-width: 800px) {
  body::before { display: none; }
  .site-header,
  .panel,
  .modal-backdrop { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .panel { box-shadow: 0 12px 34px rgba(0,0,0,.2); }
  .card:hover,
  .button:hover { transform: none; }
}

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