/* Modal-style alternating left/right feature rows */

.zigzag-band {
  position: relative;
  background: transparent;
}

.zigzag-row {
  position: relative;
  border-top: none;
}

.zigzag-row__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
  width: 100%;
}

@media (min-width: 900px) {
  .zigzag-row__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: clamp(2rem, 4vw, 4rem);
  }

  .zigzag-row--visual-left .zigzag-row__visual {
    grid-column: 1 / span 6;
    order: 1;
  }

  .zigzag-row--visual-left .zigzag-row__content {
    grid-column: 7 / span 6;
    order: 2;
  }

  .zigzag-row--visual-right .zigzag-row__content {
    grid-column: 1 / span 6;
    order: 1;
  }

  .zigzag-row--visual-right .zigzag-row__visual {
    grid-column: 7 / span 6;
    order: 2;
  }
}

.zigzag-row__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(72vw, 420px);
}

.zigzag-row__content {
  max-width: 36rem;
}

@media (min-width: 900px) {
  .zigzag-row--visual-right .zigzag-row__content {
    margin-inline: 0 auto;
  }

  .zigzag-row--visual-left .zigzag-row__content {
    margin-inline: auto 0;
  }
}

.zigzag-row__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #5eead4;
  margin-bottom: 0.75rem;
}

.zigzag-row__title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  line-height: 1.1;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 1.25rem;
}

.zigzag-row__title .zigzag-accent {
  color: #5eead4;
}

.zigzag-row__lead {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  max-width: none;
}

/* Accordion (Modal-style list) */
.zigzag-accordion {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.zigzag-accordion__item {
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.zigzag-accordion__item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 500;
  color: var(--color-text-primary);
  transition: color var(--dur-fast);
}

.zigzag-accordion__item summary::-webkit-details-marker {
  display: none;
}

.zigzag-accordion__item summary::after {
  content: '+';
  flex-shrink: 0;
  font-size: 1.35rem;
  font-weight: 300;
  color: var(--color-text-muted);
  transition: transform var(--dur-fast), color var(--dur-fast);
}

.zigzag-accordion__item[open] summary::after {
  content: '−';
  color: #5eead4;
}

.zigzag-accordion__item summary:hover {
  color: #5eead4;
}

.zigzag-accordion__panel {
  padding: 0 0 1.15rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  max-width: 52ch;
}

.zigzag-accordion__panel a {
  color: #22d3ee;
}

/* Security vault visual (labeled panel + chips) */
.zigzag-visual--vault {
  width: 100%;
  max-width: 28rem;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 900px;
}

.zigzag-vault {
  position: relative;
  width: 100%;
  height: 280px;
  transform-style: preserve-3d;
}

.zigzag-vault::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 48%;
  width: min(100%, 20rem);
  height: min(100%, 16rem);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.14), transparent 68%);
  pointer-events: none;
  z-index: 0;
  animation: vault-aura 5s ease-in-out infinite;
}

.zigzag-vault__panel {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: min(100%, 16.5rem);
  padding: 1.35rem 1.25rem 1.15rem;
  border-radius: 16px;
  background: linear-gradient(155deg, #1a2e28 0%, #0d1512 50%, #1e3d34 100%);
  border: 1px solid rgba(94, 234, 212, 0.35);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.5),
    0 0 48px rgba(94, 234, 212, 0.2),
    inset 0 1px 0 rgba(167, 243, 208, 0.3);
  transform: translate(-50%, -50%) rotateX(10deg) rotateY(-16deg);
  transform-style: preserve-3d;
  animation:
    vault-panel-float 6s ease-in-out infinite,
    vault-border-glow 4s ease-in-out infinite;
}

.zigzag-vault__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.65rem;
  border-radius: 12px;
  color: #5eead4;
  background: rgba(94, 234, 212, 0.12);
  animation: vault-icon-pulse 3.2s ease-in-out infinite;
}

.zigzag-vault__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: -0.02em;
}

.zigzag-vault__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.zigzag-vault__list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

.zigzag-vault__badge {
  flex-shrink: 0;
  padding: 0.15rem 0.45rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0a0a0a;
  background: linear-gradient(145deg, #a7f3d0, #5eead4);
  border-radius: 4px;
}

.zigzag-vault__chip {
  position: absolute;
  z-index: 2;
  padding: 0.5rem 0.85rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
  background: linear-gradient(145deg, #2a2a32, #141418);
  border: 1px solid rgba(94, 234, 212, 0.28);
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  transform-style: preserve-3d;
  will-change: transform;
}

.zigzag-vault__chip--1 {
  top: 6%;
  right: 2%;
  transform: rotate(6deg) translateZ(30px);
  animation: vault-chip-drift-1 5.5s ease-in-out infinite;
}

.zigzag-vault__chip--2 {
  bottom: 14%;
  left: 0;
  transform: rotate(-5deg) translateZ(20px);
  animation: vault-chip-drift-2 6.5s ease-in-out infinite;
  animation-delay: -1.2s;
}

.zigzag-vault__chip--3 {
  bottom: 4%;
  right: 12%;
  transform: rotate(3deg) translateZ(40px);
  z-index: 3;
  animation: vault-chip-drift-3 5s ease-in-out infinite;
  animation-delay: -2.4s;
}

.zigzag-vault__chip--accent {
  color: #0a0a0a;
  background: linear-gradient(145deg, #a7f3d0, #5eead4);
  border-color: #5eead4;
  animation:
    vault-chip-drift-3 5s ease-in-out infinite,
    vault-chip-accent-glow 3s ease-in-out infinite;
  animation-delay: -2.4s, 0s;
}

@keyframes vault-aura {
  0%,
  100% {
    opacity: 0.55;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

@keyframes vault-panel-float {
  0%,
  100% {
    transform: translate(-50%, -50%) rotateX(10deg) rotateY(-16deg) translateY(0);
  }
  50% {
    transform: translate(-50%, -50%) rotateX(14deg) rotateY(-10deg) translateY(-12px);
  }
}

@keyframes vault-border-glow {
  0%,
  100% {
    box-shadow:
      0 24px 64px rgba(0, 0, 0, 0.5),
      0 0 40px rgba(94, 234, 212, 0.16),
      inset 0 1px 0 rgba(167, 243, 208, 0.3);
  }
  50% {
    box-shadow:
      0 28px 72px rgba(0, 0, 0, 0.55),
      0 0 64px rgba(94, 234, 212, 0.34),
      inset 0 1px 0 rgba(167, 243, 208, 0.45);
  }
}

@keyframes vault-icon-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(94, 234, 212, 0));
  }
  50% {
    filter: drop-shadow(0 0 14px rgba(94, 234, 212, 0.55));
  }
}

@keyframes vault-chip-drift-1 {
  0%,
  100% {
    transform: rotate(6deg) translateZ(30px) translate(0, 0);
  }
  50% {
    transform: rotate(9deg) translateZ(30px) translate(6px, -10px);
  }
}

@keyframes vault-chip-drift-2 {
  0%,
  100% {
    transform: rotate(-5deg) translateZ(20px) translate(0, 0);
  }
  50% {
    transform: rotate(-8deg) translateZ(20px) translate(-8px, 8px);
  }
}

@keyframes vault-chip-drift-3 {
  0%,
  100% {
    transform: rotate(3deg) translateZ(40px) translate(0, 0);
  }
  50% {
    transform: rotate(6deg) translateZ(40px) translate(5px, -6px);
  }
}

@keyframes vault-chip-accent-glow {
  0%,
  100% {
    box-shadow: 0 0 24px rgba(94, 234, 212, 0.35);
  }
  50% {
    box-shadow: 0 0 40px rgba(94, 234, 212, 0.65);
  }
}

@media (prefers-reduced-motion: reduce) {
  .zigzag-vault::before,
  .zigzag-vault__panel,
  .zigzag-vault__icon,
  .zigzag-vault__chip {
    animation: none !important;
  }
}

/* Globe inside zigzag row */
.zigzag-row .particle-globe-wrap {
  margin-inline: auto;
}

.zigzag-row .particle-globe__count {
  text-align: center;
}

@media (min-width: 900px) {
  .zigzag-row--visual-left .particle-globe__count {
    text-align: center;
  }
}

.zigzag-row__cta {
  margin-top: 1.25rem;
}

/* Workspace modules hub (organizer row) — click tiles, accent on the right */
.zigzag-visual--modules {
  width: 100%;
  max-width: 24rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zigzag-modules-hub {
  width: 100%;
}

.zigzag-modules-hub__panel {
  position: relative;
  padding: 1.35rem 1.25rem 1.2rem;
  border-radius: 16px;
  background: linear-gradient(160deg, #1e1e28 0%, #121218 55%, #1a1f2e 100%);
  border: 1px solid rgba(94, 234, 212, 0.22);
  box-shadow:
    0 20px 56px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: hub-panel-border 4.5s ease-in-out infinite;
}

.zigzag-modules-hub__panel::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 17px;
  padding: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(94, 234, 212, 0.15),
    rgba(124, 58, 237, 0.25),
    rgba(94, 234, 212, 0.15),
    transparent
  );
  background-size: 220% 100%;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: hub-panel-border-sweep 5s linear infinite;
}

.zigzag-modules-hub__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5eead4;
}

.zigzag-modules-hub__title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.02em;
}

.zigzag-modules-hub__stage {
  position: relative;
  margin-bottom: 1rem;
  min-height: 8.5rem;
}

.zigzag-modules-hub__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}

.zigzag-modules-hub__line {
  fill: none;
  stroke: rgba(94, 234, 212, 0.42);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 5 9;
  animation: hub-line-flow 1.4s linear infinite;
}

.zigzag-modules-hub__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1.12fr;
  grid-template-rows: repeat(2, minmax(2.5rem, 1fr));
  gap: 0.5rem;
}

.zigzag-modules-hub__tile {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.5rem 0.35rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
  text-align: center;
  cursor: pointer;
  appearance: none;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(94, 234, 212, 0.18);
  border-radius: 8px;
  transition:
    border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out),
    background var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out);
}

.zigzag-modules-hub__tile:hover,
.zigzag-modules-hub__tile:focus-visible {
  border-color: rgba(94, 234, 212, 0.45);
  box-shadow: 0 0 16px rgba(94, 234, 212, 0.2);
  transform: translateY(-1px);
  outline: none;
}

.zigzag-modules-hub__tile[data-slot='a'] {
  grid-column: 1;
  grid-row: 1;
}

.zigzag-modules-hub__tile[data-slot='b'] {
  grid-column: 2;
  grid-row: 1;
}

.zigzag-modules-hub__tile[data-slot='c'] {
  grid-column: 1;
  grid-row: 2;
}

.zigzag-modules-hub__tile[data-slot='d'] {
  grid-column: 2;
  grid-row: 2;
}

.zigzag-modules-hub__tile[data-slot='r'],
.zigzag-modules-hub__tile--accent {
  grid-column: 3;
  grid-row: 1 / -1;
  min-height: 5.5rem;
  font-size: 0.95rem;
  color: #0a0a0a;
  cursor: default;
  background: linear-gradient(160deg, #a7f3d0 0%, #5eead4 100%);
  border-color: #5eead4;
  box-shadow: 0 0 28px rgba(94, 234, 212, 0.35);
  animation: hub-tile-pulse 2.6s ease-in-out infinite;
}

.zigzag-modules-hub__tile--accent:hover,
.zigzag-modules-hub__tile--accent:focus-visible {
  transform: none;
}

.zigzag-modules-hub__meta {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--color-text-muted);
  text-align: center;
}

@keyframes hub-panel-border {
  0%,
  100% {
    box-shadow:
      0 20px 56px rgba(0, 0, 0, 0.45),
      0 0 32px rgba(94, 234, 212, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
  50% {
    box-shadow:
      0 22px 60px rgba(0, 0, 0, 0.5),
      0 0 48px rgba(94, 234, 212, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
}

@keyframes hub-panel-border-sweep {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 220% 50%;
  }
}

@keyframes hub-tile-pulse {
  0%,
  100% {
    box-shadow: 0 0 22px rgba(94, 234, 212, 0.3);
    filter: brightness(1);
  }
  50% {
    box-shadow: 0 0 40px rgba(94, 234, 212, 0.55);
    filter: brightness(1.06);
  }
}

@keyframes hub-line-flow {
  to {
    stroke-dashoffset: -28;
  }
}

@media (max-width: 479px) {
  .zigzag-modules-hub__grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto repeat(2, minmax(2.5rem, 1fr));
  }

  .zigzag-modules-hub__tile[data-slot='r'],
  .zigzag-modules-hub__tile--accent {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 3.25rem;
  }

  .zigzag-modules-hub__tile[data-slot='a'] {
    grid-column: 1;
    grid-row: 2;
  }

  .zigzag-modules-hub__tile[data-slot='b'] {
    grid-column: 2;
    grid-row: 2;
  }

  .zigzag-modules-hub__tile[data-slot='c'] {
    grid-column: 1;
    grid-row: 3;
  }

  .zigzag-modules-hub__tile[data-slot='d'] {
    grid-column: 2;
    grid-row: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zigzag-modules-hub__panel,
  .zigzag-modules-hub__panel::before,
  .zigzag-modules-hub__tile--accent,
  .zigzag-modules-hub__tile[data-slot='r'],
  .zigzag-modules-hub__line {
    animation: none !important;
  }
}
