@import url("fonts.css");

/* ==========================================================================
   Starlite Relay — brand foundation
   Deep navy, copper/orange gradients, fine blue waves, silver wordmark.
   ========================================================================== */

:root {
  --navy-950: #060d1c;
  --navy-900: #0b1730;
  --navy-850: #0e1b36;
  --navy-800: #111e3b;
  --navy-750: #16264a;
  --navy-700: #1b2c54;
  --ink: #eef3fb;
  --ink-soft: #c9d4e5;
  --muted: #93a3be;
  --faint: #6c7e9c;
  --copper: #c97b4a;
  --copper-light: #e8a06b;
  --orange: #ff7a2f;
  --orange-soft: #ff9a4d;
  --orange-pale: #ffc46b;
  --blue: #4e8fd8;
  --blue-soft: #7fb2e5;
  --green: #4fbf8b;
  --red: #e2685e;
  --line: rgba(151, 171, 204, 0.16);
  --line-strong: rgba(151, 171, 204, 0.28);
  --surface: rgba(17, 30, 59, 0.72);
  --surface-2: rgba(23, 38, 74, 0.52);
  --surface-3: rgba(7, 14, 31, 0.55);
  --shadow: 0 24px 60px rgba(2, 6, 16, 0.45);
  --shadow-sm: 0 10px 26px rgba(2, 6, 16, 0.32);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --font-display: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --wrap: 1160px;
  --gutter: clamp(20px, 5vw, 48px);
  --ease: cubic-bezier(0.22, 0.8, 0.28, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--navy-900);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--orange-pale); text-decoration: none; }
a:hover { color: #ffd9a6; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
::selection { background: rgba(255, 122, 47, 0.35); color: #fff; }

:focus-visible {
  outline: 2px solid var(--orange-soft);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 999;
  background: var(--orange);
  color: #1a0e06;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 10px;
  transition: top 0.2s;
}
.skip-link:focus { top: 16px; color: #1a0e06; }

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.stack > * + * { margin-top: var(--gap, 16px); }
.muted { color: var(--muted); }
.ink-soft { color: var(--ink-soft); }
.center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.nowrap { white-space: nowrap; }

/* --------------------------------------------------------------- background */
.site-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(1100px 700px at 50% -12%, #1a2b52 0%, rgba(17, 30, 59, 0) 60%),
    radial-gradient(900px 600px at 88% 18%, rgba(201, 123, 74, 0.1) 0%, rgba(11, 23, 48, 0) 55%),
    linear-gradient(180deg, #0d1934 0%, #0b1730 42%, #070f22 100%);
}
.site-bg::before {
  content: "";
  position: absolute;
  inset: -8% -10%;
  background: url("../img/waves.svg") repeat;
  background-size: 1400px auto;
  opacity: 0.55;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.25) 55%, transparent 92%);
}
.site-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(900px 480px at 50% 0%, rgba(255, 122, 47, 0.08), transparent 70%);
  pointer-events: none;
}
.swoosh {
  position: absolute;
  height: 300px;
  border-radius: 50%;
  filter: blur(46px);
  opacity: 0.7;
  transform: rotate(-9deg);
}
.swoosh-a {
  top: -90px;
  right: -18vw;
  width: 80vw;
  background: linear-gradient(90deg, transparent 4%, rgba(201, 123, 74, 0.34) 34%, rgba(255, 122, 47, 0.22) 62%, transparent 96%);
}
.swoosh-b {
  top: 48vh;
  left: -26vw;
  width: 72vw;
  height: 240px;
  background: linear-gradient(90deg, transparent 6%, rgba(78, 143, 216, 0.18) 38%, rgba(201, 123, 74, 0.16) 70%, transparent 96%);
  opacity: 0.55;
}

/* ------------------------------------------------------------------ brand */
.brandline {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  min-height: 44px;
}
.brandline:hover { color: var(--ink); }
.brandline-mark { width: 34px; height: 34px; flex: 0 0 auto; }
.brandline-type { display: flex; flex-direction: column; line-height: 1; }
.brandline-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.11em;
  background: linear-gradient(180deg, #fff 0%, #dbe4f2 42%, #9daec6 66%, #eef3fb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.brandline-word sup {
  font-size: 7px;
  letter-spacing: 0;
  color: var(--orange-soft);
  -webkit-text-fill-color: var(--orange-soft);
  margin-left: 2px;
  top: -0.6em;
}
.brandline-sub {
  margin-top: 5px;
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.34em;
  color: var(--copper-light);
  white-space: nowrap;
}

/* ------------------------------------------------------------------ type */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--copper-light);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--copper));
}
.display { font-size: clamp(34px, 6vw, 58px); letter-spacing: -0.035em; line-height: 1.02; }
.h2 { font-size: clamp(26px, 3.6vw, 38px); letter-spacing: -0.028em; }
.h3 { font-size: clamp(18px, 2.2vw, 22px); }
.lede { font-size: clamp(16px, 1.8vw, 18px); color: var(--muted); max-width: 58ch; }
.tiny { font-size: 12.5px; line-height: 1.55; color: var(--faint); }

/* --------------------------------------------------------------- rules */
.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, transparent, rgba(201, 123, 74, 0.45) 18%, rgba(255, 154, 77, 0.5) 82%, transparent);
  position: relative;
}
.rule::before, .rule::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--orange-soft);
  transform: translateY(-50%);
  box-shadow: 0 0 8px rgba(255, 122, 47, 0.6);
}
.rule::before { left: 0; }
.rule::after { right: 0; }
.rule-short {
  display: flex;
  align-items: center;
  gap: 9px;
  width: max-content;
}
.rule-short::before, .rule-short::after {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--orange-soft);
  flex: 0 0 auto;
}
.rule-short span {
  display: block;
  width: 54px;
  height: 1px;
  background: linear-gradient(90deg, rgba(201, 123, 74, 0.2), rgba(255, 154, 77, 0.75), rgba(201, 123, 74, 0.2));
}

/* ------------------------------------------------------------------ buttons */
.btn {
  --btn-bg: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-align: center;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s, border-color 0.18s, color 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { color: var(--ink); }
.btn:active { transform: translateY(1px) scale(0.995); }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
  filter: saturate(0.4);
}
.btn .icon { width: 18px; height: 18px; flex: 0 0 auto; }
.btn-primary {
  background: linear-gradient(135deg, #ffc46b 0%, #ff8a3d 42%, #f26522 100%);
  color: #1c0d03;
  box-shadow: 0 10px 28px rgba(242, 101, 34, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-primary:hover {
  color: #1c0d03;
  box-shadow: 0 14px 34px rgba(242, 101, 34, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--line-strong);
  color: var(--ink);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.075); border-color: rgba(255, 196, 107, 0.4); }
.btn-quiet {
  background: transparent;
  color: var(--ink-soft);
  padding-inline: 12px;
}
.btn-quiet:hover { background: rgba(255, 255, 255, 0.05); color: var(--ink); }
.btn-outline {
  border-color: rgba(255, 154, 77, 0.45);
  color: var(--orange-pale);
  background: rgba(255, 122, 47, 0.06);
}
.btn-outline:hover { background: rgba(255, 122, 47, 0.13); border-color: rgba(255, 196, 107, 0.7); color: #ffd9a6; }
.btn-danger {
  background: rgba(226, 104, 94, 0.12);
  border-color: rgba(226, 104, 94, 0.4);
  color: #ffb3ad;
}
.btn-danger:hover { background: rgba(226, 104, 94, 0.2); color: #ffd0cc; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 13px; gap: 7px; }
.btn-sm .icon { width: 15px; height: 15px; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon {
  width: 40px; height: 40px;
  min-height: 0;
  padding: 0;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.btn-icon:hover { background: rgba(255, 255, 255, 0.08); }
.btn-icon .icon { width: 18px; height: 18px; }

/* ------------------------------------------------------------------ badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  white-space: nowrap;
}
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-orange { color: #ffbf8a; border-color: rgba(255, 122, 47, 0.35); background: rgba(255, 122, 47, 0.1); }
.badge-green { color: #8fe3bb; border-color: rgba(79, 191, 139, 0.35); background: rgba(79, 191, 139, 0.1); }
.badge-blue { color: #a8cdf5; border-color: rgba(78, 143, 216, 0.38); background: rgba(78, 143, 216, 0.1); }
.badge-red { color: #ffb0a9; border-color: rgba(226, 104, 94, 0.38); background: rgba(226, 104, 94, 0.1); }
.badge-gray { color: #aebbd0; border-color: rgba(151, 171, 204, 0.22); background: rgba(151, 171, 204, 0.07); }
.badge-copper { color: #f0bc94; border-color: rgba(201, 123, 74, 0.4); background: rgba(201, 123, 74, 0.12); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.dot-live {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--orange-soft);
  box-shadow: 0 0 0 0 rgba(255, 154, 77, 0.6);
  animation: livePulse 2.4s infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 154, 77, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(255, 154, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 154, 77, 0); }
}

/* ------------------------------------------------------------------ panels */
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(23, 38, 74, 0.66), rgba(11, 23, 48, 0.78));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.panel-pad { padding: clamp(20px, 3vw, 30px); }
.panel-hover { transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s; }
.panel-hover:hover { border-color: rgba(255, 196, 107, 0.28); transform: translateY(-2px); box-shadow: var(--shadow); }

/* ------------------------------------------------------------------ forms */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .field-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 4px;
}
.req { color: var(--orange-soft); }
.optional { color: var(--faint); font-weight: 500; font-size: 11.5px; }
.input, .select, .textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: rgba(6, 13, 28, 0.55);
  color: var(--ink);
  font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  appearance: none;
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: #627391; }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(151, 171, 204, 0.42); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: rgba(255, 154, 77, 0.75);
  box-shadow: 0 0 0 3px rgba(255, 122, 47, 0.15);
  background: rgba(6, 13, 28, 0.8);
}
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2393a3be' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.select option { background: #0d1934; color: var(--ink); }
.field-error { font-size: 12px; color: #ff9d95; min-height: 0; }
.input[aria-invalid="true"], .select[aria-invalid="true"] {
  border-color: rgba(226, 104, 94, 0.7);
  box-shadow: 0 0 0 3px rgba(226, 104, 94, 0.1);
}
.hint { font-size: 12px; color: var(--faint); line-height: 1.5; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .span-2 { grid-column: 1 / -1; }
}

/* --------------------------------------------------------------- modal/toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(3, 7, 16, 0.76);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  width: min(620px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: linear-gradient(180deg, #16264a, #0b1730 70%);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  transform: translateY(10px) scale(0.99);
  transition: transform 0.22s var(--ease);
}
.modal-backdrop.open .modal { transform: none; }
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2, .modal-head h3 { margin: 0; font-size: 19px; }
.modal-body { padding: 20px 22px; }
.modal-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px 20px;
  border-top: 1px solid var(--line);
}

.toast-region {
  position: fixed;
  z-index: 300;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(440px, calc(100vw - 28px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(16, 29, 57, 0.97);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.45;
  animation: toastIn 0.25s var(--ease);
  pointer-events: auto;
}
.toast .icon { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; color: var(--orange-pale); }
.toast.ok .icon { color: var(--green); }
.toast.err .icon { color: #ff9d95; }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: opacity 0.2s, transform 0.2s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* ------------------------------------------------------------------ utility */
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.wrap-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.grow { flex: 1 1 auto; min-width: 0; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 26px; height: 26px; }
.divider-space { margin-block: clamp(48px, 8vw, 90px); }
.hide { display: none !important; }

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

/* compact wordmark: STARLITE silver, RELAY orange (matches the card) */
.brandline-word em {
  font-style: normal;
  background: linear-gradient(180deg, #ffd79a 0%, #ffb066 38%, #ff8a3d 68%, #e85f1f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (max-width: 620px) {
  .toast-region {
    top: auto;
    bottom: 120px;
    width: calc(100% - 24px);
    max-width: 420px;
  }
}

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