/* =====================================================
   TOYOTA BEC CASE STUDY — CINEMATIC STYLESHEET
   ===================================================== */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --toyota-red: #eb0a1e;
  --toyota-dark-red: #9e0014;
  --accent-gold: #c9a84c;
  --accent-orange: #e85d04;
  --bg-void: #040408;
  --bg-deep: #080b12;
  --bg-panel: #0d1117;
  --bg-card: #111827;
  --border-glow: rgba(235, 10, 30, 0.4);
  --border-subtle: rgba(255, 255, 255, 0.07);
  --text-primary: #f0f4ff;
  --text-secondary: #8899bb;
  --text-muted: #445566;
  --text-accent: #eb0a1e;
  --glow-red: 0 0 20px rgba(235, 10, 30, 0.5), 0 0 60px rgba(235, 10, 30, 0.15);
  --glow-gold: 0 0 20px rgba(201, 168, 76, 0.4);
  --font-display: 'Orbitron', monospace;
  --font-body: 'Rajdhani', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --font-text: 'Inter', sans-serif;
  --slide-duration: 0.8s;
  --ease-cinematic: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow: hidden;
  width: 100vw;
  height: 100vh;
}

/* ========== NOISE OVERLAY ========== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* ========== LOADING SCREEN ========== */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-void);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  flex-direction: column;
  gap: 32px;
}

.loading-screen.fade-out {
  animation: fadeOut 0.8s var(--ease-cinematic) forwards;
}

.loading-logo {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--toyota-red);
  text-shadow: var(--glow-red);
  letter-spacing: 0.15em;
  animation: logoPulse 2s ease-in-out infinite;
}

.loading-bar-container {
  width: 300px;
  height: 2px;
  background: rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--toyota-red), var(--accent-gold));
  animation: loadBar 2.5s var(--ease-cinematic) forwards;
  box-shadow: 0 0 10px rgba(235, 10, 30, 0.8);
}

.loading-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  animation: blink 1s step-end infinite;
}

/* ========== INTRO CINEMATIC ========== */
.intro-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-void);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
}

.intro-screen.exiting {
  animation: introExit 1.2s var(--ease-cinematic) forwards;
}

.intro-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.intro-particle {
  position: absolute;
  width: 1px;
  height: 100px;
  background: linear-gradient(to bottom, transparent, var(--toyota-red), transparent);
  opacity: 0;
  animation: particleFall linear infinite;
}

.intro-scanline {
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--toyota-red) 50%, transparent);
  opacity: 0;
  animation: scanSweep 3s ease-in-out 1s forwards;
  box-shadow: 0 0 20px rgba(235, 10, 30, 0.8);
}

.intro-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

.intro-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--toyota-red);
  letter-spacing: 0.3em;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.5s forwards;
  text-transform: uppercase;
}

.intro-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 7rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  opacity: 0;
  animation: titleReveal 1.2s var(--ease-cinematic) 0.8s forwards;
  position: relative;
}

.intro-title span.red {
  color: var(--toyota-red);
  text-shadow: var(--glow-red);
}

.intro-title-line {
  display: block;
  overflow: hidden;
}

.intro-subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 2vw, 1.4rem);
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-top: 20px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 1.8s forwards;
}

.intro-divider {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--toyota-red), transparent);
  margin: 28px auto;
  opacity: 0;
  animation: expandLine 0.8s ease 1.4s forwards;
}

.intro-meta {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-top: 32px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 2.2s forwards;
}

.intro-meta-item {
  text-align: center;
}

.intro-meta-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 4px;
}

.intro-meta-value {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 600;
}

.intro-enter-btn {
  margin-top: 48px;
  padding: 14px 48px;
  background: transparent;
  border: 1px solid var(--toyota-red);
  color: var(--toyota-red);
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  animation: fadeInUp 0.8s ease 2.6s forwards;
  position: relative;
  overflow: hidden;
}

.intro-enter-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--toyota-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.intro-enter-btn:hover::before {
  transform: scaleX(1);
}

.intro-enter-btn:hover {
  color: white;
}

.intro-enter-btn span {
  position: relative;
  z-index: 1;
}

/* ========== MAIN PRESENTATION ========== */
.presentation {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* ========== SLIDE CONTAINER ========== */
.slides-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s var(--ease-cinematic);
  transform: translateY(30px);
}

.slide.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.slide.exiting {
  opacity: 0;
  transform: translateY(-30px);
  pointer-events: none;
}

/* ========== SLIDE LAYOUT ========== */
.slide-inner {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  height: 100vh;
  overflow: hidden;
}

/* ========== SLIDE HEADER ========== */
.slide-header {
  padding: 28px 60px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(4,4,8,0.95) 0%, rgba(8,11,18,0) 100%);
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.slide-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.slide-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--toyota-red);
  letter-spacing: 0.15em;
  padding: 4px 10px;
  border: 1px solid rgba(235, 10, 30, 0.3);
}

.slide-category {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.slide-header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.slide-header-right {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-align: right;
}

/* ========== SLIDE BODY ========== */
.slide-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 40px 60px 60px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--toyota-red) transparent;
}

.slide-body::-webkit-scrollbar {
  width: 3px;
}

.slide-body::-webkit-scrollbar-track {
  background: transparent;
}

.slide-body::-webkit-scrollbar-thumb {
  background: var(--toyota-red);
}

/* ========== SLIDE TITLE STYLES ========== */
.slide-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--toyota-red);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0;
  animation: none;
}

.slide.active .slide-eyebrow {
  animation: fadeInUp 0.6s ease 0.1s forwards;
}

.slide-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 4rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 8px;
  opacity: 0;
}

.slide.active .slide-title {
  animation: titleSlideIn 0.8s var(--ease-cinematic) 0.2s forwards;
}

.slide-title .highlight {
  color: var(--toyota-red);
}

.slide-title-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--toyota-red), transparent);
  margin: 16px 0 32px;
  opacity: 0;
}

.slide.active .slide-title-line {
  animation: expandLine 0.6s ease 0.6s forwards;
}

/* ========== CONTENT CARDS ========== */
.content-grid {
  display: grid;
  gap: 20px;
}

.content-grid-2 { grid-template-columns: 1fr 1fr; }
.content-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.content-grid-2-1 { grid-template-columns: 2fr 1fr; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 28px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.slide.active .card {
  animation: cardReveal 0.6s var(--ease-cinematic) forwards;
}

.card:hover {
  border-color: rgba(235, 10, 30, 0.3);
  box-shadow: 0 0 30px rgba(235, 10, 30, 0.08);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--toyota-red);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s ease;
}

.card:hover::before {
  transform: scaleY(1);
}

.card-red-top::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--toyota-red), transparent);
}

.card-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--toyota-red);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(235,10,30,0.2);
}

.card-title {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.card-text {
  font-family: var(--font-text);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========== STAT BLOCKS ========== */
.stat-block {
  text-align: center;
  padding: 32px 20px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  position: relative;
  opacity: 0;
}

.slide.active .stat-block {
  animation: cardReveal 0.6s ease forwards;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  color: var(--toyota-red);
  text-shadow: var(--glow-red);
  line-height: 1;
  display: block;
  margin-bottom: 8px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.stat-sublabel {
  font-family: var(--font-text);
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ========== TIMELINE ========== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--toyota-red), transparent);
}

.timeline-item {
  display: flex;
  gap: 24px;
  padding: 0 0 28px 0;
  opacity: 0;
}

.slide.active .timeline-item {
  animation: fadeInUp 0.5s ease forwards;
}

.timeline-dot {
  width: 48px;
  height: 48px;
  border: 1px solid var(--toyota-red);
  background: var(--bg-void);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--toyota-red);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.timeline-content {
  flex: 1;
  padding-top: 8px;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--toyota-red);
  letter-spacing: 0.15em;
  margin-bottom: 4px;
}

.timeline-title {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.timeline-desc {
  font-family: var(--font-text);
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== ATTACK FLOW ========== */
.attack-flow {
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
}

.flow-step {
  flex: 1;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  padding: 24px 20px;
  position: relative;
  text-align: center;
  opacity: 0;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%, 20px 50%);
  margin-right: -1px;
  transition: background 0.3s ease;
}

.flow-step:first-child {
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 50%, calc(100% - 20px) 100%, 0 100%);
}

.flow-step:last-child {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 20px 50%);
}

.flow-step:hover {
  background: rgba(235, 10, 30, 0.08);
}

.slide.active .flow-step {
  animation: cardReveal 0.5s ease forwards;
}

.flow-step-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: rgba(235, 10, 30, 0.2);
  line-height: 1;
  margin-bottom: 8px;
}

.flow-step-title {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.flow-step-desc {
  font-family: var(--font-text);
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========== THREAT METER ========== */
.threat-item {
  margin-bottom: 20px;
  opacity: 0;
}

.slide.active .threat-item {
  animation: fadeInUp 0.5s ease forwards;
}

.threat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.threat-name {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.threat-pct {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--toyota-red);
}

.threat-bar-track {
  height: 4px;
  background: rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
}

.threat-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--toyota-red), var(--accent-gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease-cinematic);
  box-shadow: 0 0 8px rgba(235, 10, 30, 0.5);
}

.slide.active .threat-bar-fill {
  transform: scaleX(1);
}

/* ========== RECOMMENDATION ITEMS ========== */
.rec-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rec-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 20px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  opacity: 0;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.rec-item:hover {
  border-color: rgba(235, 10, 30, 0.3);
}

.slide.active .rec-item {
  animation: fadeInLeft 0.5s ease forwards;
}

.rec-icon {
  width: 40px;
  height: 40px;
  background: rgba(235, 10, 30, 0.1);
  border: 1px solid rgba(235, 10, 30, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.rec-content .rec-title {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.rec-content .rec-desc {
  font-family: var(--font-text);
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== QUOTE BLOCK ========== */
.quote-block {
  border-left: 3px solid var(--toyota-red);
  padding: 20px 24px;
  background: rgba(235, 10, 30, 0.04);
  margin: 20px 0;
  opacity: 0;
}

.slide.active .quote-block {
  animation: fadeInUp 0.6s ease 0.5s forwards;
}

.quote-text {
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.7;
}

.quote-source {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--toyota-red);
  letter-spacing: 0.15em;
  margin-top: 10px;
}

/* ========== HIGHLIGHT BOX ========== */
.highlight-box {
  background: rgba(235, 10, 30, 0.06);
  border: 1px solid rgba(235, 10, 30, 0.25);
  padding: 24px;
  position: relative;
}

.highlight-box::before {
  content: '!';
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--toyota-red);
  color: white;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 900;
}

/* ========== BIG QUOTE / CONCLUSION ========== */
.conclusion-quote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0;
}

.slide.active .conclusion-quote {
  animation: titleSlideIn 1s ease 0.3s forwards;
}

/* ========== BACKGROUND ELEMENTS ========== */
.slide-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.slide-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
}

.slide-bg-radial {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
}

.slide-bg-radial.red {
  background: var(--toyota-red);
}

.slide-bg-radial.gold {
  background: var(--accent-gold);
}

/* ========== NAVIGATION ========== */
.nav-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 60px 20px;
  background: linear-gradient(0deg, rgba(4,4,8,0.98) 0%, rgba(4,4,8,0) 100%);
}

.nav-progress-section {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.nav-progress-track {
  flex: 1;
  max-width: 300px;
  height: 2px;
  background: rgba(255,255,255,0.06);
  position: relative;
}

.nav-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--toyota-red), var(--accent-gold));
  transition: width 0.5s var(--ease-cinematic);
  box-shadow: 0 0 8px rgba(235, 10, 30, 0.6);
}

.nav-progress-text {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.nav-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 1;
  justify-content: center;
}

.nav-dot {
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.15);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.nav-dot.active {
  background: var(--toyota-red);
  box-shadow: 0 0 8px rgba(235, 10, 30, 0.6);
  width: 20px;
}

.nav-dot:hover:not(.active) {
  background: rgba(255,255,255,0.35);
}

.nav-controls {
  display: flex;
  gap: 12px;
  flex: 1;
  justify-content: flex-end;
}

.nav-btn {
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: var(--font-body);
}

.nav-btn:hover:not(:disabled) {
  border-color: var(--toyota-red);
  color: var(--toyota-red);
  box-shadow: 0 0 12px rgba(235, 10, 30, 0.2);
}

.nav-btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

/* ========== SLIDE-SPECIFIC BACKGROUNDS ========== */
.slide-0 .slide-bg-radial.red { width: 600px; height: 600px; top: -200px; right: -150px; }
.slide-1 .slide-bg-radial.red { width: 400px; height: 400px; bottom: 0; left: -100px; }
.slide-2 .slide-bg-radial.gold { width: 500px; height: 500px; top: 50%; right: -150px; transform: translateY(-50%); }
.slide-3 .slide-bg-radial.red { width: 600px; height: 600px; top: -100px; left: 50%; transform: translateX(-50%); }
.slide-4 .slide-bg-radial.red { width: 400px; height: 400px; bottom: -100px; right: -100px; }
.slide-5 .slide-bg-radial.gold { width: 500px; height: 500px; top: -100px; left: -100px; }
.slide-6 .slide-bg-radial.red { width: 500px; height: 500px; bottom: -150px; left: 50%; transform: translateX(-50%); }
.slide-7 .slide-bg-radial.red { width: 700px; height: 700px; top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* ========== ABSTRACT SLIDE ========== */
.abstract-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  flex: 1;
}

.abstract-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.abstract-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--toyota-red);
  border: 1px solid rgba(235, 10, 30, 0.3);
  padding: 4px 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transition: background 0.3s ease;
}

.keyword-tag:hover {
  background: rgba(235, 10, 30, 0.1);
}

.slide.active .keyword-tag {
  animation: fadeInUp 0.4s ease forwards;
}

/* ========== CONCLUSION SLIDE ========== */
.conclusion-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  gap: 32px;
}

.conclusion-pillars {
  display: flex;
  gap: 20px;
  width: 100%;
}

.pillar {
  flex: 1;
  padding: 28px 20px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  text-align: center;
  position: relative;
  opacity: 0;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.pillar:hover {
  border-color: var(--toyota-red);
  transform: translateY(-4px);
}

.slide.active .pillar {
  animation: cardReveal 0.6s ease forwards;
}

.pillar-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.pillar-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--toyota-red);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.pillar-text {
  font-family: var(--font-text);
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== SCROLLING TICKER ========== */
.ticker-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: rgba(235, 10, 30, 0.9);
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 2000;
}

.ticker-label {
  background: var(--toyota-red);
  padding: 0 16px;
  font-family: var(--font-display);
  font-size: 0.55rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.2em;
  white-space: nowrap;
  height: 100%;
  display: flex;
  align-items: center;
  border-right: 1px solid rgba(255,255,255,0.3);
  flex-shrink: 0;
}

.ticker-track {
  overflow: hidden;
  flex: 1;
}

.ticker-content {
  display: flex;
  animation: tickerScroll 30s linear infinite;
  white-space: nowrap;
}

.ticker-item {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.1em;
  padding: 0 40px;
}

.ticker-sep {
  color: rgba(255,255,255,0.4);
  padding: 0 8px;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeOut {
  to { opacity: 0; pointer-events: none; }
}

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

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes titleSlideIn {
  from { opacity: 0; transform: translateY(30px) skewX(-2deg); }
  to { opacity: 1; transform: translateY(0) skewX(0); }
}

@keyframes titleReveal {
  from { opacity: 0; transform: translateY(40px); clip-path: inset(100% 0 0 0); }
  to { opacity: 1; transform: translateY(0); clip-path: inset(0 0 0 0); }
}

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

@keyframes expandLine {
  from { opacity: 0; transform: scaleX(0); }
  to { opacity: 1; transform: scaleX(1); }
}

@keyframes logoPulse {
  0%, 100% { text-shadow: var(--glow-red); }
  50% { text-shadow: 0 0 40px rgba(235, 10, 30, 0.9), 0 0 80px rgba(235, 10, 30, 0.3); }
}

@keyframes loadBar {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes scanSweep {
  0% { top: -2px; opacity: 0.8; }
  100% { top: 100%; opacity: 0; }
}

@keyframes particleFall {
  from { top: -100px; opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.3; }
  to { top: 100vh; opacity: 0; }
}

@keyframes introExit {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.02); }
  100% { opacity: 0; transform: scale(1.05); pointer-events: none; }
}

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes glitch {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(-2px, 1px); clip-path: inset(20% 0 60% 0); }
  94% { transform: translate(2px, -1px); clip-path: inset(60% 0 20% 0); }
  96% { transform: translate(0); clip-path: none; }
}

@keyframes pulse-border {
  0%, 100% { border-color: rgba(235, 10, 30, 0.3); }
  50% { border-color: rgba(235, 10, 30, 0.7); }
}

/* ========== GLITCH EFFECT ========== */
.glitch-text {
  position: relative;
  display: inline-block;
  animation: glitch 8s ease-in-out infinite;
}

/* ========== DETAIL TABLE ========== */
.detail-table {
  width: 100%;
  border-collapse: collapse;
}

.detail-table tr {
  border-bottom: 1px solid var(--border-subtle);
}

.detail-table tr:last-child {
  border-bottom: none;
}

.detail-table th {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--toyota-red);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 10px 16px;
  text-align: left;
  background: rgba(235, 10, 30, 0.06);
}

.detail-table td {
  font-family: var(--font-text);
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 10px 16px;
  vertical-align: top;
  line-height: 1.5;
}

.detail-table td strong {
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 600;
}

/* ========== BADGE ========== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  padding: 4px 10px;
  text-transform: uppercase;
}

.badge-danger {
  background: rgba(235, 10, 30, 0.12);
  border: 1px solid rgba(235, 10, 30, 0.4);
  color: var(--toyota-red);
}

.badge-warning {
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.3);
  color: var(--accent-gold);
}

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-border 1.5s ease infinite;
}

/* ========== SCROLLABLE CONTENT AREAS ========== */
.overflow-scroll-area {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(235,10,30,0.3) transparent;
}

/* ========== FLICKER ANIMATION ========== */
@keyframes flicker {
  0%, 95%, 100% { opacity: 1; }
  96% { opacity: 0.8; }
  97% { opacity: 1; }
  98% { opacity: 0.6; }
  99% { opacity: 1; }
}

/* ========== SLIDE VISIBILITY ========== */
.slide:not(.active):not(.exiting) {
  visibility: hidden;
}

/* ========== ACTIVE SLIDE STAGGER CLASSES ========== */
.slide.active .card:nth-child(1) { animation-delay: 0.2s; }
.slide.active .card:nth-child(2) { animation-delay: 0.35s; }
.slide.active .card:nth-child(3) { animation-delay: 0.5s; }
.slide.active .card:nth-child(4) { animation-delay: 0.65s; }

/* ========== GLOW LINE ========== */
.glow-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--toyota-red) 50%, transparent);
  margin: 20px 0;
  box-shadow: 0 0 10px rgba(235,10,30,0.4);
  opacity: 0;
}
.slide.active .glow-line {
  animation: expandLine 0.8s ease 0.3s forwards;
}

/* ========== INTRO LOGO TOYOTA ========== */
.intro-toyota-logo {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.logo-ellipse {
  border: 2px solid var(--toyota-red);
  border-radius: 50%;
}

/* ========== DATA CORRUPTION EFFECT ========== */
.data-corruption {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--toyota-red);
  letter-spacing: 0.1em;
  animation: flicker 4s ease-in-out infinite;
}

/* ========== CHEVRON NAVIGATION HINT ========== */
.slide-nav-hint {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 500;
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

.slide-nav-hint:hover {
  opacity: 0.8;
}

/* ========== IMPROVED SCROLLING FOR CONTENT ========== */
.slide-body {
  max-height: calc(100vh - 100px - 80px);
}

/* ========== METRIC HIGHLIGHT STRIP ========== */
.metric-strip {
  display: flex;
  gap: 0;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  margin-bottom: 20px;
}

.metric-strip-item {
  flex: 1;
  padding: 16px 20px;
  border-right: 1px solid var(--border-subtle);
  text-align: center;
  opacity: 0;
  background: var(--bg-panel);
  transition: background 0.3s ease;
}

.metric-strip-item:last-child {
  border-right: none;
}

.metric-strip-item:hover {
  background: rgba(235,10,30,0.06);
}

.slide.active .metric-strip-item {
  animation: fadeInUp 0.5s ease forwards;
}

.metric-strip-value {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--toyota-red);
  display: block;
  text-shadow: var(--glow-red);
}

.metric-strip-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ========== SECTION CONTENT CONTAINERS ========== */
.section-flex {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .slide-body { padding: 24px 24px 80px; }
  .slide-header { padding: 20px 24px 16px; }
  .nav-container { padding: 12px 24px 16px; }
  .content-grid-2, .content-grid-3, .abstract-content, .content-grid-2-1 {
    grid-template-columns: 1fr;
  }
  .attack-flow { flex-direction: column; }
  .flow-step { clip-path: none; margin-right: 0; margin-bottom: -1px; }
  .conclusion-pillars { flex-direction: column; }
  .intro-meta { gap: 20px; flex-wrap: wrap; }
}

/* ========== TAG STRIP ========== */
.tag-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* ========== TWO-COL LAYOUT HELPER ========== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ========== STEP INDICATOR IN SLIDE ========== */
.step-indicator {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
}

.step-dot {
  width: 4px;
  height: 4px;
  background: rgba(255,255,255,0.15);
}

.step-dot.done {
  background: var(--toyota-red);
}

/* ========== NUMBERED LIST ========== */
.numbered-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.numbered-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  font-family: var(--font-text);
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  opacity: 0;
}

.slide.active .numbered-list li {
  animation: fadeInLeft 0.5s ease forwards;
}

.numbered-list li .num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--toyota-red);
  background: rgba(235,10,30,0.1);
  border: 1px solid rgba(235,10,30,0.3);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ========== VERDICT BOX ========== */
.verdict-box {
  border: 1px solid var(--toyota-red);
  padding: 28px;
  text-align: center;
  position: relative;
  background: rgba(235, 10, 30, 0.04);
  opacity: 0;
}

.slide.active .verdict-box {
  animation: cardReveal 0.8s ease 0.6s forwards;
}

.verdict-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--toyota-red);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.verdict-value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.1;
}

/* ========== CORNER DECORATIONS ========== */
.corner-deco {
  position: absolute;
  width: 20px;
  height: 20px;
}

.corner-deco.tl { top: 0; left: 0; border-top: 1px solid var(--toyota-red); border-left: 1px solid var(--toyota-red); }
.corner-deco.tr { top: 0; right: 0; border-top: 1px solid var(--toyota-red); border-right: 1px solid var(--toyota-red); }
.corner-deco.bl { bottom: 0; left: 0; border-bottom: 1px solid var(--toyota-red); border-left: 1px solid var(--toyota-red); }
.corner-deco.br { bottom: 0; right: 0; border-bottom: 1px solid var(--toyota-red); border-right: 1px solid var(--toyota-red); }
