/* The deck on the web. deck.css is the deck's own look, copied unchanged; this file only places it:
   - STAGE (a wide screen): one 1920×1080 slide at a time, scaled to fit, fading slide to slide.
   - PHONE (held upright, or any narrow window): every slide in one column, each laid out again
     for a phone, playing its motion as it scrolls into view.
   web.js uses the same two media queries. */

/* ── What the deck's viewer gives every slide (Slides' own defaults; :where keeps them weak) ── */
:where(.deck) * { margin: 0; }
:where(.deck > section) { font: 32px/1.2 sans-serif; }
:where(.deck) h1 { font-size: 96px; font-weight: 600; }
:where(.deck) h2 { font-size: 64px; font-weight: 600; }
:where(.deck) h3 { font-size: 44px; font-weight: 600; }
:where(.deck) :is(p, li, h1, h2, h3) { overflow-wrap: break-word; text-wrap: pretty; }

html { background: var(--ink); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); -webkit-font-smoothing: antialiased; }
.deck a { color: inherit; text-decoration: none; }
.deck a:hover { color: var(--paper); }
.deck video { display: block; background: #000; }
.swipe-hint { display: none; }

/* The closing slide's company name stays on one line, as the deck's viewer shows it. */
#close > .eyebrow { white-space: nowrap; }

/* Motion plays as a slide arrives: until then, nothing on it is animating. */
.deck > section:not(.on) :is(.a, .f, .grid-210) { animation-name: none; }

/* ── STAGE ─────────────────────────────────────────────────────────────────────────────── */
@media (min-width: 761px) and (min-aspect-ratio: 4/5) {
  html, body { height: 100%; overflow: hidden; }
  .deck { position: fixed; inset: 0; overflow: hidden; }
  .deck > section {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1920px;
    height: 1080px;
    margin: -540px 0 0 -960px;
    overflow: hidden;
    transform: scale(var(--s, 0.5));
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease, visibility 0s linear 0.6s;
  }
  .deck > section.on,
  .deck:not(.ready) > section:first-child {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease;
  }

  /* The controls: out of the way, back when the pointer moves. */
  .ui {
    position: fixed;
    right: 20px;
    bottom: 18px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border-radius: 999px;
    background: rgba(11, 13, 17, 0.55);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    font: 500 13px/1 'Inter', system-ui, sans-serif;
    color: var(--mute);
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
    opacity: 0;
    transition: opacity 0.4s ease;
  }
  .ui.awake, .ui:hover, .ui:focus-within { opacity: 1; }
  .ui b { color: var(--paper); font-weight: 600; }
  .ui-count { padding: 0 6px; }
  .ui button {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--paper);
    cursor: pointer;
  }
  .ui button:hover { background: rgba(242, 244, 247, 0.1); }
  .ui button:disabled { opacity: 0.3; cursor: default; background: transparent; }
  .ui svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .ui-full[hidden] { display: none; }
}

/* ── PHONE ─────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 760px), (max-aspect-ratio: 799/1000) {
  .ui { display: none; }
  html { scroll-snap-type: y proximity; }

  .deck {
    --glow: 12px;
    --glow-big: 30px;
    --pad: 24px;
  }
  .deck > section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    padding: max(64px, calc(env(safe-area-inset-top) + 40px)) var(--pad) max(56px, calc(env(safe-area-inset-bottom) + 40px));
    justify-content: center;
    gap: 28px;
    overflow: hidden;
    scroll-snap-align: start;
  }
  /* Nudges made by hand on the 1920 canvas mean nothing here. */
  .deck * { translate: none !important; }
  .deck > section:not(.on) :is(.a, .f) { opacity: 0; }

  /* Type, for a hand-held screen. */
  .deck .display { font-size: clamp(64px, 19vw, 120px); letter-spacing: -2px; }
  .deck .title { font-size: clamp(36px, 10vw, 60px); letter-spacing: -1px; line-height: 1.05; width: auto !important; }
  .deck .sub { font-size: clamp(20px, 5.6vw, 30px); letter-spacing: -0.3px; }
  .deck :is(.lede, .item) { font-size: clamp(16px, 4.4vw, 22px); }
  .deck :is(.eyebrow, .label) { font-size: 12px; letter-spacing: 3px; }
  .deck .note { font-size: 15px; }
  .deck .photo, .deck .clip { border-radius: 16px; }

  .step, .point, .surface { gap: 20px; padding: 14px 0; }
  .head-stack, .brand-head, .proof-head, .staff-copy { gap: 14px; }
  .point-copy { gap: 4px; }

  /* Split slides: words, then the picture, then the list. */
  .s-split { flex-direction: column; justify-content: center; }
  #guests .split-copy, #custom .brand-copy { display: contents; }
  #guests .head-stack, #custom .brand-head { order: 1; }
  #guests > .photo { order: 2; width: 100% !important; height: auto !important; aspect-ratio: 1 / 1; }
  #guests .steps { order: 3; width: 100%; }
  #custom .media-pair { order: 2; gap: 10px; width: 100%; align-items: stretch; }
  #custom .media-pair > * { min-width: 0; }
  #custom .media-pair > :first-child { flex: 463 1 0; width: auto !important; height: auto !important; aspect-ratio: 463 / 824; }
  #custom .media-pair > :last-child { flex: 520 1 0; width: auto !important; height: auto !important; aspect-ratio: 520 / 824; }
  #custom .points { order: 3; }

  /* The cover: the whole set edge to edge (guests, backdrop and robot), fading into the background,
     the name under it. */
  #cover { justify-content: center; gap: 0; padding-bottom: max(96px, calc(env(safe-area-inset-bottom) + 80px)); }
  #cover > img {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: calc(100% + 2 * var(--pad)) !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    margin: 0 calc(-1 * var(--pad)) !important;
    transform: none !important;
    object-fit: cover;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 24%, #000 66%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 24%, #000 66%, transparent 100%);
  }
  #cover > div:nth-of-type(1) { display: none; }
  #cover > div:nth-of-type(2) { margin-top: 4px; }
  #cover > div:nth-of-type(2) { position: relative; z-index: 1; flex-direction: column !important; align-items: flex-start !important; gap: 14px; }
  #cover > div:nth-of-type(2) > div { gap: 6px !important; }
  #cover > div:nth-of-type(2) p:first-child { font-size: 12px !important; letter-spacing: 3px !important; width: auto !important; }
  #cover h1 { font-size: clamp(72px, 22vw, 130px) !important; letter-spacing: -3px !important; }
  #cover > div:nth-of-type(2) > p { font-size: clamp(17px, 4.6vw, 22px) !important; text-align: left !important; width: auto !important; }
  .swipe-hint {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: max(24px, calc(env(safe-area-inset-bottom) + 12px));
    z-index: 1;
    text-align: center;
    font: 500 11px/1 'Inter', system-ui, sans-serif;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--mute);
    animation: nudge 2.4s ease-in-out 1.6s infinite both;
  }
  .swipe-hint::before {
    content: "";
    display: block;
    width: 9px;
    height: 9px;
    margin: 0 auto 10px;
    border: solid currentColor;
    border-width: 1.5px 0 0 1.5px;
    transform: rotate(45deg);
  }
  @keyframes nudge { 0%, 60%, 100% { transform: none; opacity: 0.9; } 30% { transform: translateY(-6px); opacity: 1; } }

  /* Branding: the picture full width, the four places under it. */
  #brand .surfaces-body { flex-direction: column; gap: 16px; margin-top: 0; }
  #brand .surfaces-body > img { width: 100% !important; height: auto !important; aspect-ratio: 906 / 607; transform: none !important; }

  /* Proof: every video of the night behind the number. */
  #proof { justify-content: flex-end; }
  #proof .grid-210 { position: absolute; inset: 0; width: 100% !important; height: 100% !important; transform: none !important; object-fit: cover; opacity: 0.32 !important; }
  #proof::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--ink) 34%, transparent 80%); }
  #proof .proof-copy { position: relative; z-index: 1; flex: 0 0 auto; gap: 40px; }
  #proof .display { font-size: clamp(96px, 30vw, 160px); }

  /* Packages: side by side still, the shared part under them. */
  .s-tiers { justify-content: center; }
  .tiers { gap: 16px; }
  .tier { gap: 10px; padding-top: 20px; }
  .tier .title { font-size: clamp(30px, 8.6vw, 48px); }
  .tier .lede { font-size: clamp(14px, 3.8vw, 18px); }
  .both { flex-direction: column; align-items: stretch; gap: 0; padding: 20px; border-radius: 16px; }
  .both-rows { gap: 16px; }
  .both-row { flex-direction: column; gap: 4px; }
  .both-row .label { width: auto; }
  .both-row .item { font-size: clamp(15px, 4.2vw, 20px); }

  /* Crew: one row each, the photo beside the role. */
  .crew { flex-direction: column; align-items: stretch; gap: 14px; }
  .crew-card { flex-direction: row; align-items: center; gap: 18px; }
  .crew-card .photo { width: 96px !important; height: 136px !important; flex: 0 0 auto; border-radius: 12px; }

  /* Close: the party behind, the way to reach you in front. */
  #close { justify-content: flex-end; gap: 20px; }
  #close .backdrop { width: 100% !important; height: 100% !important; object-position: 62% 50%; }
  #close > .eyebrow, #close .close-copy { position: relative; z-index: 1; }
  .close-copy { gap: 28px; }
  .contact { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .deck *, .deck > section { animation: none !important; transition: none !important; }
}
