@font-face {
    font-family: "Norman";
    src: url("../assets/fonts/NormanMedium.otf") format("opentype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
  }
  @font-face {
    font-family: "Neuf";
    src: url("../assets/fonts/NeufBold.otf") format("opentype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
  }
  :root {
    color-scheme: dark;
    --wine-dark: #590000;
    --wine-light: #aa1515;
    --pink: #ff8fb3;
    --yellow: #ffc96b;
    --shadow: 30, 0, 0;

    /* Norman: names. Neuf: every yellow label and the button.
       The trial Neuf has no apostrophe, so that one mark falls back to the system sans. */
    --display: "Norman", "Bodoni 72", "Didot", "Bodoni MT", Georgia, serif;
    --label: "Neuf", "Archivo", "Helvetica Neue", Arial, sans-serif;

    /* Booth width drives everything else. */
    --b: clamp(220px, 78vw, 320px);
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  *, *::before, *::after { box-sizing: inherit; }
  html { height: 100%; scroll-padding-top: env(safe-area-inset-top, 0px); }
  body {
    margin: 0;
    min-height: 100%;
    color: var(--yellow);
    background-color: var(--wine-dark);
    background-image: linear-gradient(90deg, var(--wine-dark) 0%, var(--wine-light) 100%);
    background-attachment: fixed;
    font-family: var(--label);
  }

  .page {
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 40px max(24px, env(safe-area-inset-right, 0px)) 56px max(24px, env(safe-area-inset-left, 0px));
  }
  .layout {
    width: min(100%, 68rem);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-content: center;
    gap: clamp(32px, 5vw, 80px);
    align-items: center;
    justify-items: center;
  }

  /* ---------- Booth + strip ---------- */
  .stage {
    position: relative;
    width: var(--b);
    filter: drop-shadow(0 22px 28px rgba(var(--shadow), .5));
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .stage:focus-visible { outline: 2px solid var(--yellow); outline-offset: 8px; border-radius: 4px; }
  .booth {
    display: block;
    width: 100%;
    height: auto;
  }
  /* Window that starts at the roller's lower edge, so the strip
     appears to feed out of the slot. */
  .slot {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(var(--b) * 0.234);   /* 13.5% of booth height (461x799 art) */
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
  }
  .slot::before {            /* soft shadow under the roller */
    content: "";
    position: absolute;
    inset: 0 15% auto 15%;   /* the art has transparent padding; stay inside the opening */
    height: calc(var(--b) * 0.06);
    background: linear-gradient(rgba(0, 0, 0, .35), transparent);
    z-index: 1;
  }
  .strip {
    position: absolute;
    left: 50%;
    top: 0;
    width: 42.1%;            /* 194 / 461, from sizing_example.png */
    margin-left: -21.05%;
    transform: translateY(-100%);   /* hidden above the slot until dispensed */
    will-change: transform;
  }
  .strip img {
    display: block;
    width: 100%;
    height: auto;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .35);
  }

  /* ---------- Details ---------- */
  .details {
    width: min(36rem, 100%);
    text-align: center;
    container-type: inline-size;
  }
  .details > * {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .9s ease, transform .9s ease;
  }
  .is-done .details > * { opacity: 1; transform: none; }
  .is-done .details > :nth-child(2) { transition-delay: .25s; }

  .intro {
    margin: 0;
    font-family: var(--label);
    font-weight: 700;
    font-size: clamp(.8rem, 2.4vw, 1rem);
    line-height: 1.4;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--yellow);
  }
  .names {
    margin: 0.5rem 0 0;
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(3rem, 14vw, 6.6rem);       /* fallback */
    font-size: min(6.6rem, 19.5cqw);            /* 50% larger than before; shrinks to stay on one line */
    line-height: 1;
    letter-spacing: -.01em;
    color: var(--pink);
  }

  .invite {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-block;
    margin-top: 5.4rem;
    padding: 1rem 2.4rem;
    border: 1px solid var(--yellow);
    border-radius: 999px;
    color: var(--yellow);
    font-family: var(--label);
    font-weight: 700;
    font-size: clamp(.72rem, 2vw, .85rem);
    letter-spacing: .18em;
    text-transform: uppercase;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition:
      opacity .9s ease,
      transform .9s ease,
      color .3s ease,
      box-shadow .3s ease,
      translate .25s ease,
      scale .25s ease;
  }
  .is-done .invite { transition-delay: .6s, .6s, 0s, 0s, 0s, 0s; }
  /* Yellow fill that sweeps in from the left. */
  .invite::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--yellow);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .4s cubic-bezier(.2, .7, .2, 1);
  }
  .invite:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; }
  .invite:focus-visible::before { transform: scaleX(1); }
  .invite:focus-visible { color: var(--wine-dark); }
  @media (hover: hover) {
    .is-done .invite:hover {
      color: var(--wine-dark);
      translate: 0 -3px;
      scale: 1.05;
      box-shadow: 0 10px 24px rgba(var(--shadow), .55);
    }
    .invite:hover::before { transform: scaleX(1); }
  }
  .invite:active { scale: .97; translate: 0 0; }
  .invite:active::before { transform: scaleX(1); }
  .invite:active { color: var(--wine-dark); }

  @media (min-width: 860px) {
    :root { --b: max(220px, min(32vw, calc((100svh - 80px) / 1.75), 380px)); }
    .layout { grid-template-columns: auto minmax(0, 36rem); }
  }

  @media (prefers-reduced-motion: reduce) {
    .details > *, .invite, .invite::before { transition: none; opacity: 1; transform: none; }
    .strip { transform: translateY(calc(var(--b) * 0.141)); }
  }
