/* ================================================================
   Layerize Design System
   Semantic tokens, animations, utilities, and component styles
   ================================================================ */

/* ── Color Tokens ─────────────────────────────────────────────── */
:root {
  /* Primary – Purple (creativity, innovation, AI) */
  --primary: 258 90% 66%;
  --primary-light: 258 90% 76%;
  --primary-dark: 258 90% 50%;

  /* Accent – Indigo (trust, technology) */
  --accent: 234 89% 74%;
  --accent-dark: 234 89% 58%;

  /* Secondary – Pink (energy, creativity) */
  --secondary: 330 81% 60%;
  --secondary-light: 330 81% 72%;

  /* Backgrounds */
  --bg-primary: #07070b;
  --bg-elevated: #0c0c12;
  --bg-card: #111118;
  --bg-card-hover: #16161f;
  --bg-surface: #1a1a24;
  --bg-footer: #050508;

  /* Text */
  --text-primary: #eeeef2;
  --text-secondary: #9398a8;
  --text-muted: #5d6272;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border-default: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);
  --border-active: rgba(139, 92, 246, 0.35);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px hsl(258 90% 66% / 0.12);
  --shadow-glow-hover: 0 0 60px hsl(258 90% 66% / 0.22);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

/* ── Animations ───────────────────────────────────────────────── */

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes float-reverse {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(-3deg); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px hsl(258 90% 66% / 0.12); }
  50% { box-shadow: 0 0 40px hsl(258 90% 66% / 0.28); }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes arrow-bounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(8px); }
}

@keyframes glow-ring {
  0%, 100% {
    box-shadow: 0 0 20px hsl(258 90% 66% / 0.15), 0 0 48px hsl(258 90% 66% / 0.05);
  }
  50% {
    box-shadow: 0 0 32px hsl(258 90% 66% / 0.3), 0 0 72px hsl(258 90% 66% / 0.1);
  }
}

/* Pricing card glows */
@keyframes glow-cyan {
  0%, 100% { box-shadow: 0 0 20px rgba(6,182,212,.2), 0 0 48px rgba(6,182,212,.06); }
  50% { box-shadow: 0 0 36px rgba(6,182,212,.36), 0 0 72px rgba(6,182,212,.12); }
}
@keyframes glow-indigo {
  0%, 100% { box-shadow: 0 0 20px rgba(99,102,241,.24), 0 0 50px rgba(99,102,241,.08); }
  50% { box-shadow: 0 0 36px rgba(99,102,241,.42), 0 0 75px rgba(99,102,241,.14); }
}
@keyframes glow-purple {
  0%, 100% { box-shadow: 0 0 22px rgba(168,85,247,.26), 0 0 55px rgba(168,85,247,.08); }
  50% { box-shadow: 0 0 40px rgba(168,85,247,.45), 0 0 82px rgba(168,85,247,.16); }
}

/* Toast animations */
@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(12px); }
}

/* ── Utility Classes ──────────────────────────────────────────── */

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 8s ease infinite;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-reverse {
  animation: float-reverse 8s ease-in-out infinite;
}

.animate-glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

.animate-glow-ring {
  animation: glow-ring 3s ease-in-out infinite;
}

.animate-glow-cyan { animation: glow-cyan 3s ease-in-out infinite; }
.animate-glow-indigo { animation: glow-indigo 3s ease-in-out infinite; }
.animate-glow-purple { animation: glow-purple 3s ease-in-out infinite; }

.arrow-bounce {
  animation: arrow-bounce 2s ease-in-out infinite;
}

/* Background patterns */
.grid-bg {
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 40px 40px;
}

.grid-bg-sm {
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
  background-size: 32px 32px;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #22d3ee, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shimmer-text {
  background: linear-gradient(90deg, #67e8f9, #a78bfa, #22d3ee, #67e8f9);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* Glass card */
.glass-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.015) 100%
  );
  border: 1px solid var(--border-default);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.glass-card-hover {
  transition: border-color var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
}

.glass-card-hover:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

/* Strikethrough pricing */
.strike {
  position: relative;
  display: inline-block;
}
.strike::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 2px;
  background: #f87171;
  transform: rotate(-7deg);
}

/* ── Entrance Animations ──────────────────────────────────────── */

.fade-in-up {
  animation: fade-in-up 0.6s var(--ease-out) both;
}

.fade-in {
  animation: fade-in 0.5s var(--ease-out) both;
}

.scale-in {
  animation: scale-in 0.5s var(--ease-out) both;
}

/* Stagger delays */
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }
.delay-5 { animation-delay: 0.40s; }
.delay-6 { animation-delay: 0.48s; }

/* Logo grayscale */
.logo-grayscale {
  filter: grayscale(100%) brightness(0.6);
  opacity: 0.5;
  transition: all 0.4s var(--ease-out);
}
.logo-grayscale:hover {
  filter: grayscale(0%) brightness(1);
  opacity: 1;
}

/* Toast */
.toast-enter { animation: toast-in 0.32s ease forwards; }
.toast-exit { animation: toast-out 0.32s ease forwards; }

/* ── Focus States ─────────────────────────────────────────────── */

:focus-visible {
  outline: 2px solid hsl(var(--primary) / 0.6);
  outline-offset: 2px;
}

/* ── Scroll-triggered reveal (JS adds .is-visible) ────────────── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ================================================================
   DC layer — cyan/violet redesign (2026 handoff)
   Tokens & components used by home, plans, blog, login, signup.
   ================================================================ */

:root {
  --dc-bg: #0a0b10;
  --dc-panel: #101219;
  --dc-panel-alt: #12141c;
  --dc-text: #e8eaf2;
  --dc-muted: rgba(232, 234, 242, 0.6);
  --dc-faint: rgba(232, 234, 242, 0.4);
  --dc-cyan: #67e8f9;
  --dc-cyan-hover: #a5f3fc;
  --dc-cyan-deep: #22d3ee;
  --dc-violet: #a78bfa;
  --dc-border: rgba(255, 255, 255, 0.08);
  --dc-border-strong: rgba(255, 255, 255, 0.12);
  --dc-border-cyan: rgba(103, 232, 249, 0.25);
}

.mono { font-family: 'JetBrains Mono', monospace; }

::selection { background: rgba(34, 211, 238, 0.3); }

@keyframes dc-scan {
  0% { top: 6%; }
  50% { top: 88%; }
  100% { top: 6%; }
}
@keyframes dc-floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes dc-drift {
  0% { transform: translate(0, 0); }
  50% { transform: translate(40px, -30px); }
  100% { transform: translate(0, 0); }
}
@keyframes dc-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.dc-drift { animation: dc-drift 14s ease-in-out infinite; }
.dc-floaty { animation: dc-floaty 6s ease-in-out infinite; }
.dc-pulse-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--dc-cyan);
  animation: dc-pulse 2s infinite;
}

/* Section kicker — 12px mono uppercase */
.dc-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dc-cyan);
}
.dc-kicker--violet { color: var(--dc-violet); }

/* Buttons */
.dc-btn-primary {
  display: inline-block;
  background: var(--dc-cyan);
  color: #0a0b10;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.4);
  transition: background 0.2s ease, box-shadow 0.3s ease, color 0.2s ease;
}
.dc-btn-primary:hover {
  background: var(--dc-cyan-hover);
  color: #0a0b10;
  box-shadow: 0 0 56px rgba(34, 211, 238, 0.6);
}
.dc-btn-secondary {
  display: inline-block;
  color: rgba(232, 234, 242, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  border-radius: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.dc-btn-secondary:hover {
  border-color: rgba(103, 232, 249, 0.5);
  color: var(--dc-text);
}
.dc-btn-outline-cyan {
  display: inline-block;
  color: var(--dc-text);
  border: 1px solid rgba(103, 232, 249, 0.4);
  background: rgba(34, 211, 238, 0.05);
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.dc-btn-outline-cyan:hover { background: rgba(34, 211, 238, 0.12); color: var(--dc-text); }

/* Light (Google) button */
.dc-btn-light {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--dc-text);
  color: #0a0b10;
  border: none;
  border-radius: 9px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
.dc-btn-light:hover { background: #ffffff; color: #0a0b10; }

/* Cards */
.dc-card {
  background: var(--dc-panel);
  border: 1px solid var(--dc-border);
  border-radius: 14px;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.dc-card-hover:hover { border-color: rgba(103, 232, 249, 0.35); }

/* Inputs */
.dc-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--dc-panel-alt);
  border: 1px solid var(--dc-border-strong);
  border-radius: 9px;
  padding: 12px 14px;
  color: var(--dc-text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.2s ease;
}
.dc-input::placeholder { color: rgba(232, 234, 242, 0.3); }
.dc-input:focus { border-color: rgba(103, 232, 249, 0.5); }

/* Pill badge (mono, cyan outline) */
.dc-pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--dc-border-cyan);
  background: rgba(34, 211, 238, 0.06);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--dc-cyan);
}

/* Error / success banners */
.dc-error {
  font-size: 13px;
  color: #fda4af;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: 8px;
  padding: 10px 12px;
}
.dc-success {
  font-size: 13px;
  color: #86efac;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 8px;
  padding: 10px 12px;
}

/* Mono divider row: ── or email ── */
.dc-divider {
  display: flex; align-items: center; gap: 12px;
  color: rgba(232, 234, 242, 0.3);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}
.dc-divider::before, .dc-divider::after {
  content: '';
  flex: 1; height: 1px;
  background: var(--dc-border);
}

/* ── 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;
  }

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