:root {
  --bg: #07080f;
  --bg-alt: #0a0c16;
  --surface: #0f1220;
  --surface-2: #151a2c;
  --surface-3: #1c2238;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #edeff7;
  --text-muted: #a3a8c3;
  --text-faint: #6e7390;
  --brand: #8b7cff;
  --brand-2: #3b82f6;
  --accent: #22d3ee;
  --success: #22c55e;
  --danger: #f43f5e;
  --warning: #f59e0b;
  --grad: linear-gradient(120deg, #a78bfa 0%, #6d7cff 35%, #3b82f6 65%, #22d3ee 100%);
  --grad-soft: linear-gradient(135deg, rgba(139, 124, 255, 0.18), rgba(34, 211, 238, 0.12));
  --glass: rgba(18, 22, 40, 0.62);
  --glass-border: rgba(255, 255, 255, 0.1);
  --header-bg: rgba(7, 8, 15, 0.72);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 18px 50px -18px rgba(109, 124, 255, 0.55);
  --grid-line: rgba(255, 255, 255, 0.045);
  --blob-opacity: 0.55;
  --radius-lg: 28px;
  --radius: 20px;
  --radius-sm: 12px;
  --container: 1200px;
  --gutter: 24px;
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-alt: #eef0f8;
  --surface: #ffffff;
  --surface-2: #f3f4fa;
  --surface-3: #e9ebf5;
  --border: rgba(15, 18, 40, 0.09);
  --border-strong: rgba(15, 18, 40, 0.18);
  --text: #0c0e1c;
  --text-muted: #525873;
  --text-faint: #8a8fa8;
  --brand: #6c5ce7;
  --brand-2: #2563eb;
  --accent: #0891b2;
  --success: #16a34a;
  --danger: #e11d48;
  --warning: #d97706;
  --grad: linear-gradient(120deg, #7c3aed 0%, #5b5bf6 35%, #2563eb 65%, #0891b2 100%);
  --grad-soft: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(8, 145, 178, 0.08));
  --glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(15, 18, 40, 0.08);
  --header-bg: rgba(246, 247, 251, 0.78);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow: 0 24px 60px -28px rgba(16, 24, 40, 0.25);
  --shadow-glow: 0 18px 44px -18px rgba(91, 91, 246, 0.45);
  --grid-line: rgba(15, 18, 40, 0.05);
  --blob-opacity: 0.35;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

img {
  height: auto;
}

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

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

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 800;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: rgba(139, 124, 255, 0.35);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.text-grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.logo-mark {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 6px 16px rgba(109, 124, 255, 0.45));
}

.brand-name {
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.brand-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.btn {
  --btn-bg: var(--surface-2);
  --btn-fg: var(--text);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.2s, border-color 0.2s, opacity 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.btn .icon {
  transition: transform 0.25s var(--ease);
}

.btn:hover .icon {
  transform: translateX(2px);
}

.btn-primary {
  --btn-fg: #fff;
  background: var(--grad);
  background-size: 160% 100%;
  background-position: 0 0;
  box-shadow: var(--shadow-glow);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-position 0.5s var(--ease);
}

.btn-primary:hover {
  background-position: 100% 0;
  box-shadow: 0 22px 56px -16px rgba(109, 124, 255, 0.7);
}

.btn-ghost {
  --btn-bg: transparent;
  border-color: var(--border-strong);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  --btn-bg: var(--surface-2);
}

.btn-success {
  --btn-bg: rgba(34, 197, 94, 0.14);
  --btn-fg: var(--success);
  border-color: rgba(34, 197, 94, 0.3);
}

.btn-danger {
  --btn-bg: rgba(244, 63, 94, 0.12);
  --btn-fg: var(--danger);
  border-color: rgba(244, 63, 94, 0.28);
}

.btn-sm {
  padding: 9px 14px;
  font-size: 0.875rem;
  border-radius: 12px;
}

.btn-lg {
  padding: 16px 26px;
  font-size: 1rem;
  border-radius: 16px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s;
}

.icon-btn:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  padding: 0;
}

.field-label em {
  font-style: normal;
  font-weight: 500;
  color: var(--text-faint);
}

.field input,
.field textarea,
.phone-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-faint);
}

.field input:focus,
.field textarea:focus,
.phone-input:focus-within {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(139, 124, 255, 0.18);
}

.field.has-error input,
.field.has-error textarea,
.field.has-error .phone-input {
  border-color: var(--danger);
}

.field-error {
  min-height: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--danger);
}

.field-error:empty {
  display: none;
}

.input-icon {
  position: relative;
  display: block;
}

.input-icon .icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
}

.input-icon input {
  padding-left: 46px;
}

.alert {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid;
}

.alert-success {
  color: var(--success);
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.25);
}

.alert-error {
  color: var(--danger);
  background: rgba(244, 63, 94, 0.1);
  border-color: rgba(244, 63, 94, 0.25);
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: var(--blob-opacity);
  animation: blob-float 18s ease-in-out infinite;
}

.blob-1 {
  width: 520px;
  height: 520px;
  top: -180px;
  left: -120px;
  background: #6d5cff;
}

.blob-2 {
  width: 460px;
  height: 460px;
  top: 40px;
  right: -140px;
  background: #0ea5e9;
  animation-delay: -6s;
}

.blob-3 {
  width: 360px;
  height: 360px;
  bottom: -160px;
  left: 40%;
  background: #c026d3;
  opacity: calc(var(--blob-opacity) * 0.6);
  animation-delay: -12s;
}

@keyframes blob-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(40px, -30px) scale(1.08);
  }
  66% {
    transform: translate(-30px, 30px) scale(0.95);
  }
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.no-js [data-reveal] {
  opacity: 1;
  transform: none;
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
    --header-h: 64px;
  }

  .btn-lg {
    padding: 15px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
