/* ==========================================================================
   GSPress Landing Page
   Animations, glass morphism, particles, gradient text
   ========================================================================== */

/* --- Keyframes --- */

@keyframes bg-shift {
  0%   { background-position: 0% 0%; }
  25%  { background-position: 50% 100%; }
  50%  { background-position: 100% 50%; }
  75%  { background-position: 50% 0%; }
  100% { background-position: 0% 0%; }
}

@keyframes float-up {
  from { opacity: 0; transform: translateY(60px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes float-gentle-alt {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-12px) rotate(-1deg); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50%      { opacity: 0.7; transform: scale(1.1); }
}

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

@keyframes border-rotate {
  0%   { --angle: 0deg; }
  100% { --angle: 360deg; }
}

@keyframes particle-rise {
  0%   { transform: translateY(0) scale(1); opacity: 0.6; }
  100% { transform: translateY(-100vh) scale(0); opacity: 0; }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(79, 110, 247, 0.3), 0 0 60px rgba(124, 58, 237, 0.15); }
  50%      { box-shadow: 0 0 40px rgba(79, 110, 247, 0.5), 0 0 80px rgba(124, 58, 237, 0.3), 0 0 120px rgba(236, 72, 153, 0.1); }
}

@keyframes scanner-line {
  0%   { top: -2px; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* --- Landing wrapper --- */

.landing {
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(79, 110, 247, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 70% 60% at 50% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 10% 60%, rgba(52, 211, 199, 0.08) 0%, transparent 50%),
    linear-gradient(135deg, #08080f 0%, #0d0a1a 20%, #0a0f1e 40%, #110a20 60%, #0a1018 80%, #08080f 100%);
  background-size: 200% 200%, 200% 200%, 200% 200%, 200% 200%, 100% 100%;
  animation: bg-shift 60s ease infinite;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Noise texture overlay */
.landing::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* Grid lines overlay */
.landing::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79, 110, 247, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 110, 247, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 1;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black 20%, transparent 70%);
}

/* Content z-index */
.landing-content { position: relative; z-index: 2; }

/* --- Particles --- */

.particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  bottom: -10px;
  border-radius: 50%;
  animation: particle-rise linear infinite;
}

.particle--1  { left: 5%;  width: 2px; height: 2px; background: rgba(79, 110, 247, 0.7);  animation-duration: 8s;  animation-delay: 0s; }
.particle--2  { left: 12%; width: 3px; height: 3px; background: rgba(236, 72, 153, 0.6);  animation-duration: 12s; animation-delay: 2s; }
.particle--3  { left: 20%; width: 2px; height: 2px; background: rgba(52, 211, 199, 0.7);  animation-duration: 10s; animation-delay: 1s; }
.particle--4  { left: 30%; width: 4px; height: 4px; background: rgba(167, 139, 250, 0.5); animation-duration: 14s; animation-delay: 3s; }
.particle--5  { left: 42%; width: 2px; height: 2px; background: rgba(79, 110, 247, 0.6);  animation-duration: 9s;  animation-delay: 5s; }
.particle--6  { left: 55%; width: 3px; height: 3px; background: rgba(251, 191, 36, 0.5);  animation-duration: 11s; animation-delay: 1.5s; }
.particle--7  { left: 65%; width: 2px; height: 2px; background: rgba(236, 72, 153, 0.7);  animation-duration: 13s; animation-delay: 4s; }
.particle--8  { left: 75%; width: 3px; height: 3px; background: rgba(52, 211, 199, 0.6);  animation-duration: 10s; animation-delay: 2.5s; }
.particle--9  { left: 85%; width: 2px; height: 2px; background: rgba(167, 139, 250, 0.7); animation-duration: 8s;  animation-delay: 6s; }
.particle--10 { left: 93%; width: 4px; height: 4px; background: rgba(79, 110, 247, 0.5);  animation-duration: 15s; animation-delay: 0.5s; }

/* --- Orbs --- */

.landing-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  animation: pulse-glow 20s ease-in-out infinite;
  pointer-events: none;
}

.landing-orb--1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(79, 110, 247, 0.35) 0%, rgba(124, 58, 237, 0.15) 40%, transparent 70%);
  top: -15%; right: -10%;
}

.landing-orb--2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.3) 0%, rgba(167, 139, 250, 0.1) 40%, transparent 70%);
  bottom: -5%; left: -8%;
  animation-delay: 3s;
}

.landing-orb--3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(52, 211, 199, 0.25) 0%, transparent 60%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 5s;
}

/* --- Staggered entrance --- */

.fade-1  { animation: float-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both; }
.fade-2  { animation: float-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both; }
.fade-3  { animation: float-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both; }
.fade-4  { animation: float-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.55s both; }
.fade-5  { animation: float-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both; }
.fade-6  { animation: float-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.85s both; }
.fade-7  { animation: float-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 1.0s both; }
.fade-8  { animation: float-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 1.2s both; }
.fade-9  { animation: float-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 1.4s both; }
.fade-10 { animation: float-up 0.9s cubic-bezier(0.16, 1, 0.3, 1) 1.6s both; }

/* --- Gradient text --- */

.text-gradient {
  background: linear-gradient(
    135deg,
    #4F6EF7 0%,
    #7C3AED 20%,
    #EC4899 40%,
    #F59E0B 60%,
    #34D399 80%,
    #4F6EF7 100%
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer-text 16s linear infinite;
}

.text-gradient-subtle {
  background: linear-gradient(90deg, #A78BFA, #EC4899, #4F6EF7);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer-text 10s linear infinite;
}

/* --- Glass nav --- */

.glass-nav {
  background: rgba(15, 15, 20, 0.4);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 0.75rem 1.5rem;
}

/* --- Glass CTA button --- */

.glass-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2.25rem;
  font-family: var(--gs-font);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, rgba(79, 110, 247, 0.9) 0%, rgba(124, 58, 237, 0.9) 50%, rgba(236, 72, 153, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all 300ms cubic-bezier(0.16, 1, 0.3, 1);
  animation: glow-pulse 12s ease-in-out infinite;
  overflow: hidden;
}

.glass-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
  border-radius: inherit;
  pointer-events: none;
}

.glass-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 40px rgba(79, 110, 247, 0.6), 0 0 80px rgba(124, 58, 237, 0.4), 0 20px 60px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.25);
}

.glass-btn:active {
  transform: translateY(0) scale(0.98);
}

/* --- Glass secondary button --- */

.glass-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2.25rem;
  font-family: var(--gs-font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gs-text-primary);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(79, 110, 247, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* --- Feature card with animated border --- */

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.glass-card {
  position: relative;
  background: rgba(15, 15, 25, 0.5);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-radius: 20px;
  padding: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--angle, 0deg), transparent 40%, rgba(79, 110, 247, 0.4) 50%, rgba(124, 58, 237, 0.3) 55%, rgba(236, 72, 153, 0.3) 60%, transparent 70%);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  opacity: 0;
  transition: opacity 400ms ease;
  animation: border-rotate 12s linear infinite;
}

/* Scanner line on hover */
.glass-card::after {
  content: '';
  position: absolute;
  left: 10%; right: 10%;
  top: -2px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(79, 110, 247, 0.8), rgba(236, 72, 153, 0.6), transparent);
  border-radius: 2px;
  opacity: 0;
  box-shadow: 0 0 20px rgba(79, 110, 247, 0.5), 0 0 40px rgba(124, 58, 237, 0.3);
}

.glass-card:hover {
  transform: translateY(-8px);
  border-color: rgba(79, 110, 247, 0.15);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(79, 110, 247, 0.08);
  background: rgba(20, 20, 35, 0.6);
}

.glass-card:hover::before {
  opacity: 1;
}

.glass-card:hover::after {
  animation: scanner-line 1.5s ease-in-out;
}

/* --- Card icon --- */

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  position: relative;
}

.card-icon::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 20px;
  background: inherit;
  filter: blur(12px);
  opacity: 0.4;
  z-index: -1;
}

.card-icon--blue   { background: linear-gradient(135deg, rgba(79, 110, 247, 0.25), rgba(124, 58, 237, 0.2)); }
.card-icon--pink   { background: linear-gradient(135deg, rgba(236, 72, 153, 0.25), rgba(251, 191, 36, 0.15)); }
.card-icon--green  { background: linear-gradient(135deg, rgba(52, 211, 153, 0.25), rgba(52, 211, 199, 0.15)); }

/* --- Stats pill --- */

.stat-pill {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 100px;
  padding: 0.5rem 1.25rem;
  transition: all 300ms ease;
}

.stat-pill:hover {
  border-color: rgba(79, 110, 247, 0.3);
  background: rgba(79, 110, 247, 0.06);
}

/* --- Floating elements --- */

.float-1 { animation: float-gentle 18s ease-in-out infinite; }
.float-2 { animation: float-gentle-alt 20s ease-in-out 1s infinite; }
.float-3 { animation: float-gentle 22s ease-in-out 2s infinite; }

/* --- Glowing divider --- */

.glow-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(79, 110, 247, 0.4), rgba(124, 58, 237, 0.3), rgba(236, 72, 153, 0.3), transparent);
  border: none;
  margin: 0;
}

/* --- Reduced motion accessibility --- */

@media (prefers-reduced-motion: reduce) {
  .landing { animation: none; }
  .particle { animation: none; display: none; }
  .landing-orb { animation: none; }
  .glass-btn { animation: none; }
  .glass-card { transition: none; }
  .glass-card::before { animation: none; }
  .glass-card::after { animation: none; }
  .float-1, .float-2, .float-3 { animation: none; }
  .text-gradient, .text-gradient-subtle { animation: none; }
  [class*="fade-"] { animation: none; opacity: 1; transform: none; }
}
