:root {
  --navy: #0b1c3a;
  --navy-2: #12284f;
  --navy-3: #18325f;
  --cream: #f6efe4;
  --paper: #fbf6ee;
  --gold: #d4a24a;
  --ink: #1b2436;
  --muted: #5d4f42;
  --line: rgba(11, 28, 58, 0.1);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Montserrat", "Segoe UI", sans-serif;
  --shadow: 0 18px 40px rgba(8, 16, 32, 0.28);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html:fullscreen, html:-webkit-full-screen,
body:fullscreen, body:-webkit-full-screen {
  background: #050b16;
  height: 100%;
}
body {
  font-family: var(--sans);
  background: #050b16;
  color: var(--ink);
  overflow: hidden;
}
.deck {
  position: relative;
  height: 100%;
  height: 100dvh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1200px 700px at 80% 10%, rgba(212, 162, 74, 0.08), transparent 50%),
    linear-gradient(180deg, #07101e, #050b16);
  touch-action: manipulation;
}
.progress {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  z-index: 8;
  background: rgba(255,255,255,0.08);
}
.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), #f0d08a);
  transition: width 0.28s ease;
}
.stage {
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  padding: 0;
  position: relative;
}
.slide {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: #0b1c3a;
}
.board {
  width: 100%;
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 38px 48px 42px;
  position: relative;
  color: #f4eadc;
  overflow: hidden;
  transform-origin: center center;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), transparent 28%),
    radial-gradient(900px 500px at 100% 0%, rgba(212,162,74,0.12), transparent 46%),
    linear-gradient(145deg, var(--navy), var(--navy-2) 58%, #0e2348);
}
.board::before, .board::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.board::before {
  width: 220px; height: 220px;
  right: -70px; top: -80px;
  border: 18px solid rgba(212,162,74,0.16);
  border-radius: 50%;
}
.board::after {
  left: 28px; bottom: 22px; right: 28px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212,162,74,0.45), transparent);
}
.slide.is-on { display: flex; }
.slide.is-in { animation: pptIn 0.42s cubic-bezier(.2,.8,.2,1) both; }
.slide.is-in.back { animation-name: pptBack; }
@keyframes pptIn {
  from { opacity: 0; transform: scale(0.985) translateX(36px); }
  to { opacity: 1; transform: none; }
}
@keyframes pptBack {
  from { opacity: 0; transform: scale(0.985) translateX(-36px); }
  to { opacity: 1; transform: none; }
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.reveal { opacity: 0; transform: translateY(16px); }
.reveal.is-on {
  opacity: 1;
  transform: none;
  animation: popIn 0.38s cubic-bezier(.2,.8,.2,1) both;
}

.kicker {
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 8px;
}
h1, h2 {
  font-family: var(--serif);
  font-weight: 600;
  margin: 0;
  line-height: 1.12;
  color: #fff8ee;
}
h1 { font-size: clamp(2.1rem, 4.2vw, 3.55rem); }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.45rem); }
.lede, p, li { color: rgba(246, 239, 228, 0.86); }
.lede { font-size: 1.02rem; margin: 10px 0 0; max-width: 48rem; }

.photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.frame {
  overflow: hidden;
  border-radius: 6px;
  box-shadow: var(--shadow);
  position: relative;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.frame.cutout {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}
.frame.cutout .photo {
  object-fit: contain;
  background: transparent;
  filter: drop-shadow(0 14px 18px rgba(0,0,0,0.28));
}
.card .media .frame,
.allergen .media .frame,
.wf .media .frame,
.compare .media .frame {
  height: 100%;
  background: transparent;
}
.card .media .frame.cutout .photo,
.allergen .media .frame.cutout .photo,
.wf .media .frame.cutout .photo {
  object-fit: contain;
  padding: 6px;
}
.allergen .media { background: #f4eadc; }
.frame.fallback::after {
  content: attr(data-fallback);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  font-family: var(--serif);
  color: var(--gold);
}

.ribbon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212,162,74,0.14);
  border: 1px solid rgba(212,162,74,0.38);
  color: var(--gold);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.doodle { display: none; }

.cover {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 28px;
  height: 100%;
  min-height: 0;
}
.cover-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1;
}
.cover .cluster {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 1.4fr) minmax(0, 0.7fr);
  gap: 12px;
  min-height: 0;
  height: 100%;
}
.cover .cluster > * { min-height: 0; overflow: visible; }
.cover .cluster .photo { object-fit: contain !important; }
.cover .cluster .hero {
  grid-column: 1 / -1;
}
.names { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.name-slot {
  min-width: 0;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(212,162,74,0.55);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  color: #fff;
  outline: none;
}
.name-slot:empty::before { content: attr(data-placeholder); color: rgba(255,255,255,0.45); }

.head { margin-bottom: 16px; z-index: 1; }
.grid-2 {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 18px;
  flex: 1;
  min-height: 0;
}
.cards-3, .cards-4, .cards-6, .prep-3, .matches {
  display: grid;
  gap: 14px;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}
.cards-3, .prep-3, .matches { grid-template-columns: repeat(3, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-6 { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; }

.card, .agenda-item, .point, .step, .panel, .wf, .allergen {
  background: var(--paper);
  color: var(--ink);
  border-radius: 4px 18px 4px 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.card { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.card .media {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  aspect-ratio: 4 / 3;
}
.cards-6 .card .media,
.prep-3 .card .media,
.cards-3 .card .media,
.matches .card .media,
.cards-4 .card .media {
  aspect-ratio: 4 / 3;
  flex: 1 1 auto;
}
.card .media .frame,
.card .media .frame.fill,
.step .media .frame,
.loop-photo .frame {
  height: 100%;
  width: 100%;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #15233f;
}
.frame.fill .photo,
.card .media .photo {
  object-fit: cover !important;
  padding: 0 !important;
  filter: none;
}
.card .body { padding: 12px 14px 14px; flex: 0 0 auto; min-height: 96px; }
.card h3, .agenda-item h3, .point strong, .step h3, .panel h3, .wf h3 {
  font-family: var(--serif);
  margin: 0 0 6px;
  font-size: 1.16rem;
  color: var(--navy);
}
.card p, .agenda-item p, .point span, .step p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--muted);
}

.agenda-list { display: grid; gap: 10px; align-content: start; }
.agenda-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  padding: 12px 14px;
}
.num {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--gold);
  line-height: 1;
}
.info-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  flex: 1;
  min-height: 0;
}
.points { display: grid; gap: 8px; align-content: start; }
.point { padding: 10px 12px; }
.point strong { display: block; }
.timeline, .workflow {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}
.step {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.step .media { flex: 1 1 auto; min-height: 0; aspect-ratio: 1; }
.step-copy { padding: 12px 12px 14px; }
.step .badge, .seq .badge {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  display: grid; place-items: center;
  font-weight: 700;
  margin-bottom: 8px;
}
.loop {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 16px;
  flex: 1;
  min-height: 0;
}
.loop-photo { min-height: 0; border-radius: 4px 18px 4px 18px; overflow: hidden; box-shadow: var(--shadow); }
.loop-side { display: flex; flex-direction: column; min-height: 0; gap: 12px; }
.seq {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1;
  margin-top: 0;
  align-items: stretch;
}
.loop-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1;
  align-content: stretch;
}
.loop-step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  background: var(--paper);
  color: var(--ink);
  border-radius: 4px 18px 4px 18px;
  box-shadow: var(--shadow);
  padding: 16px 16px 18px;
  min-height: 0;
}
.loop-step h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 1.12rem; color: var(--navy); }
.loop-step p { margin: 0; font-size: 0.86rem; color: var(--muted); line-height: 1.4; }
.note {
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 4px solid var(--gold);
  background: rgba(246, 239, 228, 0.1);
  color: #fff8ee;
  border-radius: 0 12px 12px 0;
}
.hygiene {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 16px;
  flex: 1;
  min-height: 0;
}
.photos-stack { display: grid; grid-template-rows: 1fr 1fr; gap: 12px; min-height: 0; }
.split-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.split-lists ul { margin: 0; padding: 0 0 0 1.1rem; }
.split-lists li { margin: 0 0 10px; font-size: 0.9rem; line-height: 1.4; color: var(--muted); }
.panel { padding: 14px; }
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  flex: 1;
  min-height: 0;
}
.compare .col { display: flex; flex-direction: column; min-height: 0; }
.compare .media { height: 38%; min-height: 110px; border-radius: 8px; overflow: hidden; margin-bottom: 10px; }
.do h3 { color: #1d6b46; }
.dont h3 { color: #8a3b32; }
.compare ul { margin: 0; padding-left: 1.15rem; }
.compare li { margin-bottom: 7px; font-size: 0.9rem; color: var(--muted); }
.allergens {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
  margin: 8px 0 12px;
}
.allergens + .points {
  grid-template-columns: repeat(2, 1fr);
  flex: 1;
}
.allergen .media { height: 72px; background: #fff; }
.allergen .media .photo { object-fit: contain; }
.allergen span { display: block; padding: 6px; font-size: 0.7rem; color: var(--navy); font-weight: 650; }
.photo-text {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  flex: 1;
  min-height: 0;
}
.checklist { list-style: none; padding: 0; margin: 10px 0 0; }
.checklist li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.96rem;
  color: #fff8ee;
}
.checklist li::before {
  content: "";
  width: 14px; height: 14px;
  margin-top: 4px;
  border-radius: 3px;
  background: var(--gold);
  box-shadow: inset 0 0 0 3px var(--navy);
}
.wf .media { height: 120px; }
.wf h3 { padding: 10px; text-align: center; font-size: 1.02rem; }
.close {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  height: 100%;
}
.thanks {
  font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 5rem);
  color: #fff8ee;
  margin: 8px 0 4px;
}
.q { font-size: 1.15rem; color: var(--gold); margin: 0 0 16px; }
.photo-text > .frame.cutout,
.close > .frame.cutout,
.grid-2 > .frame.cutout,
.info-grid > .frame.cutout {
  align-self: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  height: 100%;
}
.photo-text > .frame.fill,
.info-grid > .frame.fill {
  height: 100%;
}
.info-grid > .frame.cutout {
  overflow: hidden;
  height: 100%;
  min-height: 0;
}
.info-grid > .frame.cutout .photo {
  object-fit: contain;
  object-position: center;
}

.chrome { display: none !important; }

.slide-no {
  position: absolute;
  right: 22px;
  bottom: 14px;
  z-index: 3;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.42);
}

@media (prefers-reduced-motion: reduce) {
  .slide.is-in, .reveal.is-on {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Phone landscape: fill the whole screen, no 16:9 letterbox. */
@media (max-width: 920px) and (orientation: landscape) {
  html, body { height: 100%; overflow: hidden; }
  .deck {
    place-items: stretch;
    width: 100%;
    height: 100%;
    height: 100dvh;
  }
  .stage {
    width: 100% !important;
    height: 100% !important;
  }
  .slide {
    align-items: center;
    justify-content: center;
  }
  .board {
    width: 1600px;
    height: 900px;
    flex: 0 0 auto;
  }
}

/* Phone portrait: rotate the deck 90° so the slide fills the phone. */
@media (max-width: 920px) and (orientation: portrait) {
  html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
    inset: 0;
  }
  .deck {
    position: fixed !important;
    top: 0 !important;
    left: 100vw !important;
    width: 100vh !important;
    height: 100vw !important;
    width: 100dvh !important;
    height: 100dvw !important;
    transform: rotate(90deg) !important;
    transform-origin: top left !important;
    place-items: stretch !important;
  }
  .stage {
    width: 100% !important;
    height: 100% !important;
  }
  .slide {
    align-items: center;
    justify-content: center;
  }
  .board {
    width: 1600px;
    height: 900px;
    flex: 0 0 auto;
  }
}

