:root {
  --bg: #0a0a0c;
  --bg-elev: #131318;
  --bg-elev-hi: #1a1a21;
  --bg-input: #16161c;
  --bg-input-hover: #1c1c24;
  --bg-input-focus: #1f1f28;

  --text: #f3f3f6;
  --text-muted: #9b9ba3;
  --text-subtle: #6a6a72;

  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --line-bright: rgba(255, 255, 255, 0.28);

  --accent: #ff8a3d;
  --accent-bright: #ffa05c;
  --accent-soft: rgba(255, 138, 61, 0.12);
  --accent-soft-strong: rgba(255, 138, 61, 0.22);
  --accent-glow: rgba(255, 138, 61, 0.42);

  --warn: #ff5c7a;
  --warn-soft: rgba(255, 92, 122, 0.1);
  --warn-line: rgba(255, 92, 122, 0.32);

  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 14px;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", system-ui, sans-serif;
  --font-tight: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter Tight", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  color-scheme: dark;
  background-color: var(--bg);
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90vw 55vh at 50% -8%, rgba(255, 138, 61, 0.09), transparent 70%),
    radial-gradient(ellipse 60vw 40vh at 100% 0%, rgba(255, 138, 61, 0.05), transparent 70%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  position: relative;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 72px 28px 96px;
  position: relative;
}

@media (max-width: 640px) {
  .page { padding: 36px 18px 64px; }
}

/* ── Header ────────────────────────────────────────── */

.page-header { margin-bottom: 56px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 32px;
  padding: 0;
  background: transparent;
}

.brand::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0 0 0 3px rgba(255, 138, 61, 0.18),
    0 0 16px var(--accent-glow);
  animation: pulse 2.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 138, 61, 0.16), 0 0 14px var(--accent-glow); }
  50% { box-shadow: 0 0 0 4px rgba(255, 138, 61, 0.24), 0 0 22px var(--accent-glow); }
}

.page-header h1 {
  font-family: var(--font-tight);
  font-weight: 600;
  font-size: clamp(34px, 5.4vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  color: var(--text);
}

.lede {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.55;
  max-width: 56ch;
  letter-spacing: -0.005em;
}

.lede.secondary {
  color: var(--text-subtle);
  font-size: 15px;
}

/* ── Form layout ───────────────────────────────────── */

.form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Sections — flat with thin dividers, no floating cards. */
.card {
  position: relative;
  padding: 36px 0 8px;
  background: transparent;
  border: none;
  border-top: 1px solid var(--line);
}

.card:first-of-type { border-top: none; padding-top: 0; }

.card h2 {
  font-family: var(--font-tight);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 6px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

.card h2::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.section-hint {
  margin: 0 0 24px;
  color: var(--text-subtle);
  font-size: 14px;
}

.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: 1fr 1fr; }
@media (max-width: 580px) { .grid.two { grid-template-columns: 1fr; } }
.span-2 { grid-column: 1 / -1; }

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 18px;
}
.field:last-child { margin-bottom: 0; }

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.label {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
  letter-spacing: -0.005em;
}

.label em {
  font-style: normal;
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 4px;
}

.help { font-size: 13px; color: var(--text-subtle); margin-top: 2px; }

/* ── Inputs ────────────────────────────────────────── */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg-input);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 13px 15px;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease), box-shadow 0.18s var(--ease);
  appearance: none;
  -webkit-appearance: none;
}

textarea {
  resize: vertical;
  min-height: 96px;
  line-height: 1.5;
  font-family: inherit;
}

select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%239b9ba3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-position: right 16px center;
  background-repeat: no-repeat;
  background-size: 12px 8px;
  padding-right: 40px;
  cursor: pointer;
}

select option {
  background: var(--bg-elev);
  color: var(--text);
}

input::placeholder, textarea::placeholder { color: var(--text-subtle); }

input:hover, select:hover, textarea:hover {
  border-color: var(--line-strong);
  background: var(--bg-input-hover);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-input-focus);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--warn-line);
  background: var(--warn-soft);
}

/* ── Help trigger ──────────────────────────────────── */

.help-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 10px 5px 8px;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  white-space: nowrap;
}

.help-trigger svg { width: 12px; height: 12px; }

.help-trigger:hover {
  background: var(--accent-soft);
  border-color: var(--accent-soft-strong);
}

.help-trigger[aria-expanded="true"] {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.help-trigger[aria-expanded="true"] .help-icon-plus { transform: rotate(45deg); }

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

/* ── Help panel ────────────────────────────────────── */

.help-panel {
  height: 0;
  overflow: hidden;
  transition: height 0.32s var(--ease);
}

.help-panel-inner {
  margin-top: 12px;
  padding: 22px 22px 20px;
  border-radius: var(--r-lg);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
}

.help-panel-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.help-panel-intro {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

.help-panel-intro:last-child { margin-bottom: 0; }

.help-panel ul {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-panel ul li {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
}

.help-panel ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}

.help-panel ul li strong { color: var(--text); font-weight: 600; }

.help-panel-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 14px;
}

.help-card {
  padding: 14px 16px;
  background: var(--bg-elev-hi);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.help-card:hover {
  border-color: var(--line-strong);
  background: var(--bg-input-focus);
}

.help-card-text { flex: 1 1 220px; min-width: 0; }
.help-card-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
  letter-spacing: -0.005em;
}
.help-card-text span {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.help-card-pick {
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 8px 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s var(--ease);
  letter-spacing: -0.005em;
}

.help-card-pick:hover {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  transform: translateY(-1px);
}

.help-panel-foot {
  font-size: 12.5px;
  color: var(--text-subtle);
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  line-height: 1.5;
}

/* ── Callout ───────────────────────────────────────── */

.callout {
  position: relative;
  padding: 18px 22px 18px 22px;
  margin: 28px 0 0;
  border-radius: var(--r-lg);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
}

.callout-eyebrow {
  margin: 0 0 6px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
}

.callout p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.callout strong { color: var(--text); font-weight: 600; }

/* ── Submit ────────────────────────────────────────── */

.form-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  align-items: stretch;
}

.legal {
  font-size: 12.5px;
  color: var(--text-subtle);
  margin: 0;
  line-height: 1.55;
}

.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  border-radius: var(--r-md);
  padding: 16px 28px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
  box-shadow: 0 0 0 0 var(--accent-glow);
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 138, 61, 0.32);
}

.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-primary:disabled { cursor: progress; opacity: 0.6; }

.btn-primary[data-loading="true"] .btn-spinner { display: inline-block; }
.btn-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(10, 10, 12, 0.3);
  border-top-color: var(--bg);
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Status ────────────────────────────────────────── */

.status {
  margin-top: 12px;
  padding: 13px 16px;
  border-radius: var(--r-md);
  font-size: 14px;
  display: none;
}

.status.error {
  display: block;
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  color: var(--warn);
}

/* ── Success screen ────────────────────────────────── */

.success-screen { margin-top: 32px; }

.success-card {
  padding: 56px 32px;
  text-align: center;
  border-radius: var(--r-lg);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
}

.success-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 32px var(--accent-glow);
}

.success-mark svg { width: 26px; height: 26px; }

.success-card h2 {
  font-family: var(--font-tight);
  font-weight: 600;
  font-size: 30px;
  margin: 0 0 12px;
  letter-spacing: -0.025em;
  color: var(--text);
}

.success-card p {
  margin: 0 auto;
  color: var(--text-muted);
  max-width: 44ch;
  line-height: 1.6;
  font-size: 15px;
}

.success-card .success-meta {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-subtle);
}

/* ── Footer ────────────────────────────────────────── */

.page-footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
  color: var(--text-subtle);
  letter-spacing: 0.04em;
}

.page-footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .help-panel { transition: none; }
  .brand::before { animation: none; }
}
