/* ─── PERCHÉ ────────────────────────────────────────────────────── */
#perche { padding: 8rem 2rem; }

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 10px;
  overflow: hidden;
}

.pillar-card {
  background: var(--surface);
  padding: 2.5rem;
  transition: background 0.3s;
}
.pillar-card:hover { background: #0f0f0f; }

.pillar-num {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: rgba(0,192,127,0.35);
  margin-bottom: 1.75rem;
}
.pillar-icon {
  width: 44px; height: 44px;
  background: rgba(0,192,127,0.06);
  border: 1px solid rgba(0,192,127,0.12);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.pillar-icon svg { width: 20px; height: 20px; }
.pillar-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.5rem;
  margin: 1.25rem 0 0.75rem;
}
.pillar-desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .pillar-grid { grid-template-columns: 1fr; }
}

/* ─── PILLAR CARDS — WATERMARK NUMBER ────────────────────────── */
.pillar-card { position: relative; overflow: hidden; }

.pillar-card::before {
  content: attr(data-num);
  position: absolute;
  bottom: -1rem;
  right: 1.5rem;
  font-family: 'Instrument Serif', serif;
  font-size: 7rem;
  line-height: 1;
  color: rgba(0,192,127,0.045);
  pointer-events: none;
  transition: color 0.5s;
  user-select: none;
}
.pillar-card:hover::before { color: rgba(0,192,127,0.08); }

/* Left glow accent on hover */
.pillar-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, rgba(0,192,127,0.5), transparent);
  opacity: 0;
  transition: opacity 0.4s;
}
.pillar-card:hover::after { opacity: 1; }

/* Section decompression — breathing room enterprise */
#perche { padding: 12rem 2rem; }

/* ═══════════════════════════════════════════════════════════════
   PERCHÉ — SLIDE 3 LAYOUT  (two-column: cards left, ISO right)
   ═══════════════════════════════════════════════════════════════ */

.pillar-scene {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

/* ── LEFT COLUMN ─────────────────────────────────────────────── */
.pillar-left {
  display: flex;
  flex-direction: column;
  gap: 2.75rem;
}

.pillar-stack {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  overflow: visible;
}

/* Override pillar-card for new vertical stacked style */
.pillar-card-v2 {
  position: relative;
  padding: 1.6rem 1.75rem 1.6rem 1.75rem;
  background: rgba(8,11,9,0.62);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  border-radius: 12px;
  border-top:   1px solid rgba(255,255,255,0.08);
  border-right: 1px solid rgba(0,0,0,0.35);
  border-bottom:1px solid rgba(0,0,0,0.5);
  border-left:  2px solid rgba(0,192,127,0.22);
  overflow: visible;
  transition: border-left-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.pillar-card-v2:hover {
  border-left-color: rgba(0,192,127,0.65);
  transform: translateX(5px);
  box-shadow: 0 12px 36px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,192,127,0.1);
}

.pillar-card-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

/* Override legacy pillar-num margin inside new card-head flex */
.pillar-card-v2 .pillar-num { margin-bottom: 0; }
/* Override legacy pillar-card:hover that would kill glassmorphism */
#perche .pillar-card:hover  { background: rgba(4,14,9,0.70); }

/* ── CONNECTOR WIRE from card right edge ──────────────────────── */
.pillar-wire {
  position: absolute;
  right: -32px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 1px;
  background: linear-gradient(to right, rgba(0,192,127,0.45), transparent);
  pointer-events: none;
}
.pillar-wire::after {
  content: '';
  position: absolute;
  right: -1px;
  top: -3.5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0,192,127,0.55);
  border: 1px solid rgba(0,192,127,0.9);
  box-shadow: 0 0 8px rgba(0,192,127,0.5);
}

/* ── RIGHT COLUMN: 3D ISO STACK ──────────────────────────────── */
.pillar-right {
  display: flex;
  align-items: center;
  justify-content: center;
}

.iso-perspective {
  perspective: 900px;
  perspective-origin: 58% 35%;
  width: 100%;
  max-width: 460px;
  /* Dark isolation frame — needed for glass depth to read */
  background: rgba(0,0,0,0.72);
  border-radius: 22px;
  border: 1px solid rgba(0,192,127,0.09);
  padding: 36px 24px 42px;
  box-shadow: 0 0 0 1px rgba(0,192,127,0.04), 0 40px 80px rgba(0,0,0,0.6);
}

.iso-stack {
  position: relative;
  transform-style: preserve-3d;
  animation: iso-float 9s ease-in-out infinite;
  /* Proper isometric angle — matches AI-rendered image */
  transform: rotateX(34deg) rotateY(-40deg);
}

@keyframes iso-float {
  0%,100% { transform: rotateX(34deg) rotateY(-40deg) translateY(0);    }
  40%      { transform: rotateX(31deg) rotateY(-37deg) translateY(-14px); }
  70%      { transform: rotateX(36deg) rotateY(-43deg) translateY(-6px);  }
}

/* ── BASE LAYER ───────────────────────────────────────────────── */
.iso-layer {
  position: relative;
  height: 100px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
  transform-style: preserve-3d;
}

/* 3D thickness — front-bottom face visible in perspective */
.iso-layer::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 4px;
  right: 4px;
  height: 10px;
  background: rgba(0,192,127,0.09);
  border: 1px solid rgba(0,192,127,0.22);
  border-top: none;
  border-radius: 0 0 5px 5px;
  transform: translateY(10px) rotateX(-90deg);
  transform-origin: bottom center;
  pointer-events: none;
}

/* TOP: UI glass panel */
.iso-l-top {
  background: rgba(4,22,13,0.50);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(0,192,127,0.32);
  border-top: 1px solid rgba(255,255,255,0.22);
  border-left: 1px solid rgba(255,255,255,0.12);
  box-shadow:
    0 0 50px rgba(0,192,127,0.07) inset,
    0 8px 32px rgba(0,0,0,0.5),
    0 0 80px rgba(0,192,127,0.05);
}

/* MID: AI circuit board */
.iso-l-mid {
  background: rgba(0,6,3,0.97);
  border: 1px solid rgba(0,192,127,0.20);
  border-top: 1px solid rgba(0,192,127,0.12);
  box-shadow:
    0 0 35px rgba(0,192,127,0.14) inset,
    0 8px 28px rgba(0,0,0,0.65);
  margin-top: 22px;
}

/* BOT: Security base */
.iso-l-bot {
  background: rgba(0,3,1,0.99);
  border: 1px solid rgba(0,192,127,0.42);
  border-bottom: 2px solid rgba(0,192,127,0.60);
  border-left: 1px solid rgba(0,192,127,0.28);
  box-shadow:
    0 0 32px rgba(0,192,127,0.12) inset,
    0 12px 40px rgba(0,0,0,0.7),
    0 0 60px rgba(0,192,127,0.08);
  margin-top: 22px;
}

/* Connector node on left edge of each layer */
.iso-node {
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0,192,127,0.80);
  border: 1px solid #00c07f;
  box-shadow: 0 0 14px rgba(0,192,127,0.7);
  z-index: 5;
}

/* Gap pillars between layers */
.iso-gap-space {
  display: flex;
  justify-content: space-between;
  padding: 0 28px;
  height: 24px;
  align-items: stretch;
}
.iso-pillar {
  width: 7px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0,192,127,0.45),
    rgba(0,192,127,0.20)
  );
  border: 1px solid rgba(0,192,127,0.30);
  border-radius: 2px;
  box-shadow:
    0 0 10px rgba(0,192,127,0.25),
    inset 0 0 4px rgba(255,255,255,0.06);
}

/* Layer tag label */
.iso-layer-tag {
  position: absolute;
  right: 14px;
  bottom: 8px;
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(0,192,127,0.45);
  font-family: 'Inter', sans-serif;
  pointer-events: none;
}

/* ── LAYER TOP CONTENT: mini dashboard ───────────────────────── */
.iso-ui-content {
  position: absolute;
  inset: 12px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.iso-gauge {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid rgba(0,192,127,0.28);
  border-top-color: rgba(0,192,127,0.88);
  flex-shrink: 0;
  position: relative;
  animation: gauge-spin 12s linear infinite;
}
.iso-gauge::before {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1px solid rgba(0,192,127,0.2);
  border-top-color: rgba(0,192,127,0.55);
  animation: gauge-spin 6s linear infinite reverse;
}
@keyframes gauge-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.iso-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 48px;
  flex-shrink: 0;
}
.iso-bars span {
  width: 7px;
  border-radius: 2px 2px 0 0;
  background: rgba(0,192,127,0.42);
  animation: bar-pulse 3s ease-in-out infinite;
}
.iso-bars span:nth-child(1) { height: 55%; animation-delay: 0s; }
.iso-bars span:nth-child(2) { height: 85%; animation-delay: 0.3s; background: rgba(0,192,127,0.72); }
.iso-bars span:nth-child(3) { height: 42%; animation-delay: 0.6s; }
.iso-bars span:nth-child(4) { height: 100%;animation-delay: 0.9s; background: rgba(0,192,127,0.88); }
@keyframes bar-pulse {
  0%,100% { opacity: 0.7; }
  50%      { opacity: 1.0; }
}

.iso-linechart {
  flex: 1;
  height: 48px;
  overflow: visible;
}

/* ── LAYER MID CONTENT: circuit board ───────────────────────── */
.iso-circuit-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.iso-traces {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0,192,127,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,192,127,0.06) 1px, transparent 1px);
  background-size: 16px 16px;
}

.iso-processor {
  width: 42px;
  height: 42px;
  background: rgba(0,192,127,0.06);
  border: 1px solid rgba(0,192,127,0.55);
  border-radius: 4px;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 18px rgba(0,192,127,0.18);
}
.iso-proc-inner {
  position: absolute;
  inset: 7px;
  background: rgba(0,192,127,0.1);
  border: 1px solid rgba(0,192,127,0.35);
  border-radius: 2px;
  animation: proc-glow 2.8s ease-in-out infinite;
}
@keyframes proc-glow {
  0%,100% { box-shadow: none; }
  50%      { box-shadow: 0 0 10px rgba(0,192,127,0.4); }
}
.iso-processor::before,
.iso-processor::after {
  content: '';
  position: absolute;
  background: rgba(0,192,127,0.45);
}
.iso-processor::before {
  left: -12px; top: 10px;
  width: 12px; height: 2px;
  box-shadow: 0 8px 0 rgba(0,192,127,0.45), 0 -8px 0 rgba(0,192,127,0.45);
}
.iso-processor::after {
  right: -12px; top: 10px;
  width: 12px; height: 2px;
  box-shadow: 0 8px 0 rgba(0,192,127,0.45), 0 -8px 0 rgba(0,192,127,0.45);
}

.iso-neural {
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}
.iso-neural span {
  width: 28px;
  height: 2px;
  background: rgba(0,192,127,0.35);
  border-radius: 1px;
  animation: neural-blink 2s ease-in-out infinite;
}
.iso-neural span:nth-child(1) { animation-delay:0s;    width:22px; }
.iso-neural span:nth-child(2) { animation-delay:0.4s;  width:28px; background: rgba(0,192,127,0.65); }
.iso-neural span:nth-child(3) { animation-delay:0.8s;  width:18px; }
.iso-neural span:nth-child(4) { animation-delay:1.2s;  width:26px; }
.iso-neural span:nth-child(5) { animation-delay:1.6s;  width:20px; }
@keyframes neural-blink {
  0%,100% { opacity: 0.45; }
  50%      { opacity: 1; }
}

/* ── LAYER BOT CONTENT: security ────────────────────────────── */
.iso-security-content {
  position: absolute;
  inset: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.iso-server-rack {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.iso-server-rack span {
  display: block;
  width: 52px;
  height: 10px;
  background: rgba(0,192,127,0.08);
  border: 1px solid rgba(0,192,127,0.2);
  border-radius: 2px;
  position: relative;
}
.iso-server-rack span::before {
  content: '';
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(0,192,127,0.7);
  box-shadow: 0 0 5px rgba(0,192,127,0.5);
  animation: server-blink 2.5s ease-in-out infinite;
}
.iso-server-rack span:nth-child(2)::before { animation-delay: 0.8s; }
.iso-server-rack span:nth-child(3)::before { animation-delay: 1.6s; }
@keyframes server-blink {
  0%,90%,100% { opacity:0.4; }
  50%          { opacity:1; }
}

.iso-locks {
  display: flex;
  gap: 18px;
}
.iso-lock {
  width: 26px;
  height: 30px;
  border: 2px solid rgba(0,192,127,0.7);
  border-radius: 4px;
  position: relative;
  box-shadow: 0 0 12px rgba(0,192,127,0.28);
}
.iso-lock::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 12px;
  border: 2px solid rgba(0,192,127,0.7);
  border-bottom: none;
  border-radius: 7px 7px 0 0;
}
.iso-lock::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: rgba(0,192,127,0.25);
  animation: lock-pulse 3.5s ease-in-out infinite;
}
@keyframes lock-pulse {
  0%,100% { background: rgba(0,192,127,0.25); }
  50%      { background: rgba(0,192,127,0.55); box-shadow: 0 0 6px rgba(0,192,127,0.4); }
}

/* ── CENTRAL LASER BEAM ──────────────────────────────────────── */
.iso-beam {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0,192,127,0.0) 5%,
    rgba(0,192,127,0.9) 20%,
    rgba(0,192,127,0.65) 50%,
    rgba(0,192,127,0.9) 80%,
    rgba(0,192,127,0.0) 95%,
    transparent 100%
  );
  box-shadow: 0 0 16px 3px rgba(0,192,127,0.4);
  pointer-events: none;
  z-index: 10;
  animation: beam-pulse 3.5s ease-in-out infinite;
}

@keyframes beam-pulse {
  0%,100% { opacity:0.65; box-shadow: 0 0 12px 2px rgba(0,192,127,0.35); }
  50%      { opacity:1;    box-shadow: 0 0 28px 6px rgba(0,192,127,0.6);  }
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .pillar-scene { grid-template-columns: 1fr; gap: 4rem; }
  .pillar-right { order: -1; }
  .iso-perspective { max-width: 420px; margin: 0 auto; }
}
@media (max-width: 640px) {
  #perche { padding: 8rem 1.25rem; }
  .pillar-scene { gap: 3rem; }
  .pillar-wire  { display: none; }
}
