/* ================================
   Global Base Styles
   ================================ */
body {
  margin: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0e1628;
  color: white;
  font-family: 'Segoe UI', Arial, sans-serif;
}

.main {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* ================================
   Left Panel (Persistent WittyHead)
   ================================ */
.left-panel {
  width: 25%;
  position: relative;
  border-right: 1px solid #333;
  background: #0e1628;
  overflow: hidden;
}

.left-panel iframe,
.left-panel .fallback {
  width: 100%;
  height: 100%;
  border: none;
  position: absolute;
  top: 0;
  left: 0;
  object-fit: cover;
}

.left-panel iframe {
  z-index: 2;
}

.left-panel iframe.hidden {
  display: none;
}

.left-panel .fallback {
  z-index: 1;
}

/* ================================
   Footer Navigation
   ================================ */
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: #162236;
  border-top: 1px solid #333;
  gap: 10px;
}
.footer button {
  background: #1e2a3f;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background 0.3s;
}
.footer button:hover {
  background: #2c3a55;
}
.footer button.active {
  background: #4cafef;
  font-weight: bold;
}
.footer .nav-arrows {
  font-size: 1.2rem;
  cursor: pointer;
  margin: 0 6px;
}

/* ================================
   Right Panel (Slides Area)
   ================================ */
.right-panel {
  flex: 1;
  display: flex;
  padding: 20px;
  box-sizing: border-box;
  min-width: 0;
}

.slide-content {
  width: 100%;
  height: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 2rem;
  box-sizing: border-box;
  text-align: center;
  display: none;       /* hidden by default */
  gap: 2rem;
  overflow-y: auto;
}
.slide-content.active {
  display: flex;       /* show only the active slide */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.6s ease;
}

/* ================================
   Titles & Subtitles
   ================================ */
.slide-title {
  font-size: 3rem;
  background: linear-gradient(90deg, #00f5ff, #4cafef);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 25px rgba(0, 245, 255, 0.6);
  margin-bottom: 1rem;
}
.slide-subtitle {
  font-size: 2rem;
  color: #ccc;
  margin-bottom: 1rem;
}

/* ================================
   Feature Grids & Cards
   ================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  justify-items: center;
}

.feature-card-with-pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.feature-card {
  background: rgba(255, 255, 255, 0.07);
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.25);
  font-size: 0.7rem;
  line-height: 1.5;
  transition: transform 0.2s;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.feature-card:hover {
  transform: scale(1.05);
}

.base-feature {
  background: rgba(0, 245, 255, 0.2);
  border: 2px solid rgba(0, 245, 255, 0.6);
  border-radius: 8px;
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  color: #00f5ff;
  font-size: 1.5rem;
  font-weight: bold;
}

.pillar {
  width: 50%;
  height: 100px;
  position: relative;
  margin: -5px auto 0 auto;
  display: flex;
  flex-direction: column;
}

/* ================================
   Slide 3 Specific Layout
   ================================ */
#slide3.slide-content.active {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  height: 100%;
  overflow-y: auto;
  padding: 1rem 2rem;
  gap: 0;
}

#slide3 .slide3-content {
  display: flex;
  flex-direction: column-reverse;
  width: 100%;
  flex: 1;
  gap: 0;
}

#slide3 .slide-title {
  margin-bottom: 0.25rem;
}

#slide3 .slide-subtitle {
  margin-bottom: 0.5rem;
}

#slide3-1 .slide-title {
  padding-top: 5px;
  padding-bottom: 5px;
  margin: 0;
}

#slide3-1 .slide-subtitle {
  padding-top: 5px;
  padding-bottom: 5px;
  margin: 0;
}

#slide3-1 .multiline-title {
  font-size: clamp(0.54rem, 0.72vw, 0.72em) !important;
}

#slide3-1 .multiline-title::first-line {
  font-size: clamp(0.81rem, 1.08vw, 1.35em) !important;
}

#slide3-1 #pillars-layer .timeline-step .feature-card .multiline-title {
  padding-left: 2%;
  padding-right: 2%;
}

#slide3 .pillars-timeline {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  width: 100%;
  flex-shrink: 0;
  transition: height 0.6s ease-out;
  margin-bottom: 0;
}

#slide3 .pillars-timeline .timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: height 0.6s ease-out;
  overflow: visible;
  height: 100%;
}

#slide3 .pillars-timeline .multiline-title {
  height: 2em;
  flex-shrink: 0;
  font-size: clamp(0.55rem, 0.65vw, 0.7em);
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#slide3 .pillars-timeline .multiline-title::first-line {
  font-size: clamp(0.8rem, 0.95vw, 1.15em);
  line-height: 1.1;
}

#slide3 .layer-timeline {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  height: 1.5em;
}

#slide3 .layer-timeline .timeline-step {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#slide3 .layer-timeline .multiline-title {
  height: 100%;
  font-size: clamp(0.55rem, 0.65vw, 0.7em);
  line-height: 1.3;
  display: flex;
  align-items: center;
  justify-content: center;
}

#slide3 .ai-base {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  height: 80px;
  opacity: 1;
  visibility: visible;
  background: rgba(0, 245, 255, 0.2);
  border: 2px solid rgba(0, 245, 255, 0.6);
  border-radius: 8px;
}

#slide3 .ai-base .timeline-step {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#slide3 .ai-base .multiline-title {
  height: 100%;
  font-size: clamp(1.5rem, 2vw, 2.5em) !important;
  line-height: 1.3;
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #00f5ff !important;
  font-weight: bold !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#slide3 .storytelling {
  margin-top: 8px;
  flex-shrink: 0;
}

/* Animated pillars for slide 3 - synchronized stretching */
.pillar-animated {
  transition: height 0.6s ease-out;
  width: 80px;
  margin: 0 auto;
  flex-shrink: 0;
  height: calc(100% - 2em);
  min-height: 50px;
}

.pillar-animated::after {
  height: calc(100% - 30px);
}

.pillar-animated {
  background: linear-gradient(to bottom,
    transparent 0%,
    transparent calc(100% - 15px),
    rgba(0, 245, 255, 0.5) calc(100% - 15px),
    rgba(0, 245, 255, 0.4) 100%);
}

/* Layer 1: Initial state - Pillars reach bottom */
.pillars-timeline[data-layer="1"] {
  flex: 1;
  min-height: 37vh;
}

/* Layer 2: After first reveal */
.pillars-timeline[data-layer="2"] {
  flex: 0 0 27vh;
}

/* Layer 3: After second reveal */
.pillars-timeline[data-layer="3"] {
  flex: 0 0 19vh;
}

/* Layer 4: Final state */
.pillars-timeline[data-layer="4"] {
  flex: 0 0 11vh;
}

/* Capital (top) */
.pillar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 110%;
  height: 15px;
  background: linear-gradient(to bottom,
    rgba(0, 245, 255, 0.6),
    rgba(0, 245, 255, 0.4));
  border-radius: 3px;
  box-shadow:
    0 0 15px rgba(0, 245, 255, 0.5),
    inset 0 2px 5px rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(0, 245, 255, 0.7);
}

/* Shaft (body) - fluted column effect */
.pillar::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 70px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(0, 245, 255, 0.3) 0px,
      rgba(0, 245, 255, 0.15) 5px,
      rgba(0, 245, 255, 0.25) 10px,
      rgba(0, 245, 255, 0.15) 15px,
      rgba(0, 245, 255, 0.3) 20px
    ),
    linear-gradient(to bottom,
      rgba(0, 245, 255, 0.35),
      rgba(0, 245, 255, 0.2));
  box-shadow:
    inset 0 0 10px rgba(0, 245, 255, 0.3),
    0 0 15px rgba(0, 245, 255, 0.2);
  border-left: 2px solid rgba(0, 245, 255, 0.5);
  border-right: 2px solid rgba(0, 245, 255, 0.5);
  transition: height 0.6s ease-out;
}

/* Base */
.pillar {
  background: linear-gradient(to bottom,
    transparent 0%,
    transparent 85px,
    rgba(0, 245, 255, 0.5) 85px,
    rgba(0, 245, 255, 0.4) 100%);
}

.pillar > * {
  position: relative;
  z-index: 1;
}

.highlight {
  color: #00f5ff;
  font-weight: bold;
}

/* ================================
   Storytelling Block
   ================================ */
.storytelling {
  margin-top: 15px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  font-style: italic;
  font-size: 1.1rem;
  color: #ccc;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

#slide4 .split {
  width: 100%;
  box-sizing: border-box;
}

#slide4 .split .feature-card {
  max-width: calc((100% - 2rem) / 3);
  flex: 1 1 auto;
  font-size: 1.4rem;
}

#slide9 .feature-card {
  font-size: 1.05rem;
}

#slide10 .feature-card {
  font-size: 1.05rem;
}

#slide11 .feature-card {
  font-size: 1.05rem;
}

#slide12 .feature-card {
  font-size: 1.05rem;
}

#slide13 .feature-card {
  font-size: 1.05rem;
}

#slide14 .feature-card {
  font-size: 1.05rem;
}

/* ================================
   Tooltip Styles (for Pillars, Domains)
   ================================ */
.tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.tooltip .tooltiptext {
  visibility: hidden;
  width: 300px;
  background: rgba(20, 30, 50, 0.95);
  color: #fff;
  text-align: left;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 245, 255, 0.4);
  position: absolute;
  z-index: 10;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
}
.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* ================================
   Timeline Steps
   ================================ */
.timeline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 1.5rem);
  margin: 2rem 0;
  padding: 0;
  width: 100%;
  box-sizing: border-box;
}

/* ================================
   Semantic Timeline (Slide 2 - parallel timeline)
   ================================ */
.timeline-semantic {
  margin-top: 1rem;
  opacity: 0;
}

.semantic-step {
  background: rgba(255, 165, 0, 0.1);
  box-shadow: 0 0 18px rgba(255, 165, 0, 0.4);
}

.semantic-step .multiline-title {
  --heading-color: #ffa500;
  --heading-shadow: 0 0 15px rgba(255, 165, 0, 0.6);
}

.onto-tooltip {
  width: 320px;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Animation states for semantic steps */
.semantic-step.fade-out {
  opacity: 0 !important;
  visibility: hidden;
  transform: translateY(-20px);
  transition: opacity 0.6s ease, transform 0.6s ease, visibility 0s 0.6s;
}

.semantic-step.move-to-main {
  transform: translateY(-100px);
  transition: transform 0.8s ease;
}

/* ================================
   Timeline Steps (Slide 3)
   ================================ */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

.timeline-step {
  opacity: 0;
  transform: translateX(40px);
  background: rgba(0, 245, 255, 0.1);
  padding: clamp(8px, 1.2vw, 14px) clamp(12px, 1.8vw, 20px);
  border-radius: 12px;
  font-size: clamp(0.9rem, 1.4vw, 1.4rem);
  font-weight: bold;
  color: #ffffff;
  box-shadow: 0 0 18px rgba(0, 245, 255, 0.4);
  transition: opacity 0.6s ease, transform 0.6s ease, background 0.25s ease;
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  box-sizing: border-box;
}

/* Active step = visible */
.timeline-step.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-step.reveal {
  opacity: 1;
  transform: translateX(0);
  background: rgba(0, 245, 255, 0.25); 
  animation: slideInRight 0.6s ease forwards;
}

.timeline-step:hover {
  transform: translateY(-2px) scale(1.08);
  background: rgba(0, 245, 255, 0.25);
}

/* ================================
   Runner Tooltips (Slide 2 and 3)
   ================================ */
.timeline-step .runner-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 30, 50, 0.95);
  padding: 8px;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0,245,255,0.4);
  z-index: 100;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  text-align: center;
  pointer-events: none;
}

.timeline-step:hover .runner-tooltip {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.runner-tooltip img {
  display: block;
  max-width: 240px;
  height: auto;
  margin: 0 auto 6px auto;
}

.runner-tooltip p {
  font-size: 0.9rem;
  color: #fff;
  margin: 0;
}

/* ================================
   Split Layout (for side-by-side slides)
   ================================ */
.split {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}
.split .left,
.split .right {
  flex: 1;
  min-width: 0;
}
.split img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0, 245, 255, 0.25);
}

/* ================================
   Animation Helpers
   ================================ */
.fade-in {
  opacity: 0;
  animation: fadeIn 1s forwards;
}
@keyframes fadeIn {
  to { opacity: 1; }
}
.stagger > * {
  opacity: 0;
  animation: fadeIn 0.8s forwards;
}
.stagger > *:nth-child(1) { animation-delay: 0.2s; }
.stagger > *:nth-child(2) { animation-delay: 0.4s; }
.stagger > *:nth-child(3) { animation-delay: 0.6s; }
.stagger > *:nth-child(4) { animation-delay: 0.8s; }

.slide-in-left {
  opacity: 0;
  transform: translateX(-40px);
  animation: slideInLeft 0.8s forwards;
}
@keyframes slideInLeft {
  to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
  opacity: 0;
  transform: translateX(40px);
  animation: slideInRight 0.8s forwards;
}
@keyframes slideInRight {
  to { opacity: 1; transform: translateX(0); }
}

@keyframes riseUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ================================
   Tooltip for videos
   ================================ */
.tooltip {
  position: relative;
}

.tooltip-bubble {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  background: #0e1628;
  padding: 8px;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0,245,255,0.4);
  z-index: 1000;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tooltip:hover .tooltip-bubble {
  visibility: visible;
  opacity: 1;
}

/* ================================
   Slide page separation a-la PPTX
   ================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Reduce avatar preview images (EddieM.jpg, BrianK.jpg) to 50% size */
.hover-video img {
  max-width: 50%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* ================================
   Left Panel Fallback Image
   ================================ */
.left-panel .fallback img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ================================
   Tooltip Video Above Base Video
   ================================ */
.tooltip-video {
  position: relative;
  display: inline-block;
  margin: 0 20px;
}

.tooltip-video > video {
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0,245,255,0.25);
  display: block;
}

/* Tooltip bubble (hidden video by default) */
.tooltip-bubble {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 110%;  /* show above the base video */
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;   /* ensure it's above */
  transition: opacity 0.3s ease;
  pointer-events: none; /* prevent accidental blocking */
}

.tooltip-bubble video {
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,245,255,0.6);
  display: block;
  max-width: 280px; /* adjust size of hover video */
  height: auto;
}

/* On hover, show tooltip video */
.tooltip-video:hover .tooltip-bubble {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

/* ================================
   Bullet Points with Animation (Slide 11)
   ================================ */
.bullet-points {
  list-style-type: disc;
  text-align: left;
  font-size: 1.4rem;
  color: #fff;
  padding-left: 2rem;
}

.bullet-points li {
  opacity: 0;
  animation: fadeInUp 0.8s forwards;
  margin-bottom: 0.8rem;
}

.bullet-points li:nth-child(1) { animation-delay: 0.3s; }
.bullet-points li:nth-child(2) { animation-delay: 0.6s; }
.bullet-points li:nth-child(3) { animation-delay: 0.9s; }

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

/* Closing slide grid styling */
.closing-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: 1.5rem;
}

.closing-grid .feature-card {
  flex: 1 1 auto;
  max-width: 250px;
  text-align: center;
}

/* ================================
   Multi-line Title (for feature-card, timeline-step, etc.)
   ================================ */
.multiline-title {
  display: block;
  text-align: center;
  font-weight: bold;
  line-height: 1.4;
  /* Use CSS variables for flexible theming */
  --heading-color: #00f5ff;
  --heading-shadow: 0 0 15px rgba(0, 245, 255, 0.6);
  --subtext-color: #ccc;
  font-size: clamp(0.6rem, 0.8vw, 0.8em);
  color: var(--subtext-color);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.multiline-title::first-line {
  font-size: clamp(0.9rem, 1.2vw, 1.5em);
  color: var(--heading-color);
  text-shadow: var(--heading-shadow);
  font-weight: bold;
  line-height: 1.2;
}

/* Dark background variant */
.feature-card.dark .multiline-title,
.timeline-step.dark .multiline-title {
  --heading-color: #ffffff;
  --heading-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  --subtext-color: #e0e0e0;
}

/* Light background variant */
.feature-card.light .multiline-title,
.timeline-step.light .multiline-title {
  --heading-color: #004d66;
  --heading-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
  --subtext-color: #333;
}

/* ================================
   TODO Note Style
   ================================ */
.todo-note {
  background: rgba(255, 100, 100, 0.15);
  border-left: 4px solid #ff4444;
  padding: 15px 20px;
  margin: 20px 0;
  border-radius: 8px;
  font-size: 1.2rem;
  color: #fff;
}

.todo-note::before {
  content: "TODO: ";
  font-size: 1.4rem;
  font-weight: bold;
  color: #ff4444;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
  margin-right: 8px;
}
