/*
 * Expertise section — octopus canvas diagram, node shells, service cards grid.
 * Depends on: variables.css, layout.css, animations.css
 *
 * @package Vinelec
 */

/* =================================================================
   SECTION WRAPPER
   ================================================================= */

.expertise {
  position: relative;
  overflow: hidden;
  /* background:
    radial-gradient(circle at 55% 35%, rgba(0, 183, 255, 0.1), transparent 32%),
    radial-gradient(circle at 20% 18%, rgba(0, 119, 255, 0.08), transparent 24%),
    radial-gradient(circle at 80% 18%, rgba(255, 136, 0, 0.08), transparent 25%),
    radial-gradient(circle at 12% 48%, rgba(223, 255, 0, 0.06), transparent 22%),
    radial-gradient(circle at 78% 78%, rgba(57, 255, 20, 0.06), transparent 22%),
    var(--clr-bg); */
  padding: 80px 0;
}

.expertise::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.035;
  pointer-events: none;
  z-index: 0;
}

/* =================================================================
   TOP SPLIT — text left / diagram right
   ================================================================= */

.expertise-top {
  display: grid;
  grid-template-columns: minmax(320px, 440px) 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.expertise-text .section-eyebrow {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--clr-primary-soft);
  margin-bottom: var(--space-md);
}

.expertise-text .section-title {
  font-family: var(--font-heading);
  font-weight: var(--fw-extrabold);
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: var(--ls-tight);
  margin-bottom: var(--space-md);
}

.expertise-text .section-title .accent {
  color: var(--clr-primary);
}

.expertise-text .section-lead {
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  color: var(--clr-text);
  margin-bottom: var(--space-lg);
}

/* =================================================================
   OCTOPUS CANVAS WRAPPER
   ================================================================= */

.octopus-wrap {
  position: relative;
  width: 100%;
  max-width: 720px;
  height: 640px;
  z-index: 2;
}

.octopus-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* =================================================================
   CENTER NODE
   ================================================================= */

.center-shell,
.node-shell {
  position: absolute;
  z-index: 6;
  will-change: transform;
}

.center-shell {
  width: 200px;
  height: 200px;
  left: 50%;
  top: 50%;
  z-index: 5;
  animation: centerFloat 5s ease-in-out infinite;
}

.center-logo,
.service-node {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: 0.35s ease;
}

.center-logo {
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.18), transparent 28%),
    radial-gradient(circle, rgba(0, 157, 255, 0.4), rgba(0, 5, 20, 0.98) 68%);
  border: 2.5px solid rgba(0, 183, 255, 0.9);
  box-shadow:
    0 0 22px #009dff,
    0 0 60px rgba(0, 157, 255, 0.85),
    0 0 120px rgba(0, 157, 255, 0.25),
    inset 0 0 40px rgba(0, 157, 255, 0.5);
  animation: centerPulse 2.8s ease-in-out infinite;
}

.center-logo::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 183, 255, 0.7);
  box-shadow:
    0 0 20px rgba(0, 183, 255, 0.55),
    0 0 40px rgba(0, 183, 255, 0.2);
  animation: rotateRing 10s linear infinite;
}

.center-logo::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border-bottom: 2px solid rgba(255, 255, 255, 0.65);
  transform: rotate(-8deg);
  opacity: 0.65;
}

.ve-logo {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ve-svg {
  width: 110px;
  height: 76px;
  filter: drop-shadow(0 0 14px rgba(0, 183, 255, 0.95));
}

.ve-logo-img{
	width: 120px;
	height: 120px;
}

/* =================================================================
   SERVICE NODES
   ================================================================= */

.node-shell {
  width: 148px;
  height: 148px;
  animation: nodeFloat 5.5s ease-in-out infinite;
}

.service-node {
  background: radial-gradient(circle, rgba(0, 20, 36, 0.92), rgba(0, 5, 20, 0.98));
  border: 2px solid var(--clr);
  box-shadow:
    0 0 15px var(--clr),
    0 0 45px rgba(var(--rgb), 0.55),
    inset 0 0 28px rgba(var(--rgb), 0.32);
}

.service-node::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1.5px solid var(--clr);
  opacity: 0.55;
  box-shadow: 0 0 16px rgba(var(--rgb), 0.5), 0 0 32px rgba(var(--rgb), 0.2);
  animation: rotateRing 8s linear infinite;
  pointer-events: none;
}

.service-node::after {
  content: "";
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  border: 1px solid var(--clr);
  opacity: 0.22;
  box-shadow: 0 0 22px rgba(var(--rgb), 0.3);
  animation: rotateRing 14s linear infinite reverse;
  pointer-events: none;
}

.service-node:hover {
  transform: scale(1.08);
  box-shadow:
    0 0 28px var(--clr),
    0 0 82px rgba(var(--rgb), 0.78),
    inset 0 0 38px rgba(var(--rgb), 0.45);
}

.service-inner {
  position: relative;
  z-index: 2;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.service-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr);
  filter: drop-shadow(0 0 8px var(--clr));
}

.service-icon svg {
  width: 100%;
  height: 100%;
  stroke: var(--clr);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-title {
  font-size: 12.5px;
  line-height: 1.3;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.01em;
  color: #e8f4ff;
  text-align: center;
}

/* ── Node positions (desktop) ── */
.node-performance { left: 22%;  top: 2%;    animation-delay: 0s;  }
.node-project     { right: 8%;  top: 2%;    animation-delay: -1s; }
.node-market      { right: -2%; top: 38%;   animation-delay: -2s; }
.node-energy      { right: 8%;  bottom: 2%; animation-delay: -3s; }
.node-data        { left: 22%;  bottom: 2%; animation-delay: -4s; }
.node-risk        { left: 2%;   top: 38%;   animation-delay: -5s; }

.node-shell[data-accent="blue"]   { --clr: #009dff; --rgb: 0, 157, 255; }
.node-shell[data-accent="orange"] { --clr: #ff8c00; --rgb: 255, 140, 0; }
.node-shell[data-accent="cyan"]   { --clr: #00f7ff; --rgb: 0, 247, 255; }
.node-shell[data-accent="gold"]   { --clr: #d4a44a; --rgb: 212, 164, 74; }
.node-shell[data-accent="green"]  { --clr: #39ff14; --rgb: 57, 255, 20; }
.node-shell[data-accent="purple"] { --clr: #465bff; --rgb: 70, 91, 255; }
.node-shell[data-accent="lime"]   { --clr: #dfff00; --rgb: 223, 255, 0; }

.mobile-nodes-row {
  display: contents;
}

/* =================================================================
   SERVICE CARDS GRID
   ================================================================= */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 60px;
  position: relative;
  z-index: 2;
}

.svc-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--ease), transform var(--ease);
}

.svc-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-3px);
}

.svc-card-img {
  position: relative;
  min-height: 200px;
  overflow: hidden;
}

.svc-card-body {
  	padding: 24px 22px;
  	display: flex;
  	flex-direction: column;
  	justify-content: center;
  	gap: 12px;
	width: 275px;
}

.svc-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.svc-card-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--card-accent, var(--clr-primary-soft));
  color: var(--card-accent, var(--clr-primary-soft));
}

.svc-card-icon svg {
  width: 18px;
  height: 18px;
}

.svc-card-title {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  font-size: var(--fs-base);
  line-height: var(--lh-snug);
}

.svc-card-desc {
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  color: var(--clr-text-light);
}

.svc-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--clr-text-light);
  margin-top: auto;
  transition: color var(--ease);
}

.svc-card-link:hover {
  color: var(--clr-white);
}

.svc-card-link svg {
  width: 14px;
  height: 14px;
}

/* Card accent colours */
.svc-card[data-accent="blue"]   { --card-accent: #009dff; }
.svc-card[data-accent="green"]  { --card-accent: #39ff14; }
.svc-card[data-accent="cyan"]   { --card-accent: #00f7ff; }
.svc-card[data-accent="orange"] { --card-accent: #ff8c00; }
.svc-card[data-accent="gold"]   { --card-accent: #d4a44a; }
.svc-card[data-accent="purple"] { --card-accent: #465bff; }

/* =================================================================
   INFO PANEL (octopus node click)
   ================================================================= */

.info-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: min(580px, calc(100% - 48px));
  background: rgba(0, 10, 28, 0.93);
  border: 1px solid rgba(0, 183, 255, 0.35);
  box-shadow: 0 0 38px rgba(0, 183, 255, 0.22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 18px;
  padding: 26px;
  z-index: 20;
  opacity: 0;
  transform: translateY(25px);
  pointer-events: none;
  transition: 0.35s ease;
}

.info-panel.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.info-panel h3 {
  color: #00c8ff;
  margin-bottom: 10px;
  font-size: 22px;
}

.info-panel p {
  color: var(--clr-text);
  line-height: 1.6;
  font-size: var(--fs-base);
  margin-bottom: 18px;
}

.panel-btn {
  display: inline-block;
  text-decoration: none;
  color: var(--clr-bg);
  background: #00c8ff;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: var(--fw-bold);
  transition: 0.3s ease;
}

.panel-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 22px rgba(0, 200, 255, 0.7);
}

.close-panel {
  position: absolute;
  right: 16px;
  top: 14px;
  background: none;
  border: none;
  color: var(--clr-white);
  font-size: 24px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.close-panel:hover {
  opacity: 1;
}
