/* ========================================
   SERVICE PRE-PRODUCTION PAGE STYLES
   ======================================== */

/* ── CSS VARIABLES ── */
:root {
  /* Colors */
  --navy-blue: #0A1F44;
  --navy-dark: #071629;
  --white: #FFFFFF;
  --black: #000000;
  --accent-blue: #3B82F6;
  --accent-blue-hover: #2563EB;
  --accent-light: #60A5FA;
  --text-on-navy: #FFFFFF;
  --text-muted-on-navy: rgba(255, 255, 255, 0.75);
  --text-on-white: #111111;
  --text-muted-on-white: #555555;
  --text-on-black: #E5E5E5;
  --text-muted-on-black: #B0B0B0;
  --border-light: #E5E7EB;
  --border-navy: rgba(255, 255, 255, 0.15);
  --border-black: rgba(255, 255, 255, 0.1);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 50px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Fonts */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* ── GLOBAL RESET ── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--text-on-white);
  background: var(--white);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-8);
}

/* ── RIPPLE EFFECT ── */
.ripple-btn {
  position: relative;
  overflow: hidden;
}

.ripple-btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple-anim 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-anim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ── HERO CTA BUTTON ARROW ANIMATION ── */
.service-hero-cta {
  color: #FFFFFF !important;
}

.service-hero-cta span {
  color: #FFFFFF !important;
}

.service-hero-cta * {
  color: #FFFFFF !important;
}

.service-hero-cta .hero-cta-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.service-hero-cta .hero-arrow-icon {
  transition: transform 0.4s ease, stroke 0.3s ease;
  position: relative;
  z-index: 1;
}

.service-hero-cta:hover .hero-cta-icon {
  background: white;
}

.service-hero-cta:hover .hero-arrow-icon {
  stroke: #A855F7;
  stroke-width: 2.5;
  animation: arrowSlide 0.8s ease infinite;
}

.service-hero-cta:hover span {
  color: #FFFFFF !important;
}

@keyframes arrowSlide {
  0% {
    transform: translateX(0);
    opacity: 1;
  }
  45% {
    transform: translateX(10px);
    opacity: 0;
  }
  55% {
    transform: translateX(-10px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ── BUTTONS ── */
.btn-primary {
  background: var(--accent-blue);
  color: var(--white);
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-ghost {
  color: var(--text-on-white);
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  border: 2px solid var(--border-light);
  background: transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-ghost:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.05);
}

/* Button variants for different sections */
.section-navy .btn-primary {
  background: var(--white);
  color: #000000;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
}

.section-navy .btn-primary:hover {
  background: var(--white);
  opacity: 0.92;
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

.section-navy .btn-ghost {
  border-color: var(--border-navy);
  color: var(--white);
}

.section-navy .btn-ghost:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

/* ── EYEBROW PILL ── */
.eyebrow-pill {
  display: inline-block;
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-blue);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(59, 130, 246, 0.2);
  margin-bottom: var(--space-6);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-family: var(--font-body);
}

.section-navy .eyebrow-pill {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-color: var(--border-navy);
}

/* ── SECTION STYLES ── */
section {
  position: relative;
  padding: var(--space-24) 0;
  z-index: 1;
}

.section-navy {
  background: var(--navy-blue);
  color: var(--text-on-navy);
}

.section-white {
  background: var(--white);
  color: var(--text-on-white);
}

/* ── SECTION-SPECIFIC TEXT COLOR ENFORCEMENT ── */
.section-navy h1,
.section-navy h2,
.section-navy h3,
.section-navy h4,
.section-navy h5,
.section-navy h6 {
  color: #FFFFFF !important;
}

.section-navy p {
  color: rgba(255, 255, 255, 0.75) !important;
}

.section-white h1,
.section-white h2,
.section-white h3,
.section-white h4,
.section-white h5,
.section-white h6 {
  color: #111111 !important;
}

.section-white p {
  color: #555555 !important;
}

/* ── HERO SECTION ── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(70px + var(--space-20)) var(--space-8) var(--space-20);
  background: linear-gradient(135deg, var(--navy-blue) 0%, var(--navy-dark) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

/* Hero gradient button animation */
@keyframes gradientShift {
  0%, 100% { background-position: 0% center; }
  50%       { background-position: 100% center; }
}

.hero-gradient-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(96,165,250,0.5);
}

/* ── PARTICLE BACKGROUND ── */
#particles-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.1;
}

/* ── MOBILE RESPONSIVE ── */
@media (max-width: 768px) {
  nav {
    padding: 0 var(--space-4);
    height: 60px;
  }

  section {
    padding: var(--space-16) 0;
  }

  #hero {
    padding: calc(60px + var(--space-16)) var(--space-4) var(--space-16);
  }

  .container {
    padding-left: var(--space-4) !important;
  }

  /* ── PRE-DEPLOYMENT ASSESSMENT SECTION - MOBILE ── */
  
  /* Fix gradient border on mobile */
  .section-white .fade-up > div[style*="padding:2px"] {
    padding: 1.5px !important;
    box-sizing: border-box !important;
  }

  /* Reduce outer card padding */
  .section-white .fade-up[style*="padding:3rem"] {
    padding: 1.5rem !important;
  }

  /* Stack main grid to single column */
  .section-white div[style*="grid-template-columns:1fr 1fr"][style*="gap:4rem"] {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Assessment Card - reduce padding */
  .section-white div[style*="background:#FFFFFF"][style*="padding:2.5rem"] {
    padding: 1.5rem !important;
  }

  /* Title section */
  .section-white div[style*="background:#FFFFFF"] h2 {
    font-size: 1.25rem !important;
    margin-bottom: 1rem !important;
  }

  /* NO-GO Badge - reduce size */
  #no-go-badge {
    padding: 0.5rem 1rem !important;
    font-size: 0.75rem !important;
  }

  #no-go-badge svg {
    width: 16px !important;
    height: 16px !important;
  }

  /* Inner cards grid - keep side by side but compact */
  .section-white div[style*="grid-template-columns:1fr 1fr"][style*="gap:1.5rem"] {
    gap: 1rem !important;
  }

  /* Vulnerability Breakdown card */
  .section-white div[style*="background:#E5E7E3"][style*="padding:1.5rem"] {
    padding: 1rem !important;
  }

  .section-white div[style*="background:#E5E7E3"] > div:first-child {
    font-size: 0.75rem !important;
    margin-bottom: 0.75rem !important;
  }

  .section-white div[style*="background:#E5E7E3"] span {
    font-size: 0.75rem !important;
  }

  /* Safety Confidence Score - reduce size */
  #confidence-score {
    font-size: 2.5rem !important;
  }

  .section-white div[style*="text-align:center"][style*="padding:2rem"] {
    padding: 1rem !important;
  }

  .section-white div[style*="text-align:center"] > div:last-child {
    font-size: 0.75rem !important;
  }

  /* Bar Chart - reduce height */
  .section-white div[style*="height:120px"] {
    height: 60px !important;
    margin-top: 1rem !important;
  }

  .chart-bar {
    border-radius: 6px 6px 0 0 !important;
  }

  /* Features List - reduce sizes */
  .feature-item {
    gap: 1rem !important;
  }

  .feature-item > div:first-child {
    width: 24px !important;
    height: 24px !important;
  }

  .feature-item svg {
    width: 14px !important;
    height: 14px !important;
  }

  .feature-item h3 {
    font-size: 1rem !important;
    margin-bottom: 0.25rem !important;
  }

  .feature-item p {
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
  }

  .section-white div[style*="gap:2rem"][style*="flex-direction:column"] {
    gap: 1.25rem !important;
  }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  /* Stack to single column on tablet too */
  .section-white div[style*="grid-template-columns:1fr 1fr"][style*="gap:4rem"] {
    grid-template-columns: 1fr !important;
    gap: 3rem !important;
  }

  /* Reduce padding slightly */
  .section-white .fade-up[style*="padding:3rem"] {
    padding: 2rem !important;
  }

  .section-white div[style*="background:#FFFFFF"][style*="padding:2.5rem"] {
    padding: 2rem !important;
  }

  /* Reduce title size */
  .section-white div[style*="background:#FFFFFF"] h2 {
    font-size: 1.5rem !important;
  }

  /* Reduce bar chart height */
  .section-white div[style*="height:120px"] {
    height: 90px !important;
  }
}

/* ── ACCESSIBILITY ── */
.skip-to-main {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--accent-blue);
  color: var(--white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  z-index: 99999;
  transition: top var(--transition-base);
}

.skip-to-main:focus {
  top: var(--space-4);
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

a:focus,
button:focus {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* ── UTILITY CLASSES ── */
.text-center {
  text-align: center;
}

#main-content {
  position: relative;
  z-index: 1;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body.reduce-motion .fade-up {
  opacity: 1 !important;
  transform: none !important;
}

/* Enhanced fade-up animation */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}


/* ========================================
   SILENT TRAP CARDS SECTION
   ======================================== */

.silent-trap-card {
  position: relative;
  cursor: pointer;
  background: #FFFFFF;
}

.silent-trap-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #60A5FA 0%, #A855F7 50%, #EC4899 100%);
  border-radius: 16px;
  padding: 2px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.silent-trap-card:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.silent-trap-card:hover::before {
  opacity: 1;
}

.silent-trap-card:hover .card-number {
  background: linear-gradient(135deg, #60A5FA 0%, #A855F7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS FOR CARDS
   ======================================== */

@media (max-width: 1024px) {
  .container > div[style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
  }
  
  .silent-trap-card {
    margin-bottom: 1.5rem;
  }
}


/* ========================================
   METHODOLOGY SECTION STYLES
   ======================================== */

.section-black {
  background: #000;
  color: #E5E5E5;
}

/* ── METHODOLOGY HORIZONTAL SCROLL ── */
.methodology-scroll-container::-webkit-scrollbar {
  display: none;
}

.methodology-card-horizontal {
  transition: all 0.3s ease;
  cursor: pointer;
}

/* ── METHODOLOGY SECTION - MOBILE RESPONSIVE ── */
@media (max-width: 768px) {
  #methodology-section {
    padding: 4rem 1rem !important;
  }

  #methodology-section h2 {
    font-size: 1.5rem !important;
    margin-bottom: 2.5rem !important;
  }

  /* Adjust card width for mobile */
  .methodology-card-horizontal {
    flex: 0 0 320px !important;
    min-height: 300px !important;
    padding: 1.75rem !important;
    /* Apply hover state by default on mobile */
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: none !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    position: relative !important;
  }

  /* Add gradient border by default on mobile using pseudo-element */
  .methodology-card-horizontal::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    border-radius: 16px !important;
    padding: 1.5px !important;
    background: linear-gradient(135deg, #60A5FA 0%, #EC4899 100%) !important;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask-composite: exclude !important;
    pointer-events: none !important;
    z-index: 0 !important;
  }

  /* Ensure content is above the gradient border */
  .methodology-card-horizontal > * {
    position: relative !important;
    z-index: 1 !important;
  }

  /* Ensure equal border weight on all sides for mobile */
  .methodology-card-horizontal .gradient-border-overlay {
    padding: 1.5px !important;
    box-sizing: border-box !important;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0) !important;
    -webkit-mask-composite: xor !important;
    mask-composite: exclude !important;
  }

  /* Ensure card border-radius matches for proper corner display */
  .methodology-card-horizontal {
    border-radius: 16px !important;
    overflow: visible !important;
  }

  /* Apply gradient to card number by default on mobile */
  .methodology-card-horizontal .card-number-horizontal {
    font-size: 3rem !important;
    background: linear-gradient(135deg, #60A5FA 0%, #A855F7 100%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    -webkit-text-stroke: 0 !important;
    text-shadow: none !important;
  }

  .methodology-card-horizontal h3 {
    font-size: 1.125rem !important;
  }

  .methodology-card-horizontal p {
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
  }

  /* Adjust timeline width for mobile card sizes */
  .horizontal-timeline-line {
    width: calc(320px * 4 + 2rem * 3) !important;
  }

  .horizontal-timeline-segment {
    max-width: calc(320px * 4 + 2rem * 3) !important;
  }

  .horizontal-ending-circle {
    left: calc(320px * 4 + 2rem * 3) !important;
  }

  /* Adjust timeline circle positions */
  .horizontal-timeline-circle:nth-child(1) {
    margin-left: 150px !important;
  }

  .horizontal-timeline-circle:nth-child(2) {
    margin-left: 310px !important;
  }

  .horizontal-timeline-circle:nth-child(3) {
    margin-left: 310px !important;
  }

  .horizontal-timeline-circle:nth-child(4) {
    margin-left: 310px !important;
  }
}

/* Tablet adjustments for Methodology */
@media (min-width: 769px) and (max-width: 1024px) {
  .methodology-card-horizontal {
    flex: 0 0 420px !important;
    padding: 2rem !important;
  }

  .methodology-card-horizontal .card-number-horizontal {
    font-size: 3.5rem !important;
  }

  .methodology-card-horizontal h3 {
    font-size: 1.125rem !important;
  }

  .methodology-card-horizontal p {
    font-size: 0.9rem !important;
  }

  /* Adjust timeline width for tablet card sizes */
  .horizontal-timeline-line {
    width: calc(420px * 4 + 2rem * 3) !important;
  }

  .horizontal-timeline-segment {
    max-width: calc(420px * 4 + 2rem * 3) !important;
  }

  .horizontal-ending-circle {
    left: calc(420px * 4 + 2rem * 3) !important;
  }

  /* Adjust timeline circle positions */
  .horizontal-timeline-circle:nth-child(1) {
    margin-left: 200px !important;
  }

  .horizontal-timeline-circle:nth-child(2) {
    margin-left: 400px !important;
  }

  .horizontal-timeline-circle:nth-child(3) {
    margin-left: 400px !important;
  }

  .horizontal-timeline-circle:nth-child(4) {
    margin-left: 400px !important;
  }
}


/* ========================================
   AI PROMISE SECTION
   ======================================== */

.ai-promise-section {
  padding: 6rem 0;
  background: #172443;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.ai-promise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1400px;
  margin: 0 auto;
  align-items: center;
}

.ai-promise-content {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.ai-promise-content.animate-in {
  opacity: 1;
  transform: translateX(0);
}

.ai-promise-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 2rem;
  color: #fff;
}

.ai-promise-description {
  font-size: 1.125rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.ai-promise-cta {
  display: inline-block;
  background: linear-gradient(90deg, #60A5FA 0%, #A855F7 100%);
  color: #fff;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(96, 165, 250, 0.4);
}

.ai-promise-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(96, 165, 250, 0.6);
}

.ai-promise-image {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  padding-right: 2rem;
  margin-left: 3rem;
}

.ai-promise-image.animate-in {
  opacity: 1;
  transform: translateX(0);
}

.ai-promise-image::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, rgba(96, 165, 250, 0.3) 30%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  animation: siri-wave 4s ease-in-out infinite;
  filter: blur(40px);
}

.ai-promise-image img {
  max-width: 120%;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
  animation: rotate-sphere 20s linear infinite;
  transform-origin: center center;
  margin-right: -3rem;
  margin-top: -2rem;
}

@keyframes rotate-sphere {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes siri-wave {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(0.8);
    opacity: 0;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .ai-promise-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .ai-promise-image {
    margin-left: 0;
    padding-right: 0;
    justify-content: center;
  }
  
  .ai-promise-image img {
    margin-right: 0;
    margin-top: 0;
    max-width: 100%;
  }
}


/* ========================================
   PRE-DEPLOYMENT ASSESSMENT ANIMATIONS
   ======================================== */

/* Blinking animation for NO-GO badge */
@keyframes blink-badge {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.blink-animation {
  animation: blink-badge 0.8s ease-in-out infinite;
}
