/* ============================================
   FLYNAUTIX Stealth Landing Page
   Premium Defense-Tech Aesthetic - Round 2
   ============================================ */

:root {
  --primary: #00CFFF;
  --primary-bright: #33DDFF;
  --primary-glow: rgba(0, 207, 255, 0.35);
  --primary-dim: rgba(0, 207, 255, 0.08);
  --primary-subtle: rgba(0, 207, 255, 0.04);
  --background: #060D18;
  --background-light: #0B1A2E;
  --card-bg: rgba(12, 28, 48, 0.6);
  --text-body: #8BA4BE;
  --text-medium: #5A7A98;
  --white: #F0F4F8;
  --card-border: rgba(27, 58, 84, 0.4);
  --success: #00E676;
  --error: #FF4C4C;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-family);
  background-color: var(--background);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(0, 207, 255, 0.2);
  color: var(--white);
}

/* --- Skip Link (Accessibility) --- */
.skip-link {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 10000;
  padding: 12px 24px;
  background: var(--primary);
  color: var(--background);
  font-weight: 700;
  font-size: 14px;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--white);
  outline-offset: 2px;
}

/* --- Global Focus Styles (Accessibility) --- */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* --- Scan Lines Overlay --- */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* --- Ambient Gradient Orbs --- */
.ambient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  will-change: transform;
}

.ambient-orb--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 207, 255, 0.12), transparent 70%);
  top: -200px;
  right: -150px;
  animation: orbFloat1 20s ease-in-out infinite;
}

.ambient-orb--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 100, 200, 0.08), transparent 70%);
  bottom: -200px;
  left: -150px;
  animation: orbFloat2 25s ease-in-out infinite;
}

@keyframes orbFloat1 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-40px, 30px); }
  66% { transform: translate(20px, -20px); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(30px, -40px); }
  66% { transform: translate(-20px, 20px); }
}

/* --- Particle Canvas --- */
#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* --- Main Content --- */
.stealth-main {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 24px 100px;
  text-align: center;
}

/* --- Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Classification Badge --- */
.stealth-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border: 1px solid rgba(0, 207, 255, 0.2);
  border-radius: 100px;
  background: rgba(0, 207, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 32px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.stealth-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: badgePulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px var(--primary-glow);
}

@keyframes badgePulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* --- Logo --- */
.stealth-logo {
  position: relative;
  margin-bottom: 32px;
}

.stealth-logo-ring {
  position: absolute;
  inset: -12px;
  border-radius: 22px;
  border: 1px solid rgba(0, 207, 255, 0.15);
  animation: ringPulse 4s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
    border-color: rgba(0, 207, 255, 0.1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.04);
    border-color: rgba(0, 207, 255, 0.3);
  }
}

.stealth-logo img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 16px;
  filter: drop-shadow(0 0 40px rgba(0, 207, 255, 0.2));
  position: relative;
  z-index: 1;
}

/* --- Sonar Ping Animation --- */
.sonar-ping {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(0, 207, 255, 0.4);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.sonar-ping--1 {
  animation: sonarPing 4s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.sonar-ping--2 {
  animation: sonarPing 4s cubic-bezier(0, 0.2, 0.8, 1) infinite 1.33s;
}

.sonar-ping--3 {
  animation: sonarPing 4s cubic-bezier(0, 0.2, 0.8, 1) infinite 2.66s;
}

@keyframes sonarPing {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
    border-color: rgba(0, 207, 255, 0.5);
  }
  100% {
    transform: translate(-50%, -50%) scale(3.5);
    opacity: 0;
    border-color: rgba(0, 207, 255, 0);
  }
}

/* --- Title with Gradient Shimmer --- */
.stealth-title {
  font-size: 68px;
  font-weight: 800;
  letter-spacing: 10px;
  color: var(--white);
  margin-bottom: 16px;
  background: linear-gradient(
    90deg,
    rgba(240, 244, 248, 0.7) 0%,
    var(--white) 20%,
    var(--primary) 40%,
    var(--white) 60%,
    rgba(240, 244, 248, 0.7) 80%,
    var(--primary) 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -200% 0; }
}

/* --- Tagline --- */
.stealth-tagline {
  font-size: 17px;
  font-weight: 400;
  color: var(--text-body);
  margin-bottom: 28px;
  max-width: 460px;
  line-height: 1.6;
  letter-spacing: 0.2px;
}

/* --- Divider --- */
.stealth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.stealth-divider-line {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 207, 255, 0.4));
}

.stealth-divider-line:last-child {
  background: linear-gradient(90deg, rgba(0, 207, 255, 0.4), transparent);
}

.stealth-divider-diamond {
  width: 6px;
  height: 6px;
  background: var(--primary);
  transform: rotate(45deg);
  opacity: 0.6;
}

/* --- Teaser --- */
.stealth-teaser {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 36px;
  opacity: 0.7;
}

/* --- Signup Form --- */
.stealth-form {
  width: 100%;
  max-width: 500px;
}

.stealth-form-row {
  display: flex;
  gap: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  transition: border-color 0.3s, box-shadow 0.3s;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.stealth-form-row:focus-within {
  border-color: rgba(0, 207, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(0, 207, 255, 0.06), 0 8px 32px rgba(0, 207, 255, 0.08);
}

.stealth-form-row.error {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(255, 76, 76, 0.06);
  animation: formShake 0.4s ease-out;
}

@keyframes formShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.stealth-form-row.success {
  border-color: var(--success);
  box-shadow: 0 0 0 4px rgba(0, 230, 118, 0.06);
}

.stealth-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.stealth-input-icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  color: var(--text-medium);
  transition: color 0.3s;
  pointer-events: none;
}

.stealth-form-row:focus-within .stealth-input-icon {
  color: var(--primary);
}

.stealth-input-wrap input {
  flex: 1;
  padding: 16px 16px 16px 44px;
  background: transparent;
  border: none;
  color: var(--white);
  font-family: var(--font-family);
  font-size: 15px;
  outline: none;
  min-width: 0;
  letter-spacing: 0.2px;
}

.stealth-input-wrap input::placeholder {
  color: var(--text-medium);
  font-weight: 400;
}

.stealth-form-row button {
  padding: 16px 28px;
  background: linear-gradient(135deg, var(--primary), #00A8D6);
  color: var(--background);
  border: none;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stealth-form-row button:hover {
  background: linear-gradient(135deg, var(--primary-bright), var(--primary));
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.stealth-form-row button:active {
  transform: scale(0.97);
}

/* Focus visible for button */
.stealth-form-row button:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

.stealth-form-row button .btn-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
}

.stealth-form-row button:hover .btn-arrow {
  transform: translateX(2px);
}

/* Checkmark icon (hidden by default) */
.stealth-form-row button .btn-checkmark {
  display: none;
  width: 20px;
  height: 20px;
}

/* Loading state */
.stealth-form-row button.loading .btn-text,
.stealth-form-row button.loading .btn-arrow {
  visibility: hidden;
}

.stealth-form-row button .btn-spinner {
  display: none;
}

.stealth-form-row button.loading .btn-spinner {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border: 2px solid rgba(6, 13, 24, 0.2);
  border-top-color: var(--background);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Loading pulse on the entire button */
.stealth-form-row button.loading {
  animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Success state with checkmark */
.stealth-form-row button.success-state .btn-text,
.stealth-form-row button.success-state .btn-arrow,
.stealth-form-row button.success-state .btn-spinner {
  display: none !important;
  visibility: hidden;
}

.stealth-form-row button.success-state .btn-checkmark {
  display: block;
  animation: checkmarkDraw 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.stealth-form-row button.success-state {
  background: linear-gradient(135deg, var(--success), #00C853);
}

@keyframes checkmarkDraw {
  0% {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  100% {
    stroke-dasharray: 50;
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

/* Disabled state */
.stealth-form-row button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Form message */
.stealth-form-message {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
  min-height: 20px;
  transition: opacity 0.4s, transform 0.4s;
  opacity: 0;
  transform: translateY(-4px);
}

.stealth-form-message.show {
  opacity: 1;
  transform: translateY(0);
}

.stealth-form-message.success {
  color: var(--success);
}

.stealth-form-message.error {
  color: var(--error);
}

/* Form hint */
.stealth-form-hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-medium);
  opacity: 0.6;
  letter-spacing: 0.3px;
}

/* --- Status Indicators --- */
.stealth-status {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 48px;
  padding: 10px 20px;
  border-radius: 8px;
  background: rgba(12, 28, 48, 0.3);
  border: 1px solid rgba(27, 58, 84, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.stealth-status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text-medium);
}

.stealth-status-item--mono {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-medium);
  opacity: 0.5;
}

.stealth-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.stealth-status-dot--active {
  background: var(--success);
  box-shadow: 0 0 6px rgba(0, 230, 118, 0.5);
}

.stealth-status-dot--pending {
  background: #FFAB00;
  box-shadow: 0 0 6px rgba(255, 171, 0, 0.4);
  animation: dotBlink 2s ease-in-out infinite;
}

@keyframes dotBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.stealth-status-separator {
  width: 1px;
  height: 14px;
  background: var(--card-border);
}

/* --- Footer --- */
.stealth-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 16px 24px;
  text-align: center;
}

.stealth-footer p {
  font-size: 11px;
  color: var(--text-medium);
  opacity: 0.4;
  letter-spacing: 0.5px;
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .stealth-logo-ring,
  .stealth-badge-dot,
  .ambient-orb,
  .sonar-ping,
  .stealth-status-dot--pending {
    animation: none !important;
  }

  .sonar-ping {
    display: none;
  }

  .stealth-title {
    animation: none;
    background: none;
    -webkit-text-fill-color: var(--white);
  }

  .stealth-form-row button.loading .btn-spinner {
    animation: none;
    border: 2px solid var(--background);
  }

  .stealth-form-row button.loading {
    animation: none;
  }

  .stealth-form-row button.success-state .btn-checkmark {
    animation: none;
    stroke-dashoffset: 0;
    opacity: 1;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  /* Remove particle canvas animations via JS check */
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 767px) {
  .stealth-title {
    font-size: 42px;
    letter-spacing: 6px;
  }

  .stealth-tagline {
    font-size: 15px;
    padding: 0 8px;
  }

  .stealth-teaser {
    font-size: 10px;
    letter-spacing: 3px;
  }

  .stealth-form {
    max-width: 100%;
  }

  .stealth-form-row {
    flex-direction: column;
    border-radius: 12px;
  }

  .stealth-input-wrap input {
    padding: 16px 16px 16px 44px;
  }

  .stealth-form-row:not(:focus-within) .stealth-input-wrap {
    border-bottom: 1px solid var(--card-border);
  }

  .stealth-form-row button {
    padding: 16px;
    justify-content: center;
  }

  .stealth-status {
    flex-direction: column;
    gap: 10px;
    padding: 14px 20px;
  }

  .stealth-status-separator {
    width: 60px;
    height: 1px;
  }

  .ambient-orb--1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -80px;
  }

  .ambient-orb--2 {
    width: 250px;
    height: 250px;
    bottom: -100px;
    left: -80px;
  }
}

@media (max-width: 400px) {
  .stealth-title {
    font-size: 34px;
    letter-spacing: 4px;
  }

  .stealth-badge {
    font-size: 10px;
    letter-spacing: 2px;
  }
}

/* Large screens */
@media (min-width: 1400px) {
  .stealth-title {
    font-size: 78px;
    letter-spacing: 14px;
  }

  .stealth-tagline {
    font-size: 19px;
  }
}
