/* =========================================
   APP PERFORMANCE & SECURITY - PREMIUM SAAS STYLES
   ========================================= */

/* Hero Section */
.aps-hero {
  position: relative;
  padding: 180px 0 100px;
  background: var(--clr-surface-2);
  overflow: hidden;
  text-align: center;
  z-index: 1;
}
.aps-grid-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    linear-gradient(rgba(26, 46, 68, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 46, 68, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -1;
}
.aps-grid-overlay::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 100%, rgba(181, 36, 106, 0.08) 0%, transparent 60%);
}
.aps-hero-container {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}
.aps-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  color: var(--clr-primary);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 24px;
  box-shadow: 0 4px 15px rgba(26, 46, 68, 0.04);
}
.aps-pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--clr-accent);
  margin-right: 12px;
  box-shadow: 0 0 0 0 rgba(181, 36, 106, 0.7);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(181, 36, 106, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(181, 36, 106, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(181, 36, 106, 0); }
}
.aps-title {
  font-size: clamp(3rem, 5vw, 4.8rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--clr-primary);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.aps-title span {
  color: var(--clr-accent);
  position: relative;
}
.aps-title span::after {
  content: ''; position: absolute; left: 0; bottom: 8px; width: 100%; height: 6px; 
  background: rgba(181, 36, 106, 0.2); z-index: -1;
}
.aps-desc {
  font-size: 1.15rem;
  color: var(--clr-text-muted);
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto 40px;
}
.aps-hero-actions {
  display: flex;
  justify-content: center;
}
.aps-btn {
  padding: 16px 40px;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 100px;
  background: linear-gradient(135deg, var(--clr-primary) 0%, var(--clr-primary-light) 100%);
  color: #fff;
  border: none;
  box-shadow: 0 10px 25px rgba(26, 46, 68, 0.2);
  transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1);
  text-decoration: none;
}
.aps-btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 35px rgba(26, 46, 68, 0.3);
  background: linear-gradient(135deg, var(--clr-primary-light) 0%, var(--clr-primary) 100%);
}

/* Sections Global */
.aps-section {
  padding: 120px 0;
  position: relative;
}
.aps-section-title {
  font-size: clamp(2.2rem, 3.5vw, 3rem);
  font-weight: 800;
  color: var(--clr-primary);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.aps-section-desc {
  font-size: 1.1rem;
  color: var(--clr-text-muted);
  line-height: 1.7;
  max-width: 600px;
}
.aps-eyebrow {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--clr-accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

/* Performance Engine (Section 1) */
.aps-performance {
  background: var(--clr-surface);
}
.aps-perf-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 80px;
}
.aps-perf-header .aps-section-desc {
  margin: 0 auto;
}
.aps-perf-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}
.aps-metric-cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.aps-metric-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  padding: 28px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  box-shadow: 0 10px 30px rgba(26, 46, 68, 0.03);
  transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.aps-metric-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--clr-accent); transform: scaleY(0); transition: transform 0.4s;
}
.aps-metric-card:hover {
  transform: translateX(10px);
  border-color: rgba(181, 36, 106, 0.2);
  box-shadow: 0 20px 40px rgba(26, 46, 68, 0.08);
}
.aps-metric-card:hover::before { transform: scaleY(1); }
.aps-metric-card i {
  font-size: 2.2rem;
  color: var(--clr-accent);
  margin-right: 24px;
  padding: 16px;
  background: rgba(181, 36, 106, 0.08);
  border-radius: 14px;
}
.aps-mc-val {
  font-size: 2rem;
  font-weight: 800;
  color: var(--clr-primary);
  line-height: 1;
  margin-bottom: 6px;
}
.aps-mc-label {
  font-size: 0.95rem;
  color: var(--clr-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.aps-speed-graph {
  position: relative;
  height: 360px;
  background: var(--clr-primary);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  padding: 0 50px;
  box-shadow: 0 30px 60px rgba(26, 46, 68, 0.15);
}
.aps-speed-graph::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.aps-sg-line {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
}
.aps-sg-line::after {
  content: ''; position: absolute; left: 0; top: 0; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--clr-accent), #ff8a65);
  box-shadow: 0 0 15px rgba(181, 36, 106, 0.6);
}
.aps-sg-line.line-1::after { width: 92%; animation: load-bar 2.5s cubic-bezier(0.2, 1, 0.3, 1) forwards; }
.aps-sg-line.line-2::after { width: 68%; animation: load-bar 2.5s cubic-bezier(0.2, 1, 0.3, 1) 0.2s forwards; }
.aps-sg-line.line-3::after { width: 42%; animation: load-bar 2.5s cubic-bezier(0.2, 1, 0.3, 1) 0.4s forwards; }
@keyframes load-bar { from { width: 0; } }
.aps-sg-overlay {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.aps-sg-badge {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 12px 24px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 1px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Security Architecture (Section 2) */
.aps-security {
  background: var(--clr-surface-2);
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
}
.aps-sec-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: center;
}
.aps-sec-visual {
  position: relative;
  height: 460px;
  display: flex; align-items: center; justify-content: center;
}
.aps-shield-wrapper {
  position: relative;
  width: 320px; height: 320px;
  display: flex; align-items: center; justify-content: center;
}
.aps-shield-ring {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  border-radius: 50%; border: 1px dashed rgba(26, 46, 68, 0.2);
}
.aps-shield-ring.r1 { width: 100%; height: 100%; animation: spin 25s linear infinite; }
.aps-shield-ring.r2 { width: 75%; height: 75%; border-style: solid; border-color: rgba(181, 36, 106, 0.15); border-width: 2px;}
.aps-shield-ring.r3 { width: 45%; height: 45%; background: rgba(181, 36, 106, 0.05); }
@keyframes spin { 100% { transform: translate(-50%, -50%) rotate(360deg); } }
.aps-shield-core {
  position: relative; z-index: 2;
  font-size: 6rem; color: var(--clr-accent);
  filter: drop-shadow(0 10px 20px rgba(181, 36, 106, 0.3));
  animation: float-shield 4s ease-in-out infinite alternate;
}
@keyframes float-shield {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}
.aps-lock-node {
  position: absolute; width: 60px; height: 60px; background: var(--clr-surface); border: 1px solid var(--clr-border);
  border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: var(--clr-primary);
  box-shadow: 0 15px 30px rgba(26, 46, 68, 0.08);
  transition: all 0.4s ease;
}
.aps-lock-node:hover {
  color: var(--clr-accent);
  transform: scale(1.15);
  border-color: rgba(181, 36, 106, 0.3);
}
.aps-lock-node.n1 { top: -5%; left: 20%; animation: float-reverse 5s ease-in-out infinite alternate; }
.aps-lock-node.n2 { bottom: 5%; right: -5%; animation: float 6s ease-in-out infinite alternate; }
.aps-lock-node.n3 { top: 40%; left: -15%; animation: float-reverse 4s ease-in-out infinite alternate; }

.aps-sec-features {
  list-style: none; padding: 0; margin: 40px 0 0 0;
}
.aps-sec-features li {
  display: flex; align-items: flex-start; margin-bottom: 24px;
  padding: 16px; border-radius: 16px; background: transparent;
  transition: background 0.3s;
}
.aps-sec-features li:hover {
  background: rgba(181, 36, 106, 0.04);
}
.aps-sec-features i {
  color: var(--clr-accent); font-size: 1.6rem; margin-right: 20px; margin-top: 2px;
}
.aps-sec-features span strong {
  display: block; color: var(--clr-primary); margin-bottom: 6px; font-size: 1.1rem;
}
.aps-sec-features span {
  color: var(--clr-text-muted); font-size: 1rem; line-height: 1.6;
}

/* Monitoring Dashboard (Section 3) */
.aps-monitoring {
  background: var(--clr-surface);
}
.aps-mon-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 80px;
}
.aps-mon-header .aps-section-desc {
  margin: 0 auto;
}
.aps-dash-wrapper {
  perspective: 1200px;
}
.aps-dash-container {
  transform: rotateX(5deg);
  transition: transform 0.6s cubic-bezier(0.2, 1, 0.3, 1);
  box-shadow: 0 40px 80px rgba(26, 46, 68, 0.1);
  border-radius: 24px;
}
.aps-dash-container:hover {
  transform: rotateX(0deg);
}
.aps-dash-header {
  background: var(--clr-primary); padding: 16px 24px; border-radius: 24px 24px 0 0; display: flex; align-items: center;
}
.aps-dash-dots span {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.2); margin-right: 8px;
}
.aps-dash-title {
  margin: 0 auto; color: rgba(255,255,255,0.7); font-size: 0.85rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
}
.aps-dash-body {
  background: var(--clr-surface-2); border: 1px solid var(--clr-border); border-top: none; border-radius: 0 0 24px 24px;
  padding: 40px; display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 30px;
}
.aps-dash-widget {
  background: var(--clr-surface); border: 1px solid var(--clr-border); border-radius: 16px; padding: 24px; margin-bottom: 24px;
  box-shadow: 0 10px 20px rgba(26, 46, 68, 0.02);
  transition: transform 0.3s, box-shadow 0.3s;
}
.aps-dash-widget:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(26, 46, 68, 0.05);
}
.aps-dash-widget:last-child { margin-bottom: 0; }
.aps-dash-col.main .aps-dash-widget { height: 100%; display: flex; flex-direction: column; margin-bottom: 0; }
.w-head { font-size: 0.85rem; font-weight: 700; color: var(--clr-text-muted); text-transform: uppercase; margin-bottom: 16px; letter-spacing: 1px;}
.w-status { font-size: 1.8rem; font-weight: 800; color: var(--clr-primary); margin-bottom: 12px; display: flex; align-items: center; gap: 10px;}
.w-status::before { content: ''; display: inline-block; width: 12px; height: 12px; background: var(--clr-accent); border-radius: 50%; box-shadow: 0 0 10px var(--clr-accent); }
.w-bar-bg { width: 100%; height: 8px; background: var(--clr-surface-2); border-radius: 4px; overflow: hidden; }
.w-bar-fill.accent { width: 100%; height: 100%; background: linear-gradient(90deg, var(--clr-primary), var(--clr-accent)); border-radius: 4px; }
.w-val { font-size: 2.2rem; font-weight: 800; color: var(--clr-primary); display: flex; align-items: center; justify-content: space-between; }
.w-val span { font-size: 0.85rem; font-weight: 700; padding: 6px 12px; border-radius: 6px; }
.w-val span.trend.down { background: rgba(181, 36, 106, 0.1); color: var(--clr-accent); }
.w-chart-area { flex: 1; display: flex; align-items: flex-end; margin-top: 20px; }
.aps-sparkline { width: 100%; height: 100%; }
.w-list ul { list-style: none; padding: 0; margin: 0; }
.w-list li { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px dashed var(--clr-border); font-size: 1rem; font-weight: 600; color: var(--clr-primary); }
.w-list li:last-child { border-bottom: none; padding-bottom: 0; }
.w-list .badge { font-size: 0.75rem; padding: 6px 10px; border-radius: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;}
.w-list .badge.ok { background: rgba(26, 46, 68, 0.1); color: var(--clr-primary); }
.w-list .badge.idle { background: var(--clr-surface-2); color: var(--clr-text-light); }

@media (max-width: 992px) {
  .aps-perf-layout, .aps-sec-container { grid-template-columns: 1fr; gap: 60px; }
  .aps-dash-body { grid-template-columns: 1fr; }
  .aps-dash-container { transform: none; }
}
@media (max-width: 768px) {
  .aps-title { font-size: 2.8rem; }
  .aps-shield-wrapper { width: 240px; height: 240px; }
  .aps-shield-core { font-size: 4rem; }
  .aps-dash-body { padding: 24px; }
  .aps-metric-card { padding: 20px; }
  .aps-speed-graph { padding: 0 24px; height: 260px; }
  .aps-mc-val { font-size: 1.6rem; }
}
