/* =========================================================
   workloadr.ai — Under Development Landing Page
   Design System: Purple accent, glass-morphism, dark mode
   ========================================================= */

:root {
  color-scheme: dark;

  /* Core Surfaces */
  --background: #0b0f17;
  --surface: #121826;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-2: rgba(255, 255, 255, 0.08);

  /* Borders */
  --border: rgba(255, 255, 255, 0.10);
  --border-2: rgba(255, 255, 255, 0.14);

  /* Text */
  --foreground: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.64);
  --muted-2: rgba(255, 255, 255, 0.45);

  /* Accent Palette */
  --accent: #7c5cff;
  --accent-glow: rgba(124, 92, 255, 0.25);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Pill (amber status) */
  --pill-border: rgba(245, 158, 11, 0.5);
  --pill-text: #f3c977;
  --pill-bg: rgba(245, 158, 11, 0.1);

  /* Title gradient */
  --gradient: linear-gradient(110deg, #dbe0f9 0%, #9caaef 35%, #7495ec 60%, #70cad4 100%);

  /* Radii */
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.55);
  --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.35);
  --glow-accent: 0 10px 24px rgba(124, 92, 255, 0.25);

  /* Blur */
  --blur-card: 14px;
  --blur-nav: 18px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.25s;
}

/* =========================================================
   Reset
   ========================================================= */

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

::selection {
  background: rgba(124, 92, 255, 0.35);
  color: #fff;
}

/* =========================================================
   Scrollbar
   ========================================================= */

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.20);
}

/* =========================================================
   Body & Background
   ========================================================= */

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(124, 92, 255, 0.22), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(34, 197, 94, 0.10), transparent 55%),
    radial-gradient(900px 650px at 55% 110%, rgba(245, 158, 11, 0.08), transparent 55%),
    var(--background);
  background-attachment: fixed;
  color: var(--foreground);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle top-edge highlight */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(600px 100px at 50% 0%, rgba(124, 92, 255, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle grain texture */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    repeating-radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 3px),
    repeating-radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 4px);
  opacity: 0.25;
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: 0;
}

/* =========================================================
   Particle Canvas
   ========================================================= */

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

/* =========================================================
   Shell (Main Layout)
   ========================================================= */

.shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5rem;
  padding: 6rem 1.5rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* =========================================================
   Hero Section
   ========================================================= */

.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding-top: 2rem;
}

.hero-logo {
  opacity: 0;
  transform: translateY(14px) scale(0.9);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.hero-logo svg {
  filter: drop-shadow(0 0 20px var(--accent-glow));
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--pill-border);
  background: var(--pill-bg);
  color: var(--pill-text);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.15);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

/* Pulsing dot indicator */
.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
  animation: pulse-dot 2s ease-in-out infinite;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 20px rgba(116, 149, 236, 0.25));
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease);
}

.tagline {
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  color: var(--muted);
  font-weight: 400;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

/* =========================================================
   Entrance Animation (triggered by body.is-ready)
   ========================================================= */

body.is-ready [data-animate] {
  opacity: 1;
  transform: translateY(0) scale(1);
}

body.is-ready .hero-title {
  opacity: 1;
  transform: translateY(0);
  filter: drop-shadow(0 0 30px rgba(116, 149, 236, 0.35));
  animation: hero-blur 1.2s var(--ease);
}

body.is-ready .pill {
  opacity: 1;
  transform: translateY(0);
}

body.is-ready .tagline {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Feature Cards
   ========================================================= */

.features {
  width: 100%;
  max-width: 960px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.5rem;
  backdrop-filter: blur(var(--blur-card));
  -webkit-backdrop-filter: blur(var(--blur-card));
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);

  /* Entrance state */
  opacity: 0;
  transform: translateY(16px);
}

/* Mouse-tracking glow overlay */
.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    300px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(124, 92, 255, 0.12),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
  z-index: 0;
}

/* Show glow only when mouse position is set (JS sets --mouse-x/--mouse-y) */
.feature-card[style*="--mouse-x"]:hover::before {
  opacity: 1;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-2);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(124, 92, 255, 0.08);
}

.feature-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.25);
  color: var(--accent);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.feature-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}

.feature-desc {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* =========================================================
   Waitlist Section
   ========================================================= */

.waitlist {
  width: 100%;
  max-width: 560px;
}

.waitlist-panel {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  backdrop-filter: blur(var(--blur-card));
  -webkit-backdrop-filter: blur(var(--blur-card));
  box-shadow: var(--shadow-md);
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.waitlist-heading {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.waitlist-sub {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.waitlist-form {
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.waitlist-form.is-success {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

.waitlist-input-group {
  display: flex;
  gap: 0.5rem;
}

.waitlist-input-group input {
  flex: 1;
  height: 44px;
  padding: 0 1rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--foreground);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    background 0.2s var(--ease);
}

.waitlist-input-group input::placeholder {
  color: var(--muted-2);
}

.waitlist-input-group input:focus {
  border-color: rgba(124, 92, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.18);
  background: rgba(0, 0, 0, 0.30);
}

.waitlist-input-group input.is-error {
  border-color: rgba(239, 68, 68, 0.65);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
  animation: shake 0.5s var(--ease);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 44px;
  padding: 0 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.95), rgba(124, 92, 255, 0.65));
  border: 1px solid rgba(124, 92, 255, 0.45);
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--glow-accent);
  white-space: nowrap;
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    background 0.2s var(--ease);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(124, 92, 255, 0.35);
  background: linear-gradient(135deg, rgba(124, 92, 255, 1), rgba(124, 92, 255, 0.75));
}

.btn-primary:focus-visible {
  outline: none;
  border-color: rgba(124, 92, 255, 0.62);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.20), var(--glow-accent);
}

.btn-primary:active {
  transform: translateY(0);
}

.waitlist-privacy {
  font-size: 0.75rem;
  color: var(--muted-2);
  margin-top: 0.75rem;
}

/* Waitlist success state */
.waitlist-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: var(--success);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1rem 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.waitlist-success.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.waitlist-check {
  flex-shrink: 0;
}

/* Honeypot field — invisible to humans, bots fill it */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

/* =========================================================
   Social Proof Counter
   ========================================================= */

.social-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

body.is-ready .social-proof {
  opacity: 1;
  transform: translateY(0);
}

.live-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

.live-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

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

.social-proof-text strong {
  color: var(--foreground);
  font-weight: 600;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem 1.8rem;
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

/* Purple accent sweep line */
.site-footer::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 92, 255, 0.6), transparent);
  opacity: 0;
  transform: translateX(-30%);
}

body.is-ready .site-footer {
  opacity: 1;
  transform: translateY(0);
}

body.is-ready .site-footer::after {
  animation: footer-sweep 1.8s var(--ease) 0.8s forwards;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-left {
  justify-self: start;
  font-size: 0.8rem;
  color: var(--muted-2);
}

.footer-center {
  justify-self: center;
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.footer-right {
  justify-self: end;
  display: flex;
  gap: 0.9rem;
}

/* Social Icon Links */
.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--muted);
  background: transparent;
  border: 0;
  padding: 0;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition:
    color 0.25s var(--ease),
    transform 0.25s var(--ease),
    background 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.icon-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.icon-link:hover,
.icon-link:focus-visible {
  color: var(--foreground);
  transform: translateY(-1px);
  background: rgba(124, 92, 255, 0.1);
  box-shadow: 0 0 12px rgba(124, 92, 255, 0.2);
}

.icon-link:focus-visible {
  outline: 2px solid rgba(124, 92, 255, 0.5);
  outline-offset: 3px;
}

/* =========================================================
   Tooltip
   ========================================================= */

.tooltip-target {
  position: relative;
  cursor: pointer;
}

.tooltip-target::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: -0.6rem;
  transform: translate(-50%, -100%) scale(0.96);
  background: rgba(11, 15, 23, 0.94);
  border: 1px solid rgba(124, 92, 255, 0.35);
  color: var(--foreground);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  z-index: 10;
}

.tooltip-target:hover::after,
.tooltip-target:focus-visible::after,
.tooltip-target.is-tooltip::after {
  opacity: 1;
  transform: translate(-50%, -110%) scale(1);
}

/* =========================================================
   Keyframes
   ========================================================= */

@keyframes hero-blur {
  from { filter: blur(8px); }
  to { filter: blur(0); }
}

@keyframes footer-sweep {
  0% {
    opacity: 0;
    transform: translateX(-30%);
  }
  20% {
    opacity: 0.8;
  }
  100% {
    opacity: 0;
    transform: translateX(30%);
  }
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
  }
  50% {
    opacity: 0.5;
    box-shadow: 0 0 4px rgba(245, 158, 11, 0.25);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-6px); }
  30% { transform: translateX(5px); }
  45% { transform: translateX(-4px); }
  60% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
}

/* =========================================================
   Responsive — Tablet (640px–1023px)
   ========================================================= */

@media (min-width: 640px) and (max-width: 1023px) {
  .shell {
    gap: 4rem;
    padding: 4rem 1.25rem 3rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 640px;
    margin: 0 auto;
  }

  /* Third card spans full width, centered */
  .feature-card:nth-child(3) {
    grid-column: 1 / -1;
    max-width: 50%;
    justify-self: center;
  }

  .feature-card {
    padding: 1.5rem 1.25rem;
  }
}

/* =========================================================
   Responsive — Mobile (<=639px)
   ========================================================= */

@media (max-width: 639px) {
  .shell {
    gap: 3rem;
    padding: 3rem 1rem 2.5rem;
  }

  .hero {
    gap: 1.2rem;
  }

  .hero-title {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .feature-card {
    padding: 1.25rem 1rem;
  }

  .waitlist-panel {
    padding: 1.75rem 1.25rem;
  }

  .waitlist-input-group {
    flex-direction: column;
  }

  .waitlist-input-group input,
  .btn-primary {
    width: 100%;
  }

  .site-footer {
    padding: 1.2rem 1rem calc(1.2rem + env(safe-area-inset-bottom));
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 0.9rem;
  }

  .footer-left,
  .footer-right {
    justify-self: center;
  }

  .footer-center {
    font-size: 0.75rem;
  }

  .footer-right {
    flex-wrap: wrap;
    row-gap: 0.5rem;
    justify-content: center;
  }
}

/* =========================================================
   Responsive — Short Viewport
   ========================================================= */

@media (max-height: 700px) {
  .shell {
    gap: 2.5rem;
    padding-top: 2rem;
  }

  .hero {
    gap: 1rem;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3.5rem);
  }
}

/* =========================================================
   Dynamic Viewport Height
   ========================================================= */

@supports (min-height: 100dvh) {
  body {
    min-height: 100dvh;
  }
}

/* =========================================================
   Reduced Motion
   ========================================================= */

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

  .hero-logo,
  .pill,
  .hero-title,
  .tagline,
  .feature-card,
  .waitlist-panel,
  .site-footer {
    opacity: 1 !important;
    transform: none !important;
  }

  .site-footer::after {
    animation: none !important;
    opacity: 0 !important;
  }

  .pill::before {
    animation: none !important;
  }
}
