/* ============================================================
   FRAMES SEQUENCE PINNED SECTION — Organic Tree Cyber Network
   ============================================================ */
.frames-sequence-section {
  width: 100%;
  height: 99%;
  max-height: 99vh;
  padding: 0;
  margin: 0;
  background: #ffffff;
  position: relative;
  overflow: hidden;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.frames-sequence-section .container2 {
  width: 100%;
  max-width: 99.5%;
  height: 100%;
  margin: 0 auto;
  padding: 0;
}

.frames-card-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  background: #000000;
  border: none;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
  clip-path: polygon(
    0 26px,
    26px 0,
    calc(100% - 26px) 0,
    100% 26px,
    100% calc(100% - 26px),
    calc(100% - 26px) 100%,
    26px 100%,
    0 calc(100% - 26px)
  );
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* ── Top-Left Section Tag & Title Badge ── */
.frames-top-left-badge {
  position: absolute;
  top: 32px;
  left: 36px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}

.frames-badge-tag {
  font-family: "Black Ops One", system-ui;
  font-size: 14px;
  letter-spacing: 1.5px;
  color: #1c59c3;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64b5f6;
  box-shadow: 0 0 10px #64b5f6;
  animation: badgeDotGlow 2s ease-in-out infinite alternate;
}

@keyframes badgeDotGlow {
  0% {
    transform: scale(0.9);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.3);
    opacity: 1;
  }
}

.frames-badge-title {
  font-family: "Black Ops One", system-ui;
  font-size: 26px;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.5px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

/* ── Synchronized Organic Tree Cyber Network Layer ── */
.frames-steps-overlay {
  position: absolute;
  top: 50%;
  left: 36px;
  transform: translateY(-50%);
  width: 95%;
  height: 600px;
  z-index: 20;
  pointer-events: none;
}

/* Mid-Left Central Hub Circle (Origin of Branches at x=60, y=300) */
.steps-hub-ring {
  transform-origin: 60px 300px;
  animation: hubRingRotate 8s linear infinite;
  filter: drop-shadow(0 0 10px #ffffff);
}

.steps-hub-core {
  filter: drop-shadow(0 0 14px #ffffff);
}

@keyframes hubRingRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* White Organic Tree SVG Network */
.steps-cyber-network-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 900px;
  height: 600px;
  overflow: visible;
  z-index: 1;
}

.steps-trunk-bg {
  vector-effect: non-scaling-stroke;
}

.step-branch {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition:
    stroke-dashoffset 0.25s ease-out,
    opacity 0.25s ease-out;
  filter: drop-shadow(0 0 8px #ffffff);
  vector-effect: non-scaling-stroke;
  opacity: 0;
}

.step-branch.is-drawn {
  stroke-dashoffset: 0;
  opacity: 1;
}

/* Step Items positioned right at branch tips/endpoints */
.steps-list {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 900px;
  height: 600px;
  z-index: 2;
}

.step-item {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: scale(0.85) translateY(10px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.step-item.is-active {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* 100.0% Calibrated Positions (top = SVG_Y - 10px, left = SVG_X - 10px so node center lands exactly at tip!) */
.step-item[data-step="1"] {
  top: 60px;
  left: 450px;
} /* SVG tip: x=460, y=70 */
.step-item[data-step="2"] {
  top: 125px;
  left: 310px;
} /* SVG tip: x=320, y=135 */
.step-item[data-step="3"] {
  top: 190px;
  left: 510px;
} /* SVG tip: x=520, y=200 */
.step-item[data-step="4"] {
  top: 255px;
  left: 370px;
} /* SVG tip: x=380, y=265 */
.step-item[data-step="5"] {
  top: 325px;
  left: 470px;
} /* SVG tip: x=480, y=335 */
.step-item[data-step="6"] {
  top: 390px;
  left: 250px;
} /* SVG tip: x=260, y=400 */
.step-item[data-step="7"] {
  top: 455px;
  left: 410px;
} /* SVG tip: x=420, y=465 */
.step-item[data-step="8"] {
  top: 520px;
  left: 330px;
} /* SVG tip: x=340, y=530 */

.step-node {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  background: rgba(6, 9, 17, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition:
    border-color 0.4s ease,
    background 0.4s ease,
    box-shadow 0.4s ease;
}

.step-node-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition:
    background 0.4s ease,
    transform 0.4s ease;
}

.step-item.is-active .step-node {
  border-color: #ffffff;
  background: #ffffff;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.95);
}

.step-item.is-active .step-node-dot {
  background: #1c59c3;
  transform: scale(1.3);
}

.step-content {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 16px;
  border-radius: 8px;
  box-shadow: none;
  transition:
    background 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}

.step-item.is-active .step-content {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.step-num {
  font-family: "Black Ops One", monospace;
  font-size: 14px;
  color: #ffffff;
  letter-spacing: 1px;
}

.step-item.is-active .step-num {
  color: #64b5f6;
}

.step-text h4 {
  font-family: "Black Ops One", system-ui;
  font-size: 13px;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.step-text p {
  display: none;
}

/* ── Canvas Viewport ── */
.frames-canvas-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.frames-canvas-container canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==================== RESPONSIVE MEDIA QUERIES (TABLET & MOBILE ONLY) ==================== */

/* ── Tablet & Small Laptops (<= 1024px) ── */
@media (max-width: 1024px) {
  .frames-sequence-section {
    padding: 20px 0;
  }
  .frames-sequence-section .container2 {
    max-width: 98%;
    padding: 0 15px;
  }
  .step-item[data-step="1"] {
    top: 60px;
    left: 350px;
  }
  .step-item[data-step="2"] {
    top: 125px;
    left: 220px;
  }
  .step-item[data-step="3"] {
    top: 190px;
    left: 400px;
  }
  .step-item[data-step="4"] {
    top: 255px;
    left: 280px;
  }
  .step-item[data-step="5"] {
    top: 325px;
    left: 360px;
  }
  .step-item[data-step="6"] {
    top: 390px;
    left: 180px;
  }
  .step-item[data-step="7"] {
    top: 455px;
    left: 310px;
  }
  .step-item[data-step="8"] {
    top: 520px;
    left: 240px;
  }
}

/* ── Mobile Devices (<= 768px) ── */
@media (max-width: 768px) {
  .frames-sequence-section {
    height: 100vh;
    height: 100dvh;
    min-height: 520px;
    padding: 16px 0;
    margin: 0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }
  .frames-sequence-section .container2 {
    width: 100%;
    max-width: 100%;
    height: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .frames-card-wrap {
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    background: #000000;
    overflow: hidden;
    position: relative;
    clip-path: polygon(
      0 18px,
      18px 0,
      calc(100% - 18px) 0,
      100% 18px,
      100% calc(100% - 18px),
      calc(100% - 18px) 100%,
      18px 100%,
      0 calc(100% - 18px)
    );
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
  }
  .frames-top-left-badge {
    top: 14px;
    left: 16px;
    gap: 2px;
    z-index: 30;
  }
  .frames-badge-tag {
    font-size: 12px;
    letter-spacing: 1px;
  }
  .frames-badge-title {
    font-size: clamp(17px, 4.6vw, 21px);
    letter-spacing: 0;
  }
  .frames-canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
  }
  .frames-canvas-container canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 80% 60%;
    transform: scale(1.25) translate(24px, 25px);
  }
  .steps-cyber-network-svg {
    display: none;
  }
  .frames-steps-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: none;
    padding: 68px 12px 14px 14px;
    box-sizing: border-box;
    z-index: 20;
    pointer-events: none;
  }
  .steps-list {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 68%;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: clamp(10px, 1.8vh, 14px);
  }
  .step-item {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none;
    opacity: 0.25;
    gap: 6px;
    transition:
      opacity 0.35s ease,
      transform 0.35s ease;
  }
  .step-item.is-active {
    opacity: 1;
    transform: translateX(4px);
  }
  .step-node {
    width: 14px;
    height: 14px;
    border-width: 1.5px;
  }
  .step-node-dot {
    width: 4px;
    height: 4px;
  }
  .step-content {
    padding: 4px 8px;
    gap: 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: none;
  }
  .step-item.is-active .step-content {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  }
  .step-num {
    font-family: "Black Ops One", system-ui, sans-serif;
    font-size: 11px;
    color: #1c59c3;
    font-weight: 400;
    letter-spacing: 0.5px;
  }
  .step-item.is-active .step-num {
    color: #64b5f6;
    text-shadow: 0 0 8px rgba(100, 181, 246, 0.6);
  }
  .step-text h4 {
    font-family: "Black Ops One", system-ui, sans-serif;
    font-size: 11px;
    font-weight: 400;
    color: #ffffff;
    white-space: normal;
    line-height: 1.2;
    letter-spacing: 0.2px;
  }
}

/* ── Small Mobile Screens (<= 400px) ── */
@media (max-width: 400px) {
  .frames-sequence-section {
    padding: 10px 0;
  }
  .frames-card-wrap {
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }
  .steps-list {
    max-width: 72%;
  }
  .step-text h4 {
    font-size: 10px;
  }
}
