/* Our Story Page Specific Styles */

/* Aurora Background Effect */
.story-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 0;
  overflow: hidden;
  background: linear-gradient(135deg, var(--midnight) 0%, var(--deep) 100%);
}

.aurora-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  animation: float 8s ease-in-out infinite;
}

.aurora-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle at 30% 30%, rgba(47,110,145,.35) 0%, transparent 60%);
  top: -200px;
  left: -200px;
  animation-delay: 0s;
}

.aurora-2 {
  width: 800px;
  height: 400px;
  background: radial-gradient(circle at 70% 20%, rgba(31,138,112,.25) 0%, transparent 60%);
  right: -300px;
  top: -100px;
  animation-delay: -3s;
}

.aurora-3 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle at 50% 50%, rgba(231,183,95,.15) 0%, transparent 60%);
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  animation-delay: -6s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  25% { transform: translateY(-20px) scale(1.05); }
  50% { transform: translateY(-10px) scale(0.95); }
  75% { transform: translateY(-30px) scale(1.02); }
}

/* Hero Grid */
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 600px;
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 1.05;
  margin: 1rem 0;
  background: linear-gradient(135deg, var(--text) 0%, var(--emerald) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  margin: 1.5rem 0;
  line-height: 1.4;
}

.hero-description {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Hero Metrics */
.hero-metrics {
  background: var(--bg-card);
  border: 1px solid var(--ring);
  border-radius: var(--radius);
  padding: 2rem;
  backdrop-filter: blur(10px);
}

.hero-metrics h3 {
  color: var(--text);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.metric {
  text-align: center;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--ring);
  border-radius: var(--radius-sm);
}

.metric-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--emerald);
  margin-bottom: 0.5rem;
}

.metric-label {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Letters Section */
.letters-section {
  background: linear-gradient(180deg, rgba(37,212,143,.08) 0%, transparent 100%);
}

.letters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.letter-card {
  background: var(--bg-card);
  border: 1px solid var(--ring);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  transition: all 0.3s ease;
}

.letter-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.quote-mark {
  position: absolute;
  top: -10px;
  left: 1rem;
  font-size: 4rem;
  color: var(--gold);
  opacity: 0.3;
  font-family: 'Space Grotesk', serif;
}

.letter-card blockquote {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  font-style: italic;
  margin: 0;
  line-height: 1.5;
}

/* Payment Flow Section */
.payment-flow-section {
  background: var(--bg-secondary);
}

.flow-wrapper {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.flow-controls {
  background: var(--bg-card);
  border: 1px solid var(--ring);
  border-radius: var(--radius);
  padding: 2rem;
}

.sector-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.pill {
  padding: 0.6rem 1rem;
  border: 1px solid var(--ring);
  border-radius: 50px;
  background: var(--bg-secondary);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pill.active {
  background: var(--gradient-primary);
  color: var(--midnight);
  border-color: transparent;
}

.pill:hover:not(.active) {
  border-color: var(--emerald);
}

.flow-diagram {
  background: linear-gradient(180deg, var(--bg-secondary), var(--midnight));
  border: 1px solid var(--ring);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1rem;
}

.flow-path {
  stroke: url(#flow-gradient);
  stroke-width: 6;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: drawPath 2s ease forwards;
}

@keyframes drawPath {
  to { stroke-dashoffset: 0; }
}

.flow-node {
  fill: var(--gold);
  stroke: var(--gold);
  stroke-width: 2;
}

.flow-label {
  fill: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.flow-legend {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.legend-chip {
  background: var(--bg-secondary);
  border: 1px solid var(--ring);
  color: var(--muted);
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

.flow-kpis {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.kpi-chip {
  background: rgba(37,212,143,.1);
  border: 1px solid var(--emerald);
  color: var(--emerald);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
}

.flow-note {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.flow-context {
  background: var(--bg-card);
  border: 1px solid var(--ring);
  border-radius: var(--radius);
  padding: 2rem;
}

.flow-context h3 {
  color: var(--text);
  margin-bottom: 1rem;
}

.context-list {
  list-style: none;
  margin-bottom: 2rem;
}

.context-list li {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1rem;
  padding-left: 1rem;
  position: relative;
}

.context-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--emerald);
  font-weight: bold;
}

.context-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.context-metric {
  background: var(--bg-secondary);
  border: 1px solid var(--ring);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}

/* Before/After Comparison - SINGLE CLEAN VERSION */
.before-after-section {
  background: linear-gradient(180deg, rgba(231,183,95,.06) 0%, transparent 100%);
}

.comparison-wrapper {
  margin-top: 2rem;
}

.comparison-container {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--ring);
  background: var(--midnight);
  min-height: 400px;
  width: 100%;
}

.before-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 2rem;
  background: linear-gradient(180deg, #2d1417, #3d1f26);
  min-height: 400px;
  z-index: 1;
}

.after-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 2rem;
  background: linear-gradient(180deg, rgba(15,30,47,1), rgba(12,32,27,1));
  min-height: 400px;
  z-index: 2;
  clip-path: inset(0 50% 0 0);
  transition: clip-path 0.1s ease;
}

.after-overlay {
  display: none;
}

.comparison-handle {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: 4px;
  cursor: ew-resize;
  z-index: 10;
  background: var(--emerald);
  box-shadow: 0 0 0 6px rgba(37,212,143,.2);
}

.handle-bar {
  display: none;
}

.handle-grab {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-secondary);
  border: 2px solid var(--emerald);
  border-radius: 50%;
  padding: 0.8rem;
  color: var(--emerald);
  font-size: 1.2rem;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
}

.handle-grab:hover {
  background: var(--emerald);
  color: var(--midnight);
}

.before-panel h3,
.after-panel h3 {
  color: var(--text);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.before-panel ul,
.after-panel ul {
  list-style: none;
  margin-bottom: 2rem;
}

.before-panel li,
.after-panel li {
  color: var(--muted);
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  position: relative;
}

.before-panel li::before,
.after-panel li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--emerald);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stat {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--ring);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--emerald);
  margin-bottom: 0.3rem;
}

.stat-label {
  color: var(--muted);
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .comparison-container {
    min-height: 300px;
  }
  
  .before-panel,
  .after-panel {
    padding: 1.5rem;
    min-height: 300px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .handle-grab {
    padding: 0.6rem;
    font-size: 1rem;
    width: 2.5rem;
    height: 2.5rem;
  }
}
/* Philosophy Section - CLEANED UP VERSION */
.philosophy-section {
  background: linear-gradient(135deg, var(--midnight) 0%, var(--deep) 100%);
  text-align: center;
}

/* SINGLE Founders Revelation Section - Corrected Variables */
.founders-revelation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--ring);
  border-radius: var(--radius);
  padding: 40px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  max-width: 1000px;
  margin: 0 auto;
}

.revelation-context {
  border-right: 2px solid var(--emerald);
  padding-right: 30px;
}

.context-label {
  font-size: 0.9rem;
  color: var(--emerald);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.context-location {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 5px;
}

.context-year {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
}

.revelation-quote {
  padding-left: 30px;
}

.quote-text {
  font-size: 1.3rem;
  line-height: 1.6;
  color: var(--text);
  font-style: italic;
  margin-bottom: 20px;
  position: relative;
}

.quote-text::before {
  content: '"';
  font-size: 4rem;
  color: var(--emerald);
  position: absolute;
  left: -20px;
  top: -10px;
  opacity: 0.3;
}

.quote-attribution {
  color: var(--emerald);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Vision Section */
.vision-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: start;
  margin-top: 2rem;
}

.vision-content h3 {
  color: var(--text);
  margin: 2rem 0 1rem;
  font-size: 1.5rem;
}

.vision-content p {
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.vision-points {
  list-style: none;
  margin-top: 1.5rem;
}

.vision-points li {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.vision-insights {
  background: var(--bg-card);
  border: 1px solid var(--ring);
  border-radius: var(--radius);
  padding: 2rem;
}

.vision-insights h4 {
  color: var(--text);
  margin-bottom: 1.5rem;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.insight {
  background: var(--bg-secondary);
  border: 1px solid var(--ring);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}

.insight-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.insight-label {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 2rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gradient-primary);
  opacity: 0.3;
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 5rem;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.timeline-item.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.timeline-marker {
  position: absolute;
  left: 1.25rem;
  top: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--emerald);
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 0 4px rgba(37,212,143,0.2);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--ring);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.timeline-content h4 {
  color: var(--emerald);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.timeline-content h5 {
  color: var(--text);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.timeline-content p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .flow-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .vision-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .story-hero {
    padding: 6rem 0;
  }
  
  .letters-grid {
    grid-template-columns: 1fr;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .insights-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .context-metrics {
    grid-template-columns: 1fr;
  }
  
  .timeline::before {
    left: 1rem;
  }
  
  .timeline-item {
    padding-left: 3rem;
  }
  
  .timeline-marker {
    left: 0.75rem;
  }

  /* Founder's Realization Responsive - SINGLE VERSION */
  .founders-revelation {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .revelation-context {
    border-right: none;
    border-bottom: 2px solid var(--emerald);
    padding-right: 0;
    padding-bottom: 20px;
    text-align: center;
  }

  .revelation-quote {
    padding-left: 0;
    padding-top: 20px;
  }

  .quote-text {
    font-size: 1.1rem;
  }

  .quote-text::before {
    left: -15px;
    font-size: 3rem;
  }
}

@media (max-width: 480px) {
  .aurora {
    display: none;
  }
  
  .comparison-container {
    min-height: 300px;
  }
  
  .before-panel,
  .after-panel {
    padding: 1.5rem;
    min-height: 300px;
  }
}

/* === Our Story — Final desktop fix (scoped & safe) === */

/* Text must be allowed to wrap normally */
.section.timeline-section .timeline-content,
.section.timeline-section .timeline-content h4,
.section.timeline-section .timeline-content h5,
.section.timeline-section .timeline-content p {
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
  max-width: 100%;
  box-sizing: border-box;
}

/* Desktop: force a wide, sane layout */
@media (min-width: 1025px) {
  /* Kill any multi-column or weird layout applied by globals */
  .section.timeline-section .timeline {
    max-width: 1200px !important;  /* widen beyond 800px cap */
    width: 100% !important;
    margin: 0 auto;
    /* hard reset layout */
    column-count: initial !important;
    column-gap: normal !important;
    display: grid !important;
    grid-auto-flow: row !important;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)) !important;
    gap: 2rem 3rem !important;
    position: relative;
  }

  /* Ensure each item can actually grow wide */
  .section.timeline-section .timeline-item {
    display: block !important;  /* ignore inline/inline-block/floats */
    float: none !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    padding-left: 5rem;          /* keep space for marker */
    box-sizing: border-box;
  }

  /* Keep the vertical line + marker in place */
  .section.timeline-section .timeline::before { left: 2rem; }
  .section.timeline-section .timeline-marker { left: 1.25rem; }
}