/* Vela Performance — shared tokens and primitives */
:root {
  --navy-950: #020b1f;
  --navy-900: #03102b;
  --navy-850: #061838;
  --navy-800: #0a2148;
  --navy-700: #13305f;
  --navy-600: #24467d;
  --ice: #acd7f8;
  --ice-300: #cfe7fb;
  --ice-100: #eaf4fd;
  --ice-50: #f5f9fe;
  --orange: #f07f1d;
  --orange-600: #d96a0b;
  --orange-100: #fdeedf;
  --ink: #06142e;
  --ink-2: #33445f;
  --ink-3: #5b6a82;
  --line: #d6e0ec;
  --line-2: #e7edf5;
  --paper: #f6f9fc;
  --white: #ffffff;
  --ok: #1f7a4d;
  --ok-100: #e2f3ea;
  --warn: #9a5a00;
  --warn-100: #fdf0d9;
  --bad: #b3261e;
  --bad-100: #fbe6e4;

  --f-display: "Saira", "Montserrat", sans-serif;
  --f-body: "Montserrat", system-ui, sans-serif;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 18px;
  --shadow-1: 0 1px 2px rgba(6, 20, 46, .06), 0 4px 14px rgba(6, 20, 46, .06);
  --shadow-2: 0 2px 6px rgba(6, 20, 46, .08), 0 18px 40px rgba(6, 20, 46, .12);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body { margin: 0; font-family: var(--f-body); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--paper); font-variant-numeric: lining-nums; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
::selection { background: var(--orange); color: var(--white); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
html { scrollbar-color: var(--navy-600) var(--navy-950); }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Display type: the logo's wide oblique voice */
.display { font-family: var(--f-display); font-style: italic; font-weight: 800; font-stretch: 125%; letter-spacing: -0.01em; line-height: .95; text-transform: uppercase; text-wrap: balance; }
.spaced { font-family: var(--f-body); font-weight: 600; text-transform: uppercase; letter-spacing: .28em; font-size: .75rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 48px; padding: 0 1.4em; border: 0; border-radius: 999px; font-family: var(--f-body); font-weight: 700; font-size: .95rem; letter-spacing: .01em; text-decoration: none; cursor: pointer; transition: background-color .2s var(--ease-out), color .2s var(--ease-out), transform .2s var(--ease-out), box-shadow .2s var(--ease-out); white-space: nowrap; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--orange); color: var(--navy-950); box-shadow: 0 2px 4px rgba(2, 11, 31, .18), 0 8px 18px -8px rgba(2, 11, 31, .45); }
.btn-primary:hover { background: #ff8f2e; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--ice); box-shadow: inset 0 0 0 1.5px rgba(172, 215, 248, .45); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ice); color: var(--white); }
.btn-ink { background: var(--navy-900); color: var(--white); }
.btn-ink:hover { background: var(--navy-700); }
.btn-line { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-line:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.btn-danger { background: var(--white); color: var(--bad); box-shadow: inset 0 0 0 1.5px #efc3bf; }
.btn-danger:hover { background: var(--bad-100); }
.btn-sm { min-height: 36px; padding: 0 1em; font-size: .85rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--navy-950) transparent var(--navy-950) transparent; animation: spin .7s linear infinite; }
.btn-ink.is-busy::after { border-color: var(--white) transparent var(--white) transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Status pills */
.pill { display: inline-flex; align-items: center; gap: .45em; padding: .28em .75em; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; line-height: 1.4; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-open { background: var(--orange); color: var(--navy-950); }
.pill-waitlist { background: var(--warn-100); color: var(--warn); }
.pill-closed { background: rgba(172, 215, 248, .12); color: var(--ice); }
.pill-draft { background: var(--line-2); color: var(--ink-3); }

/* Form controls */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .label { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.field .req { color: var(--orange-600); margin-left: 2px; }
.field .hint { font-size: .78rem; color: var(--ink-3); line-height: 1.45; }
.input, .select, .textarea { width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; font-size: 1rem; color: var(--ink); background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r); transition: border-color .15s, box-shadow .15s; appearance: none; caret-color: var(--orange); }
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2333445f' stroke-width='1.8'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.input::placeholder, .textarea::placeholder { color: #66758c; }
.input:hover, .select:hover, .textarea:hover { border-color: #b9c7d8; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--navy-700); box-shadow: 0 0 0 4px rgba(172, 215, 248, .55); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--bad); }
.field .error { display: none; font-size: .78rem; font-weight: 600; color: var(--bad); }
.field.has-error .error { display: block; }

.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--white); font-size: .92rem; font-weight: 600; color: var(--ink-2); transition: all .15s; cursor: pointer; }
.choice input:checked + span { border-color: var(--navy-900); background: var(--navy-900); color: var(--white); }
.choice input:focus-visible + span { box-shadow: 0 0 0 4px rgba(172, 215, 248, .7); }
.choice:hover span { border-color: #b9c7d8; }

.check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: .9rem; line-height: 1.5; color: var(--ink-2); cursor: pointer; }
.check input { appearance: none; width: 22px; height: 22px; margin: 1px 0 0; border: 1.5px solid #9fb0c6; border-radius: 6px; background: var(--white); display: grid; place-items: center; cursor: pointer; transition: all .15s; }
.check input:checked { background: var(--navy-900); border-color: var(--navy-900); }
.check input:checked::after { content: ""; width: 11px; height: 6px; border: 2px solid var(--white); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check.has-error input { border-color: var(--bad); }

/* In-page dialog (no prompt/confirm) */
dialog.vp-dialog { border: 0; padding: 0; border-radius: var(--r-lg); box-shadow: var(--shadow-2); width: min(440px, calc(100vw - 32px)); color: var(--ink); }
dialog.vp-dialog::backdrop { background: rgba(2, 11, 31, .55); }
.vp-dialog .dlg-body { padding: 24px 24px 8px; }
.vp-dialog h3 { margin: 0 0 8px; font-size: 1.15rem; }
.vp-dialog p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.vp-dialog .dlg-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px 24px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--navy-900); color: var(--white); padding: 12px 18px; border-radius: 999px; font-size: .9rem; font-weight: 600; box-shadow: var(--shadow-2); transition: all .3s var(--ease-out); z-index: 100; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); }
