/* ===========================================================
   edsuit — Premium Light Theme Design System
   White page, white card surfaces, vibrant cyan & purple accents.
   =========================================================== */

:root {
  /* Surfaces */
  --bg-deep:    #FAFAFC;   /* Very light gray/blue tint for background depth */
  --bg-panel:   rgba(255, 255, 255, 0.8);   /* Glass cards */
  --bg-panel-solid: #FFFFFF;
  --bg-panel-2: #F1F5F9;   /* subtle alt surface */
  --bg-panel-3: #E2E8F0;   /* hover / active surface */

  /* Borders */
  --line:       rgba(226, 232, 240, 0.6);   /* subtle glass border */
  --line-2:     #CBD5E1;   

  /* Brand Vibrant Colors */
  --cyan:       #06b6d4;   
  --cyan-2:     #0891b2;
  --cyan-3:     #0ea5e9;
  --cyan-soft:  rgba(6, 182, 212, 0.08);
  
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;

  /* Text */
  --text:       #0f172a;   /* rich black/slate */
  --text-mute:  #475569;   
  --text-dim:   #94a3b8;   
}

/* Base setup */
.font-inter, body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  letter-spacing: -0.015em;
}

html, body {
  background-color: var(--bg-deep);
  color: var(--text);
  scroll-behavior: smooth;
}

.app-bg {
  background-color: var(--bg-deep);
  color: var(--text);
}

/* -----------------------------------------------------------
   Premium Dynamic Background Wash (Mesh Gradients)
   ----------------------------------------------------------- */
.bg-decor {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
  animation: float 15s ease-in-out infinite alternate;
}

.bg-decor-1 {
  width: 800px; height: 800px;
  top: -200px; left: -200px;
  background: radial-gradient(circle, rgba(14,165,233,0.3) 0%, transparent 60%);
}

.bg-decor-2 {
  width: 900px; height: 900px;
  top: 20%; right: -300px;
  background: radial-gradient(circle, rgba(139,92,246,0.25) 0%, transparent 60%);
  animation-delay: -5s;
}

.bg-decor-3 {
  width: 600px; height: 600px;
  bottom: -100px; left: 20%;
  background: radial-gradient(circle, rgba(236,72,153,0.2) 0%, transparent 60%);
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-40px) scale(1.05); }
}

/* Grid Overlay */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at top, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at top, black 40%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

nav, section, footer { position: relative; z-index: 1; }

/* -----------------------------------------------------------
   Glass Navigation
   ----------------------------------------------------------- */
.glass-nav {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  display: block;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}
.brand-logo:hover {
  transform: translateY(-2px) scale(1.02);
  filter: drop-shadow(0 8px 16px rgba(6, 182, 212, 0.25));
}

/* -----------------------------------------------------------
   Premium Tool Cards
   ----------------------------------------------------------- */
.tool-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.3));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-bottom-color: rgba(255, 255, 255, 0.2);
  border-right-color: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  box-shadow: 
    0 8px 32px 0 rgba(0, 0, 0, 0.04),
    inset 0 1px 2px rgba(255,255,255,0.8);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  animation: fade-in-up 0.5s ease-out forwards;
  opacity: 0;
}

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

.tool-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-4px);
  box-shadow: 
    0 15px 30px -5px rgba(15, 23, 42, 0.05),
    0 0 0 1px rgba(6, 182, 212, 0.1),
    0 8px 20px -4px rgba(6, 182, 212, 0.15),
    inset 0 1px 0 rgba(255,255,255,1);
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(6,182,212,0), rgba(6,182,212,0.8), rgba(6,182,212,0));
  opacity: 0;
  transition: opacity 0.4s ease;
}
.tool-card:hover::before { opacity: 1; }

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(6,182,212,0.1), rgba(139,92,246,0.1));
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
  color: var(--cyan-2);
  font-size: 30px;       
  line-height: 1;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.tool-card:hover .tool-icon {
  background: linear-gradient(135deg, rgba(6,182,212,0.15), rgba(139,92,246,0.15));
  color: var(--cyan-2);
  transform: scale(1.05) translateY(-2px);
  border-color: rgba(6,182,212,0.4);
  box-shadow: 0 8px 16px rgba(6, 182, 212, 0.15);
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: linear-gradient(90deg, rgba(6,182,212,0.1), rgba(14,165,233,0.1));
  color: var(--cyan-2);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 9999px;
  border: 1px solid rgba(6, 182, 212, 0.15);
  flex-shrink: 0;
}

.tag-chip {
  padding: 4px 12px;
  background: var(--bg-panel-2);
  border: 1px solid var(--line);
  color: var(--text-mute);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.tag-chip:hover {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.3);
  color: var(--cyan-2);
  transform: translateY(-1px);
}

.star-icon {
  color: white;
  fill: white;
  background-color: var(--cyan-2);
  border-radius: 50%;
  padding: 3px;
}
.star-value { color: var(--text); font-weight: 800; }

/* -----------------------------------------------------------
   Filters & Search
   ----------------------------------------------------------- */
.cat-pill {
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--bg-panel-solid);
  color: var(--text-mute);
  border: 1px solid var(--line);
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
  transition: all 0.2s ease;
  cursor: pointer;
}
.cat-pill:hover {
  background: var(--cyan-soft);
  color: var(--cyan-2);
  border-color: rgba(6, 182, 212, 0.30);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(6,182,212,0.1);
}
.cat-pill.is-active {
  background: var(--cyan-2);
  color: #FFFFFF;
  border-color: var(--cyan-2);
  box-shadow: 0 6px 12px rgba(6,182,212,0.25);
}

.quick-tag {
  padding: 6px 16px;
  font-size: 0.8125rem;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(4px);
  color: var(--text-mute);
  border: 1px solid var(--line);
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.2s ease;
}
.quick-tag:hover {
  background: #FFFFFF;
  color: var(--cyan-2);
  border-color: var(--cyan-2);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.04);
}

/* Premium Search Input Wrapper */
.search-wrapper {
  position: relative;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.7), rgba(255,255,255,0.4));
  backdrop-filter: blur(24px);
  box-shadow: 
    0 10px 30px -10px rgba(0,0,0,0.05),
    inset 0 1px 2px rgba(255,255,255,0.8);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-bottom-color: rgba(255, 255, 255, 0.2);
  border-right-color: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}
.search-wrapper:focus-within {
  border-color: var(--cyan-2);
  box-shadow: 
    0 15px 40px -10px rgba(6,182,212,0.15),
    0 0 0 4px rgba(6,182,212,0.1),
    inset 0 1px 0 rgba(255,255,255,1);
  transform: translateY(-2px);
}

/* -----------------------------------------------------------
   Stat cards
   ----------------------------------------------------------- */
.stat-card {
  background: linear-gradient(135deg, rgba(255,255,255,0.7), rgba(255,255,255,0.3));
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-bottom-color: rgba(255, 255, 255, 0.2);
  border-right-color: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: left;
  box-shadow: 
    0 8px 32px 0 rgba(0,0,0,0.03),
    inset 0 1px 2px rgba(255,255,255,0.8);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.stat-card:hover {
  border-color: rgba(6,182,212,0.3);
  transform: translateY(-4px);
  box-shadow: 0 15px 30px -10px rgba(6, 182, 212, 0.1);
}
.stat-card::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 0;
}
.stat-card:hover::after { opacity: 1; }
.stat-card > * { position: relative; z-index: 1; }

.stat-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--cyan-soft);
  color: var(--cyan-2);
  margin-bottom: 16px;
}

/* -----------------------------------------------------------
   CTA section glow
   ----------------------------------------------------------- */
.cta-box {
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.6));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: 
    0 25px 50px -12px rgba(0,0,0,0.08),
    inset 0 1px 0 rgba(255,255,255,1);
}
.cta-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

/* -----------------------------------------------------------
   Buttons
   ----------------------------------------------------------- */
.explore-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  color: var(--cyan-2);
  font-size: 0.875rem;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.explore-btn:hover {
  color: var(--cyan-3);
  transform: translateX(4px);
  background: transparent;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan-2), var(--cyan-3));
  color: white;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
  border: none;
  transition: all 0.3s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-2);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}
.btn-secondary:hover {
  background: #FFFFFF;
  border-color: var(--cyan-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

/* -----------------------------------------------------------
   Misc utilities
   ----------------------------------------------------------- */
.text-gradient {
  background: linear-gradient(135deg, var(--cyan-2), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.hidden { display: none !important; }

/* View toggles */
.view-btn {
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.view-btn.is-active {
  background: var(--text);
  color: white;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.view-btn:not(.is-active) {
  color: var(--text-mute);
}
.view-btn:not(.is-active):hover {
  color: var(--text);
  background: var(--bg-panel-2);
}

/* List view tweaks */
.tool-card.list-view {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 24px;
}
.tool-card.list-view .tool-card-body { flex: 1; min-width: 0; }
.tool-card.list-view .tool-card-icon-wrap { flex-shrink: 0; }
.tool-card.grid-view { padding: 24px; }

/* Scrollbar (Premium) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* Dropdown */
.more-dropdown { position: relative; }
.more-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 
    0 20px 40px -10px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(0,0,0,0.02);
  padding: 8px;
  z-index: 30;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.95);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top left;
}
.more-dropdown.open .more-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.more-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-mute);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s ease;
}
.more-menu button:hover {
  background: var(--cyan-soft);
  color: var(--cyan-2);
}
.more-menu button.is-active {
  background: var(--cyan-soft);
  color: var(--cyan-2);
}
.more-dropdown.open .more-chevron { transform: rotate(180deg); }
.more-chevron { transition: transform 0.2s ease; }

/* ===========================================================
   Phase 2: Ultra-Premium Enhancements
   =========================================================== */

/* Hero Floating Badges */
.hero-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.08);
  animation: float-badge 6s ease-in-out infinite alternate;
  z-index: 10;
}
.hero-badge-1 { top: 15%; left: 5%; animation-delay: 0s; }
.hero-badge-2 { bottom: 25%; right: 5%; animation-delay: -3s; }
.hero-badge-3 { top: 25%; right: 10%; animation-delay: -1.5s; }

@keyframes float-badge {
  0% { transform: translateY(0) rotate(-2deg); }
  100% { transform: translateY(-15px) rotate(2deg); }
}

/* Infinite Marquee */
.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  padding: 40px 0 20px 0;
}
.marquee-track {
  display: inline-block;
  animation: scroll-marquee 30s linear infinite;
  /* Double width to allow seamless scrolling */
  width: max-content;
}
.marquee-content {
  display: inline-flex;
  align-items: center;
  gap: 5rem;
  padding-right: 5rem;
}
.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  transition: all 0.3s ease;
  user-select: none;
}
.marquee-item:hover {
  color: var(--cyan-2);
  transform: scale(1.05);
}
.marquee-icon { width: 32px; height: 32px; }

@keyframes scroll-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Testimonial Cards */
.testimonial-card {
  background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(255,255,255,0.6));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 
    0 20px 40px -10px rgba(0,0,0,0.05),
    inset 0 1px 0 rgba(255,255,255,1);
  transition: all 0.4s ease;
  position: relative;
}
.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px -12px rgba(6, 182, 212, 0.15);
  border-color: rgba(6,182,212,0.4);
}
.quote-icon {
  position: absolute;
  top: 24px; right: 24px;
  color: var(--cyan-soft);
  width: 48px; height: 48px;
  z-index: 0;
}
.testimonial-card > * { position: relative; z-index: 1; }

/* Footer Input */
.footer-input-wrapper {
  position: relative;
  border-radius: 12px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-2);
  transition: all 0.3s ease;
  display: flex;
  overflow: hidden;
  margin-top: 16px;
}
.footer-input-wrapper:focus-within {
  border-color: var(--cyan-2);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15);
}
.footer-input {
  flex: 1;
  background: transparent;
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--text);
  outline: none;
}
.footer-btn {
  background: var(--cyan-2);
  color: white;
  padding: 0 16px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  cursor: pointer;
}
.footer-btn:hover { background: var(--cyan-3); }
