/* ==========================================================================
   How it works — energy flow diagram + benefits
   ========================================================================== */

.hiw-hero {
  padding-top: 150px;
  padding-bottom: 40px;
}

.hiw-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr 0.85fr;
  gap: 30px;
  align-items: center;
}

.hiw-copy h1 { font-size: clamp(2.4rem, 4vw, 3.4rem); margin-bottom: 16px; }
.hiw-copy .lede { max-width: 40ch; margin-bottom: 26px; color: var(--muted); }

.hiw-benefits { list-style: none; display: grid; gap: 16px; }
.hiw-benefits li { display: flex; gap: 14px; align-items: flex-start; }
.hiw-benefits .ic {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--blue);
  color: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), color 0.3s var(--ease);
}
.hiw-benefits li:hover .ic { background: var(--blue); color: var(--white); transform: scale(1.06); }
.hiw-benefits h2, .hiw-benefits h3 { font-size: 0.98rem; font-weight: 700; margin-bottom: 2px; }
.hiw-benefits p { color: var(--muted); font-size: 0.85rem; }

/* ---- Flow diagram ---- */
.flow-diagram-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 560px;
  margin: 0 auto;
}

.flow-ring {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 1px dashed var(--border-light);
  animation: spin 60s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.flow-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.flow-svg line {
  stroke: var(--blue-light);
  stroke-width: 0.5;
  stroke-dasharray: 3 2.4;
  opacity: 0.85;
  animation: flow-dash 1.6s linear infinite;
}

@keyframes flow-dash { to { stroke-dashoffset: -10.8; } }

.flow-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 108px;
}

.flow-node .ic {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(10, 15, 26, 0.9);
  border: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-light);
  margin-bottom: 8px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}

.flow-node:hover .ic { transform: scale(1.1); border-color: var(--blue-light); }

.flow-node .label { font-size: 0.78rem; font-weight: 700; color: var(--white); }
.flow-node .sub { font-size: 0.68rem; color: var(--muted); line-height: 1.3; }

.flow-hub {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 92px; height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47,107,255,0.35), rgba(10,15,26,0.95) 70%);
  border: 1.5px solid var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 40px rgba(47, 107, 255, 0.55);
  animation: pulse-hub 2.6s ease-in-out infinite;
}

@keyframes pulse-hub {
  0%, 100% { box-shadow: 0 0 30px rgba(47,107,255,0.45); }
  50% { box-shadow: 0 0 55px rgba(47,107,255,0.8); }
}

.flow-hub span { font-weight: 800; font-size: 0.95rem; letter-spacing: 0.02em; }
.flow-hub .hub-v2 { color: var(--white); }
.flow-hub .hub-x { color: var(--blue-light); }

/* ---- Right benefits card ---- */
.hiw-side h2 { font-size: 1.5rem; margin-bottom: 14px; }
.hiw-side > p { color: var(--muted); margin-bottom: 22px; font-size: 0.92rem; }

.hiw-list { list-style: none; display: grid; gap: 18px; margin-bottom: 24px; }
.hiw-list li { display: flex; gap: 12px; align-items: flex-start; }
.hiw-list .ic {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--blue);
  color: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hiw-list h3 { font-size: 0.92rem; }
.hiw-list p { color: var(--muted); font-size: 0.82rem; }

/* ---- App section ---- */
.app-section {
  margin-top: 90px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: grid;
  grid-template-columns: 0.6fr 1fr 1fr;
  gap: 30px;
  align-items: center;
  background: linear-gradient(180deg, var(--navy-panel), rgba(13,20,32,0.3));
}

.phone-mock {
  width: 100%;
  max-width: 160px;
  aspect-ratio: 9/18;
  border-radius: 26px;
  border: 2px solid var(--border-light);
  background: linear-gradient(160deg, #0d1622, #060a12);
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.phone-mock video {
  position: absolute; inset: 6%;
  width: 88%; height: 88%;
  object-fit: cover;
  border-radius: 14px;
}

.phone-mock::before {
  content: "";
  position: absolute; inset: 6%;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), transparent 30%);
  pointer-events: none;
  z-index: 1;
}

/* ---- Video showcase cards ---- */
.video-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.video-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16/10;
}

.video-card video {
  width: 100%; height: 100%;
  object-fit: cover;
}

.video-card-label {
  position: absolute;
  left: 16px; bottom: 14px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(5,8,15,0.75);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-light);
  font-size: 0.8rem;
  font-weight: 600;
}

@media (max-width: 700px) {
  .video-card-grid { grid-template-columns: 1fr; }
}

.app-copy-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--green);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}

.app-checks { list-style: none; display: grid; gap: 12px; }
.app-checks li { display: flex; gap: 10px; font-size: 0.88rem; }
.app-checks svg { color: var(--blue-light); flex-shrink: 0; }
.app-checks span { display: block; }
.app-checks small { display: block; color: var(--muted-dim); font-size: 0.76rem; }

/* ---- Testimonial ---- */
.testimonial {
  margin-top: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px 40px;
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--navy-panel);
}

.testimonial .quote-mark { font-size: 2.4rem; color: var(--blue-light); line-height: 1; }
.testimonial p { font-size: 1.1rem; flex: 1; }
.testimonial .who { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.testimonial .avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}
.testimonial .who strong { display: block; font-size: 0.9rem; }
.testimonial .who span { color: var(--muted); font-size: 0.8rem; }

@media (max-width: 1080px) {
  .hiw-grid { grid-template-columns: 1fr; }
  .app-section { grid-template-columns: 1fr; text-align: center; }
  .app-checks { text-align: left; }
  .testimonial { flex-direction: column; text-align: center; }
}
