/* ============================================================
   CY5 Cloud Security Mind Maps — mindmap.css
   Ultra-premium dark futuristic design system — 3D Sphere Edition
   Brand: #D07909 primary · #F5A309 secondary · #0C0A09 bg
   Max mindmap width: 1140px
   ============================================================ */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  --cy5-primary:       #D07909;
  --cy5-secondary:     #F5A309;
  --cy5-text:          #A8A29E;
  --cy5-accent:        #F2D8B6;
  --cy5-white:         #F8F8F8;
  --cy5-bg:            #0C0A09;
  --cy5-bg-accent:     #1C1917;
  --cy5-bg-dark:       #121010;
  --cy5-border:        rgba(208, 121, 9, 0.18);
  --cy5-border-hover:  rgba(245, 163, 9, 0.45);
  --cy5-glow:          rgba(208, 121, 9, 0.35);
  --cy5-glow-strong:   rgba(245, 163, 9, 0.6);

  /* Type */
  --font-display: 'Syne', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-expo:  cubic-bezier(0.7, 0, 0.84, 0);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ──────────────────────────────────────────────────── */
html { font-size: 16px; scroll-behavior: smooth; }

.cy5mm-body {
  background: var(--cy5-bg);
  color: var(--cy5-text);
  font-family: var(--font-mono);
  min-height: 100vh;
  overflow-x: hidden;
  cursor: default;
}

/* Remove Elementor/WP padding if present */
.cy5mm-body .elementor-section-wrap,
.cy5mm-body #page,
.cy5mm-body .site-content { all: unset; }

/* ── Ambient canvas ────────────────────────────────────────── */
#cy5mm-ambient {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ── Grid overlay ──────────────────────────────────────────── */
.cy5mm-grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    linear-gradient(rgba(208,121,9,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(208,121,9,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

/* ── Scanlines ─────────────────────────────────────────────── */
.cy5mm-scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.06) 3px,
    rgba(0,0,0,0.06) 4px
  );
  animation: scanline-drift 10s linear infinite;
}
@keyframes scanline-drift {
  0%   { background-position: 0 0; }
  100% { background-position: 0 100vh; }
}

/* ── Navigation ────────────────────────────────────────────── */
.cy5mm-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 60px;
  background: rgba(12, 10, 9, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--cy5-border);
}

.cy5mm-nav__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
  padding: 0 24px;
  max-width: 1600px;
  margin: 0 auto;
}

.cy5mm-nav__logo {
  text-decoration: none;
  flex-shrink: 0;
}

.cy5mm-nav__logo-mark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--cy5-primary);
  letter-spacing: 0.08em;
  text-shadow: 0 0 20px var(--cy5-glow);
  transition: color 0.2s, text-shadow 0.2s;
}
.cy5mm-nav__logo:hover .cy5mm-nav__logo-mark {
  color: var(--cy5-secondary);
  text-shadow: 0 0 30px var(--cy5-glow-strong);
}

/* ── Breadcrumb ────────────────────────────────────────────── */
.cy5mm-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  overflow: hidden;
}

.cy5mm-breadcrumb__item {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--cy5-text);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
a.cy5mm-breadcrumb__item:hover { color: var(--cy5-secondary); }
.cy5mm-breadcrumb__item--active { color: var(--cy5-accent); }
.cy5mm-breadcrumb__item--cat { color: var(--cy5-primary); }
.cy5mm-breadcrumb__sep { color: rgba(168,162,158,0.3); font-size: 11px; }

/* ── Nav controls ──────────────────────────────────────────── */
.cy5mm-nav__controls {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.cy5mm-btn {
  background: transparent;
  border: 1px solid var(--cy5-border);
  border-radius: 6px;
  color: var(--cy5-text);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.cy5mm-btn svg { width: 16px; height: 16px; }
.cy5mm-btn:hover {
  border-color: var(--cy5-border-hover);
  color: var(--cy5-secondary);
  background: rgba(208,121,9,0.08);
  box-shadow: 0 0 12px rgba(208,121,9,0.2);
}

/* ── Header ────────────────────────────────────────────────── */
.cy5mm-header {
  position: relative;
  z-index: 5;
  padding: 90px 24px 28px;
  text-align: center;
  pointer-events: none;
}

.cy5mm-header__inner {
  max-width: 800px;
  margin: 0 auto;
}

.cy5mm-header__tag {
  display: inline-block;
  font-size: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.2em;
  color: var(--cy5-primary);
  background: rgba(208,121,9,0.1);
  border: 1px solid var(--cy5-border);
  padding: 4px 12px;
  border-radius: 2px;
  margin-bottom: 16px;
  animation: fade-up 0.6s var(--ease-out-expo) both;
}

.cy5mm-header__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.05;
  color: var(--cy5-white);
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25em;
}

.cy5mm-header__word {
  display: inline-block;
  animation: fade-up 0.7s var(--ease-out-expo) both;
  background: linear-gradient(135deg, var(--cy5-white) 0%, var(--cy5-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cy5mm-header__desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--cy5-text);
  max-width: 520px;
  margin: 0 auto 18px;
  animation: fade-up 0.8s var(--ease-out-expo) 0.2s both;
}

.cy5mm-header__hint {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(168,162,158,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: fade-up 0.8s var(--ease-out-expo) 0.3s both;
}

.cy5mm-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cy5-primary);
  display: inline-block;
  box-shadow: 0 0 0 0 var(--cy5-glow);
  animation: pulse-ring 2s infinite;
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(208,121,9,0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(208,121,9,0); }
  100% { box-shadow: 0 0 0 0 rgba(208,121,9,0); }
}

/* ═══════════════════════════════════════════════════════════════
   CANVAS WRAP — outer full-width shell
═══════════════════════════════════════════════════════════════ */
.cy5mm-canvas-wrap {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ═══════════════════════════════════════════════════════════════
   SPHERE WRAP — capped at 1140px, pulsing gradient bg
═══════════════════════════════════════════════════════════════ */
.cy5mm-sphere-wrap {
  position: relative;
  width: 100%;
  max-width: 1140px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(208,121,9,0.22);
  box-shadow:
    0 0 0 1px rgba(208,121,9,0.08),
    0 0 60px rgba(208,121,9,0.06),
    0 40px 120px rgba(0,0,0,0.6);

  /* Pulsing gradient background — "information brewing" */
  background: #0a0703;
  animation: sphere-bg-pulse 6s ease-in-out infinite alternate;
}

@keyframes sphere-bg-pulse {
  0% {
    background:
      radial-gradient(ellipse 70% 55% at 30% 40%, rgba(208,121,9,0.13) 0%, transparent 65%),
      radial-gradient(ellipse 50% 40% at 75% 65%, rgba(245,163,9,0.07) 0%, transparent 60%),
      #0a0703;
    box-shadow:
      0 0 0 1px rgba(208,121,9,0.10),
      0 0 80px rgba(208,121,9,0.08),
      0 40px 120px rgba(0,0,0,0.6);
  }
  33% {
    background:
      radial-gradient(ellipse 60% 70% at 60% 30%, rgba(208,121,9,0.16) 0%, transparent 60%),
      radial-gradient(ellipse 40% 50% at 20% 70%, rgba(245,163,9,0.09) 0%, transparent 65%),
      #0c0804;
    box-shadow:
      0 0 0 1px rgba(208,121,9,0.18),
      0 0 100px rgba(208,121,9,0.13),
      0 40px 120px rgba(0,0,0,0.6);
  }
  67% {
    background:
      radial-gradient(ellipse 80% 45% at 50% 60%, rgba(208,121,9,0.10) 0%, transparent 65%),
      radial-gradient(ellipse 55% 65% at 80% 25%, rgba(245,163,9,0.08) 0%, transparent 60%),
      #0b0703;
    box-shadow:
      0 0 0 1px rgba(208,121,9,0.12),
      0 0 70px rgba(208,121,9,0.10),
      0 40px 120px rgba(0,0,0,0.6);
  }
  100% {
    background:
      radial-gradient(ellipse 65% 60% at 40% 50%, rgba(208,121,9,0.14) 0%, transparent 60%),
      radial-gradient(ellipse 45% 45% at 65% 75%, rgba(245,163,9,0.10) 0%, transparent 55%),
      #0a0703;
    box-shadow:
      0 0 0 1px rgba(208,121,9,0.16),
      0 0 90px rgba(208,121,9,0.12),
      0 40px 120px rgba(0,0,0,0.6);
  }
}

/* Subtle corner accent lines */
.cy5mm-sphere-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(208,121,9,0.5) 40%, rgba(245,163,9,0.7) 50%, rgba(208,121,9,0.5) 60%, transparent 95%);
  z-index: 2;
  animation: top-line-pulse 6s ease-in-out infinite alternate;
}
@keyframes top-line-pulse {
  0%   { opacity: 0.5; }
  50%  { opacity: 1; }
  100% { opacity: 0.6; }
}

.cy5mm-sphere-wrap::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(208,121,9,0.25) 50%, transparent 90%);
  z-index: 2;
}

/* ── 3D Stage ──────────────────────────────────────────────── */
#cy5mm-sphere-stage {
  position: relative;
  width: 100%;
  height: 580px;
  min-height: 420px;
  display: block;
  outline: none;
  cursor: grab;
}
#cy5mm-sphere-stage:active { cursor: grabbing; }

/* Three.js renderer canvas fills stage */
#cy5mm-sphere-stage > canvas {
  position: absolute !important;
  top: 0; left: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* CSS2DRenderer label overlay */
#cy5mm-sphere-stage > div {
  position: absolute !important;
  top: 0; left: 0;
}

/* ── Focus mode bar ────────────────────────────────────────── */
.cy5mm-focus-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  background: rgba(12,10,9,0.92);
  border-bottom: 1px solid rgba(208,121,9,0.2);
  backdrop-filter: blur(12px);
  transform: translateY(-100%);
  transition: transform 0.4s var(--ease-out-expo);
  z-index: 5;
  position: relative;
}
.cy5mm-focus-bar[aria-hidden="false"],
.cy5mm-focus-bar.cy5mm-focus-bar--visible {
  transform: translateY(0);
}
[aria-hidden="true"].cy5mm-focus-bar { pointer-events: none; }

.cy5mm-focus-back {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(208,121,9,0.3);
  border-radius: 4px;
  color: var(--cy5-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.cy5mm-focus-back svg { width: 13px; height: 13px; }
.cy5mm-focus-back:hover {
  background: rgba(208,121,9,0.12);
  border-color: var(--cy5-primary);
  color: var(--cy5-secondary);
}

.cy5mm-focus-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--cy5-accent);
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Rotation bar ──────────────────────────────────────────── */
.cy5mm-rot-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid rgba(208,121,9,0.1);
  background: rgba(10,7,3,0.6);
}

.cy5mm-rot-label {
  color: rgba(208,121,9,0.5);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.cy5mm-rot-bar {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  outline: none;
  cursor: pointer;
  position: relative;
}

/* Track */
.cy5mm-rot-bar::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(90deg,
    rgba(208,121,9,0.15) 0%,
    rgba(208,121,9,0.45) 50%,
    rgba(208,121,9,0.15) 100%
  );
  border-radius: 2px;
}
.cy5mm-rot-bar::-moz-range-track {
  height: 2px;
  background: linear-gradient(90deg, rgba(208,121,9,0.15) 0%, rgba(208,121,9,0.4) 50%, rgba(208,121,9,0.15) 100%);
  border-radius: 2px;
}

/* Thumb */
.cy5mm-rot-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #F5A309 0%, #D07909 60%, #8a4e04 100%);
  border: 2px solid rgba(245,163,9,0.5);
  box-shadow: 0 0 10px rgba(208,121,9,0.6), 0 0 24px rgba(208,121,9,0.3);
  cursor: grab;
  margin-top: -8px;
  transition: box-shadow 0.2s, transform 0.15s;
}
.cy5mm-rot-bar::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.2);
  box-shadow: 0 0 18px rgba(245,163,9,0.9), 0 0 40px rgba(208,121,9,0.5);
}
.cy5mm-rot-bar::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #F5A309 0%, #D07909 60%, #8a4e04 100%);
  border: 2px solid rgba(245,163,9,0.5);
  box-shadow: 0 0 10px rgba(208,121,9,0.6);
  cursor: grab;
}
.cy5mm-rot-bar:focus::-webkit-slider-thumb {
  box-shadow: 0 0 20px rgba(245,163,9,0.8), 0 0 0 3px rgba(208,121,9,0.25);
}

/* ── CSS2D Node Labels ─────────────────────────────────────── */
.cy5mm-label3d {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cy5-accent);
  letter-spacing: 0.05em;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  text-shadow: 0 0 8px rgba(0,0,0,0.9), 0 1px 3px rgba(0,0,0,0.8);
  transition: opacity 0.4s;
  padding: 2px 6px;
  border-radius: 3px;
}

.cy5mm-label3d--d0 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--cy5-secondary);
  text-shadow: 0 0 16px rgba(208,121,9,0.8), 0 2px 6px rgba(0,0,0,0.9);
  background: rgba(12,10,9,0.7);
  border: 1px solid rgba(208,121,9,0.25);
}

.cy5mm-label3d--d1 {
  font-size: 11px;
  color: var(--cy5-accent);
  background: rgba(10,7,3,0.65);
}

.cy5mm-label3d--d2 {
  font-size: 10px;
  color: rgba(168,162,158,0.85);
}

.cy5mm-label3d--d3,
.cy5mm-label3d--d4 {
  font-size: 9px;
  color: rgba(168,162,158,0.6);
}

/* ── Tooltip ───────────────────────────────────────────────── */
.cy5mm-tooltip {
  position: fixed;
  background: rgba(18,16,16,0.97);
  backdrop-filter: blur(14px);
  border: 1px solid var(--cy5-border);
  border-radius: 4px;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cy5-accent);
  pointer-events: none;
  z-index: 80;
  max-width: 240px;
  opacity: 0;
  transition: opacity 0.15s;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 12px rgba(208,121,9,0.1);
}
.cy5mm-tooltip.cy5mm-tooltip--visible { opacity: 1; }

/* ── Detail panel ──────────────────────────────────────────── */
.cy5mm-detail-panel {
  position: fixed;
  right: 0;
  top: 60px;
  bottom: 0;
  width: min(400px, 90vw);
  background: rgba(14, 12, 10, 0.97);
  backdrop-filter: blur(32px) saturate(180%);
  border-left: 1px solid var(--cy5-border);
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.45s var(--ease-out-expo);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--cy5-border) transparent;
}

.cy5mm-detail-panel[aria-hidden="false"] {
  transform: translateX(0);
}

.cy5mm-detail-panel__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 1px solid var(--cy5-border);
  border-radius: 4px;
  color: var(--cy5-text);
  cursor: pointer;
  padding: 6px;
  display: flex;
  transition: all 0.2s;
}
.cy5mm-detail-panel__close svg { width: 16px; height: 16px; }
.cy5mm-detail-panel__close:hover {
  border-color: var(--cy5-border-hover);
  color: var(--cy5-secondary);
}

.cy5mm-detail-panel__content {
  padding: 48px 28px 32px;
}

.cy5mm-detail-panel__tag {
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--cy5-primary);
  text-transform: uppercase;
  margin-bottom: 12px;
  font-family: var(--font-mono);
}

.cy5mm-detail-panel__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--cy5-white);
  line-height: 1.2;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--cy5-white), var(--cy5-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cy5mm-detail-panel__desc {
  font-size: 13px;
  line-height: 1.8;
  color: var(--cy5-text);
  margin-bottom: 24px;
}

.cy5mm-detail-panel__meta {
  border-top: 1px solid var(--cy5-border);
  padding-top: 16px;
  margin-bottom: 24px;
  font-size: 11px;
  color: rgba(168,162,158,0.6);
  font-family: var(--font-mono);
}

.cy5mm-detail-panel__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--cy5-primary);
  border: 1px solid var(--cy5-border);
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.25s;
  background: rgba(208,121,9,0.05);
}
.cy5mm-detail-panel__cta svg { width: 14px; height: 14px; }
.cy5mm-detail-panel__cta:hover {
  background: rgba(208,121,9,0.15);
  border-color: var(--cy5-border-hover);
  color: var(--cy5-secondary);
  box-shadow: 0 0 20px rgba(208,121,9,0.2);
  transform: translateX(2px);
}
.cy5mm-detail-panel__cta[href="#"] { display: none; }

/* ── Stats badge ───────────────────────────────────────────── */
.cy5mm-stats {
  position: fixed;
  bottom: 20px;
  left: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(168,162,158,0.35);
  z-index: 40;
}

/* ── Loader ────────────────────────────────────────────────── */
.cy5mm-loader {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--cy5-bg);
  z-index: 200;
  transition: opacity 0.6s, visibility 0.6s;
}
.cy5mm-loader--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.cy5mm-loader__ring {
  width: 48px;
  height: 48px;
  border: 2px solid var(--cy5-border);
  border-top-color: var(--cy5-primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.cy5mm-loader__text {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--cy5-text);
  font-family: var(--font-mono);
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════
   INDEX PAGE
═══════════════════════════════════════════════════════════════ */
.cy5mm-index-hero {
  position: relative;
  z-index: 5;
  padding: 120px 24px 80px;
  text-align: center;
  overflow: hidden;
}

.cy5mm-index-hero__inner { position: relative; z-index: 2; max-width: 860px; margin: 0 auto; }

.cy5mm-index-hero__eyebrow {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--cy5-primary);
  text-transform: uppercase;
  background: rgba(208,121,9,0.08);
  border: 1px solid var(--cy5-border);
  padding: 5px 14px;
  border-radius: 2px;
  margin-bottom: 28px;
  font-family: var(--font-mono);
  animation: fade-up 0.6s var(--ease-out-expo) both;
}

.cy5mm-index-hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
  margin-bottom: 20px;
}

.cy5mm-index-hero__line1 {
  display: block;
  font-size: clamp(40px, 7vw, 96px);
  color: var(--cy5-white);
  animation: fade-up 0.7s var(--ease-out-expo) 0.05s both;
}

.cy5mm-index-hero__line2 {
  display: block;
  font-size: clamp(40px, 7vw, 96px);
  background: linear-gradient(90deg, var(--cy5-primary), var(--cy5-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fade-up 0.7s var(--ease-out-expo) 0.12s both;
}

.cy5mm-index-hero__sub {
  font-size: 15px;
  line-height: 1.7;
  color: var(--cy5-text);
  max-width: 560px;
  margin: 0 auto 36px;
  animation: fade-up 0.8s var(--ease-out-expo) 0.2s both;
}

.cy5mm-index-hero__stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  animation: fade-up 0.8s var(--ease-out-expo) 0.3s both;
}

.cy5mm-stat span {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
  color: var(--cy5-secondary);
  line-height: 1;
}

.cy5mm-stat label {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: rgba(168,162,158,0.5);
  text-transform: uppercase;
  margin-top: 4px;
  display: block;
}

/* Decorative orbs */
.cy5mm-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
}
.cy5mm-orb--1 {
  width: 400px; height: 400px;
  background: rgba(208,121,9,0.15);
  top: -100px; left: -100px;
  animation: orb-drift-1 12s ease-in-out infinite alternate;
}
.cy5mm-orb--2 {
  width: 300px; height: 300px;
  background: rgba(245,163,9,0.1);
  bottom: -50px; right: -50px;
  animation: orb-drift-2 10s ease-in-out infinite alternate;
}
.cy5mm-orb--3 {
  width: 200px; height: 200px;
  background: rgba(242,216,182,0.06);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  animation: orb-drift-3 15s ease-in-out infinite alternate;
}
@keyframes orb-drift-1 { to { transform: translate(60px, 40px); } }
@keyframes orb-drift-2 { to { transform: translate(-40px, -30px); } }
@keyframes orb-drift-3 { to { transform: translate(-50%,-50%) scale(1.3); } }

/* ── Search ────────────────────────────────────────────────── */
.cy5mm-nav__search {
  position: relative;
  flex: 1;
  max-width: 320px;
}
#cy5mm-search {
  width: 100%;
  background: rgba(28,25,23,0.8);
  border: 1px solid var(--cy5-border);
  border-radius: 4px;
  color: var(--cy5-white);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 7px 12px 7px 34px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#cy5mm-search::placeholder { color: rgba(168,162,158,0.4); }
#cy5mm-search:focus {
  border-color: var(--cy5-border-hover);
  box-shadow: 0 0 0 2px rgba(208,121,9,0.15);
}
.cy5mm-nav__search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: rgba(168,162,158,0.4);
  pointer-events: none;
}

/* ── Filter bar ────────────────────────────────────────────── */
.cy5mm-filter-bar {
  position: sticky;
  top: 60px;
  z-index: 30;
  background: rgba(12,10,9,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--cy5-border);
  padding: 12px 24px;
}

.cy5mm-filter-bar__inner {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 1400px;
  margin: 0 auto;
}

.cy5mm-filter-btn {
  background: transparent;
  border: 1px solid var(--cy5-border);
  color: var(--cy5-text);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.cy5mm-filter-btn:hover {
  border-color: var(--cy5-border-hover);
  color: var(--cy5-accent);
}
.cy5mm-filter-btn--active {
  background: rgba(208,121,9,0.15);
  border-color: var(--cy5-primary);
  color: var(--cy5-secondary);
}

/* ── Topic grid ────────────────────────────────────────────── */
.cy5mm-index-grid-wrap {
  position: relative;
  z-index: 10;
  padding: 40px 24px 80px;
  max-width: 1400px;
  margin: 0 auto;
}

.cy5mm-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ── Topic card ────────────────────────────────────────────── */
.cy5mm-topic-card {
  position: relative;
  background: var(--cy5-bg-accent);
  border: 1px solid var(--cy5-border);
  border-radius: 6px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s var(--ease-out-expo), box-shadow 0.3s;
  animation: card-in 0.5s var(--ease-out-expo) both;
}

.cy5mm-topic-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(208,121,9,0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

.cy5mm-topic-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cy5-primary), transparent);
  transform: scaleX(0);
  transition: transform 0.4s var(--ease-out-expo);
}

.cy5mm-topic-card:hover {
  border-color: var(--cy5-border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(208,121,9,0.1), 0 0 40px rgba(208,121,9,0.08);
}
.cy5mm-topic-card:hover::before { opacity: 1; }
.cy5mm-topic-card:hover::after { transform: scaleX(1); }

.cy5mm-topic-card__cat {
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--cy5-primary);
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.cy5mm-topic-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--cy5-white);
  line-height: 1.2;
}

.cy5mm-topic-card__desc {
  font-size: 12px;
  line-height: 1.7;
  color: var(--cy5-text);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cy5mm-topic-card__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(208,121,9,0.12);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(208,121,9,0.7);
  font-family: var(--font-mono);
  text-transform: uppercase;
}
.cy5mm-topic-card__cta svg { width: 12px; height: 12px; }

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

/* ── Loading ────────────────────────────────────────────────── */
.cy5mm-grid-loading {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 60px;
}

/* ── Footer ────────────────────────────────────────────────── */
.cy5mm-index-footer {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--cy5-border);
  font-size: 11px;
  color: rgba(168,162,158,0.3);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

/* ── Shared animations ─────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .cy5mm-canvas-wrap { padding: 0 12px 16px; }
  #cy5mm-sphere-stage { height: 440px; }
  .cy5mm-sphere-wrap { border-radius: 14px; }
}

@media (max-width: 768px) {
  .cy5mm-header { padding: 80px 16px 18px; }
  #cy5mm-sphere-stage { height: 360px; }
  .cy5mm-detail-panel {
    width: 100vw; top: auto; bottom: 0; height: 70vh;
    border-left: none; border-top: 1px solid var(--cy5-border);
    transform: translateY(100%);
  }
  .cy5mm-detail-panel[aria-hidden="false"] { transform: translateY(0); }
  .cy5mm-topic-grid { grid-template-columns: 1fr; }
  .cy5mm-index-hero { padding: 90px 16px 48px; }
  .cy5mm-rot-bar-wrap { padding: 10px 14px; }
}

@media (max-width: 480px) {
  #cy5mm-sphere-stage { height: 300px; }
  .cy5mm-sphere-wrap { border-radius: 10px; }
}

/* ── Hide WP admin bar padding ──────────────────────────────── */
.cy5mm-body.admin-bar .cy5mm-nav { top: 32px; }
.cy5mm-body.admin-bar.wp-admin-bar { margin-top: 0; }
