/* ==========================================================================
   WHY IT WORKS — premium glass-card section (repair.html only, testing
   mode). Self-contained design system, prefixed `wiw-` to avoid clashing
   with the shared `.grid-3` / `.card` styles used elsewhere.
   ========================================================================== */

.wiw-section {
  --wiw-blue: #246BFF;
  --wiw-purple: #6B5CFF;
  --wiw-pink: #D946EF;
  --wiw-bg: #FFFFFF;
  --wiw-text: #111827;
  --wiw-text-muted: #667085;
  --wiw-glass: rgba(255, 255, 255, 0.82);
  --wiw-glass-border: rgba(255, 255, 255, 0.9);
  --wiw-line: rgba(17, 24, 39, 0.08);
  --wiw-max-width: 1400px;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 50px 1.5rem;
  background: var(--wiw-bg);
  color: var(--wiw-text);
}

html[data-theme="dark"] .wiw-section {
  --wiw-bg: #05070d;
  --wiw-text: #F3F4F6;
  --wiw-text-muted: #9AA4B2;
  --wiw-glass: rgba(255, 255, 255, 0.055);
  --wiw-glass-border: rgba(255, 255, 255, 0.14);
  --wiw-line: rgba(255, 255, 255, 0.08);
}

.wiw-section * { box-sizing: border-box; }

.wiw-inner { position: relative; z-index: 2; max-width: var(--wiw-max-width); margin: 0 auto; }

/* ---------------------------------------------------------------------- */
/* Background: blobs, mesh, dot-grid, glass shapes, particles             */
/* Disabled — section background is flat white, no gradient wash.         */
/* ---------------------------------------------------------------------- */
.wiw-bg { display: none; }

.wiw-blob {
  position: absolute; border-radius: 50%;
  filter: blur(60px);
  animation: wiwDrift 26s ease-in-out infinite; animation-play-state: paused;
}
.wiw-section.wiw-in-view .wiw-blob { animation-play-state: running; }
.wiw-blob-1 { width: 34rem; height: 34rem; top: -12rem; left: -10rem; background: radial-gradient(circle, rgba(36,107,255,0.07), transparent 70%); }
.wiw-blob-2 { width: 30rem; height: 30rem; bottom: -10rem; right: -8rem; background: radial-gradient(circle, rgba(217,70,239,0.06), transparent 70%); animation-duration: 30s; animation-direction: reverse; }
.wiw-blob-3 { width: 24rem; height: 24rem; top: 38%; left: 46%; background: radial-gradient(circle, rgba(107,92,255,0.05), transparent 70%); animation-duration: 33s; animation-delay: -9s; }

html[data-theme="dark"] .wiw-blob-1 { background: radial-gradient(circle, rgba(36,107,255,0.22), transparent 70%); }
html[data-theme="dark"] .wiw-blob-2 { background: radial-gradient(circle, rgba(217,70,239,0.16), transparent 70%); }
html[data-theme="dark"] .wiw-blob-3 { background: radial-gradient(circle, rgba(107,92,255,0.16), transparent 70%); }

@keyframes wiwDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(2.6rem, -3rem) scale(1.06); }
  66% { transform: translate(-2rem, 2rem) scale(0.96); }
}

.wiw-mesh {
  position: absolute; inset: -10%;
  background:
    radial-gradient(ellipse 45% 35% at 22% 20%, rgba(238,245,255,0.9), transparent 60%),
    radial-gradient(ellipse 40% 32% at 78% 30%, rgba(247,243,255,0.85), transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 90%, rgba(238,245,255,0.7), transparent 65%);
  opacity: 0.8;
}
html[data-theme="dark"] .wiw-mesh { opacity: 0; }

.wiw-dotgrid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(17,24,39,0.10) 1px, transparent 1px);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 0%, transparent 78%);
  opacity: 0.55;
}
html[data-theme="dark"] .wiw-dotgrid { background-image: radial-gradient(rgba(255,255,255,0.14) 1px, transparent 1px); }

.wiw-shape {
  position: absolute; opacity: 0.08; pointer-events: none;
  animation: wiwShapeFloat 16s ease-in-out infinite; animation-play-state: paused;
}
.wiw-section.wiw-in-view .wiw-shape { animation-play-state: running; }

.wiw-cube {
  width: 3.25rem; height: 3.25rem;
  background: linear-gradient(135deg, var(--wiw-blue), var(--wiw-purple));
  border-radius: 0.65rem;
  transform: perspective(400px) rotateX(35deg) rotateY(35deg);
}
.wiw-cube-1 { top: 12%; left: 6%; animation-duration: 19s; }
.wiw-cube-2 { bottom: 16%; right: 8%; width: 2.25rem; height: 2.25rem; background: linear-gradient(135deg, var(--wiw-pink), var(--wiw-purple)); animation-duration: 22s; animation-delay: -6s; }

.wiw-sphere {
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.9), rgba(36,107,255,0.35) 55%, transparent 75%);
  border: 1px solid rgba(255,255,255,0.5);
}
.wiw-sphere-1 { width: 4rem; height: 4rem; top: 20%; right: 12%; animation-duration: 24s; animation-delay: -3s; }
.wiw-sphere-2 { width: 2.5rem; height: 2.5rem; bottom: 10%; left: 14%; animation-duration: 20s; animation-delay: -11s; }

.wiw-hex {
  width: 3rem; height: 3rem;
  background: linear-gradient(135deg, var(--wiw-purple), var(--wiw-blue));
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  top: 62%; right: 22%; animation-duration: 26s; animation-delay: -8s;
}

html[data-theme="dark"] .wiw-shape { opacity: 0.12; }

@keyframes wiwShapeFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(1.2rem, -1.8rem) rotate(12deg); }
}

.wiw-particle {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: var(--wiw-blue); opacity: 0;
  box-shadow: 0 0 8px 1px currentColor;
  animation: wiwParticleFloat 9s ease-in-out infinite; animation-play-state: paused;
}
.wiw-section.wiw-in-view .wiw-particle { animation-play-state: running; }
.wiw-particle:nth-child(6) { top: 16%; left: 10%; color: var(--wiw-blue); animation-delay: 0s; }
.wiw-particle:nth-child(7) { top: 70%; left: 18%; color: var(--wiw-purple); animation-delay: 1.6s; }
.wiw-particle:nth-child(8) { top: 24%; left: 86%; color: var(--wiw-pink); animation-delay: 3.1s; }
.wiw-particle:nth-child(9) { top: 76%; left: 80%; color: var(--wiw-blue); animation-delay: 4.6s; }
.wiw-particle:nth-child(10) { top: 48%; left: 4%; color: var(--wiw-purple); animation-delay: 5.9s; }
.wiw-particle:nth-child(11) { top: 42%; left: 95%; color: var(--wiw-pink); animation-delay: 2.4s; }

@keyframes wiwParticleFloat {
  0% { opacity: 0; transform: translate(0, 0); }
  15% { opacity: 0.6; }
  50% { transform: translate(0.6rem, -1.6rem); }
  85% { opacity: 0.45; }
  100% { opacity: 0; transform: translate(-0.5rem, -2.8rem); }
}

/* ---------------------------------------------------------------------- */
/* Header                                                                  */
/* ---------------------------------------------------------------------- */
.wiw-header {
  text-align: center; max-width: 46rem; margin: 0 auto;
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(.16,.84,.44,1), transform 0.9s cubic-bezier(.16,.84,.44,1);
}
.wiw-section.wiw-in-view .wiw-header { opacity: 1; transform: translateY(0); }

.wiw-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--red-700);
  background: var(--red-50);
  border: 1px solid rgba(239, 68, 68, 0.15);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
}
html[data-theme="dark"] .wiw-badge { background: rgba(239, 68, 68, 0.12); color: #fca5a5; }

.wiw-title {
  font-family: 'Inter', var(--font-display, sans-serif), sans-serif;
  font-weight: 800; letter-spacing: -0.025em; line-height: 1.12;
  font-size: 35px;
  color: var(--wiw-text); margin: 0.85rem 0 0;
}

.wiw-title-gradient {
  display: inline; line-height: inherit;
  color: var(--red-600);
}
html[data-theme="dark"] .wiw-title-gradient { color: #f87171; }

.wiw-subtitle {
  max-width: 580px; margin: 0.75rem auto 0;
  font-size: 0.95rem;
  font-weight: 500; color: var(--wiw-text-muted); line-height: 1.7;
}

/* ---------------------------------------------------------------------- */
/* Stage: card row                                                         */
/* ---------------------------------------------------------------------- */
.wiw-stage {
  position: relative;
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

.wiw-cards {
  position: relative; z-index: 2;
  display: flex; justify-content: center; align-items: stretch; flex-wrap: wrap;
  gap: clamp(1.1rem, 2.2vw, 1.5rem);
}

/* ---------------------------------------------------------------------- */
/* Card — wrapper holds the overlapping icon + the visual card body        */
/* ---------------------------------------------------------------------- */
.wiw-card {
  --wiw-accent: var(--red-500);
  position: relative;
  width: 280px; max-width: 86vw;
  display: flex; flex-direction: column; align-items: flex-start;
  opacity: 0; translate: 0 32px;
  transition:
    transform 0.5s cubic-bezier(.16,.84,.44,1),
    opacity 0.8s cubic-bezier(.16,.84,.44,1),
    translate 0.8s cubic-bezier(.16,.84,.44,1);
}

.wiw-section.wiw-in-view .wiw-card { opacity: 1; translate: 0 0; }
.wiw-section.wiw-in-view .wiw-card:nth-child(1) { transition-delay: 0.05s; }
.wiw-section.wiw-in-view .wiw-card:nth-child(2) { transition-delay: 0.2s; }
.wiw-section.wiw-in-view .wiw-card:nth-child(3) { transition-delay: 0.35s; }

.wiw-card:hover, .wiw-card:focus-within { transform: translateY(-10px); }

/* ---------------------------------------------------------------------- */
/* Card body — the visible white panel; icon overlaps its top edge         */
/* ---------------------------------------------------------------------- */
.wiw-card-body {
  position: relative;
  width: 100%; flex: 1;
  display: flex; flex-direction: column; align-items: flex-start;
  margin-top: -36px;
  padding: 2.75rem 1.5rem 1.25rem;
  background: var(--wiw-glass);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--wiw-glass-border);
  border-radius: 1.5rem;
  box-shadow:
    0 20px 60px -18px rgba(17,24,39,0.13),
    0 2px 8px -2px rgba(17,24,39,0.06),
    inset 0 1px 0 rgba(255,255,255,0.9);
  overflow: hidden;
  transition: box-shadow 0.5s cubic-bezier(.16,.84,.44,1), border-color 0.4s ease;
}
.wiw-card:hover .wiw-card-body, .wiw-card:focus-within .wiw-card-body {
  box-shadow:
    0 25px 60px -24px rgba(239,68,68,0.16),
    0 4px 14px -2px rgba(17,24,39,0.08),
    inset 0 1px 0 rgba(255,255,255,0.95);
  border-color: var(--red-500);
}
html[data-theme="dark"] .wiw-card-body {
  box-shadow:
    0 30px 90px -20px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.08);
}
html[data-theme="dark"] .wiw-card:hover .wiw-card-body, html[data-theme="dark"] .wiw-card:focus-within .wiw-card-body {
  box-shadow:
    0 25px 60px -24px rgba(239,68,68,0.22),
    inset 0 1px 0 rgba(255,255,255,0.12);
  border-color: var(--red-500);
}

/* Cursor-tracked spotlight */
.wiw-card-spotlight {
  position: absolute; width: 260px; height: 260px; border-radius: 50%;
  left: var(--mx, 50%); top: var(--my, 50%);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(239,68,68,0.9), rgba(239,68,68,0.5) 45%, transparent 72%);
  filter: blur(70px);
  opacity: 0; transition: opacity 0.4s ease;
  pointer-events: none; z-index: 0;
}
.wiw-card:hover .wiw-card-spotlight, .wiw-card:focus-within .wiw-card-spotlight { opacity: 0.07; }

.wiw-card-body > :not(.wiw-card-spotlight) { position: relative; z-index: 1; }

.wiw-num {
  display: block;
  font-family: 'Inter', var(--font-display, sans-serif), sans-serif;
  font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em;
  color: var(--wiw-accent);
  margin-bottom: 0.5rem;
}

/* Frozen-glass orb icon — overlaps the card body's top edge */
.wiw-orb {
  position: relative; z-index: 3;
  width: 72px; height: 72px; margin-left: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(150deg, rgba(255,255,255,0.6), rgba(255,255,255,0.18) 55%, rgba(255,255,255,0.4));
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1.5px solid var(--wiw-accent);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.95),
    inset 0 -8px 12px -6px rgba(255,255,255,0.5),
    inset 0 0 0 1px rgba(255,255,255,0.12),
    0 18px 34px -16px color-mix(in srgb, var(--wiw-accent) 55%, transparent);
  color: var(--wiw-accent);
  animation: wiwOrbFloat 4s ease-in-out infinite;
  transition: transform 0.5s cubic-bezier(.16,.84,.44,1), box-shadow 0.5s ease;
}
.wiw-orb::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.65) 0%, transparent 32%, transparent 68%, rgba(255,255,255,0.3) 100%);
  pointer-events: none;
}
.wiw-card:nth-child(2) .wiw-orb { animation-delay: -1.3s; }
.wiw-card:nth-child(3) .wiw-orb { animation-delay: -2.6s; }
html[data-theme="dark"] .wiw-orb {
  background: linear-gradient(150deg, rgba(255,255,255,0.14), rgba(255,255,255,0.03) 55%, rgba(255,255,255,0.1));
  border-color: var(--wiw-accent);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.25),
    inset 0 -8px 12px -6px rgba(255,255,255,0.08),
    0 18px 34px -16px color-mix(in srgb, var(--wiw-accent) 65%, transparent);
}
.wiw-card:hover .wiw-orb, .wiw-card:focus-within .wiw-orb {
  transform: scale(1.1) rotate(6deg);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.95),
    inset 0 -8px 12px -6px rgba(255,255,255,0.5),
    0 22px 42px -14px color-mix(in srgb, var(--wiw-accent) 75%, transparent);
}
.wiw-orb-glow {
  position: absolute; inset: 14%; border-radius: 50%;
  background: radial-gradient(circle, var(--wiw-accent), transparent 70%);
  filter: blur(16px); opacity: 0.32;
  transition: opacity 0.4s ease;
}
.wiw-card:hover .wiw-orb-glow, .wiw-card:focus-within .wiw-orb-glow { opacity: 0.55; }
.wiw-orb svg { width: 28px; height: 28px; position: relative; z-index: 1; filter: drop-shadow(0 1px 1px rgba(255,255,255,0.6)); }

@keyframes wiwOrbFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

.wiw-card h3 {
  font-family: 'Inter', var(--font-display, sans-serif), sans-serif;
  font-weight: 700; font-size: 1.15rem; letter-spacing: -0.012em;
  color: var(--wiw-text); margin: 0 0 0.4rem;
}
.wiw-card p {
  margin: 0; font-size: 0.9rem; line-height: 1.6; font-weight: 400;
  color: var(--wiw-text-muted);
}

.wiw-cta {
  margin-top: auto; align-self: flex-end;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--wiw-bg);
  border: 1px solid color-mix(in srgb, var(--wiw-accent) 35%, transparent);
  color: var(--wiw-accent);
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(.16,.84,.44,1), background 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}
.wiw-cta svg { width: 18px; height: 18px; transition: transform 0.35s cubic-bezier(.16,.84,.44,1); }
.wiw-card:hover .wiw-cta, .wiw-card:focus-within .wiw-cta {
  background: var(--wiw-accent);
  border-color: transparent;
  color: #fff;
}
.wiw-card:hover .wiw-cta svg, .wiw-card:focus-within .wiw-cta svg { transform: translateX(3px); }
html[data-theme="dark"] .wiw-cta { background: rgba(255,255,255,0.04); }

/* ---------------------------------------------------------------------- */
/* Responsive                                                              */
/* ---------------------------------------------------------------------- */
@media (min-width: 640px) and (max-width: 1023px) {
  .wiw-cards { max-width: 620px; margin: 0 auto; }
}

@media (max-width: 639px) {
  .wiw-card-body { padding: 2.75rem 1.5rem 1.5rem; }
}

/* ---------------------------------------------------------------------- */
/* Accessibility                                                          */
/* ---------------------------------------------------------------------- */
.wiw-cta:focus-visible { outline: 2px solid var(--wiw-accent); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .wiw-section, .wiw-section * {
    animation: none !important;
    transition: opacity 0.4s ease, color 0.4s ease !important;
  }
  .wiw-header, .wiw-card { opacity: 1 !important; transform: none !important; translate: 0 0 !important; }
  .wiw-card:hover, .wiw-card:focus-within { transform: none !important; }
}
