:root {
  --ink: #1f2a32;
  --muted: #687681;
  --paper: #f8f5ee;
  --panel: #ffffff;
  --line: #ded8cc;
  --blue: #2f61d5;
  --green: #2f8768;
  --amber: #b9812e;
  --rose: #c75d68;
  --wash: #eef3f0;
  --shadow: 0 24px 70px rgba(31, 42, 50, 0.10);
}

* {
  box-sizing: border-box;
}

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

body {
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(31, 42, 50, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(31, 42, 50, 0.03) 1px, transparent 1px),
    linear-gradient(135deg, rgba(47, 97, 213, 0.08), transparent 42%),
    linear-gradient(315deg, rgba(47, 135, 104, 0.08), transparent 40%),
    var(--paper);
  background-size: 56px 56px, 56px 56px, auto, auto, auto;
  color: var(--ink);
  font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

button {
  color: inherit;
  font: inherit;
}

.deck {
  height: 100vh;
  width: 100vw;
  position: relative;
}

.slide {
  align-items: center;
  display: flex;
  height: 100%;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: clamp(28px, 5vw, 76px);
  pointer-events: none;
  position: absolute;
  transform: translateY(26px) scale(0.985);
  transition: opacity 420ms ease, transform 420ms ease;
}

.slide::before {
  background: linear-gradient(180deg, var(--ink), rgba(31, 42, 50, 0.12));
  content: "";
  height: min(62vh, 440px);
  left: clamp(16px, 3vw, 42px);
  opacity: 0.18;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
}

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

.slide-inner {
  margin: 0 auto;
  max-width: 1120px;
  width: min(100%, 1120px);
}

.cover-grid,
.two-column {
  align-items: center;
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.82fr);
}

.eyebrow {
  align-items: center;
  color: var(--green);
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 800;
  gap: 10px;
  letter-spacing: 0;
  margin: 0 0 18px;
  text-transform: uppercase;
}

.eyebrow::before {
  background: currentColor;
  content: "";
  height: 1px;
  width: 34px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 9.2vw, 7.75rem);
  font-weight: 500;
  line-height: 0.9;
  margin-bottom: 22px;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 5.4vw, 4.75rem);
  font-weight: 500;
  line-height: 1.04;
  margin-bottom: 28px;
  max-width: 900px;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.25;
  margin-bottom: 12px;
}

.subtitle,
.lead {
  color: var(--muted);
  font-size: clamp(1.1rem, 2.1vw, 1.5rem);
  line-height: 1.45;
  max-width: 760px;
}

.opposition-mark,
.definition-panel,
.feature-card,
.scale-card,
.either-card,
.relation-card {
  background: rgba(255, 255, 255, 0.70);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.opposition-mark {
  display: grid;
  gap: 20px;
  justify-items: center;
  padding: clamp(28px, 5vw, 52px);
}

.opposition-mark span {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 850;
}

.axis {
  background: linear-gradient(90deg, var(--rose), var(--amber), var(--blue));
  border-radius: 999px;
  height: 12px;
  position: relative;
  width: min(100%, 360px);
}

.axis::before,
.axis::after {
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: 50%;
  content: "";
  height: 22px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
}

.axis::before {
  left: -2px;
}

.axis::after {
  right: -2px;
}

.definition-panel {
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.55;
  padding: clamp(22px, 4vw, 42px);
}

mark {
  background: rgba(35, 166, 111, 0.16);
  border-radius: 6px;
  color: var(--ink);
  padding: 0 0.25em;
}

.mini-diagram,
.flow {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.mini-diagram span,
.flow span,
.middle-terms span,
.binary-note {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #305647;
  font-weight: 750;
  padding: 10px 14px;
}

.mini-diagram .connector {
  background: var(--blue);
  border: 0;
  height: 3px;
  min-width: 72px;
  padding: 0;
}

.feature-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card {
  box-shadow: none;
  min-height: 268px;
  padding: 28px;
  position: relative;
}

.feature-card::after {
  background: linear-gradient(90deg, var(--blue), transparent);
  bottom: 0;
  content: "";
  height: 3px;
  left: 28px;
  position: absolute;
  width: 72px;
}

.number {
  color: var(--blue);
  display: block;
  font-size: 0.85rem;
  font-weight: 850;
  margin-bottom: 42px;
}

.feature-card p,
.scale-card p,
.either-card p,
.relation-card p,
.closing {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.term {
  color: var(--blue);
  display: inline-block;
  font-family: inherit;
  transform-origin: center;
}

.slide.is-active .term {
  animation: termPulse 900ms ease 260ms both;
}

@keyframes termPulse {
  0% {
    transform: scale(0.94);
  }
  48% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

.reveal,
.reveal-list li {
  opacity: 0;
  transform: translateY(18px);
}

.slide.is-active .reveal,
.slide.is-active .reveal-list li {
  animation: revealUp 560ms ease both;
}

.slide.is-active .reveal:nth-child(2),
.slide.is-active .reveal-list li:nth-child(1) {
  animation-delay: 90ms;
}

.slide.is-active .reveal:nth-child(3),
.slide.is-active .reveal-list li:nth-child(2) {
  animation-delay: 180ms;
}

.slide.is-active .reveal:nth-child(4),
.slide.is-active .reveal-list li:nth-child(3) {
  animation-delay: 270ms;
}

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

.reveal-list {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 24px 0 0;
  padding-left: 22px;
}

.scale-card,
.either-card,
.relation-card {
  padding: clamp(22px, 4vw, 38px);
}

.scale-labels,
.split-choice,
.relation-row {
  align-items: center;
  display: flex;
  font-size: clamp(1.7rem, 3.6vw, 3.15rem);
  font-weight: 850;
  justify-content: space-between;
}

.scale-line {
  background: linear-gradient(90deg, var(--rose), var(--amber), var(--green), var(--blue));
  border-radius: 999px;
  display: flex;
  height: 14px;
  justify-content: space-between;
  margin: 32px 0 20px;
  padding: 0 22px;
}

.scale-line span {
  background: var(--panel);
  border: 3px solid var(--ink);
  border-radius: 50%;
  height: 24px;
  transform: translateY(-5px);
  width: 24px;
}

.middle-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.split-choice {
  background: linear-gradient(90deg, rgba(47, 111, 237, 0.12) 0 50%, rgba(215, 92, 106, 0.12) 50% 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  gap: 16px;
  margin-bottom: 22px;
  padding: 30px;
}

.binary-note {
  display: inline-block;
  margin-bottom: 20px;
}

.relation-card {
  display: grid;
  gap: 18px;
}

.relation-row {
  border-bottom: 1px solid var(--line);
  gap: 18px;
  padding-bottom: 18px;
}

.arrow {
  color: var(--green);
}

.compare-table {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.compare-table > div {
  display: grid;
  grid-template-columns: 1.18fr repeat(3, 1fr);
}

.compare-table span {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-width: 0;
  line-height: 1.35;
  padding: 16px;
}

.compare-table span:last-child {
  border-right: 0;
}

.compare-table > div:last-child span {
  border-bottom: 0;
}

.table-head span {
  background: #edf2fb;
  color: #253f7c;
  font-weight: 850;
}

.flow span {
  border-radius: 8px;
  flex: 1 1 190px;
}

.example-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.example-card,
.summary-chip {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(31, 42, 50, 0.08);
  cursor: pointer;
  padding: 20px;
  text-align: left;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.example-card:hover,
.example-card:focus-visible,
.summary-chip:hover,
.summary-chip:focus-visible {
  border-color: var(--blue);
  box-shadow: var(--shadow);
  outline: 0;
  transform: translateY(-3px);
}

.example-card span {
  display: block;
  font-size: 1.35rem;
  font-weight: 850;
  margin-bottom: 8px;
}

.example-card small {
  color: var(--green);
  font-weight: 800;
}

.sentence-box {
  background: rgba(255, 248, 234, 0.82);
  border: 1px solid #ead2a0;
  border-radius: 8px;
  color: #725019;
  font-weight: 700;
  margin-top: 22px;
  min-height: 58px;
  padding: 16px 18px;
}

.summary-list {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 34px;
}

.summary-chip {
  font-weight: 800;
  min-height: 112px;
}

.closing {
  font-size: clamp(1.2rem, 2.4vw, 1.65rem);
  max-width: 820px;
}

.thanks-layout {
  align-items: end;
  display: grid;
  gap: clamp(28px, 6vw, 86px);
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
}

.thanks h2 {
  color: var(--blue);
  font-size: clamp(3rem, 8vw, 7rem);
  max-width: 780px;
}

.team-block {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(22px, 4vw, 34px);
}

.team-block .team-label {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.team-block p {
  align-items: baseline;
  color: var(--ink);
  display: flex;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 750;
  gap: 14px;
  line-height: 1.5;
  margin: 0 0 10px;
}

.team-block span {
  color: var(--blue);
  font-variant-numeric: tabular-nums;
  min-width: 28px;
}

.controls {
  align-items: center;
  bottom: 22px;
  display: flex;
  gap: 18px;
  left: 50%;
  position: fixed;
  transform: translateX(-50%);
  z-index: 10;
}

.controls button {
  align-items: center;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 8px 26px rgba(34, 48, 58, 0.12);
  cursor: pointer;
  display: grid;
  font-size: 2rem;
  height: 44px;
  justify-content: center;
  line-height: 1;
  transition: transform 180ms ease, border-color 180ms ease;
  width: 44px;
}

.controls button:hover,
.controls button:focus-visible {
  border-color: var(--blue);
  outline: 0;
  transform: translateY(-2px);
}

.dots {
  align-items: center;
  display: flex;
  gap: 9px;
}

.dot {
  background: #aab7c0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  height: 10px;
  padding: 0;
  transition: background 180ms ease, width 180ms ease;
  width: 10px;
}

.dot.is-active {
  background: var(--blue);
  width: 28px;
}

.progress {
  background: rgba(34, 48, 58, 0.09);
  height: 4px;
  left: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 11;
}

.progress span {
  background: linear-gradient(90deg, var(--blue), var(--green));
  display: block;
  height: 100%;
  transition: width 300ms ease;
  width: 0;
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .deck {
    min-height: 100vh;
  }

  .slide {
    min-height: 100vh;
    padding: 60px 18px 92px;
  }

  .cover-grid,
  .two-column,
  .thanks-layout,
  .feature-grid,
  .example-grid,
  .summary-list {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: auto;
  }

  .number {
    margin-bottom: 18px;
  }

  .compare-table {
    overflow-x: auto;
  }

  .compare-table > div {
    min-width: 760px;
  }

  .controls {
    bottom: 14px;
    gap: 12px;
    max-width: calc(100vw - 20px);
  }

  .dots {
    gap: 6px;
  }
}

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