/* ============================================================
   DESIGN TOKENS — Space / Video Game Portfolio
   ============================================================ */
:root {
  /* Type scale — fluid */
  --text-xs:   clamp(0.75rem,  0.7rem + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.75vw,   1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem + 4vw,      5rem);
  --text-hero: clamp(3.5rem,   1rem + 8vw,      9rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Brand palette — deep space */
  --clr-space:      #04050f;
  --clr-space-mid:  #080c1e;
  --clr-nebula-a:   #1a0a3a;   /* deep violet */
  --clr-nebula-b:   #0a1a3a;   /* deep blue */
  --clr-accent:     #a259ff;   /* electric purple */
  --clr-accent-2:   #00e5ff;   /* neon cyan */
  --clr-accent-3:   #ff6b9d;   /* hot pink */
  --clr-gold:       #ffd700;
  --clr-text:       #e8eaf6;
  --clr-text-muted: #b0bcd8;
  --clr-text-faint: #7a88a8;
  --clr-glow:       rgba(162, 89, 255, 0.35);
  --clr-glow-cyan:  rgba(0, 229, 255, 0.25);

  /* Fonts */
  --font-display: 'Orbitron', 'Courier New', monospace;
  --font-body:    'Rajdhani', 'Segoe UI', sans-serif;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-full: 9999px;
}

/* ============================================================
   BASE RESET
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  height: 100%;
}
body {
  min-height: 100dvh;
  height: auto;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--clr-text);
  background-color: var(--clr-space);
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; line-height: 1; }
p { text-wrap: pretty; max-width: 60ch; }

::selection {
  background: rgba(162, 89, 255, 0.35);
  color: #fff;
}

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

/* ============================================================
   SPACE CANVAS — full-viewport background
   ============================================================ */
#space-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ============================================================
   SCANLINES — CRT / retro game overlay
   ============================================================ */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  animation: scanlines-drift 8s linear infinite;
}
@keyframes scanlines-drift {
  0%   { background-position: 0 0; }
  100% { background-position: 0 80px; }
}

/* ============================================================
   FLOATING CONSOLES LAYER
   ============================================================ */
.consoles-layer {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.console-float {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: clamp(100px, 12vw, 180px);
  transform: rotate(var(--rot, 0deg)) scale(var(--scale, 1));
  animation: console-bob var(--duration, 10s) var(--delay, 0s) ease-in-out infinite;
  opacity: 0;
  animation-fill-mode: both;
}

@keyframes console-bob {
  0%   { transform: rotate(var(--rot)) scale(var(--scale)) translateY(0px);   opacity: 0.5; }
  25%  { transform: rotate(calc(var(--rot) + 3deg)) scale(var(--scale)) translateY(-14px); opacity: 0.65; }
  50%  { transform: rotate(var(--rot)) scale(var(--scale)) translateY(-6px);  opacity: 0.55; }
  75%  { transform: rotate(calc(var(--rot) - 2deg)) scale(var(--scale)) translateY(-20px); opacity: 0.7; }
  100% { transform: rotate(var(--rot)) scale(var(--scale)) translateY(0px);   opacity: 0.5; }
}

.console-placeholder {
  width: 100%;
  color: var(--clr-accent);
  /* Per-slot filters are applied inline via style attribute */
  transition: filter 0.3s ease;
}

/* ============================================================
   HERO CONTENT
   ============================================================ */
.hero {
  position: relative;
  z-index: 10;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-12) var(--space-6);
  gap: var(--space-6);
}

/* Frosted dark radial vignette behind hero text so it reads over floating icons */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    ellipse 72% 82% at 50% 50%,
    rgba(4, 5, 15, 0.76) 25%,
    rgba(4, 5, 15, 0.38) 60%,
    transparent 100%
  );
  pointer-events: none;
}

/* Logo mark */
.logo-mark {
  animation: logo-pulse 4s ease-in-out infinite;
}
@keyframes logo-pulse {
  0%, 100% { filter: drop-shadow(0 0 12px var(--clr-glow)) drop-shadow(0 0 24px var(--clr-glow-cyan)); }
  50%       { filter: drop-shadow(0 0 20px rgba(162,89,255,0.7)) drop-shadow(0 0 40px var(--clr-glow-cyan)); }
}

/* Salem Sparks name */
.hero-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 900;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #a259ff 0%, #00e5ff 50%, #ff6b9d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 18px rgba(162,89,255,0.5));
  margin-bottom: calc(var(--space-2) * -1);
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  color: var(--clr-accent-2);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4);
  background: rgba(0, 229, 255, 0.06);
  backdrop-filter: blur(8px);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clr-accent-2);
  box-shadow: 0 0 8px var(--clr-accent-2);
  animation: blink 1.4s step-start infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.15; }
}

/* Hero title */
.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.02em;
}

.hero-title__line1 {
  font-size: var(--text-hero);
  background: linear-gradient(135deg, #a259ff 0%, #00e5ff 55%, #ff6b9d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 40px var(--clr-glow));
  animation: title-shimmer 5s ease-in-out infinite;
}

.hero-title__line2 {
  font-size: clamp(1.2rem, 3.5vw, 3rem);
  letter-spacing: 0.55em;
  color: var(--clr-text-muted);
  text-transform: uppercase;
  margin-top: var(--space-2);
}

@keyframes title-shimmer {
  0%, 100% { filter: drop-shadow(0 0 30px rgba(162,89,255,0.5)) drop-shadow(0 0 60px rgba(0,229,255,0.2)); }
  50%       { filter: drop-shadow(0 0 50px rgba(162,89,255,0.8)) drop-shadow(0 0 90px rgba(0,229,255,0.4)); }
}

/* Hero sub */
.hero-sub {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 300;
  color: var(--clr-text-muted);
  letter-spacing: 0.02em;
  max-width: 42ch;
  line-height: 1.6;
}
.hero-sub strong {
  color: var(--clr-text);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Progress bar */
.progress-wrap {
  width: min(480px, 90vw);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.progress-bar-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid rgba(162, 89, 255, 0.2);
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--clr-accent), var(--clr-accent-2));
  box-shadow: 0 0 12px var(--clr-glow), 0 0 24px var(--clr-glow-cyan);
  animation: progress-load 2.4s var(--ease-out) 0.6s forwards;
}
@keyframes progress-load {
  to { width: 72%; }
}
.progress-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  color: var(--clr-text-faint);
}
.progress-pct {
  color: var(--clr-accent);
}

/* Contact */
.hero-contact {
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  font-family: var(--font-body);
  letter-spacing: 0.02em;
}
.hero-link {
  color: var(--clr-accent-2);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 229, 255, 0.4);
  transition: color var(--transition-interactive), border-color var(--transition-interactive), text-shadow var(--transition-interactive);
}
.hero-link:hover {
  color: #fff;
  border-color: var(--clr-accent-2);
  text-shadow: 0 0 10px var(--clr-accent-2);
}

/* Footer */
.hero-footer {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  color: var(--clr-text-faint);
  text-transform: uppercase;
  margin-top: var(--space-4);
}
.footer-dot { opacity: 0.4; }

/* ============================================================
   ENTRY ANIMATIONS — stagger hero children
   ============================================================ */
.logo-mark,
.hero-name,
.status-badge,
.hero-title,
.hero-sub,
.progress-wrap,
.hero-contact,
.hero-footer {
  opacity: 0;
  animation: hero-enter 0.8s var(--ease-out) both;
}
.logo-mark     { animation-delay: 0.1s; }
.hero-name     { animation-delay: 0.2s; }
.status-badge  { animation-delay: 0.3s; }
.hero-title    { animation-delay: 0.45s; }
.hero-sub      { animation-delay: 0.65s; }
.progress-wrap { animation-delay: 0.8s; }
.hero-contact  { animation-delay: 0.95s; }
.hero-footer   { animation-delay: 1.1s; }

@keyframes hero-enter {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .hero { gap: var(--space-5); padding: var(--space-10) var(--space-4); }
  .hero-footer { flex-wrap: wrap; justify-content: center; gap: var(--space-2); }
  /* Hide some consoles on small screens */
  .console-float:nth-child(n+5) { display: none; }
}

/* SVG planet float classes removed — planet-rings element deleted */

/* ============================================================
   SCROLL — vertical scrolling enabled above in body rule
   ============================================================ */

/* ============================================================
   HERO CTA BUTTON — "Contact Me"
   ============================================================ */
.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-space);
  background: linear-gradient(135deg, var(--clr-accent) 0%, var(--clr-accent-2) 100%);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: hero-enter 0.8s var(--ease-out) 1.05s both;
  transition: transform 180ms ease, box-shadow 180ms ease;
  box-shadow: 0 0 20px rgba(162,89,255,0.4), 0 0 40px rgba(0,229,255,0.2);
}
.hero-cta-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #fff2 0%, transparent 60%);
  opacity: 0;
  transition: opacity 200ms ease;
}
.hero-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 0 32px rgba(162,89,255,0.6), 0 0 60px rgba(0,229,255,0.3); }
.hero-cta-btn:hover::before { opacity: 1; }
.hero-cta-btn:active { transform: translateY(0); }
.hero-cta-btn__arrow {
  display: flex;
  animation: arrow-bounce 2s ease-in-out infinite;
}
@keyframes arrow-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(3px); }
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-section {
  position: relative;
  z-index: 10;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(4rem, 10vw, 8rem) var(--space-6);
  overflow: hidden;
}

/* Parallax nebula background layers */
.contact-bg-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(26,10,58,0.9) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 70%, rgba(10,20,58,0.8) 0%, transparent 70%);
  pointer-events: none;
}

.contact-nebula {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 50% 40% at 15% 50%, rgba(162,89,255,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 40% 35% at 85% 40%, rgba(0,229,255,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 30% 25% at 50% 80%, rgba(255,107,157,0.04) 0%, transparent 55%);
  pointer-events: none;
  will-change: transform;
  transition: transform 0.1s linear;
}

/* Top divider */
.contact-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(600px, 80vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(162,89,255,0.4), rgba(0,229,255,0.4), transparent);
}

.contact-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-12);
}

/* Section header — now lives inside the card */
.contact-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid rgba(162, 89, 255, 0.12);
  margin-bottom: var(--space-2);
}

.contact-eyebrow {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.3em;
  color: var(--clr-accent-2);
  text-transform: uppercase;
  opacity: 0.75;
}

.contact-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 0.88;
}
.contact-heading__top {
  font-size: clamp(2.2rem, 7vw, 5.5rem);
  color: var(--clr-text-muted);
  letter-spacing: 0.5em;
  text-transform: uppercase;
}
.contact-heading__bottom {
  font-size: clamp(3rem, 10vw, 8rem);
  background: linear-gradient(135deg, #a259ff 0%, #00e5ff 55%, #ff6b9d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(162,89,255,0.5));
  letter-spacing: -0.02em;
}

.contact-sub {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 300;
  color: var(--clr-text-muted);
  letter-spacing: 0.02em;
  max-width: 40ch;
  line-height: 1.6;
  text-align: center;
}

/* ── Scroll-reveal ── */
.contact-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.contact-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   CONTACT CARD
   ============================================================ */
.contact-card {
  width: 100%;
  background: rgba(10, 8, 28, 0.75);
  border: 1px solid rgba(162, 89, 255, 0.18);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 5vw, 3rem);
  backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px rgba(0,229,255,0.06),
    0 20px 60px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.04);
  position: relative;
  overflow: hidden;
}
/* Card glow top edge */
.contact-card::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(162,89,255,0.5), rgba(0,229,255,0.5), transparent);
}

/* Success modal body — centered layout */
.modal-body--success {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
}

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}
@media (max-width: 580px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-text-muted);
}

.form-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(162, 89, 255, 0.22);
  border-radius: var(--radius-md);
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  padding: var(--space-4) var(--space-5);
  width: 100%;
  outline: none;
  transition:
    border-color 200ms ease,
    background 200ms ease,
    box-shadow 200ms ease;
  resize: none;
}
.form-input::placeholder { color: var(--clr-text-faint); }
.form-input:focus {
  border-color: rgba(162, 89, 255, 0.7);
  background: rgba(162, 89, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(162, 89, 255, 0.12), 0 0 16px rgba(162, 89, 255, 0.15);
}
.form-input.is-error {
  border-color: rgba(255, 107, 157, 0.7);
  box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.1);
}

.form-textarea { min-height: 140px; }

.textarea-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2);
}

.char-count {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--clr-text-faint);
  white-space: nowrap;
}

.form-error {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--clr-accent-3);
  min-height: 1rem;
  line-height: 1.4;
}

.form-group--turnstile {
  align-items: flex-start;
}

/* Turnstile iframe sizing */
.cf-turnstile { min-height: 65px; }

/* Legal text */
.form-legal {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--clr-text-faint);
  letter-spacing: 0.02em;
  line-height: 1.5;
  max-width: none;
}
.legal-link {
  color: var(--clr-accent-2);
  font: inherit;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(0, 229, 255, 0.35);
  cursor: pointer;
  padding: 0;
  transition: color 150ms ease, border-color 150ms ease, text-shadow 150ms ease;
}
.legal-link:hover {
  color: #fff;
  border-color: var(--clr-accent-2);
  text-shadow: 0 0 8px var(--clr-accent-2);
}

/* Global error banner */
.form-global-error {
  background: rgba(255, 107, 157, 0.1);
  border: 1px solid rgba(255, 107, 157, 0.3);
  border-radius: var(--radius-md);
  color: var(--clr-accent-3);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  padding: var(--space-4);
  line-height: 1.5;
}

/* Submit button */
.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-space);
  background: linear-gradient(135deg, var(--clr-accent) 0%, var(--clr-accent-2) 100%);
  padding: var(--space-5) var(--space-10);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  align-self: flex-start;
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
  box-shadow: 0 0 20px rgba(162,89,255,0.4), 0 0 40px rgba(0,229,255,0.15);
}
.form-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #fff3 0%, transparent 60%);
  opacity: 0;
  transition: opacity 200ms ease;
}
.form-submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 0 30px rgba(162,89,255,0.6), 0 0 60px rgba(0,229,255,0.3); }
.form-submit:hover::before { opacity: 1; }
.form-submit:active:not(:disabled) { transform: translateY(0); }
.form-submit:disabled { opacity: 0.55; cursor: not-allowed; }

.form-submit.is-loading .form-submit__text { opacity: 0; }
.form-submit.is-loading .form-submit__icon { opacity: 0; }
.form-submit.is-loading .form-submit__loader { opacity: 1; }
.form-submit__loader {
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid rgba(0,0,0,0.3);
  border-top-color: rgba(0,0,0,0.85);
  border-radius: 50%;
  opacity: 0;
  animation: spin 0.7s linear infinite;
  pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   FORM SUCCESS STATE
   ============================================================ */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
  padding: var(--space-8) var(--space-4);
  animation: hero-enter 0.6s var(--ease-out) both;
}
.form-success__icon {
  width: 64px; height: 64px;
  animation: success-pop 0.5s var(--ease-out) both;
}
@keyframes success-pop {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.form-success__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #a259ff 0%, #00e5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  max-width: none;
}
.form-success__sub {
  color: var(--clr-text-muted);
  font-size: var(--text-base);
  max-width: 36ch;
  line-height: 1.6;
}
.form-success__email { color: var(--clr-accent-2); font-weight: 600; }
.form-success__ref {
  font-size: var(--text-xs);
  color: var(--clr-text-faint);
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  max-width: none;
}
.form-success__ref code {
  color: var(--clr-text-muted);
  font-family: monospace;
  font-size: 0.75em;
  word-break: break-all;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(2, 3, 8, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  animation: modal-fade-in 0.2s ease both;
}
.modal-overlay[hidden] { display: none !important; }

@keyframes modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: linear-gradient(160deg, #0d0a20 0%, #08091c 100%);
  border: 1px solid rgba(162, 89, 255, 0.25);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  max-height: 85dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,229,255,0.07),
    0 30px 80px rgba(0,0,0,0.7);
  animation: modal-slide-up 0.25s var(--ease-out) both;
}
@keyframes modal-slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) clamp(1.25rem, 4vw, 2rem);
  border-bottom: 1px solid rgba(162, 89, 255, 0.15);
  flex-shrink: 0;
}

.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #a259ff, #00e5ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-full);
  color: var(--clr-text-muted);
  border: 1px solid rgba(162,89,255,0.2);
  background: rgba(162,89,255,0.06);
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
  flex-shrink: 0;
}
.modal-close:hover {
  color: var(--clr-accent-3);
  background: rgba(255,107,157,0.1);
  border-color: rgba(255,107,157,0.35);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: clamp(1.25rem, 4vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  scrollbar-width: thin;
  scrollbar-color: rgba(162,89,255,0.3) transparent;
}
.modal-body::-webkit-scrollbar { width: 5px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(162,89,255,0.3); border-radius: 3px; }

.modal-updated {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  color: var(--clr-text-faint);
  max-width: none;
}

.modal-body h4 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-top: var(--space-2);
}
.modal-body p {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  line-height: 1.7;
  max-width: none;
}
.modal-body ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.modal-body ul li {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--clr-text-muted);
  line-height: 1.6;
  padding-left: var(--space-5);
  position: relative;
}
.modal-body ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--clr-accent-2);
  font-weight: 700;
}
.modal-link {
  color: var(--clr-accent-2);
  text-decoration: none;
  border-bottom: 1px solid rgba(0,229,255,0.35);
  transition: color 150ms ease;
}
.modal-link:hover { color: #fff; }

.modal-footer {
  padding: var(--space-5) clamp(1.25rem, 4vw, 2rem);
  border-top: 1px solid rgba(162, 89, 255, 0.12);
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}
.modal-btn-accept {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-space);
  background: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-2));
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
  box-shadow: 0 0 16px rgba(162,89,255,0.35);
}
.modal-btn-accept:hover { transform: translateY(-1px); box-shadow: 0 0 24px rgba(162,89,255,0.55); }

/* focus-trap trap */
.modal-overlay:focus { outline: none; }

/* ============================================================
   FOOTER SECTION (below contact form)
   ============================================================ */
.site-footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: var(--space-8) var(--space-6) var(--space-12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  border-top: 1px solid rgba(162,89,255,0.08);
}
.site-footer p {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  color: var(--clr-text-faint);
  text-transform: uppercase;
  max-width: none;
}

/* ============================================================
   RESPONSIVE — contact section
   ============================================================ */
@media (max-width: 600px) {
  .form-submit { align-self: stretch; justify-content: center; }
  .contact-section { padding: 4rem var(--space-4); }
}

/* Error message parts */
.form-global-error__msg {
  font-weight: 600;
}
.form-global-error__code {
  font-family: var(--font-display);
  font-size: 0.78em;
  letter-spacing: 0.06em;
  opacity: 0.8;
}
