/* ═══ SYSTEM PAGE ═══ */

/* ═══ HERO-LITE ═══ */
/* .system-hero padding/bg handled by .page-hero in base.css */

.system-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ═══ SYSTEM ARCHITECTURE ═══ */
.system-architecture {
  background: var(--bg-primary);
  padding: 100px 0;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

/* Visual connector — center cross */
.app-grid::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-deep);
  border: 1px solid var(--gold-dim);
  z-index: 2;
  box-shadow: 0 0 30px rgba(201, 168, 76, 0.1);
}

.app-grid::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  z-index: 3;
}

/* Connector lines — horizontal */
.app-grid-connectors {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.connector-h {
  position: absolute;
  top: 50%;
  left: calc(50% - 100px);
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold), var(--gold-dim));
  opacity: 0.4;
  transform: translateY(-50%);
}

.connector-v {
  position: absolute;
  left: 50%;
  top: calc(50% - 100px);
  width: 1px;
  height: 200px;
  background: linear-gradient(180deg, var(--gold-dim), var(--gold), var(--gold-dim));
  opacity: 0.4;
  transform: translateX(-50%);
}

/* App card */
.app-card {
  padding: 32px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  z-index: 2;
}

.app-card:hover {
  border-color: var(--gold-dim);
  box-shadow: 0 4px 24px rgba(201, 168, 76, 0.06);
}

.app-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 168, 76, 0.06);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.app-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.app-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.65;
}

/* ═══ MODULES ═══ */
.system-modules {
  background: var(--bg-deep);
  padding: 100px 0;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.module-card {
  padding: 36px 28px;
  background: var(--bg-card);
  border: 1px solid rgba(76, 175, 80, 0.15);
  border-radius: 8px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.module-card:hover {
  border-color: rgba(76, 175, 80, 0.35);
  box-shadow: 0 4px 24px rgba(76, 175, 80, 0.06);
}

.module-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(76, 175, 80, 0.06);
  border: 1px solid rgba(76, 175, 80, 0.15);
  margin-bottom: 20px;
}

.module-badge {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(76, 175, 80, 0.08);
  border: 1px solid rgba(76, 175, 80, 0.15);
  border-radius: 100px;
  padding: 4px 12px;
  margin-bottom: 16px;
}

.module-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.module-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.65;
}

/* ═══ ORDER FLOW ═══ */
.order-flow {
  background: var(--bg-primary);
  padding: 100px 0;
}

.flow-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 900px;
  margin: 0 auto 56px;
  position: relative;
}

.flow-step {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 0 12px;
}

/* Connector line between steps */
.flow-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 24px;
  right: -2px;
  width: calc(100% - 48px);
  height: 1px;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold));
  transform: translateX(50%);
  opacity: 0.5;
}

.flow-step-dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  position: relative;
  z-index: 2;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.flow-step:hover .flow-step-dot {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(201, 168, 76, 0.15);
}

.flow-step-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
}

.flow-step h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.flow-step p {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 300;
  line-height: 1.5;
}

/* Status badges row */
.flow-statuses {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.flow-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 6px 16px;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.flow-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.flow-status--active .flow-status-dot { background: var(--gold); }
.flow-status--active { color: var(--gold); border-color: rgba(201, 168, 76, 0.2); }

.flow-status--reviewed .flow-status-dot { background: #64B5F6; }
.flow-status--reviewed { color: #64B5F6; border-color: rgba(100, 181, 246, 0.2); }

.flow-status--ready .flow-status-dot { background: var(--green); }
.flow-status--ready { color: var(--green); border-color: rgba(76, 175, 80, 0.2); }

.flow-status--delivered .flow-status-dot { background: var(--text-muted); }
.flow-status--delivered { color: var(--text-secondary); border-color: var(--border-subtle); }

/* Highlighted integrity box */
.integrity-box {
  max-width: 700px;
  margin: 0 auto;
  padding: 28px 32px;
  background: rgba(201, 168, 76, 0.04);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 8px;
  text-align: center;
  position: relative;
}

.integrity-box::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.1), transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.integrity-box-icon {
  font-size: 1.4rem;
  display: block;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.integrity-box p {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 400;
  line-height: 1.65;
  position: relative;
  z-index: 1;
}

.integrity-box strong {
  color: var(--gold);
  font-weight: 600;
}

/* ═══ CTA BANNER ═══ */
.system-cta {
  background: var(--bg-deep);
  padding: 100px 0;
  text-align: center;
}

.cta-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cta-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: transparent;
  color: var(--green);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--green);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.cta-whatsapp::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.cta-whatsapp:hover::before { transform: scaleX(1); }
.cta-whatsapp:hover {
  color: #fff;
  box-shadow: 0 4px 20px rgba(76, 175, 80, 0.2);
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .app-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Hide connectors on mobile */
  .app-grid::before,
  .app-grid::after,
  .connector-h,
  .connector-v {
    display: none;
  }

  .modules-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .flow-steps {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .flow-step {
    width: 100%;
    max-width: 280px;
  }

  .flow-step:not(:last-child)::after {
    top: auto;
    bottom: -14px;
    left: 50%;
    right: auto;
    width: 1px;
    height: 24px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, var(--gold-dim), var(--gold));
  }
}

@media (max-width: 480px) {
  .system-hero {
    padding: 140px 20px 40px;
  }

  .system-architecture,
  .system-modules,
  .order-flow,
  .system-cta {
    padding: 60px 0;
  }

  .app-card,
  .module-card {
    padding: 24px 20px;
  }

  .integrity-box {
    padding: 24px 20px;
  }

  .flow-statuses {
    gap: 8px;
  }
}
