:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --paper: #fffefa;
  --ink: #141516;
  --muted: #686c69;
  --line: #d8d8d0;
  --soft: #ecece5;
  --teal: #006b68;
  --coral: #d24d35;
  --gold: #b88719;
  --shadow: 0 20px 60px rgb(20 21 22 / 0.12);
  --shadow-tight: 0 12px 32px rgb(20 21 22 / 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgb(20 21 22 / 0.035) 1px, transparent 1px),
    linear-gradient(rgb(20 21 22 / 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 64px 64px;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.visually-hidden {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.deck-hud {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  height: 64px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(240px, 520px) minmax(120px, 1fr);
  align-items: center;
  gap: 24px;
  padding: 0 28px;
  color: rgb(20 21 22 / 0.78);
  pointer-events: none;
}

.brand-lockup,
.progress-wrap,
.slide-counter {
  display: flex;
  align-items: center;
}

.brand-lockup {
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  right: -3px;
  bottom: 2px;
  border-radius: 50%;
  background: var(--coral);
}

.progress-wrap {
  gap: 12px;
  min-width: 0;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgb(20 21 22 / 0.12);
}

.progress-track span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--coral), var(--gold));
  transition: width 220ms ease;
}

.slide-counter {
  justify-content: flex-end;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

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

.slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  min-height: 100svh;
  padding: 88px 72px 72px;
  overflow: hidden;
}

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

.slide-inner.wide {
  width: min(1320px, 100%);
}

.sentence {
  max-width: 1120px;
  margin: 0;
  font-size: clamp(3.6rem, 7.2vw, 6.9rem);
  line-height: 0.98;
  font-weight: 880;
}

.sentence.medium {
  max-width: 1240px;
  font-size: clamp(3.1rem, 6vw, 5.8rem);
  line-height: 1.02;
}

.title-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 38px;
}

.title-copy {
  min-width: 0;
}

.cover-meta,
.cover-kicker {
  margin: 0;
  font-weight: 850;
  text-transform: uppercase;
}

.cover-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.cover-kicker {
  margin-top: 9px;
  margin-bottom: 20px;
  color: var(--teal);
  font-size: 0.92rem;
}

.figma-logo {
  display: grid;
  grid-template-columns: repeat(2, 46px);
  grid-template-rows: repeat(3, 46px);
  width: 92px;
  filter: drop-shadow(10px 10px 0 var(--soft));
}

.figma-dot {
  width: 46px;
  height: 46px;
}

.figma-red {
  background: #f24e1e;
  border-radius: 23px 0 0 23px;
}

.figma-purple {
  background: #a259ff;
  border-radius: 0 23px 23px 0;
}

.figma-blue {
  background: #1abcfe;
  border-radius: 50%;
}

.figma-green {
  background: #0acf83;
  border-radius: 23px 0 0 23px;
}

.figma-orange {
  background: #ff7262;
  border-radius: 23px 0 0 23px;
}

.browser-frame {
  overflow: hidden;
  border: 1px solid rgb(20 21 22 / 0.16);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.browser-chrome {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #f2f2ed;
}

.browser-buttons {
  display: flex;
  gap: 4px;
}

.browser-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-weight: 900;
}

.browser-button:hover {
  border-color: var(--line);
  background: white;
}

.browser-address {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  font-size: 0.84rem;
}

.browser-preview {
  height: min(75vh, 720px);
  background: white;
}

.browser-webview {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: white;
}

.browser-frame.is-refreshing .browser-webview {
  opacity: 0.45;
}

.deck-controls {
  position: fixed;
  z-index: 25;
  right: 24px;
  bottom: 22px;
  display: flex;
  gap: 8px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgb(20 21 22 / 0.16);
  border-radius: 999px;
  background: rgb(255 254 250 / 0.92);
  color: var(--ink);
  box-shadow: 0 8px 22px rgb(20 21 22 / 0.08);
  font-size: 1.25rem;
  font-weight: 800;
}

.icon-button.small {
  width: 36px;
  height: 36px;
  box-shadow: none;
}

.overview-dialog {
  width: min(850px, calc(100vw - 40px));
  max-height: min(720px, calc(100svh - 80px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.overview-dialog::backdrop {
  background: rgb(20 21 22 / 0.35);
}

.overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  max-height: calc(100svh - 170px);
  overflow: auto;
  padding: 18px;
}

.overview-tile {
  min-height: 90px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  text-align: left;
}

.overview-tile strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.overview-tile small {
  color: var(--muted);
}

.overview-tile.is-current {
  border-color: var(--teal);
  background: #dcebea;
}

.toast {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 28px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 0.84rem;
  font-weight: 750;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1020px) {
  .deck-hud {
    grid-template-columns: 1fr auto;
  }

  .progress-wrap {
    display: none;
  }

  .slide {
    padding: 82px 32px 72px;
  }

  .title-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .browser-preview {
    height: 68vh;
  }
}

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

  .deck {
    height: auto;
    min-height: 100svh;
  }

  .deck-hud {
    height: 56px;
    padding: 0 16px;
  }

  .brand-lockup span:last-child {
    display: none;
  }

  .slide {
    position: relative;
    min-height: 100svh;
    padding: 72px 18px 80px;
    overflow: auto;
  }

  .sentence,
  .sentence.medium {
    font-size: 2.85rem;
    line-height: 1.02;
  }

  .figma-logo {
    grid-template-columns: repeat(2, 36px);
    grid-template-rows: repeat(3, 36px);
    width: 72px;
  }

  .figma-dot {
    width: 36px;
    height: 36px;
  }

  .deck-controls {
    top: 8px;
    right: auto;
    bottom: auto;
    left: 50%;
    gap: 5px;
    transform: translateX(-50%);
  }

  .deck-controls .icon-button {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}
