:root {
  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-spec: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

  --ps-primary-50: #f0faff;
  --ps-primary-100: #d1effe;
  --ps-primary-200: #bae7fd;
  --ps-primary-300: #9bdbfc;
  --ps-primary-400: #87d5fc;
  --ps-primary-500: #69cafb;
  --ps-primary-600: #60b8e4;
  --ps-primary-700: #4b8fb2;
  --ps-primary-800: #3a6f8a;
  --ps-primary-900: #2c5569;

  --bg: #f7f9fb;
  --surface: #ffffff;
  --surface-soft: #f3f6f9;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-soft: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --danger: #dc2626;
  --success: #059669;
  --shadow-card: 0 24px 60px -30px rgba(15, 23, 42, 0.35);
  --radius: 14px;
}

.dark {
  --bg: #070b12;
  --surface: #0d131d;
  --surface-soft: #131b27;
  --text: #e6edf5;
  --text-muted: #93a3b8;
  --text-soft: #64748b;
  --border: #1e2836;
  --border-strong: #2b3747;
  --danger: #f87171;
  --success: #34d399;
  --shadow-card: 0 30px 70px -32px rgba(0, 0, 0, 0.8);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .font-display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin: 0;
}

.font-spec {
  font-family: var(--font-spec);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(circle at 50% 20%, var(--ps-primary-50), transparent 70%);
}

.dark .aurora-bg {
  background: radial-gradient(circle at 50% 20%, rgba(105, 202, 251, 0.08), transparent 70%);
}

.aurora {
  position: absolute;
  border-radius: 9999px;
  filter: blur(80px);
  opacity: 0.5;
}

.dark .aurora {
  opacity: 0.3;
}

.aurora-1 {
  width: 38rem;
  height: 38rem;
  top: -8rem;
  left: 4%;
  background: var(--ps-primary-300);
  animation: drift-1 18s ease-in-out infinite;
}

.aurora-2 {
  width: 32rem;
  height: 32rem;
  top: 18%;
  right: 2%;
  background: var(--ps-primary-500);
  animation: drift-2 22s ease-in-out infinite;
}

.aurora-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(105, 202, 251, 0.16) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 50% 30%, black, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, black, transparent 78%);
}

@keyframes drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8rem, 3rem) scale(1.1); }
}

@keyframes drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1.05); }
  50% { transform: translate(-6rem, -4rem) scale(0.95); }
}

.ink-strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  background: linear-gradient(90deg, #00aeef, #ec008c, #ffd400, #69cafb);
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand img {
  height: 30px;
  width: auto;
  display: block;
}

.brand .logo-dark {
  display: none;
}

.dark .brand .logo-light {
  display: none;
}

.dark .brand .logo-dark {
  display: block;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.help-link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px dashed var(--border-strong);
  padding-bottom: 1px;
}

.help-link:hover {
  color: var(--ps-primary-700);
  border-color: var(--ps-primary-500);
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--ps-primary-400);
  color: var(--ps-primary-600);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
}

.theme-toggle .icon-sun {
  display: none;
}

.dark .theme-toggle .icon-sun {
  display: block;
}

.dark .theme-toggle .icon-moon {
  display: none;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--ps-primary-700);
  background: var(--ps-primary-50);
  border: 1px solid var(--ps-primary-200);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 20px;
}

.dark .eyebrow {
  color: var(--ps-primary-300);
  background: rgba(105, 202, 251, 0.08);
  border-color: rgba(105, 202, 251, 0.22);
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--ps-primary-500);
}

.intro h1 {
  font-size: 40px;
  line-height: 1.1;
  font-weight: 700;
}

.intro h1 em {
  font-style: normal;
  color: var(--ps-primary-600);
}

.intro p.lead {
  margin: 18px 0 32px;
  color: var(--text-muted);
  font-size: 16px;
  max-width: 44ch;
}

.perk-list {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  gap: 14px;
}

.perk-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.perk-list .tick {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--ps-primary-50);
  color: var(--ps-primary-700);
  border: 1px solid var(--ps-primary-200);
  margin-top: 2px;
}

.dark .perk-list .tick {
  background: rgba(105, 202, 251, 0.1);
  border-color: rgba(105, 202, 251, 0.25);
  color: var(--ps-primary-300);
}

.perk-list .tick svg {
  width: 13px;
  height: 13px;
}

.perk-list strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.perk-list span {
  font-size: 13px;
  color: var(--text-muted);
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.stat-row .stat-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.stat-row .stat-label {
  font-size: 11px;
  color: var(--text-soft);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.card-head {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.card-head h2 {
  font-size: 19px;
  font-weight: 600;
}

.card-head p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

form {
  padding: 26px 28px 30px;
}

fieldset {
  border: 0;
  margin: 0 0 26px;
  padding: 0;
}

fieldset:last-of-type {
  margin-bottom: 20px;
}

legend {
  font-size: 11px;
  color: var(--text-soft);
  font-family: var(--font-spec);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding: 0;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

label .req {
  color: var(--danger);
  margin-left: 2px;
}

.hint {
  font-size: 12px;
  color: var(--text-soft);
}

input[type='text'],
input[type='email'],
input[type='tel'],
input[type='date'],
select,
textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 10px 12px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

textarea {
  resize: vertical;
  min-height: 92px;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 34px;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-soft);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--ps-primary-500);
  box-shadow: 0 0 0 3px rgba(105, 202, 251, 0.25);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea,
.field.has-error .chip-group {
  border-color: var(--danger);
}

.error-text {
  font-size: 12px;
  color: var(--danger);
  display: none;
}

.field.has-error .error-text {
  display: block;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
}

.chip {
  position: relative;
  display: inline-flex;
}

.chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.chip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: all 0.18s ease;
}

.chip span:hover {
  border-color: var(--ps-primary-400);
  color: var(--ps-primary-700);
}

.chip input:checked + span {
  background: var(--ps-primary-50);
  border-color: var(--ps-primary-500);
  color: var(--ps-primary-800);
  font-weight: 500;
}

.dark .chip input:checked + span {
  background: rgba(105, 202, 251, 0.12);
  color: var(--ps-primary-200);
}

.chip input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(105, 202, 251, 0.3);
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-muted);
}

.consent input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--ps-primary-500);
  flex: none;
}

.consent a {
  color: var(--ps-primary-700);
}

.dark .consent a {
  color: var(--ps-primary-300);
}

.submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--ps-primary-500);
  color: #000;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 12px 30px -12px rgba(105, 202, 251, 0.8);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
  background: var(--ps-primary-400);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: progress;
}

.btn-primary svg {
  width: 16px;
  height: 16px;
}

.btn-primary .spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: #000;
  border-radius: 999px;
  animation: spin 0.7s linear infinite;
}

.btn-primary.is-loading .spinner {
  display: block;
}

.btn-primary.is-loading .arrow {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.submit-note {
  font-size: 12px;
  color: var(--text-soft);
  max-width: 30ch;
}

.success {
  display: none;
  padding: 48px 32px 52px;
  text-align: center;
}

.success.is-shown {
  display: block;
  animation: fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.success .seal {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  background: var(--ps-primary-50);
  border: 1px solid var(--ps-primary-200);
  color: var(--ps-primary-700);
}

.dark .success .seal {
  background: rgba(105, 202, 251, 0.1);
  border-color: rgba(105, 202, 251, 0.25);
  color: var(--ps-primary-300);
}

.success .seal svg {
  width: 26px;
  height: 26px;
}

.success h2 {
  font-size: 23px;
}

.success p {
  margin: 12px auto 26px;
  max-width: 42ch;
  color: var(--text-muted);
  font-size: 14px;
}

.summary {
  text-align: left;
  max-width: 420px;
  margin: 0 auto 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 16px 18px;
  display: grid;
  gap: 10px;
}

.summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}

.summary dt {
  color: var(--text-soft);
}

.summary dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
}

.success-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-ghost:hover {
  border-color: var(--ps-primary-500);
  color: var(--ps-primary-700);
}

.dark .btn-ghost:hover {
  color: var(--ps-primary-300);
}

.btn-ghost svg {
  width: 16px;
  height: 16px;
}

.page-footer {
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-soft);
}

.page-footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.page-footer a:hover {
  color: var(--ps-primary-600);
}

@media (max-width: 1024px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .intro h1 {
    font-size: 32px;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 22px 16px 48px;
  }

  .topbar {
    margin-bottom: 28px;
  }

  .intro h1 {
    font-size: 27px;
  }

  .intro p.lead {
    font-size: 15px;
  }

  .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  form,
  .card-head {
    padding-left: 18px;
    padding-right: 18px;
  }

  .success {
    padding: 36px 18px 40px;
  }

  .submit-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary {
    justify-content: center;
  }

  .help-link {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .aurora,
  .success.is-shown,
  .btn-primary .spinner {
    animation: none !important;
  }
  .btn-primary:hover:not(:disabled) {
    transform: none;
  }
}
