/* ===================================================================
   LaunchPad — shared stylesheet
   Extracted from the original single-page site so index.html,
   submit.html and join.html can share one design system.
   =================================================================== */

:root {
  --bg: #08090b;
  --surface: #101216;
  --paper: #f4f4f0;
  --muted: #9b9ea7;
  --amber: #f5b942;
  --amber-soft: #ffcb5c;
}

html {
  scroll-behavior: smooth;
}
@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;
  }
}

body {
  background: var(--bg);
  color: var(--paper);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle grid background */
.grid-bg {
  background-image:
    linear-gradient(rgba(244, 244, 240, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 244, 240, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(
    ellipse at 50% 30%,
    black 30%,
    transparent 75%
  );
}

/* Ambient glow */
.ambient {
  position: absolute;
  border-radius: 9999px;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(6px);
  transition:
    opacity 900ms cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform, filter;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 800ms ease,
    transform 800ms ease;
}
.reveal-stagger.in > * {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 120ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 240ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 360ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 480ms; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 600ms; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: 720ms; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: 840ms; }

/* Glowing dot */
.pulse-dot {
  position: relative;
  width: 8px;
  height: 8px;
  background: var(--amber);
  border-radius: 9999px;
  box-shadow:
    0 0 12px rgba(245, 185, 66, 0.9),
    0 0 28px rgba(245, 185, 66, 0.5);
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 9999px;
  border: 1px solid rgba(245, 185, 66, 0.5);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Trajectory */
.trajectory path.trail {
  stroke-dasharray: 4 6;
  animation: dash 18s linear infinite;
}
@keyframes dash {
  to { stroke-dashoffset: -400; }
}

.traveler {
  offset-path: path("M 60 420 C 160 360, 240 240, 340 200 S 520 120, 640 60");
  offset-rotate: 0deg;
  animation: travel 9s ease-in-out infinite;
}
@keyframes travel {
  0% { offset-distance: 0%; opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}

.field-dot {
  animation: twinkle 5s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.9; }
}

/* Process card */
.process-card {
  position: relative;
  transition:
    transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1),
    background 500ms ease;
}
.process-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 28px;
  width: 28px;
  height: 1px;
  background: var(--amber);
  transition: width 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.process-card:hover { transform: translateY(-6px); }
.process-card:hover::before { width: 64px; }
.process-card:hover .card-num { color: var(--amber); }
.process-card:hover .card-bg {
  background: radial-gradient(
    120% 80% at 0% 0%,
    rgba(245, 185, 66, 0.08),
    transparent 60%
  );
}

/* Discipline flow */
.discipline {
  display: inline-block;
  transition:
    color 400ms ease,
    transform 400ms ease;
}
.discipline:hover { color: var(--amber); transform: translateY(-2px); }

/* Vertical path */
.vpath-line {
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(245, 185, 66, 0.6) 20%,
    rgba(245, 185, 66, 0.6) 80%,
    transparent
  );
}
.vpath-node {
  box-shadow:
    0 0 0 1px rgba(245, 185, 66, 0.4),
    0 0 18px rgba(245, 185, 66, 0.4);
}

/* Nav */
.nav-scrolled {
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(244, 244, 240, 0.06);
}

/* Button */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition:
    transform 400ms ease,
    background 400ms ease;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary .arrow { transition: transform 400ms ease; }
.btn-primary:hover .arrow { transform: translateX(4px); }
.btn-primary:disabled,
.btn-primary[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Scroll progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--amber), var(--amber-soft));
  z-index: 60;
  transition: width 80ms linear;
}

/* Custom cursor (desktop only) */
@media (pointer: fine) {
  .cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--amber);
    border-radius: 9999px;
    pointer-events: none;
    z-index: 100;
    transform: translate(-50%, -50%);
    transition:
      width 200ms ease,
      height 200ms ease,
      background 200ms ease;
    mix-blend-mode: difference;
  }
  .cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(244, 244, 240, 0.35);
    border-radius: 9999px;
    pointer-events: none;
    z-index: 99;
    transform: translate(-50%, -50%);
    transition:
      width 300ms ease,
      height 300ms ease,
      border-color 300ms ease;
  }
  .cursor-hover .cursor-dot { width: 14px; height: 14px; }
  .cursor-hover .cursor-ring {
    width: 56px;
    height: 56px;
    border-color: rgba(245, 185, 66, 0.6);
  }
}

/* Big typography */
.display {
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.95;
}
.editorial {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
}

/* Marquee for disciplines */
.marquee {
  display: flex;
  gap: 3rem;
  animation: marquee 40s linear infinite;
  width: max-content;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Selection */
::selection {
  background: rgba(245, 185, 66, 0.3);
  color: #fff;
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Hero entrance */
.hero-enter > * {
  opacity: 0;
  transform: translateY(20px);
  animation: heroIn 1100ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.hero-enter > *:nth-child(1) { animation-delay: 120ms; }
.hero-enter > *:nth-child(2) { animation-delay: 260ms; }
.hero-enter > *:nth-child(3) { animation-delay: 420ms; }
.hero-enter > *:nth-child(4) { animation-delay: 580ms; }
.hero-enter > *:nth-child(5) { animation-delay: 740ms; }
.hero-enter > *:nth-child(6) { animation-delay: 900ms; }
@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Subtle noise */
.noise::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* ===================================================================
   Forms — Submit Project / Join LaunchPad
   New component styles, built to match the tokens above.
   =================================================================== */

.field-label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.field-label .req { color: var(--amber); }
.field-hint {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}

.field-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid rgba(244, 244, 240, 0.1);
  color: var(--paper);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 15px;
  font-family: inherit;
  transition:
    border-color 250ms ease,
    background 250ms ease;
}
.field-input::placeholder { color: rgba(155, 158, 167, 0.65); }
.field-input:hover { border-color: rgba(244, 244, 240, 0.18); }
.field-input:focus {
  outline: none;
  border-color: var(--amber);
  background: #0d0f13;
}
.field-input:disabled { opacity: 0.55; cursor: not-allowed; }
textarea.field-input { resize: vertical; min-height: 120px; line-height: 1.6; }

select.field-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1L7 7L13 1' stroke='%239B9EA7' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 42px;
}
select.field-input:invalid { color: rgba(244, 244, 240, 0.55); }
select.field-input option { background: var(--surface); color: var(--paper); }

.field-invalid {
  border-color: rgba(232, 96, 74, 0.75) !important;
}
.field-error-msg {
  display: none;
  margin-top: 8px;
  font-size: 12.5px;
  color: #ef8a75;
}
.field-error-msg.show { display: block; }

/* Radio / checkbox option cards */
.opt-card {
  position: relative;
  display: block;
  cursor: pointer;
}
.opt-card input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.opt-card-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid rgba(244, 244, 240, 0.1);
  background: var(--surface);
  border-radius: 12px;
  padding: 14px 16px;
  transition:
    border-color 250ms ease,
    background 250ms ease;
}
.opt-card:hover .opt-card-body { border-color: rgba(244, 244, 240, 0.22); }
.opt-card .opt-mark {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 6px;
  border: 1px solid rgba(244, 244, 240, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 250ms ease,
    background 250ms ease;
}
.opt-card.is-radio .opt-mark { border-radius: 9999px; }
.opt-mark::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 3px;
  background: var(--ink-950, #08090b);
  opacity: 0;
  transform: scale(0.4);
  transition:
    opacity 200ms ease,
    transform 200ms ease;
}
.opt-card.is-radio .opt-mark::after { border-radius: 9999px; }
.opt-card input:checked ~ .opt-card-body {
  border-color: var(--amber);
  background: rgba(245, 185, 66, 0.06);
}
.opt-card input:checked ~ .opt-card-body .opt-mark {
  background: var(--amber);
  border-color: var(--amber);
}
.opt-card input:checked ~ .opt-card-body .opt-mark::after {
  opacity: 1;
  transform: scale(1);
}
.opt-card input:focus-visible ~ .opt-card-body {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}
.opt-title { font-size: 14.5px; color: var(--paper); font-weight: 500; }
.opt-sub { margin-top: 3px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

/* Compact pill checkboxes (skills) */
.pill-check { position: relative; display: block; cursor: pointer; }
.pill-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill-check-body {
  font-size: 13px;
  color: var(--muted);
  border: 1px solid rgba(244, 244, 240, 0.12);
  border-radius: 9999px;
  padding: 9px 16px;
  transition:
    border-color 250ms ease,
    background 250ms ease,
    color 250ms ease;
  white-space: nowrap;
}
.pill-check:hover .pill-check-body { border-color: rgba(244, 244, 240, 0.3); }
.pill-check input:checked ~ .pill-check-body {
  border-color: var(--amber);
  background: rgba(245, 185, 66, 0.1);
  color: var(--paper);
}
.pill-check input:focus-visible ~ .pill-check-body {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* File dropzone */
.file-drop {
  position: relative;
  display: block;
  border: 1px dashed rgba(244, 244, 240, 0.22);
  border-radius: 14px;
  padding: 22px 18px;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 250ms ease,
    background 250ms ease;
}
.file-drop:hover, .file-drop.is-drag {
  border-color: var(--amber);
  background: rgba(245, 185, 66, 0.05);
}
.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-drop .fd-label { font-size: 13.5px; color: var(--paper); }
.file-drop .fd-hint { margin-top: 4px; font-size: 12px; color: var(--muted); }
.file-drop .fd-files { margin-top: 10px; font-size: 12.5px; color: var(--amber); word-break: break-all; }

/* Fieldset group */
.field-group {
  border: none;
  padding: 0;
  margin: 0;
}
.opt-grid { display: grid; gap: 10px; }

/* Submit button spinner */
.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 9999px;
  border: 2px solid rgba(8, 9, 11, 0.35);
  border-top-color: #08090b;
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Form status banners */
.form-banner {
  display: none;
  align-items: flex-start;
  gap: 12px;
  border-radius: 14px;
  padding: 18px 20px;
  font-size: 14px;
  line-height: 1.6;
}
.form-banner.show { display: flex; }
.form-banner.success {
  background: rgba(245, 185, 66, 0.08);
  border: 1px solid rgba(245, 185, 66, 0.35);
  color: var(--paper);
}
.form-banner.error {
  background: rgba(232, 96, 74, 0.08);
  border: 1px solid rgba(232, 96, 74, 0.4);
  color: var(--paper);
}

/* Simple sub-page nav link (Back to home) */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  transition: color 250ms ease;
}
.back-link:hover { color: var(--amber); }
