/**
 * VALINA Sections V2 — Unified Component System
 * 
 * Standardized section headers, card grids, detail lists,
 * intro blocks, and CTA sections across all subpages.
 *
 * Depends on valina.css design tokens.
 * Version: 2.0.0
 */

/* ============================================
   SECTION HEADER
============================================ */
.v2-section {
  padding: 0 20px 60px;
  scroll-margin-top: 80px;
}

.v2-section-header {
  text-align: center;
  margin-bottom: 48px;
}

.v2-section-label {
  font-family: "Orbitron", monospace;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--val-purple, #8a69c7);
  margin-bottom: 12px;
  display: block;
}

.v2-section-title {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: #fff;
  margin: 0 0 10px;
  line-height: 1.2;
}

.v2-section-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.55);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Section Divider — mini KITT scanner matching val-bar */
.v2-divider {
  height: 1px;
  max-width: 120px;
  margin: 24px auto 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(138, 105, 199, 0.2),
    transparent
  );
  opacity: 0.6;
  position: relative;
  overflow: visible;
}
/* Mini KITT beam */
.v2-divider::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 40px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    var(--val-cyan, #22d3ee) 0%,
    rgba(34, 211, 238, 0.3) 40%,
    transparent 75%
  );
  filter: blur(1px);
  animation: dividerKitt 8s ease-in-out infinite;
}
/* Mini KITT trail */
.v2-divider::before {
  content: "";
  position: absolute;
  top: -4px;
  width: 70px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(138, 105, 199, 0.35) 0%,
    rgba(138, 105, 199, 0.12) 30%,
    transparent 65%
  );
  opacity: 0.5;
  filter: blur(3px);
  animation: dividerKitt 8s ease-in-out infinite;
  animation-delay: 0.3s;
}
@keyframes dividerKitt {
  0%,
  100% {
    left: -20px;
  }
  50% {
    left: calc(100% - 20px);
  }
}

/* ============================================
   CARD GRID
============================================ */
.v2-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.v2-card {
  background: linear-gradient(
    135deg,
    rgba(18, 18, 35, 0.95),
    rgba(26, 26, 50, 0.9)
  );
  border: 1px solid rgba(138, 105, 199, 0.15);
  border-radius: 16px;
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

/* Hover glow from top-left */
.v2-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 20% 20%,
    rgba(138, 105, 199, 0.08),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.v2-card:hover {
  transform: translateY(-6px);
  border-color: rgba(138, 105, 199, 0.4);
  box-shadow: 0 12px 40px rgba(138, 105, 199, 0.15);
}
.v2-card:hover::before {
  opacity: 1;
}

/* Card icon */
.v2-card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 16px;
  background: rgba(138, 105, 199, 0.1);
  border-radius: 12px;
  border: 1px solid rgba(138, 105, 199, 0.2);
  transition:
    transform 0.3s ease,
    background 0.3s ease;
}
.v2-card:hover .v2-card-icon {
  transform: scale(1.08);
  background: rgba(138, 105, 199, 0.18);
}

/* Card title */
.v2-card-title {
  font-family: "Orbitron", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 10px;
}

/* Card description */
.v2-card-desc {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  margin: 0;
}

/* Optional: numbered card badge (for identity layers, steps, etc.) */
.v2-card-number {
  position: absolute;
  top: 16px;
  right: 20px;
  font-family: "Orbitron", monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(138, 105, 199, 0.3);
  letter-spacing: 0.05em;
}

/* Optional: card accent stripe - left border glow */
.v2-card[data-accent="cyan"] {
  border-left: 2px solid var(--val-cyan, #22d3ee);
}
.v2-card[data-accent="pink"] {
  border-left: 2px solid var(--val-pink, #f472b6);
}
.v2-card[data-accent="green"] {
  border-left: 2px solid var(--val-green, #10b981);
}
.v2-card[data-accent="gold"] {
  border-left: 2px solid var(--val-gold, #f59e0b);
}
.v2-card[data-accent="purple"] {
  border-left: 2px solid var(--val-purple, #8a69c7);
}
.v2-card[data-accent="violet"] {
  border-left: 2px solid var(--val-violet, #a855f7);
}

/* Card tags */
.v2-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.v2-tag {
  font-family: "Orbitron", monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(138, 105, 199, 0.12);
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(138, 105, 199, 0.15);
}
.v2-tag.live {
  background: rgba(16, 185, 129, 0.12);
  color: var(--val-green, #10b981);
  border-color: rgba(16, 185, 129, 0.25);
}

/* ============================================
   INTRO BLOCK (blockquote-style)
============================================ */
.v2-intro {
  max-width: 820px;
  margin: 0 auto 40px;
  padding: 24px 28px;
  border-left: 3px solid var(--val-purple, #8a69c7);
  background: rgba(138, 105, 199, 0.04);
  border-radius: 0 12px 12px 0;
  position: relative;
}
.v2-intro::before {
  content: "";
  position: absolute;
  top: 0;
  left: -3px;
  width: 3px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    var(--val-cyan, #22d3ee),
    var(--val-purple, #8a69c7)
  );
  border-radius: 2px;
}
.v2-intro p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.05rem;
  line-height: 1.8;
  margin: 0;
}
.v2-intro strong {
  color: #fff;
}

/* Accent variants */
.v2-intro[data-accent="gold"]::before {
  background: linear-gradient(
    to bottom,
    var(--val-gold, #f59e0b),
    var(--val-purple, #8a69c7)
  );
}
.v2-intro[data-accent="cyan"]::before {
  background: linear-gradient(
    to bottom,
    var(--val-cyan, #22d3ee),
    var(--val-purple, #8a69c7)
  );
}
.v2-intro[data-accent="violet"]::before {
  background: linear-gradient(
    to bottom,
    var(--val-violet, #a855f7),
    var(--val-purple, #8a69c7)
  );
}

/* ============================================
   DETAIL LIST (vertical items)
============================================ */
.v2-detail-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.v2-detail-item {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: rgba(18, 18, 35, 0.7);
  border: 1px solid rgba(138, 105, 199, 0.1);
  border-radius: 14px;
  transition:
    border-color 0.3s ease,
    transform 0.3s ease;
  position: relative;
  overflow: hidden;
}
.v2-detail-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 10% 50%,
    rgba(138, 105, 199, 0.06),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}
.v2-detail-item:hover {
  border-color: rgba(138, 105, 199, 0.3);
  transform: translateX(4px);
}
.v2-detail-item:hover::before {
  opacity: 1;
}

.v2-detail-icon {
  flex: 0 0 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: rgba(138, 105, 199, 0.08);
  border-radius: 10px;
  border: 1px solid rgba(138, 105, 199, 0.15);
}

.v2-detail-body {
  flex: 1;
}
.v2-detail-title {
  font-family: "Orbitron", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 6px;
}
.v2-detail-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
  margin: 0;
}

/* ============================================
   CTA SECTION
============================================ */
.v2-cta {
  text-align: center;
  padding: 60px 20px 40px;
  position: relative;
}
/* CTA divider — mini KITT scanner */
.v2-cta-divider {
  height: 1px;
  max-width: 120px;
  margin: 30px auto 0;
  background: linear-gradient(90deg, transparent, rgba(138, 105, 199, 0.2), transparent);
  position: relative;
  overflow: visible;
}
.v2-cta-divider::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 40px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, var(--val-cyan, #22d3ee) 0%, rgba(34, 211, 238, 0.3) 40%, transparent 75%);
  filter: blur(1px);
  animation: dividerKitt 8s ease-in-out infinite;
}
.v2-cta-divider::before {
  content: "";
  position: absolute;
  top: -4px;
  width: 70px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(138, 105, 199, 0.35) 0%, rgba(138, 105, 199, 0.12) 30%, transparent 65%);
  opacity: 0.5;
  filter: blur(3px);
  animation: dividerKitt 8s ease-in-out infinite;
  animation-delay: 0.3s;
}

.v2-cta-title {
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: #fff;
  margin: 0 0 12px;
}
.v2-cta-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 28px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.v2-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Orbitron", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--val-purple, #8a69c7),
    var(--val-violet, #a855f7)
  );
  border: none;
  border-radius: 12px;
  padding: 14px 32px;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  animation: ctaPulse 3s ease-in-out infinite;
}
.v2-cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(138, 105, 199, 0.35);
}
.v2-cta-btn::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}
.v2-cta-btn:hover::after {
  opacity: 1;
}

@keyframes ctaPulse {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(138, 105, 199, 0.2);
  }
  50% {
    box-shadow: 0 0 35px rgba(138, 105, 199, 0.35);
  }
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
============================================ */
.v2-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.v2-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.v2-stagger > .v2-reveal:nth-child(1) {
  transition-delay: 0s;
}
.v2-stagger > .v2-reveal:nth-child(2) {
  transition-delay: 0.08s;
}
.v2-stagger > .v2-reveal:nth-child(3) {
  transition-delay: 0.16s;
}
.v2-stagger > .v2-reveal:nth-child(4) {
  transition-delay: 0.24s;
}
.v2-stagger > .v2-reveal:nth-child(5) {
  transition-delay: 0.32s;
}
.v2-stagger > .v2-reveal:nth-child(6) {
  transition-delay: 0.4s;
}
.v2-stagger > .v2-reveal:nth-child(7) {
  transition-delay: 0.48s;
}
.v2-stagger > .v2-reveal:nth-child(8) {
  transition-delay: 0.56s;
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 768px) {
  .v2-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .v2-card {
    padding: 24px 20px;
  }
  .v2-detail-item {
    flex-direction: column;
    gap: 12px;
  }
  .v2-detail-icon {
    width: 48px;
  }
  .v2-intro {
    padding: 20px;
  }
  .v2-section {
    padding: 0 16px 40px;
  }
  .v2-section-header {
    margin-bottom: 32px;
  }
}

@media (max-width: 480px) {
  .v2-cta-btn {
    padding: 12px 24px;
    font-size: 0.8rem;
  }
}
