/* ============================================
   CARI TECH — Section styles part 2
   ============================================ */

/* ---------- Why ---------- */
.why {
  background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand-deep-2) 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  margin: 0 24px;
  position: relative;
  overflow: hidden;
}
.why::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.18), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(167, 139, 250, 0.14), transparent 40%);
  pointer-events: none;
}
.why-bg-blob {
  position: absolute;
  width: 50%; height: 80%;
  right: -10%; top: 10%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  filter: blur(100px);
  opacity: 0.18;
  pointer-events: none;
}
.why-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.why-eyebrow { color: var(--accent); }
.why-title { color: #fff; }
.why-lede { color: rgba(255, 255, 255, 0.72); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}
.why-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 4px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  position: relative;
  transition: transform 0.3s ease;
}
.why-card:hover { transform: translateY(-6px); }
.why-num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.why-bar {
  position: absolute;
  top: -1px; left: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  transition: width 0.6s ease;
}
.why-card.in .why-bar,
.why-card:hover .why-bar { width: 60px; }
.why-card-title {
  font-size: 22px;
  letter-spacing: -0.02em;
  color: #fff;
  margin-top: 8px;
}
.why-card-desc {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* ---------- AI (radial orbital) ---------- */
.ai-section {
  background:
    radial-gradient(ellipse at 30% 0%, rgba(255, 114, 0, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse at top, var(--brand-deep-2) 0%, var(--brand-deep) 80%);
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-top: 80px;
  border-radius: var(--radius-lg);
  margin-left: 24px;
  margin-right: 24px;
}
.why {
  margin-bottom: 0;
  border-radius: var(--radius-lg);
  margin-left: 24px;
  margin-right: 24px;
  margin-top: 48px;
}
@media (max-width: 768px) {
  .ai-section, .why { margin-left: 12px; margin-right: 12px; }
}
.ai-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  pointer-events: none;
}
.ai-bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.45;
}
.ai-bg-glow-1 {
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(255, 114, 0, 0.55), transparent 70%);
  top: -80px; right: -60px;
}
.ai-bg-glow-2 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(3, 108, 111, 0.7), transparent 70%);
  bottom: -120px; left: -80px;
}

.ai-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.ai-copy {
  position: relative;
  min-height: 480px;
  display: block;
}
.ai-copy-intro {
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-grid.is-detail-open .ai-copy-intro {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  position: absolute;
  inset: 0;
}

/* Legend buttons */
.ai-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}
.ai-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ai-legend-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 114, 0, 0.45);
  transform: translateX(2px);
}
.ai-legend-item.is-active {
  background: linear-gradient(135deg, rgba(255, 114, 0, 0.22), rgba(255, 114, 0, 0.08));
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 114, 0, 0.35), 0 12px 30px -10px rgba(255, 114, 0, 0.4);
}
.ai-legend-item.is-related {
  border-color: rgba(255, 255, 255, 0.3);
}
.ai-legend-ico {
  display: inline-flex;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.ai-legend-item.is-active .ai-legend-ico {
  background: var(--accent);
  color: var(--brand-deep);
}
.ai-legend-code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}
.ai-legend-item.is-active .ai-legend-code { color: var(--accent); }
.ai-legend-title {
  font-weight: 600;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Orbit stage */
.ai-orbit {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 560px;
  margin: 0 auto;
  justify-self: center;
}
.ai-orbit-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}
.ai-orbit-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.ai-orbit-ring-outer { width: 92%; height: 92%; }
.ai-orbit-ring-mid {
  width: 72%; height: 72%;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.06);
  animation: orbit-spin 60s linear infinite;
}
.ai-orbit-ring-inner {
  width: 42%; height: 42%;
  border-color: rgba(255, 114, 0, 0.15);
}
@keyframes orbit-spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Core */
.ai-core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 96px; height: 96px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-core-inner {
  width: 64px; height: 64px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.85), transparent 50%),
    linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 40px rgba(255, 114, 0, 0.55),
    inset 0 0 20px rgba(255, 255, 255, 0.15);
  animation: core-breath 4s ease-in-out infinite;
  position: relative;
  z-index: 2;
}
@keyframes core-breath {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 0 40px rgba(255, 114, 0, 0.55), inset 0 0 20px rgba(255, 255, 255, 0.15); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3), 0 0 60px rgba(255, 114, 0, 0.75), inset 0 0 20px rgba(255, 255, 255, 0.2); }
}
.ai-core-pulse {
  position: absolute;
  top: 50%; left: 50%;
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 1px solid rgba(255, 114, 0, 0.5);
  transform: translate(-50%, -50%);
  animation: core-pulse 3s ease-out infinite;
}
.ai-core-pulse-2 { animation-delay: 1.5s; }
@keyframes core-pulse {
  0% { width: 64px; height: 64px; opacity: 0.6; }
  100% { width: 160px; height: 160px; opacity: 0; }
}
.ai-core-label {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}

/* Nodes */
.ai-node {
  position: absolute;
  top: 50%; left: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  transition: opacity 0.5s ease, filter 0.4s ease;
  will-change: transform;
}
.ai-node.is-dimmed { opacity: 0.25 !important; filter: saturate(0.4); }
.ai-node-halo {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 114, 0, 0.25), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.ai-node.is-active .ai-node-halo,
.ai-node.is-related .ai-node-halo { opacity: 1; }
.ai-node-dot {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(2, 82, 84, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.ai-node.is-related .ai-node-dot {
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-deep);
  border-color: var(--accent);
}
.ai-node.is-active .ai-node-dot {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15), 0 0 32px rgba(255, 114, 0, 0.6);
}
.ai-node-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.ai-node-label.above { bottom: calc(100% + 10px); }
.ai-node-label.below { top: calc(100% + 10px); }
.ai-node-code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--accent);
  opacity: 0.85;
}
.ai-node-title {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: -0.005em;
}
.ai-node.is-active .ai-node-title { color: #fff; }

/* Expanded card */
.ai-card {
  position: absolute;
  left: 50%;
  width: 270px;
  background: rgba(8, 36, 38, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 114, 0, 0.35);
  border-radius: 14px;
  padding: 16px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 20px 50px -10px rgba(0, 0, 0, 0.6),
    0 0 60px -20px rgba(255, 114, 0, 0.5);
  z-index: 320;
  transform: translateX(-50%) scale(0.78); /* counter the node scale 1.35 → 1.05 visual */
  transform-origin: top center;
  animation: card-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes card-in {
  from { opacity: 0; transform: translateX(-50%) scale(0.65); }
  to { opacity: 1; transform: translateX(-50%) scale(0.78); }
}
.ai-card.below {
  top: calc(100% + 44px);
}
.ai-card.below.below { transform-origin: top center; }
.ai-card.above {
  bottom: calc(100% + 44px);
  transform-origin: bottom center;
}
.ai-card-stem {
  position: absolute;
  left: 50%;
  width: 1px;
  height: 18px;
  background: linear-gradient(to bottom, rgba(255, 114, 0, 0.6), transparent);
}
.ai-card.below .ai-card-stem { top: -18px; }
.ai-card.above .ai-card-stem {
  bottom: -18px;
  background: linear-gradient(to top, rgba(255, 114, 0, 0.6), transparent);
}
.ai-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.ai-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 114, 0, 0.15);
  border: 1px solid rgba(255, 114, 0, 0.4);
  color: var(--accent);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}
.ai-status-live {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.45);
  color: #6EE7B7;
}
.ai-status-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: dot-blink 1.4s ease-in-out infinite;
}
@keyframes dot-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.ai-card-code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.1em;
}
.ai-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.ai-card-body {
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}
.ai-card-meter {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ai-meter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 6px;
}
.ai-meter-val { color: var(--accent); font-weight: 600; }
.ai-meter-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.ai-meter-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #FFB873);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(255, 114, 0, 0.6);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-card-related { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.ai-card-related-label {
  font-size: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 8px;
}
.ai-card-related-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ai-chip:hover {
  background: rgba(255, 114, 0, 0.18);
  border-color: var(--accent);
  color: #fff;
}

.ai-orbit-hint {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
  transition: opacity 0.3s ease;
}
.ai-orbit.is-focused .ai-orbit-hint { opacity: 0; }

/* Detail panel — slides into the left column, replacing the intro copy */
.ai-detail {
  position: relative;
  background:
    linear-gradient(135deg, rgba(255, 114, 0, 0.10), rgba(255, 114, 0, 0)),
    rgba(8, 36, 38, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 114, 0, 0.35);
  border-radius: 20px;
  padding: 28px 28px 24px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 24px 60px -20px rgba(0, 0, 0, 0.5),
    0 0 80px -20px rgba(255, 114, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 1;
}
.ai-detail-close {
  position: absolute;
  top: 14px; right: 16px;
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 2;
}
.ai-detail-close:hover {
  background: rgba(255, 114, 0, 0.2);
  border-color: var(--accent);
  color: #fff;
}
.ai-detail-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ai-detail-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: inline-flex;
  align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 24px rgba(255, 114, 0, 0.4), inset 0 0 16px rgba(255, 255, 255, 0.15);
}
.ai-detail-head-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ai-detail-code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.14em;
}
.ai-detail-title {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin: 4px 0 0;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.ai-detail-tagline {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.005em;
}
.ai-detail-body {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
}
.ai-detail-includes { margin-top: 4px; }
.ai-detail-includes-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 10px;
}
.ai-detail-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ai-detail-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}
.ai-detail-tick {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(255, 114, 0, 0.18);
  color: var(--accent);
  display: inline-flex;
  align-items: center; justify-content: center;
  margin-top: 1px;
}
.ai-detail-meter {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ai-detail-related {
  margin-top: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 880px) {
  .ai-detail { padding: 22px; }
  .ai-detail-title { font-size: 22px; }
  .ai-copy { min-height: auto; }
}

/* ---------- Testimonials ---------- */
.testimonials-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  margin-bottom: 48px;
}
.testimonials-stage {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 32px 64px;
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  overflow: hidden;
}
.testimonials-stage > svg:first-of-type {
  color: var(--accent-2);
  opacity: 0.2;
  position: absolute;
  top: 24px; left: 32px;
}
[data-theme="dark"] .testimonials-stage > svg:first-of-type { color: var(--accent); }
.testimonial-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.testimonial-slide {
  flex: 0 0 100%;
  min-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 16px;
}
.testimonial-q {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.4;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
}
.testimonial-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--brand-deep);
  display: inline-flex;
  align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 18px;
}
.testimonial-name { font-weight: 700; font-size: 15px; }
.testimonial-role { font-size: 13px; color: var(--ink-muted); }
.testimonial-dots {
  display: flex;
  gap: 8px;
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
}
.t-dot {
  width: 24px; height: 4px;
  border-radius: 2px;
  background: var(--line-strong);
  cursor: pointer;
  transition: background 0.3s ease, width 0.3s ease;
  border: none;
  padding: 0;
}
.t-dot.active {
  background: var(--accent-2);
  width: 36px;
}
[data-theme="dark"] .t-dot.active { background: var(--accent); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: start;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 100px;
}
.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
.contact-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
a.contact-card:hover {
  border-color: var(--accent-2);
  transform: translateX(4px);
}
.cc-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--accent-2);
  display: inline-flex;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
[data-theme="dark"] .cc-icon { color: var(--accent); }
.cc-lab {
  font-size: 12px;
  color: var(--ink-muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cc-val {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 2px;
}
.cc-hours {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 4px;
}
.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  height: 200px;
  position: relative;
  margin-top: 8px;
}
.map-stub {
  position: relative;
  width: 100%; height: 100%;
}
.map-stub svg { width: 100%; height: 100%; }
.map-pin {
  position: absolute;
  top: 50%; left: 55%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.map-pin-dot {
  width: 16px; height: 16px;
  background: var(--accent-2);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(11, 31, 58, 0.3);
  z-index: 2;
}
.map-pin-pulse {
  position: absolute;
  top: 0;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent-2);
  animation: pin-pulse 2s ease-out infinite;
}
@keyframes pin-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(3); opacity: 0; }
}
.map-pin-label {
  background: var(--brand-deep);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  margin-top: 4px;
  z-index: 2;
}
.contact-form {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-sm);
}
.cf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.cf-submit {
  margin-top: 8px;
  align-self: flex-start;
}
.cf-submit:disabled { opacity: 0.7; cursor: wait; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brand-deep);
  color: rgba(255, 255, 255, 0.7);
  padding: 80px 0 32px;
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .logo-mark { color: #fff; }
.footer-brand .logo-name { color: #fff; }
.footer-brand .logo-sub { color: rgba(255, 255, 255, 0.5); }
.footer-brand p {
  margin: 16px 0 24px;
  font-size: 14px;
  max-width: 280px;
  line-height: 1.6;
}
.socials {
  display: flex;
  gap: 8px;
}
.socials a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  display: inline-flex;
  align-items: center; justify-content: center;
  transition: all 0.2s ease;
  font-size: 15px;
}
.socials a:hover {
  background: var(--accent);
  color: var(--brand-deep);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.fc-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease, transform 0.2s ease;
}
.footer-col a:hover {
  color: var(--accent);
  transform: translateX(3px);
}
.fc-addr {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- WhatsApp FAB ---------- */
.whatsapp-fab {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 56px; height: 56px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  z-index: 90;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.whatsapp-fab.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.whatsapp-fab:hover { transform: translateY(-3px) scale(1.05); }
.wf-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25D366;
  animation: pin-pulse 2s ease-out infinite;
  z-index: -1;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid,
  .about-grid,
  .ai-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .contact-info { position: static; }
  .stats-grid,
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .services-grid,
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .services-head { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-nav {
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--bg-elev);
    flex-direction: column;
    padding: 20px 24px 24px;
    gap: 14px;
    border-bottom: 1px solid var(--line);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    /* Fechado: fora do ecrã E definitivamente inerte (não intercepta toques
       nem fica sobreposto ao corpo do site). */
    transform: translateY(-130%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.28s ease, visibility 0s linear 0.28s;
    z-index: 190;
  }
  .site-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.28s ease, opacity 0.28s ease, visibility 0s;
  }
  .header-cta, .login-btn { display: none; }
  .nav-login { display: inline-flex !important; }
  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 10px;
  }
  .hamburger span {
    display: block;
    width: 18px; height: 2px;
    background: var(--ink);
    border-radius: 2px;
  }
}
@media (max-width: 640px) {
  .hero { padding: 120px 0 64px; min-height: auto; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .services-grid,
  .portfolio-grid,
  .why-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .cf-row { grid-template-columns: 1fr; }
  .why { margin: 0 12px; }
  .contact-form { padding: 24px; }
  .testimonials-stage { padding: 32px 20px 56px; }
  .filter-bar { width: 100%; overflow-x: auto; }
  .ai-legend { grid-template-columns: 1fr; }
  .ai-orbit { max-width: 360px; }
  .ai-node-title { font-size: 11px; }
  .ai-card { width: 230px; }
}
