/* ---------- Tokens ---------- */
:root {
  --bg-0: #04060f;
  --bg-1: #07091a;
  --bg-2: #0c1130;
  --surface: rgba(14, 18, 44, 0.55);
  --surface-strong: rgba(20, 26, 60, 0.85);
  --border: rgba(125, 249, 255, 0.18);
  --border-strong: rgba(138, 77, 255, 0.45);
  --text: #e8ecff;
  --text-dim: #aab0d6;
  --text-muted: #7a82a8;
  --accent-cyan: #7df9ff;
  --accent-violet: #8a4dff;
  --accent-pink: #ff5cf3;
  --gradient: linear-gradient(135deg, #7df9ff 0%, #8a4dff 50%, #ff5cf3 100%);
  --shadow-glow: 0 0 40px rgba(125, 249, 255, 0.18), 0 0 80px rgba(138, 77, 255, 0.12);
  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(138, 77, 255, 0.18), transparent 60%),
    radial-gradient(900px 700px at -10% 30%, rgba(125, 249, 255, 0.12), transparent 60%),
    radial-gradient(700px 600px at 50% 110%, rgba(255, 92, 243, 0.10), transparent 60%),
    var(--bg-0);
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
}

main, header, footer { position: relative; z-index: 1; }

a { color: var(--accent-cyan); text-decoration: none; }
a:hover { color: #fff; }

img { max-width: 100%; display: block; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(4, 6, 15, 0.55);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.logo-wordmark {
  display: block;
  height: 38px;
  width: auto;
  /* Opt out of cross-axis stretching when the wordmark sits inside a flex
     column container (e.g. the footer). Without this the image would be
     stretched to fill the container width while height stays fixed,
     destroying the aspect ratio. */
  align-self: flex-start;
  flex-shrink: 0;
  /* If the PNG has a black background plate, `lighten` blends it cleanly into
     the dark header. If the PNG already has a transparent background, this
     blend mode is a no-op against the dark header — safe either way. */
  mix-blend-mode: lighten;
  filter: drop-shadow(0 0 12px rgba(125, 249, 255, 0.25));
  transition: filter 0.25s ease, transform 0.25s ease;
}
.logo:hover .logo-wordmark {
  filter: drop-shadow(0 0 16px rgba(125, 249, 255, 0.45));
  transform: translateY(-1px);
}
.logo-wordmark-small {
  height: 28px;
  margin-bottom: 4px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.site-nav a:hover { color: var(--text); }

.nav-cta {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text) !important;
  background: rgba(125, 249, 255, 0.06);
  transition: all 0.2s ease;
}
.nav-cta:hover {
  border-color: var(--accent-cyan);
  background: rgba(125, 249, 255, 0.12);
  box-shadow: 0 0 20px rgba(125, 249, 255, 0.25);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--gradient);
  color: #07091a;
  box-shadow: 0 6px 30px rgba(138, 77, 255, 0.45);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 40px rgba(138, 77, 255, 0.6), 0 0 20px rgba(125, 249, 255, 0.4);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent-cyan);
  background: rgba(125, 249, 255, 0.06);
}
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(7, 9, 26, 0.3);
  border-top-color: #07091a;
  border-radius: 50%;
  display: none;
  animation: spin 0.8s linear infinite;
}
.btn.is-loading .btn-spinner { display: inline-block; }
.btn.is-loading .btn-label { opacity: 0.7; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 100px 32px 80px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}

.kicker {
  display: inline-block;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin: 0 0 18px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(125, 249, 255, 0.05);
}

h1 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.1;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}
h2 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  margin: 0 0 14px;
  letter-spacing: 0.01em;
}
h3 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  margin: 12px 0 10px;
  letter-spacing: 0.02em;
}
h4 {
  font-family: 'Orbitron', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  margin: 14px 0 8px;
  letter-spacing: 0.04em;
}

.grad-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 0 32px;
}

.muted { color: var(--text-dim); }
.muted.small { font-size: 0.85rem; color: var(--text-muted); }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Orbit graphic */
.hero-orbit {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 440px;
  margin-left: auto;
  display: grid;
  place-items: center;
}
.hero-orbit .planet {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #b6f0ff, #7df9ff 30%, #8a4dff 70%, #2a1860 100%);
  box-shadow: 0 0 60px rgba(125, 249, 255, 0.5), inset -10px -20px 40px rgba(0,0,0,0.6);
  z-index: 2;
}
.hero-orbit .ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border);
}
/* Shape/position only — color/shadow set per-ring below at matched specificity. */
.hero-orbit .ring::before {
  content: '';
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  top: 50%;
  left: -4.5px;
  transform: translateY(-50%);
}

.hero-orbit .ring-1 {
  width: 60%;
  height: 60%;
  /* Negative animation-delay starts the spin partway through the cycle so the
     dot doesn't begin at 9 o'clock when the page loads. */
  animation: orbit-spin-1 30s linear -3s infinite;
}
.hero-orbit .ring-1::before {
  background: var(--accent-cyan);
  box-shadow: 0 0 14px var(--accent-cyan), 0 0 24px rgba(125, 249, 255, 0.4);
}

.hero-orbit .ring-2 {
  width: 80%;
  height: 80%;
  border-color: var(--border-strong);
  animation: orbit-spin-2 50s linear -18s infinite reverse;
}
.hero-orbit .ring-2::before {
  background: var(--accent-violet);
  box-shadow: 0 0 14px var(--accent-violet), 0 0 24px rgba(138, 77, 255, 0.4);
}

.hero-orbit .ring-3 {
  width: 100%;
  height: 100%;
  animation: orbit-spin-3 80s linear -42s infinite;
}
.hero-orbit .ring-3::before {
  background: var(--accent-pink);
  box-shadow: 0 0 14px var(--accent-pink), 0 0 24px rgba(255, 92, 243, 0.4);
}

/* Flat 2D orbits — same keyframe shape for all three rings, just a Z rotation.
   Per-ring speeds, directions, and staggered animation-delays are set on
   each .ring-N rule above. */
@keyframes orbit-spin-1 {
  from { transform: rotateZ(0deg); }
  to   { transform: rotateZ(360deg); }
}
@keyframes orbit-spin-2 {
  from { transform: rotateZ(0deg); }
  to   { transform: rotateZ(360deg); }
}
@keyframes orbit-spin-3 {
  from { transform: rotateZ(0deg); }
  to   { transform: rotateZ(360deg); }
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 80px 32px;
}
.section-alt {
  background:
    linear-gradient(180deg, transparent, rgba(12, 17, 48, 0.4) 30%, rgba(12, 17, 48, 0.4) 70%, transparent);
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
.section-alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; padding-left: 32px; padding-right: 32px; }

.section-head {
  text-align: center;
  margin: 0 auto 50px;
  max-width: 720px;
}
.section-head .kicker { margin-bottom: 14px; }

/* ---------- Project cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-glow);
}
.project-art {
  position: relative;
  height: 220px;
  display: grid;
  place-items: stretch;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  /* Background gradient acts as a fallback color while the image loads */
  background:
    radial-gradient(400px 200px at 30% 30%, rgba(125, 249, 255, 0.25), transparent 60%),
    radial-gradient(400px 200px at 70% 70%, rgba(138, 77, 255, 0.3), transparent 60%),
    var(--bg-1);
}
.project-art[data-project="carkeep"] {
  background:
    radial-gradient(400px 200px at 30% 30%, rgba(255, 180, 80, 0.18), transparent 60%),
    radial-gradient(400px 200px at 70% 70%, rgba(125, 249, 255, 0.22), transparent 60%),
    var(--bg-1);
}

.project-screenshot {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: saturate(1.05) contrast(1.02);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.project-card:hover .project-screenshot {
  transform: scale(1.04);
}

/* Soft fade so the image dissolves into the card body */
.project-art::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60px;
  background: linear-gradient(180deg, transparent, rgba(14, 18, 44, 0.55) 60%, rgba(14, 18, 44, 0.85));
  z-index: 2;
  pointer-events: none;
}

/* Top-corner gradient accent — keeps the futuristic flair from the old glyph treatment */
.project-art::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  z-index: 3;
  opacity: 0.65;
}
.project-body {
  padding: 24px 26px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.project-body p { color: var(--text-dim); margin: 0 0 16px; }

.badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(125, 249, 255, 0.12);
  color: var(--accent-cyan);
  border: 1px solid var(--border);
  text-transform: uppercase;
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  margin-right: 8px;
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.tag-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag-list li {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.card-link {
  margin-top: auto;
  align-self: flex-start;
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---------- Upcoming ---------- */
.upcoming-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.upcoming-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.upcoming-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-violet);
  box-shadow: 0 0 10px var(--accent-violet);
  animation: pulse 2.4s ease-in-out infinite;
}
.upcoming-card .eta {
  display: inline-block;
  margin-top: 10px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ---------- Signup ---------- */
.signup-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 50px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;
}
.signup-wrap::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.4;
  pointer-events: none;
}

.signup-copy h2 { margin-bottom: 16px; }
.check-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}
.check-list li {
  position: relative;
  padding: 10px 0 10px 32px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}
.check-list li:last-child { border-bottom: none; }
.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 12px rgba(125, 249, 255, 0.4);
}
.check-list li::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 19px;
  width: 6px;
  height: 3px;
  border-left: 2px solid #07091a;
  border-bottom: 2px solid #07091a;
  transform: rotate(-45deg);
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
}
.field label {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.field input {
  background: rgba(4, 6, 15, 0.7);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  outline: none;
}
.field input:focus {
  border-color: var(--accent-cyan);
  background: rgba(4, 6, 15, 0.9);
  box-shadow: 0 0 0 3px rgba(125, 249, 255, 0.15), 0 0 20px rgba(125, 249, 255, 0.15);
}
.field input:invalid:not(:placeholder-shown):not(:focus) {
  border-color: rgba(255, 92, 243, 0.6);
}
.hint {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.form-status {
  margin: 4px 0 0;
  font-size: 0.92rem;
  min-height: 1.4em;
}
.form-status.is-success { color: #7df9ff; }
.form-status.is-error { color: #ff5cf3; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 40px 32px;
  background: rgba(4, 6, 15, 0.6);
  backdrop-filter: blur(10px);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.footer-brand { display: flex; flex-direction: column; gap: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .site-header { padding: 14px 20px; }
  .site-nav { gap: 18px; }
  .site-nav a:not(.nav-cta) { display: none; }
  .hero {
    grid-template-columns: 1fr;
    padding: 60px 20px 40px;
    gap: 40px;
  }
  .hero-orbit { max-width: 280px; margin: 0 auto; }
  .section { padding: 60px 20px; }
  .section-alt > * { padding-left: 20px; padding-right: 20px; }
  .signup-wrap {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 32px 24px;
  }
  .field-row { grid-template-columns: 1fr; }
}

@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;
  }
}
