/* === Design Tokens === */
:root {
  --bg: #16191B;
  --amber: #D4A853;
  --text: #F5F2ED;
  --muted: rgba(245, 242, 237, 0.5);
  --dim: rgba(245, 242, 237, 0.15);
  --teal: #5B8A8A;
  --paper: #E8DCC8;
  --font: 'Space Grotesk', system-ui, sans-serif;
  --slide-transition: 400ms ease-out;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(to right, rgba(245,242,237,0.02) 0px, rgba(245,242,237,0.02) 1px, transparent 1px, transparent 40px),
    repeating-linear-gradient(to bottom, rgba(245,242,237,0.02) 0px, rgba(245,242,237,0.02) 1px, transparent 1px, transparent 40px);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 0%, rgba(0,0,0,0.15) 60%, rgba(0,0,0,0.05) 100%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black 0%, rgba(0,0,0,0.15) 60%, rgba(0,0,0,0.05) 100%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  opacity: 0.035;
  pointer-events: none;
  z-index: 0;
}

[data-lucide] { display: inline-block; vertical-align: middle; }

/* === Slide Container === */
.deck { position: relative; width: 100vw; height: 100vh; overflow: hidden; }

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 6rem 4rem;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
  overflow-y: auto;
}

/* Content slides: top-aligned with consistent padding */
.slide:not(:has(.chapter-divider)):not(.title-slide) {
  justify-content: flex-start;
  padding-top: 20vh;
}

/* Chapter divider slides + title slide: centered */
.slide:has(.chapter-divider),
.slide.title-slide {
  justify-content: center;
}

.slide--active { opacity: 1; pointer-events: auto; z-index: 1; }
.slide--enter { animation: slideEnter var(--slide-transition) forwards; }
.slide--exit-left { animation: slideExitLeft var(--slide-transition) forwards; z-index: 0; }
.slide--exit-right { animation: slideExitRight var(--slide-transition) forwards; z-index: 0; }
.slide--enter-right { transform: translateX(60px); opacity: 0; }
.slide--enter-left { transform: translateX(-60px); opacity: 0; }

@keyframes slideEnter { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideExitLeft { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(-60px); } }
@keyframes slideExitRight { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(60px); } }

/* === Typography === */
.slide__title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0;
  color: var(--text);
}
.slide__title::after { display: none; }

.slide__subtitle {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 1.5rem;
  max-width: 48rem;
  text-align: center;
}

/* === Title Slide === */
.title-slide { text-align: center; overflow: hidden; justify-content: center; gap: 0.75rem; }
.tagline-stack { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.title-slide .tagline {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 40rem;
}

.tagline-sub {
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* === Nav Hint (keyboard helper) === */
.nav-hint {
  position: absolute;
  bottom: 2.5rem;
  right: 3rem;
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.nav-hint__key {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  border: 1px solid var(--dim);
  border-radius: 6px;
  background: rgba(245, 242, 237, 0.04);
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
  user-select: none;
  transition: opacity 0.3s ease;
}

.nav-hint__key--pulse {
  animation: key-nudge 2s 2s ease-in-out 3;
}

@keyframes key-nudge {
  0%, 100% { transform: translateX(0); border-color: var(--dim); color: var(--muted); }
  20% { transform: translateX(3px); border-color: var(--amber); color: var(--amber); }
  40% { transform: translateX(0); border-color: var(--dim); color: var(--muted); }
}

/* === Proposal Lockup === */
.proposal-lockup {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(0.8rem, 2vw, 1.5rem);
  margin-bottom: 2rem;
}

.proposal-lockup__bs-text,
.proposal-lockup__partner-name {
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  font-weight: 700;
  color: var(--muted);
  letter-spacing: -0.01em;
  white-space: nowrap;
  line-height: 1;
}

.proposal-lockup__x {
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  font-weight: 300;
  color: var(--dim);
  user-select: none;
}

/* === Chapter Divider === */
.chapter-divider { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 0 6rem; }
.chapter-divider__ghost { display: none; }
.chapter-divider__content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 1.5rem; width: 100%; max-width: 56rem; }
.chapter-divider__header { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-align: center; }
.chapter-divider__label { font-family: 'Space Mono', monospace; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; color: var(--amber); opacity: 0.7; }
.chapter-divider__title { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 700; color: var(--text); line-height: 1.2; letter-spacing: -0.02em; max-width: 44rem; }
.chapter-divider__subtitle { font-size: clamp(0.95rem, 1.8vw, 1.15rem); font-weight: 400; color: var(--muted); max-width: 34rem; text-align: center; line-height: 1.5; }
.chapter-divider__title.anim, .chapter-divider__subtitle.anim { opacity: 1; transform: translateY(0); transition: none; }

/* Extra margin below divider bar in content slides */
.slide:not(:has(.chapter-divider)) > .chapter-divider__divider {
  margin-bottom: 2rem;
}

/* === Programme (3-step overview) === */
.program {
  display: flex;
  flex-direction: column;
  max-width: 32rem;
  width: 100%;
}

.program__step {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  position: relative;
}

.program__num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--amber);
  color: var(--amber);
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg);
  z-index: 1;
}

.program__connector {
  position: absolute;
  left: 21px;
  top: 44px;
  width: 2px;
  height: calc(100% - 44px + 1.2rem);
  background: repeating-linear-gradient(
    to bottom,
    var(--amber) 0px,
    var(--amber) 4px,
    transparent 4px,
    transparent 10px
  );
  opacity: 0.35;
}

.program__step:last-child .program__connector { display: none; }

.program__body {
  padding: 0.6rem 0 2rem;
}

.program__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.program__desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

/* === Concept Grid (AI Fundamentals) === */
.concept-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
  max-width: 52rem;
  width: 100%;
}

.concept-grid--three {
  grid-template-columns: repeat(3, 1fr);
  max-width: 56rem;
}

.concept-card {
  padding: 1.4rem;
  border: 1px solid var(--dim);
  border-radius: 12px;
  background: rgba(245, 242, 237, 0.03);
}

.concept-card__icon { color: var(--amber); margin-bottom: 0.5rem; display: block; }
.concept-card__title { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.3rem; }
.concept-card__desc { font-size: 0.85rem; color: var(--muted); line-height: 1.5; }

/* === Use Case Grid (newsrooms — 2×2) === */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 52rem;
  width: 100%;
}

.usecase-card {
  padding: 1.4rem;
  border: 1px solid var(--dim);
  border-radius: 12px;
  background: rgba(245, 242, 237, 0.03);
}

.usecase-card__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
  color: var(--amber);
}

.usecase-card__name { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.usecase-card__org { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.5rem; }
.usecase-card__desc { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }

/* === Demo Grid (2×3 numbered use cases) === */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  max-width: 48rem;
  width: 100%;
}

.demo-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--dim);
  border-radius: 10px;
  background: rgba(245, 242, 237, 0.03);
}

.demo-item__num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--amber);
  color: var(--amber);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.demo-item__content { flex: 1; }
.demo-item__content strong { display: block; font-size: 0.9rem; color: var(--text); margin-bottom: 0.1rem; }
.demo-item__content span { font-size: 0.78rem; color: var(--muted); line-height: 1.4; }

/* === Exercise List === */
.exercise-section {
  max-width: 48rem;
  width: 100%;
}

.exercise-setup {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.2rem;
  border: 1px solid rgba(212, 168, 83, 0.3);
  border-radius: 10px;
  background: rgba(212, 168, 83, 0.05);
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.exercise-setup i,
.exercise-setup svg { color: var(--amber); flex-shrink: 0; }
.exercise-setup strong { color: var(--amber); }

.exercise-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.exercise-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--dim);
  border-radius: 10px;
  background: rgba(245, 242, 237, 0.03);
}

.exercise-item__num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--amber);
  color: var(--amber);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.exercise-item__content { flex: 1; }
.exercise-item__content strong { display: block; font-size: 0.9rem; color: var(--text); margin-bottom: 0.15rem; }
.exercise-item__content span { font-size: 0.78rem; color: var(--muted); line-height: 1.4; }

.exercise-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  opacity: 0.7;
  font-style: italic;
}

/* === Format Card (logistics key-value) === */
.format-section {
  max-width: 36rem;
  width: 100%;
}

.format-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.format-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  background: rgba(245, 242, 237, 0.03);
}

.format-row i,
.format-row svg { color: var(--amber); flex-shrink: 0; opacity: 0.7; }
.format-row span { font-size: 0.9rem; color: var(--muted); }
.format-row strong { color: var(--text); font-weight: 600; }

.format-row--accent {
  border: 1px solid rgba(212, 168, 83, 0.3);
  background: rgba(212, 168, 83, 0.05);
}

.format-row--accent strong { color: var(--amber); }

/* === Conclusion === */
.conclusion {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.5rem;
}

.conclusion__signal { margin-bottom: 0.5rem; }

.conclusion__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--amber);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 200ms;
}

.conclusion__cta:hover { opacity: 0.8; }

/* === About Slide === */
.about-slide {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  align-items: start;
  max-width: 52rem;
  width: 100%;
  text-align: left;
}

.about-slide__photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 30% top;
  border-radius: 2px;
  filter: grayscale(0.15);
}

.about-slide__content {
  border-left: 2px solid rgba(212, 168, 83, 0.4);
  padding-left: 1.5rem;
}

.about-slide__name {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.about-slide__bio {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.about-slide__bio strong {
  color: var(--text);
}

.about-slide__credentials {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.about-slide__credentials li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text);
  opacity: 0.7;
}

.about-slide__credentials li i,
.about-slide__credentials li svg {
  color: var(--amber);
  flex-shrink: 0;
}

/* === Contact Links === */
.contact-links {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 200ms;
}

.contact-link:hover {
  color: var(--amber);
}

.contact-link i,
.contact-link svg {
  opacity: 0.6;
  transition: opacity 200ms;
}

.contact-link:hover i,
.contact-link:hover svg {
  opacity: 1;
}

/* === Chapter Bar === */
.chapter-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 100; display: flex; height: 32px; }
.chapter-segment { flex: 1; display: flex; flex-direction: column; justify-content: center; position: relative; cursor: pointer; }
.chapter-segment__label { font-family: 'Space Mono', monospace; font-size: 0.5rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; padding: 0 0.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 0.3s ease; }
.chapter-segment--future .chapter-segment__label { color: rgba(245,242,237,0.15); }
.chapter-segment--past .chapter-segment__label { color: rgba(212,168,83,0.4); }
.chapter-segment--active .chapter-segment__label { color: var(--amber); }
.chapter-segment__track { position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: rgba(245,242,237,0.06); }
.chapter-segment__fill { height: 100%; width: 0%; border-radius: 0 1px 1px 0; transition: width 0.4s ease-out, background 0.3s ease; }
.chapter-segment--past .chapter-segment__fill { width: 100%; background: rgba(212,168,83,0.3); }
.chapter-segment--active .chapter-segment__fill { background: var(--amber); box-shadow: 0 0 8px rgba(212,168,83,0.5); }
.chapter-segment--future .chapter-segment__fill { width: 0%; background: transparent; }

/* === Responsive === */
@media (max-width: 768px) {
  .slide { padding: 2rem 1.5rem; }
  .concept-grid, .concept-grid--three { grid-template-columns: 1fr; }
  .usecase-grid { grid-template-columns: 1fr; }
  .demo-grid { grid-template-columns: 1fr; }
  .exercise-list { grid-template-columns: 1fr; }
  .chapter-divider { padding: 0 2rem; }
  .proposal-lockup { gap: 0.75rem; }
  .about-slide { grid-template-columns: 1fr; gap: 2rem; }
  .about-slide__photo { max-width: 200px; margin: 0 auto; }
  .about-slide__photo img { aspect-ratio: 1 / 1; }
  .contact-links { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .slide { padding: 1.5rem 1rem; }
  .chapter-divider { padding: 0 1.5rem 2.5rem; }
}
