/* =====================================================================
   AEGON TOOLS — ULTRA-PREMIUM HERO (QUSO ARCHITECTURE)
   - Visible Crisp Dots in Both Light & Dark Themes
   - 2 Diverse Fonts in Main Heading (Modern Sans + Editorial Serif Italics)
   - Clean 3-Line Tagline / Description
   - 3D Tilted, Larger, Animated & Clickable Side Product Showcase Cards
   - Infinite Smooth Tool Marquee Strip at Bottom of Hero
   - 100% Reliable Inline SVGs & Direct Product Links
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@1,600;1,700&display=swap');

:root {
  --qs-font-display: var(--font-display, 'Outfit', 'Clash Display', -apple-system, sans-serif);
  --qs-font-body: var(--font-body, 'Inter', 'Poppins', -apple-system, sans-serif);
  --qs-font-serif: 'Playfair Display', Georgia, serif;
}

/* Light Theme Variables — Crisp, clearly visible background dots */
html:not([data-theme="dark"]) .qs-hero-sec {
  --qs-bg: #f8fafc;
  --qs-dot-color: rgba(99, 102, 241, 0.3);
  --qs-ambient: radial-gradient(ellipse 70% 55% at 50% 38%, rgba(124, 92, 255, 0.14) 0%, rgba(99, 102, 241, 0.06) 50%, transparent 75%);
  --qs-text-title: #0f172a;
  --qs-text-sub: #475569;
  --qs-text-muted: #64748b;
  --qs-card-bg: #ffffff;
  --qs-card-border: rgba(124, 92, 255, 0.16);
  --qs-card-shadow: 0 18px 42px -4px rgba(44, 37, 94, 0.1), 0 2px 10px rgba(44, 37, 94, 0.04);
  --qs-card-hover-shadow: 0 24px 52px -6px rgba(124, 92, 255, 0.22);
  --qs-accent: #7c5cff;
  --qs-accent-grad: linear-gradient(135deg, #7c5cff 0%, #6366f1 50%, #9333ea 100%);
  --qs-btn-shadow: 0 12px 30px -4px rgba(124, 92, 255, 0.45);
  --qs-search-bg: #ffffff;
  --qs-search-border: rgba(124, 92, 255, 0.22);
  --qs-search-shadow: 0 14px 36px -6px rgba(44, 37, 94, 0.09);
  --qs-tile-bg: #ffffff;
  --qs-tile-border: rgba(124, 92, 255, 0.18);
  --qs-tile-shadow: 0 6px 18px -4px rgba(44, 37, 94, 0.08), 0 0 1px rgba(0, 0, 0, 0.05);
}

/* Dark Theme Variables */
html[data-theme="dark"] .qs-hero-sec {
  --qs-bg: #070812;
  --qs-dot-color: rgba(124, 92, 255, 0.22);
  --qs-ambient: radial-gradient(ellipse 70% 55% at 50% 38%, rgba(124, 92, 255, 0.26) 0%, rgba(99, 102, 241, 0.12) 50%, transparent 75%);
  --qs-text-title: #f8fafc;
  --qs-text-sub: #94a3b8;
  --qs-text-muted: #64748b;
  --qs-card-bg: rgba(15, 18, 36, 0.94);
  --qs-card-border: rgba(124, 92, 255, 0.26);
  --qs-card-shadow: 0 20px 48px -10px rgba(0, 0, 0, 0.7);
  --qs-card-hover-shadow: 0 26px 62px -8px rgba(124, 92, 255, 0.32);
  --qs-accent: #7c5cff;
  --qs-accent-grad: linear-gradient(135deg, #9370ff 0%, #6366f1 50%, #b366ff 100%);
  --qs-btn-shadow: 0 14px 34px -4px rgba(124, 92, 255, 0.6);
  --qs-search-bg: rgba(15, 18, 36, 0.94);
  --qs-search-border: rgba(124, 92, 255, 0.34);
  --qs-search-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.8);
  --qs-tile-bg: rgba(22, 26, 52, 0.96);
  --qs-tile-border: rgba(124, 92, 255, 0.28);
  --qs-tile-shadow: 0 8px 22px -4px rgba(0, 0, 0, 0.6);
}

/* ---------------------------------------------------------------------
   1. HERO SECTION WRAPPER
   --------------------------------------------------------------------- */
.qs-hero-sec {
  position: relative;
  background-color: var(--qs-bg);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(135px, 17vh, 190px) 0 clamp(70px, 9vh, 105px);
  overflow: hidden;
  transition: background-color 0.3s ease;
  font-family: var(--qs-font-body);
  box-sizing: border-box;
}

/* Push following sections down below the fold */
.popular-tools-section {
  margin-top: 0;
  padding-top: 60px;
}

/* PURE STATIC DOTTED MATRIX (Crisp & clearly visible in both light & dark themes) */
.qs-canvas-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle, var(--qs-dot-color) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
  background-position: 0 0;
  mask-image: radial-gradient(circle at 50% 45%, black 65%, transparent 98%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, black 65%, transparent 98%);
  transform: none !important;
  animation: none !important;
}

/* Static Soft Central Ambient Glow */
.qs-ambient-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 650px;
  background: var(--qs-ambient);
  filter: blur(65px);
  pointer-events: none;
  z-index: 0;
  animation: none !important;
}

/* Static Constellation Arcs (SVG Layer) */
.qs-constellation-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.qs-net-path {
  fill: none;
  stroke-dasharray: 4, 4;
  stroke-width: 1.5;
  stroke-linecap: round;
}
.qs-node-dot {
  opacity: 0.85;
}

/* Main Hero Container */
.qs-hero-container {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
  z-index: 2;
  margin-top: 5px;
}

/* ---------------------------------------------------------------------
   2. 3D TILTED, ANIMATED & CLICKABLE SIDE SHOWCASE CARDS
   --------------------------------------------------------------------- */
.qs-mockup-wrap {
  position: absolute;
  top: calc(50% + 8px);
  transform: translateY(-50%);
  z-index: 3;
  pointer-events: auto;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Subtle 3D Floating Animations */
@keyframes qsFloatLeft {
  0%, 100% {
    transform: translateY(-50%) perspective(1000px) rotate(-3.5deg) translateY(0);
  }
  50% {
    transform: translateY(-50%) perspective(1000px) rotate(-3deg) translateY(-9px);
  }
}
@keyframes qsFloatRight {
  0%, 100% {
    transform: translateY(-50%) perspective(1000px) rotate(3.5deg) translateY(0);
  }
  50% {
    transform: translateY(-50%) perspective(1000px) rotate(3deg) translateY(-9px);
  }
}

.qs-mockup-left {
  left: 0.5%;
  width: 325px;
  animation: qsFloatLeft 7s ease-in-out infinite;
}
.qs-mockup-right {
  right: 0.5%;
  width: 325px;
  animation: qsFloatRight 7s ease-in-out infinite alternate;
}

.qs-mockup-left:hover {
  animation-play-state: paused;
  transform: translateY(-50%) perspective(1000px) rotate(-0.5deg) scale(1.02);
}
.qs-mockup-right:hover {
  animation-play-state: paused;
  transform: translateY(-50%) perspective(1000px) rotate(0.5deg) scale(1.02);
}

/* Window Shell */
.qs-mockup-window {
  background: var(--qs-card-bg);
  border: 1.5px solid var(--qs-card-border);
  border-radius: 20px;
  box-shadow: var(--qs-card-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.qs-mockup-wrap:hover .qs-mockup-window {
  box-shadow: var(--qs-card-hover-shadow);
  border-color: rgba(124, 92, 255, 0.4);
}

.qs-window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 15px;
  background: rgba(124, 92, 255, 0.04);
  border-bottom: 1px solid var(--qs-card-border);
}
.qs-window-dots {
  display: flex;
  gap: 5px;
}
.qs-window-dots span {
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
}
.qs-window-dots span:nth-child(1) { background: #ff5f56; }
.qs-window-dots span:nth-child(2) { background: #ffbd2e; }
.qs-window-dots span:nth-child(3) { background: #27c93f; }
.qs-window-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--qs-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.qs-window-actions {
  display: flex;
  gap: 6px;
}
.qs-win-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.08);
  color: var(--qs-text-title);
}
.qs-win-pill.is-purple {
  background: var(--qs-accent);
  color: #ffffff;
}
.qs-win-pill.is-live {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

/* Dispatch Body & Interactive Rows */
.qs-dispatch-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.qs-dispatch-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid rgba(16, 185, 129, 0.16);
}
.qs-dispatch-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

/* Interactive Product Item Link with Micro-Animations */
.qs-dispatch-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(124, 92, 255, 0.04);
  border: 1.5px solid var(--qs-card-border);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.qs-dispatch-item:hover {
  transform: translateX(4px);
  background: rgba(124, 92, 255, 0.08);
  border-color: var(--qs-accent);
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.18);
}

.qs-dispatch-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: 0 4px 12px -3px rgba(24, 20, 60, 0.14);
  transition: transform 0.22s ease;
}
.qs-dispatch-ico svg,
.qs-mpill-ico svg {
  display: block;
}
/* Uploaded / brand icons fill the entire tile — no white gap around */
.qs-dispatch-ico img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain;
  border-radius: 12px;
  padding: 3px;
  background: #fff;
  box-sizing: border-box;
}
.qs-dispatch-ico svg {
  width: 30px !important;
  height: 30px !important;
}
.qs-dispatch-item:hover .qs-dispatch-ico {
  transform: scale(1.12);
}

.qs-dispatch-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  text-align: left;
}
.qs-dispatch-details strong {
  font-size: 12.5px;
  color: var(--qs-text-title);
  font-weight: 700;
  transition: color 0.2s ease;
}
.qs-dispatch-item:hover .qs-dispatch-details strong {
  color: var(--qs-accent);
}
.qs-dispatch-details small {
  font-size: 10.5px;
  color: var(--qs-text-muted);
}

.qs-dispatch-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  white-space: nowrap;
}
.qs-dispatch-badge.is-purple {
  background: rgba(124, 92, 255, 0.12);
  color: var(--qs-accent);
}

.qs-dispatch-footer {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--qs-card-border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.qs-foot-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--qs-accent);
}
.qs-foot-badge.is-green {
  color: #10b981;
}

/* ---------------------------------------------------------------------
   3. CENTER STAGE HERO CONTENT
   --------------------------------------------------------------------- */
.qs-center-stage {
  max-width: 820px;
  margin: 14px auto 0 auto;
  text-align: center;
  position: relative;
  z-index: 4;
}

/* Top Hook Pill ("⚡ UP TO 80% OFF RETAIL") */
.qs-badge-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
  margin-top: -8px;
}
.qs-hero-hook-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 6px;
  border-radius: 999px;
  background: var(--qs-card-bg);
  border: 1.5px solid var(--qs-card-border);
  box-shadow: 0 10px 26px -4px rgba(124, 92, 255, 0.18);
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.qs-hero-hook-pill:hover {
  transform: translateY(-2px);
  border-color: var(--qs-accent);
  box-shadow: 0 14px 32px -4px rgba(124, 92, 255, 0.3);
}
.qs-hook-discount {
  display: inline-flex;
  align-items: center;
  padding: 3.5px 10px;
  border-radius: 999px;
  background: var(--qs-accent-grad);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(124, 92, 255, 0.35);
}
.qs-hook-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--qs-text-muted);
  opacity: 0.5;
}
.qs-hook-text {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--qs-text-title);
}
.qs-hook-arrow {
  color: var(--qs-accent);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.qs-hero-hook-pill:hover .qs-hook-arrow {
  transform: translateX(3px);
}

/* Main Display Headline (Enlarged + 2 Distinct Designer Fonts) */
.qs-hero-h1 {
  font-size: clamp(50px, 6.5vw, 82px);
  line-height: 1.09;
  letter-spacing: -0.03em;
  margin: 0 auto 26px auto;
  max-width: 860px;
}
.qs-h1-row {
  display: block;
}
.qs-h1-primary {
  font-family: var(--qs-font-display);
  font-weight: 800;
  color: var(--qs-text-title);
}
.qs-h1-editorial {
  font-family: var(--qs-font-serif);
  font-weight: 700;
  font-style: italic;
  letter-spacing: -0.01em;
}
.qs-grad-text {
  background: var(--qs-accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Subtitle (Concise & Punchy) */
.qs-hero-sub {
  font-size: clamp(15.5px, 1.7vw, 17.5px);
  line-height: 1.65;
  color: var(--qs-text-sub);
  max-width: 720px;
  margin: 0 auto 28px auto;
}
.qs-sub-line {
  display: block;
  margin-bottom: 4px;
}
.qs-hero-sub strong {
  color: var(--qs-text-title);
}
@media (max-width: 768px) {
  .qs-sub-line { display: inline; }
}

/* Social Proof & Avatars Strip */
.qs-proof-strip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}
.qs-avatar-stack {
  display: flex;
  align-items: center;
}
.qs-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--qs-card-bg);
  background-size: cover;
  background-position: center;
  margin-left: -8px;
}
.qs-avatar:first-child {
  margin-left: 0;
}
.qs-proof-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
}
.qs-proof-stars {
  color: #f59e0b;
  letter-spacing: 1px;
  font-size: 12px;
}
.qs-proof-count {
  font-weight: 700;
  color: var(--qs-text-title);
}

/* ---------------------------------------------------------------------
   4. SEARCH BAR (Primary Action - Non-Clipped Placeholder)
   --------------------------------------------------------------------- */
.qs-search-form {
  max-width: 620px;
  margin: 0 auto 22px auto;
  position: relative;
  z-index: 5;
}
.qs-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 18px;
  background: var(--qs-search-bg);
  border: 1.5px solid var(--qs-search-border);
  border-radius: 999px;
  box-shadow: var(--qs-search-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: all 0.25s ease;
}
.qs-search-box:focus-within {
  border-color: var(--qs-accent);
  box-shadow: 0 16px 40px -4px rgba(124, 92, 255, 0.25);
  transform: translateY(-1px);
}
.qs-search-ico {
  color: var(--qs-accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.qs-search-box input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 14.5px;
  color: var(--qs-text-title);
  outline: none;
  font-family: inherit;
  text-overflow: ellipsis;
}
.qs-search-box input::placeholder {
  color: var(--qs-text-muted);
  opacity: 0.85;
}
.qs-search-kbd {
  font-size: 11px;
  font-weight: 600;
  color: var(--qs-text-muted);
  background: rgba(124, 92, 255, 0.08);
  border: 1px solid rgba(124, 92, 255, 0.16);
  padding: 3px 7px;
  border-radius: 6px;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .qs-search-kbd { display: none; }
}
.qs-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--qs-accent-grad);
  color: #ffffff;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.qs-search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(124, 92, 255, 0.4);
}

/* ---------------------------------------------------------------------
   5. PRIMARY CTA ("Browse All Tools") & TRUST LINE
   --------------------------------------------------------------------- */
.qs-cta-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.qs-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 38px;
  border-radius: 13px;
  background: var(--qs-accent-grad);
  color: #ffffff !important;
  font-size: 15.5px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--qs-btn-shadow);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.qs-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -4px rgba(124, 92, 255, 0.6);
  color: #ffffff !important;
}

/* Admin-editable secondary button (e.g. "Join Community") */
.qs-cta-btn.is-secondary {
  background: var(--qs-card-bg);
  color: var(--qs-text-title) !important;
  border: 1.5px solid var(--qs-card-border);
  box-shadow: 0 12px 28px -8px rgba(124, 92, 255, .22);
}
.qs-cta-btn.is-secondary svg {
  color: #22c55e;
}
.qs-cta-btn.is-secondary:hover {
  border-color: var(--qs-accent);
  box-shadow: 0 16px 34px -8px rgba(124, 92, 255, .38);
  color: var(--qs-accent) !important;
}

.qs-micro-trust {
  font-size: 13px;
  color: var(--qs-text-muted);
  margin: 0 auto 24px auto;
  font-weight: 500;
}

/* ---------------------------------------------------------------------
   6. ULTRA-PREMIUM INFINITE MARQUEE STRIP (Under Hero Content)
   --------------------------------------------------------------------- */
.qs-marquee-wrap {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 50px auto 0 auto;
  overflow: hidden;
  padding: 8px 0;
  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);
  z-index: 5;
}

.qs-marquee-track {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  animation: qsMarquee 34s linear infinite;
}

.qs-marquee-wrap:hover .qs-marquee-track {
  animation-play-state: paused;
}

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

.qs-marquee-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--qs-tile-bg);
  border: 1.5px solid var(--qs-tile-border);
  box-shadow: var(--qs-tile-shadow);
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  flex-shrink: 0;
}
.qs-marquee-pill:hover {
  transform: translateY(-2px);
  border-color: var(--qs-accent);
  box-shadow: 0 8px 22px rgba(124, 92, 255, 0.25);
}
.qs-mpill-ico {
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.qs-mpill-ico svg {
  display: block;
}
.qs-mpill-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--qs-text-title);
  white-space: nowrap;
}
.qs-mpill-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.1);
  color: var(--qs-accent);
  white-space: nowrap;
}

/* ---------------------------------------------------------------------
   7. RESPONSIVE BREAKPOINTS
   --------------------------------------------------------------------- */
@media (max-width: 1350px) {
  .qs-mockup-left { width: 295px; left: 0.5%; }
  .qs-mockup-right { width: 295px; right: 0.5%; }
}

@media (max-width: 1120px) {
  /* On tablets and below, hide side mockups to give hero clean focus */
  .qs-mockup-wrap {
    display: none;
  }
  .qs-constellation-svg {
    opacity: 0.35;
  }
  .qs-hero-sec {
    min-height: auto;
    padding: 85px 0 65px;
  }
  .qs-marquee-wrap {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .qs-hero-h1 {
    font-size: 36px;
  }
  .qs-hero-sub {
    font-size: 14.5px;
  }
}