:root {
  --blue: #179cca;
  --blue-dark: #087ba7;
  --ink: #173042;
  --muted: #73828d;
  --surface: #f4f7f8;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(9, 37, 54, 0.18);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.color-stripe {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  height: 7px;
  background:
    linear-gradient(
      90deg,
      #f3bf35 0 3%,
      #36b2d3 3% 6%,
      #e24775 6% 9%,
      #2496c6 9% 12%,
      #80bf45 12% 15%,
      #f28f2f 15% 18%,
      #e04052 18% 21%,
      #7bc7dc 21% 24%,
      #a0c846 24% 27%,
      #eb4e81 27% 30%,
      #2496c6 30% 33%,
      #f3bf35 33% 36%,
      #36b2d3 36% 39%,
      #e24775 39% 42%,
      #2496c6 42% 45%,
      #80bf45 45% 48%,
      #f28f2f 48% 51%,
      #e04052 51% 54%,
      #7bc7dc 54% 57%,
      #a0c846 57% 60%,
      #eb4e81 60% 63%,
      #2496c6 63% 66%,
      #f3bf35 66% 69%,
      #36b2d3 69% 72%,
      #e24775 72% 75%,
      #2496c6 75% 78%,
      #80bf45 78% 81%,
      #f28f2f 81% 84%,
      #e04052 84% 87%,
      #7bc7dc 87% 90%,
      #a0c846 90% 93%,
      #eb4e81 93% 96%,
      #2496c6 96% 100%
    );
}

.presentation {
  display: grid;
  grid-template-rows: 82px minmax(0, 1fr) 72px;
  width: 100%;
  height: 100%;
  padding-top: 7px;
  background:
    radial-gradient(circle at 12% 18%, rgba(23, 156, 202, 0.1), transparent 28%),
    radial-gradient(circle at 88% 82%, rgba(226, 71, 117, 0.08), transparent 24%),
    var(--surface);
}

.topbar,
.controls {
  display: flex;
  align-items: center;
  padding-inline: clamp(20px, 4vw, 64px);
}

.topbar {
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 0.76rem;
  letter-spacing: 0.12em;
}

.brand small {
  margin-top: 3px;
  color: var(--blue-dark);
  font-size: 0.68rem;
  font-style: italic;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 10px);
  grid-template-rows: repeat(2, 10px);
  gap: 2px;
  rotate: 45deg;
}

.brand-mark i {
  border-radius: 2px;
}

.brand-mark i:nth-child(1) { background: #e24775; }
.brand-mark i:nth-child(2) { background: #36b2d3; }
.brand-mark i:nth-child(3) { background: #f3bf35; }
.brand-mark i:nth-child(4) { background: #80bf45; }

.topbar-actions {
  display: flex;
  gap: 8px;
}

.icon-button,
.nav-button {
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--blue-dark);
  border: 0;
  background: transparent;
  cursor: pointer;
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  transition: background-color 180ms ease, transform 180ms ease;
}

.icon-button:hover {
  background: rgba(23, 156, 202, 0.1);
  transform: translateY(-1px);
}

.icon-button svg,
.nav-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.stage {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  padding: 0 clamp(72px, 8vw, 130px);
}

.slide-shell {
  position: relative;
  overflow: hidden;
  width: min(100%, calc((100vh - 185px) * 16 / 9));
  aspect-ratio: 16 / 9;
  border-radius: clamp(8px, 1vw, 16px);
  background: #dce6ea;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 360ms ease, transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
  user-select: none;
  -webkit-user-drag: none;
}

.slide.is-active {
  z-index: 2;
  opacity: 1;
  transform: scale(1);
}

.slide.is-leaving {
  z-index: 1;
  opacity: 0;
  transform: scale(0.99);
}

.nav-button {
  position: absolute;
  top: 50%;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(23, 48, 66, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 30px rgba(9, 37, 54, 0.1);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.nav-button:hover:not(:disabled) {
  color: var(--white);
  background: var(--blue);
  transform: translateY(-50%) scale(1.05);
}

.nav-button:disabled {
  opacity: 0.3;
  cursor: default;
}

.nav-button--previous {
  left: clamp(14px, 2.5vw, 42px);
}

.nav-button--next {
  right: clamp(14px, 2.5vw, 42px);
}

.controls {
  gap: clamp(24px, 4vw, 54px);
}

.slide-meta {
  display: flex;
  min-width: 250px;
  align-items: baseline;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.slide-number {
  color: var(--blue-dark);
  font-size: 1.15rem;
}

.slide-divider {
  color: #b4c0c7;
}

.slide-title {
  overflow: hidden;
  max-width: 190px;
  margin-left: 14px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.progress-track {
  overflow: hidden;
  height: 3px;
  flex: 1;
  border-radius: 99px;
  background: #d8e1e5;
}

.progress-value {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #e24775);
  transition: width 320ms ease;
}

.hint {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.68rem;
}

.hint span {
  display: flex;
  align-items: center;
  gap: 5px;
}

kbd {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding: 0 5px;
  border: 1px solid #ccd7dc;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 2px 0 #ccd7dc;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.62rem;
}

.overview {
  overflow-y: auto;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: clamp(28px, 5vw, 72px);
  color: var(--white);
  border: 0;
  background: rgba(10, 32, 45, 0.97);
}

.overview::backdrop {
  background: rgba(10, 32, 45, 0.75);
  backdrop-filter: blur(10px);
}

.overview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
}

.overview h1 {
  margin: 5px 0 0;
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.eyebrow {
  color: #68c5e4;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.icon-button--dark {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2.5vw, 34px);
  padding-bottom: 40px;
}

.overview-card {
  padding: 0;
  color: inherit;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.overview-card-image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #fff;
  transition: border-color 180ms ease, transform 180ms ease;
}

.overview-card:hover .overview-card-image,
.overview-card.is-current .overview-card-image {
  border-color: #61c5e5;
  transform: translateY(-4px);
}

.overview-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overview-card-label {
  display: flex;
  margin-top: 10px;
  align-items: baseline;
  gap: 10px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overview-card-label strong {
  color: var(--white);
  font-size: 0.76rem;
}

@media (max-width: 900px) {
  .presentation {
    grid-template-rows: 68px minmax(0, 1fr) 62px;
  }

  .stage {
    padding-inline: 22px;
  }

  .slide-shell {
    width: min(100%, calc((100vh - 157px) * 16 / 9));
  }

  .nav-button {
    top: auto;
    bottom: 12px;
    width: 44px;
    height: 44px;
    transform: none;
  }

  .nav-button:hover:not(:disabled) {
    transform: scale(1.05);
  }

  .nav-button--previous {
    left: 38px;
  }

  .nav-button--next {
    right: 38px;
  }

  .hint {
    display: none;
  }

  .slide-meta {
    min-width: 190px;
  }

  .slide-title {
    max-width: 110px;
  }

  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .brand small,
  .slide-title {
    display: none;
  }

  .brand strong {
    font-size: 0.66rem;
  }

  .controls {
    gap: 16px;
  }

  .slide-meta {
    min-width: 76px;
  }

  .overview {
    padding: 24px 18px;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
