/*
 * The /presentation slide deck. Loaded after /styles.css, so every token and
 * component (hero tile, tiles, cards, the amber primary) is the site's own —
 * docs/DESIGN.md is the source of truth. Slides are drawn on a fixed 1600×900
 * stage that presentation.js scales to fit the window, like a slide in a
 * presentation app; sizes below are therefore in stage pixels.
 */

.deck-page {
  --stage-w: 1600px;
  --stage-h: 900px;
  --scale: 1;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #0e0f12;
}

.deck {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--stage-w);
  height: var(--stage-h);
  overflow: hidden;
  border-radius: calc(12px / var(--scale));
  transform: translate(-50%, -50%) scale(var(--scale));
}

.slide {
  position: absolute;
  inset: 0;
  display: grid;
  overflow: hidden;
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  transition: opacity 360ms ease, visibility 0s linear 360ms;
}

.slide.is-current {
  opacity: 1;
  visibility: visible;
  transition: opacity 360ms ease, visibility 0s;
}

/* App-mode slides are cream; flow slides keep the .flow purple gradient and
   dot grid from /styles.css, with the grid drawn a little larger. */
.slide:not(.flow) {
  background: var(--canvas);
}

.slide.flow {
  color: #ffffff;
  background-size: 28px 28px, 100% 100%;
}

.slide h1,
.slide h2 {
  letter-spacing: -0.02em;
}

.kicker {
  color: var(--brand-strong);
  font-family: var(--font-rounded);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  color: var(--ink-secondary);
  font-size: 46px;
  line-height: 1.35;
}

/* ---- 1: title (flow mode) ---- */

.slide-title {
  place-content: center;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.deck-hero {
  --size: 150px;
  margin-bottom: 18px;
}

.slide-title h1 {
  font-size: 200px;
  line-height: 0.95;
  text-shadow: 4px 6px 0 rgb(0 0 0 / 0.22);
}

.subtitle {
  font-size: 58px;
  line-height: 1.3;
}

.presenter {
  position: absolute;
  bottom: 52px;
  left: 72px;
  font-family: var(--font-rounded);
  font-size: 46px;
  font-weight: 600;
}

/* ---- 3: full-bleed photo ---- */

.slide.slide-photo {
  background: var(--flow-deep);
  color: #ffffff;
}

.photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

/* A dark scrim under the caption so white type stays readable on any photo:
   at the caption's baseline the scrim is 70% black, which puts white text
   above 7:1 whatever the photo underneath. */
.slide-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / 0) 45%, rgb(0 0 0 / 0.7) 100%);
  pointer-events: none;
}

.photo-caption {
  position: absolute;
  z-index: 1;
  bottom: 84px;
  left: 80px;
  display: grid;
  justify-items: start;
  gap: 18px;
}

.photo-caption h2 {
  font-size: 180px;
  line-height: 0.95;
  text-shadow: 4px 6px 0 rgb(0 0 0 / 0.3);
}

.caption-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 30px 14px 22px;
  border-radius: var(--r-pill);
  background: var(--flow-deep);
  font-family: var(--font-rounded);
  font-size: 36px;
  font-weight: 600;
}

.caption-pill .ico {
  width: 36px;
  height: 36px;
}

/* The year: an amber badge with the 3D edge, ink on amber (9.1:1). */
.year-badge {
  position: absolute;
  z-index: 1;
  top: 72px;
  right: 80px;
  padding: 18px 44px;
  border-radius: var(--r-pill);
  background: var(--cta);
  color: var(--ink);
  font-family: var(--font-rounded);
  font-size: 116px;
  font-weight: 700;
  line-height: 1;
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 0.4),
    0 8px 0 var(--cta-pressed),
    0 18px 36px rgb(0 0 0 / 0.3);
  transform: rotate(-4deg);
}

.credit {
  position: absolute;
  z-index: 1;
  right: 28px;
  bottom: 20px;
  color: rgb(255 255 255 / 0.85);
  font-size: 18px;
}

.credit a {
  color: inherit;
}

/* A small hint in the top-right corner of the title slide. It disappears once
   the page is in full screen, so the audience never sees it. Lavender on the
   gradient's top stop is 5.1:1; white on the 14% white key is 4.7:1. */
.fullscreen-hint {
  position: absolute;
  top: 40px;
  right: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 26px;
}

.fullscreen-hint kbd {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 46px;
  padding: 0 10px;
  border: 1.5px solid rgb(255 255 255 / 0.35);
  border-radius: 12px;
  background: rgb(255 255 255 / 0.14);
  color: #ffffff;
  font-family: var(--font-rounded);
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 3px 0 rgb(0 0 0 / 0.18);
}

:root:fullscreen .fullscreen-hint {
  visibility: hidden;
}

/* ---- 2: maps ---- */

.slide-map {
  grid-template-rows: auto 1fr;
  gap: 28px;
  padding: 56px 90px 48px;
}

.map-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.map-head > div {
  display: grid;
  justify-items: start;
  gap: 16px;
}

.map-head .caption-pill {
  color: #ffffff;
}

.map-head h2 {
  font-size: 116px;
  line-height: 0.98;
}

.map-head .lead {
  max-width: 620px;
  padding-bottom: 8px;
  text-align: right;
}

.maps {
  display: flex;
  justify-content: center;
  gap: 36px;
  min-height: 0;
}

.map-card {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 0;
  margin: 0;
  padding: 14px 14px 12px;
}

.map-card img {
  height: 100%;
  max-height: 500px;
  width: auto;
  max-width: none;
  border-radius: 12px;
}

.map-card figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 4px 0;
}

.map-card strong {
  font-family: var(--font-rounded);
  font-size: 34px;
  font-weight: 600;
}

.map-credit {
  color: var(--ink-secondary);
  font-size: 17px;
}

.map-credit a {
  color: inherit;
}

/* ---- 4: why ---- */

.slide-why {
  grid-template-columns: 540px 1fr;
  align-items: center;
  gap: 80px;
  padding: 0 90px 0 110px;
}

.polaroid {
  margin: 0;
  padding: 22px 22px 18px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 30px 60px rgb(0 0 0 / 0.18), 0 6px 14px rgb(0 0 0 / 0.08);
  transform: rotate(-3deg);
}

.polaroid img {
  width: 100%;
  height: 660px;
  max-width: none;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-sunken-strong);
}

.polaroid figcaption {
  padding-top: 14px;
  color: var(--ink-secondary);
  font-family: var(--font-rounded);
  font-size: 34px;
  font-weight: 600;
  text-align: center;
}

.why-copy {
  display: grid;
  gap: 22px;
}

.why-copy h2 {
  font-size: 140px;
  line-height: 1;
}

.pains {
  display: grid;
  gap: 22px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.pains li {
  display: flex;
  align-items: center;
  gap: 26px;
  font-family: var(--font-rounded);
  font-size: 46px;
  font-weight: 600;
  line-height: 1.15;
}

.pains .tile,
.what-card .tile {
  width: 84px;
  height: 84px;
  border-radius: 22px;
}

.pains .tile .ico,
.what-card .tile .ico {
  width: 42px;
  height: 42px;
}

/* ---- 5: what ---- */

.slide-what {
  align-content: center;
  gap: 44px;
  padding: 0 90px;
}

.what-head {
  display: grid;
  gap: 14px;
}

.what-head h2 {
  font-size: 130px;
  line-height: 1;
}

.what-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.what-card {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 36px 32px 40px;
}

.what-card h3 {
  font-size: 50px;
}

.what-card p {
  color: var(--ink-secondary);
  font-size: 34px;
  line-height: 1.35;
}

.what-extras {
  display: flex;
  gap: 48px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.what-extras li {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-secondary);
  font-size: 34px;
}

.what-extras .ico {
  width: 40px;
  height: 40px;
  color: var(--brand);
}

/* ---- 6: demo (flow mode) — the TestFlight QR as large as the stage allows ---- */

.slide-demo {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 72px;
  padding: 0 100px 0 110px;
}

.demo-copy {
  display: grid;
  gap: 28px;
}

.slide-demo h2 {
  font-size: 150px;
  line-height: 0.95;
  text-shadow: 4px 6px 0 rgb(0 0 0 / 0.22);
}

.demo-lead {
  font-family: var(--font-rounded);
  font-size: 50px;
  font-weight: 600;
  line-height: 1.2;
}

.demo-url {
  font-size: 34px;
}

.qr-card-lg {
  padding: 36px;
  border-radius: 40px;
}

.qr-card-lg img {
  width: 700px;
  height: 700px;
}

/* ---- 7: demo script — numbered steps, read down each column ---- */

.slide-steps {
  align-content: center;
  gap: 40px;
  padding: 0 80px;
}

.steps-head {
  display: grid;
  gap: 10px;
}

.steps-head h2 {
  font-size: 104px;
  line-height: 1;
}

.steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(5, 1fr);
  grid-auto-flow: column;
  gap: 16px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 24px 14px 16px;
  counter-increment: step;
  font-family: var(--font-rounded);
  font-size: 36px;
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
}

/* The step number: an amber disc with the 3D edge, ink on amber (9.1:1). */
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--cta);
  color: var(--ink);
  font-size: 32px;
  font-weight: 700;
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 0.4),
    0 4px 0 var(--cta-pressed);
}

.steps .tile {
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 18px;
}

.steps .tile .ico {
  width: 30px;
  height: 30px;
}

/* ---- 8: contact (flow mode) ---- */

.slide-contact {
  grid-template-columns: 1fr 540px;
  align-items: center;
  gap: 64px;
  padding: 0 90px 0 100px;
}

.contact-copy {
  display: grid;
  gap: 24px;
}

.contact-kicker {
  font-family: var(--font-rounded);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.slide-contact h2 {
  font-size: 112px;
  line-height: 0.98;
  text-shadow: 4px 6px 0 rgb(0 0 0 / 0.22);
}

.contact-list {
  display: grid;
  gap: 18px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 24px;
  font-family: var(--font-rounded);
  font-size: 46px;
  font-weight: 600;
}

.contact-list a {
  color: #ffffff;
  text-decoration: none;
}

/* The brand marks sit on white, as their owners require; the Rumis tile is
   the hero-tile gradient with a white house. */
.contact-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  flex: none;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 8px 18px rgb(20 10 60 / 0.25);
}

.contact-icon .brand {
  width: 50px;
  height: 50px;
}

.contact-icon-rumis {
  color: #ffffff;
  background: linear-gradient(135deg, var(--vivid-orange), var(--vivid-pink));
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.35),
    0 8px 18px rgb(20 10 60 / 0.25);
}

.contact-icon-rumis .ico {
  width: 44px;
  height: 44px;
}

/* The QR sits on white with its own quiet zone, dark modules in ink. */
.qr-card {
  display: grid;
  justify-items: center;
  gap: 18px;
  margin: 0;
  padding: 34px 34px 30px;
  border-radius: 34px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 60px rgb(20 10 60 / 0.35);
}

.qr-card img {
  width: 470px;
  height: 470px;
  max-width: none;
  image-rendering: pixelated;
}

.qr-card figcaption {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

.qr-card strong {
  font-family: var(--font-rounded);
  font-size: 42px;
  font-weight: 700;
}

.qr-card span {
  color: var(--ink-secondary);
  font-size: 28px;
}

/* ---- 9: appendix divider (flow mode) ---- */

.slide-appendix {
  place-content: center;
  justify-items: center;
  gap: 22px;
  text-align: center;
}

.slide-appendix h2 {
  font-size: 150px;
  line-height: 0.95;
  text-shadow: 4px 6px 0 rgb(0 0 0 / 0.22);
}

.slide-appendix .subtitle {
  max-width: 1100px;
}

/* ---- 10+: screen gallery — screenshots of the app in the simulator ---- */

.slide-shots {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 30px;
  padding: 48px 80px 40px;
}

.shots-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.shots-head > div {
  display: grid;
  gap: 8px;
}

.shots-head h2 {
  font-size: 88px;
  line-height: 1;
}

.shots-head .lead {
  max-width: 700px;
  padding-bottom: 6px;
  font-size: 32px;
  text-align: right;
}

.shots {
  --shot-h: 580px;
  display: flex;
  align-self: center;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  min-height: 0;
}

.shots-5 {
  --shot-h: 540px;
  gap: 30px;
}

/* Six phones must fit the 1440px between the side paddings: at 450px tall
   each is 217px wide with its bezel, 1402px with the gaps. */
.shots-6 {
  --shot-h: 450px;
  gap: 20px;
}

.shot {
  display: grid;
  justify-items: center;
  gap: 16px;
  margin: 0;
}

/* A thin ink bezel with the phone's own corner radius (6.5% of its height). */
.shot img {
  width: auto;
  height: var(--shot-h);
  max-width: none;
  border: 5px solid var(--ink);
  border-radius: calc(var(--shot-h) * 0.065);
  box-shadow: 0 24px 48px rgb(20 10 60 / 0.2);
}

.shot figcaption {
  max-width: calc(var(--shot-h) * 0.52);
  font-family: var(--font-rounded);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

/* ---- Controls: fade away while presenting, back on mouse movement ---- */

.deck-controls {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: var(--r-pill);
  background: rgb(22 23 26 / 0.72);
  color: #ffffff;
  transition: opacity 300ms ease;
}

.deck-page.is-idle .deck-controls {
  opacity: 0;
}

.deck-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
}

.deck-btn:hover {
  background: rgb(255 255 255 / 0.14);
}

.deck-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.deck-btn .ico {
  width: 20px;
  height: 20px;
  stroke-width: 2.4;
}

.deck-count {
  min-width: 56px;
  font-family: var(--font-rounded);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.deck-progress {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  height: 4px;
}

.deck-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--cta);
  transition: width 360ms ease;
}

.deck-page :focus-visible {
  outline-color: var(--cta);
}

/* Without the script every slide is shown, one after another. */
.deck-page:not(.is-ready) {
  height: auto;
  overflow: auto;
}

.deck-page:not(.is-ready) .deck {
  position: static;
  height: auto;
  margin: 0 auto;
  transform: none;
}

.deck-page:not(.is-ready) .slide {
  position: relative;
  height: var(--stage-h);
  opacity: 1;
  visibility: visible;
}

.deck-page:not(.is-ready) .deck-controls,
.deck-page:not(.is-ready) .deck-progress {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .slide,
  .slide.is-current,
  .deck-progress span {
    transition: none;
  }
}
