/* ==========================
   VEIL SYSTEM - SECTION BASE CLASSES
========================== */

/*
  3:1:1 ratio system:
  - 60% dark-base (default)
  - 20% white-veiled (credibility/trust sections)
  - 20% green-veiled (CTAs/highlights)
*/

/* Dark base section (default) */
.section-dark-base {
  background: var(--bg-dark-base);
  color: var(--text-primary);
}

/* White section with green veil overlay */
.section-white-veiled {
  position: relative;
  background: var(--bg-white-base);
  color: var(--text-on-white-veiled);
  overflow: hidden;
}

.section-white-veiled::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--veil-green-on-white);
  pointer-events: none;
  z-index: 0;
}

/* Ensure container content is above the veil */
.section-white-veiled .container {
  position: relative;
  z-index: 1;
}

/* Force dark text colors on white-veiled sections (override all component defaults) */
.section-white-veiled,
.section-white-veiled .section-title,
.section-white-veiled .section-subtitle,
.section-white-veiled h1,
.section-white-veiled h2,
.section-white-veiled h3,
.section-white-veiled h4,
.section-white-veiled h5,
.section-white-veiled h6,
.section-white-veiled p,
.section-white-veiled .metric-label,
.section-white-veiled .metric-value,
.section-white-veiled .pricing-label,
.section-white-veiled .pricing-value,
.section-white-veiled .pricing-footer,
.section-white-veiled .security-item h3,
.section-white-veiled .security-item p,
.section-white-veiled .preview-status,
.section-white-veiled .preview-disclaimer,
.section-white-veiled .showcase-content h3,
.section-white-veiled .showcase-content p,
.section-white-veiled .badge-text h4,
.section-white-veiled .badge-text p,
.section-white-veiled .security-split-left h3,
.section-white-veiled .security-split-left p,
.section-white-veiled .feature-icon-compact + h4 {
  color: var(--text-on-white-veiled) !important;
}

/* Darker accent colors for white backgrounds */
.section-white-veiled .metric-value.positive {
  color: #059669 !important; /* emerald-600 - darker green for white bg */
}

.section-white-veiled .status-badge.active {
  background: rgba(5, 150, 105, 0.1);
  color: #059669 !important;
}

.section-white-veiled .status-dot {
  background: #059669;
}

/* Green section with dark veil overlay */
.section-green-veiled {
  position: relative;
  background: var(--bg-emerald-base);
  color: var(--text-on-green-veiled);
  overflow: hidden;
}

.section-green-veiled::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--veil-dark-on-green);
  pointer-events: none;
  z-index: 0;
}

/* Ensure container content is above the veil */
.section-green-veiled .container {
  position: relative;
  z-index: 1;
}

/* Force white text colors on green-veiled sections (override all component defaults) */
.section-green-veiled,
.section-green-veiled .section-title,
.section-green-veiled .section-subtitle,
.section-green-veiled h1,
.section-green-veiled h2,
.section-green-veiled h3,
.section-green-veiled h4,
.section-green-veiled h5,
.section-green-veiled h6,
.section-green-veiled p,
.section-green-veiled .why-content h3,
.section-green-veiled .why-content p,
.section-green-veiled .final-cta-content h2,
.section-green-veiled .final-cta-content p,
.section-green-veiled .cta-title,
.section-green-veiled .cta-subtitle,
.section-green-veiled .commitment-header .section-title,
.section-green-veiled .commitment-header .section-subtitle,
.section-green-veiled .commitment-item h3,
.section-green-veiled .commitment-item p {
  color: var(--text-on-green-veiled) !important;
}

/* Keep icons visible on green background */
.section-green-veiled .why-icon {
  filter: brightness(1.2);
}

/* ==========================
   VEIL SYSTEM - CARD VARIANTS
========================== */

/* Card with white background + green veil (for audit/partner cards) */
.card-white-veiled {
  position: relative;
  background: var(--bg-white-base);
  color: var(--text-on-white-veiled);
  border: 1px solid rgba(0, 212, 170, 0.15);
  border-radius: 16px;
  padding: 32px 24px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 212, 170, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-white-veiled::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--veil-green-on-white);
  pointer-events: none;
  z-index: 0;
}

.card-white-veiled > * {
  position: relative;
  z-index: 1;
}

.card-white-veiled:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 212, 170, 0.15);
  border-color: rgba(0, 212, 170, 0.25);
}

/* Card with green background + dark veil (for CTAs/KPIs) */
.card-green-veiled {
  position: relative;
  background: var(--bg-emerald-base);
  color: var(--text-on-green-veiled);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  padding: 32px 24px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-green-veiled::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--veil-dark-on-green);
  pointer-events: none;
  z-index: 0;
}

.card-green-veiled > * {
  position: relative;
  z-index: 1;
}

.card-green-veiled:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

/* ==========================
   VEIL SYSTEM - INLINE BADGES
========================== */

/* Small badge with white bg + green veil (inline emphasis) */
.badge-white-veiled {
  position: relative;
  display: inline-block;
  background: var(--bg-white-base);
  color: var(--text-on-white-veiled);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  border: 1px solid rgba(0, 212, 170, 0.2);
}

.badge-white-veiled::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--veil-green-on-white);
  pointer-events: none;
  z-index: 0;
}

.badge-white-veiled > * {
  position: relative;
  z-index: 1;
}

/* Small badge with green bg + dark veil (inline emphasis) */
.badge-green-veiled {
  position: relative;
  display: inline-block;
  background: var(--bg-emerald-base);
  color: var(--text-on-green-veiled);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.badge-green-veiled::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--veil-dark-on-green);
  pointer-events: none;
  z-index: 0;
}

.badge-green-veiled > * {
  position: relative;
  z-index: 1;
}

/* ==========================
   VEIL SYSTEM - RESPONSIVE ADJUSTMENTS
========================== */

/* Reduce veil intensity on mobile for better readability */
@media (max-width: 640px) {
  .section-white-veiled::before,
  .card-white-veiled::before,
  .badge-white-veiled::before {
    background: linear-gradient(
      to bottom right,
      rgba(0, 212, 170, 0.03),
      transparent,
      rgba(0, 212, 170, 0.06)
    );
  }

  .section-green-veiled::before,
  .card-green-veiled::before,
  .badge-green-veiled::before {
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.15),
      rgba(0, 0, 0, 0.08),
      transparent
    );
  }
}

/* ==========================
   PATTERN 4-9: NEW VALUE PROPS PATTERNS
========================== */

/* Pattern 4: Glassmorphism Flip Cards */
.value-props-pattern-4 {
  padding: 80px 20px;
  background: var(--bg-primary);
}

.value-props-flip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.flip-card-container {
  perspective: 1000px;
  height: 280px;
}

.flip-card {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flip-card-container:hover .flip-card {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.flip-card-front {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-glass);
}

.flip-card-back {
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.1) 0%, rgba(0, 212, 170, 0.05) 100%);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(0, 212, 170, 0.3);
  transform: rotateY(180deg);
  box-shadow: 0 12px 40px rgba(0, 212, 170, 0.2);
}

.value-prop-icon-large {
  width: 80px;
  height: 80px;
  color: var(--color-primary-green);
  margin-bottom: 20px;
}

.value-prop-icon-large svg {
  width: 100%;
  height: 100%;
}

.flip-card-front h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.flip-card-back h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.flip-card-back p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 1024px) {
  .value-props-flip-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 640px) {
  .value-props-flip-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .flip-card-container {
    height: 240px;
  }
}

/* Pattern 5: Accordion/Expandable List */
.value-props-pattern-5 {
  padding: 80px 20px;
  background: rgba(255, 255, 255, 0.02);
}

.value-props-accordion {
  max-width: 900px;
  margin: 0 auto;
}

.accordion-item {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.accordion-item:hover {
  border-color: rgba(0, 212, 170, 0.3);
}

.accordion-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  cursor: pointer;
  user-select: none;
  position: relative;
  z-index: 1;
}

.accordion-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  color: var(--color-primary-green);
  background: rgba(0, 212, 170, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.accordion-icon svg {
  width: 24px;
  height: 24px;
}

.accordion-header h3 {
  flex: 1;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.accordion-toggle {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 300;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  position: relative;
  z-index: 1;
}

.accordion-item.active .accordion-content {
  max-height: 200px;
}

.accordion-item.active {
  border-color: rgba(0, 212, 170, 0.4);
}

.accordion-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle, rgba(0, 212, 170, 0.15) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  opacity: 1;
  z-index: 0;
}

.accordion-item.active .accordion-toggle {
  transform: rotate(45deg);
  background: rgba(0, 212, 170, 0.2);
  color: var(--color-primary-green);
}

.accordion-content p {
  padding: 0 24px 24px 88px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 640px) {
  .accordion-header {
    padding: 20px;
    gap: 12px;
  }

  .accordion-icon {
    width: 40px;
    height: 40px;
  }

  .accordion-icon svg {
    width: 20px;
    height: 20px;
  }

  .accordion-header h3 {
    font-size: 18px;
  }

  .accordion-content p {
    padding: 0 20px 20px 64px;
    font-size: 15px;
  }
}

/* Pattern 6: Icon-First Minimal */
.value-props-pattern-6 {
  padding: 80px 20px;
  background: var(--bg-primary);
}

.value-props-icon-first {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.icon-first-card {
  text-align: center;
  transition: all 0.3s ease;
}

.icon-first-card:hover {
  transform: translateY(-8px);
}

.icon-first-visual {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  color: var(--color-primary-green);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-first-card:hover .icon-first-visual {
  transform: scale(1.1);
  color: #00D4AA;
}

.icon-first-visual svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 20px rgba(0, 212, 170, 0.3));
}

.icon-first-card h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.icon-first-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 1024px) {
  .value-props-icon-first {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}

@media (max-width: 640px) {
  .value-props-icon-first {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .icon-first-visual {
    width: 100px;
    height: 100px;
  }
}

/* Pattern 7: Bento Grid (Asymmetric) */
.value-props-pattern-7 {
  padding: 80px 20px;
  background: rgba(255, 255, 255, 0.02);
}

.value-props-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.bento-card-large {
  grid-column: span 2;
  grid-row: span 2;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.1) 0%, rgba(0, 212, 170, 0.05) 100%);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(0, 212, 170, 0.3);
  border-radius: 24px;
  padding: 48px 40px;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 212, 170, 0.15);
}

.bento-card-large:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 48px rgba(0, 212, 170, 0.25);
}

.bento-card-small {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px 24px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-glass);
}

.bento-card-small:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(0, 212, 170, 0.2);
}

.bento-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 6px 14px;
  background: var(--color-primary-green);
  color: white;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 20px;
}

.bento-card-large h3 {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.bento-card-large p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
}

.bento-card-small h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.bento-card-small p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 1024px) {
  .value-props-bento {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
  }

  .bento-card-large {
    grid-column: span 2;
    grid-row: span 1;
  }
}

@media (max-width: 640px) {
  .value-props-bento {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .bento-card-large {
    grid-column: span 1;
    padding: 32px 24px;
  }

  .bento-card-large h3 {
    font-size: 24px;
  }
}

/* Pattern 8: Interactive Tabs */
.value-props-pattern-8 {
  padding: 80px 20px;
  background: var(--bg-primary);
}

.value-props-tabs {
  max-width: 900px;
  margin: 0 auto;
}

.tabs-navigation {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-btn {
  padding: 12px 24px;
  background: transparent;
  border: none;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  white-space: nowrap;
  border-radius: 8px 8px 0 0;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
  color: var(--color-primary-green);
  background: rgba(0, 212, 170, 0.1);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary-green);
}

.tabs-content {
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 48px 40px;
  min-height: 300px;
  box-shadow: var(--shadow-glass);
}

.tab-panel {
  display: none;
  text-align: center;
  animation: fadeIn 0.4s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  color: var(--color-primary-green);
}

.tab-icon svg {
  width: 100%;
  height: 100%;
}

.tab-panel h3 {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.tab-panel p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

@media (max-width: 640px) {
  .tab-btn {
    padding: 10px 16px;
    font-size: 14px;
  }

  .tabs-content {
    padding: 32px 24px;
    min-height: 250px;
  }

  .tab-icon {
    width: 64px;
    height: 64px;
  }

  .tab-panel h3 {
    font-size: 24px;
  }

  .tab-panel p {
    font-size: 16px;
  }
}

/* Pattern 9: Horizontal Timeline */
.value-props-pattern-9 {
  padding: 80px 20px;
  background: rgba(255, 255, 255, 0.02);
}

.value-props-timeline {
  max-width: 1400px;
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 0;
}

.timeline-track {
  display: flex;
  align-items: center;
  min-width: min-content;
  padding: 0 20px;
}

.horizontal-timeline-card {
  flex-shrink: 0;
  width: 280px;
  background: var(--bg-card);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-glass);
}

.horizontal-timeline-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(0, 212, 170, 0.3);
}

.horizontal-timeline-number {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background: var(--color-primary-green);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.horizontal-timeline-card .value-prop-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  color: var(--color-primary-green);
}

.horizontal-timeline-card .value-prop-icon svg {
  width: 100%;
  height: 100%;
}

.horizontal-timeline-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.horizontal-timeline-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.horizontal-timeline-connector {
  flex-shrink: 0;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, rgba(0, 212, 170, 0.3) 0%, rgba(0, 212, 170, 0.1) 100%);
  position: relative;
}

.horizontal-timeline-connector::after {
  content: '→';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-primary-green);
  font-size: 16px;
}

@media (max-width: 768px) {
  .horizontal-timeline-card {
    width: 240px;
    padding: 28px 20px;
  }

  .horizontal-timeline-connector {
    width: 60px;
  }

  .horizontal-timeline-card h3 {
    font-size: 18px;
  }

  .horizontal-timeline-card p {
    font-size: 14px;
  }
}
