/* Everything after the opening: one sheet of paper, three beats and a footer, with room around each.
   The beats: what guests see (a recording playing in a phone), how it works, and what you get for the price.
   Text is set in one left-aligned column to be read. On a laptop each beat is two columns, as the opening is.
   The start dialog is here too. */

.below {
  background-color: var(--paper); background-image: var(--fibre); background-size: 280px; background-blend-mode: multiply;
  color: var(--ink);
}
.beat { display: grid; align-content: center; gap: var(--beat-gap); min-height: 100svh; max-width: 34rem; margin-inline: auto; padding: var(--section) var(--gutter); --beat-gap: clamp(1.6rem, 4vw, 2.4rem); }
.beat h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem); line-height: 1.06; text-wrap: balance; }
.beat p, .beat li { font-size: var(--lead); line-height: 1.5; }
.beat .small { font-size: var(--small); line-height: 1.5; color: var(--ink-2); }

/* ---------- what guests see: a recording of a real invitation, playing in a phone ---------- */
/* js/film.js sets [data-state] on .film: idle, playing, paused or ended. */
/* On a phone the heading, the paragraph, the phone and the link share one screen, so this beat has less padding. */
.beat-film { padding-block: 2.5rem; }
.beat-text { display: grid; gap: 1rem; }
.film { display: grid; justify-items: center; gap: 0.9rem; }
.device {
  --dw: min(15.5rem, 64vw, (100svh - 23.5rem) * 0.462);
  position: relative; width: var(--dw); padding: calc(var(--dw) * 0.03); border-radius: calc(var(--dw) * 0.155);
  background: linear-gradient(145deg, #2a3833, #0d1613 40%, #18231f);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 calc(var(--dw) * 0.16) calc(var(--dw) * 0.22) calc(var(--dw) * -0.1) rgba(22, 34, 28, 0.5), 0 3px 8px rgba(22, 34, 28, 0.25);
}
.device-screen { display: block; width: 100%; height: auto; aspect-ratio: 390 / 844; border-radius: calc(var(--dw) * 0.128); object-fit: cover; background: #efe6d3; }
.device-tap { position: absolute; inset: 0; padding: 0; border: 0; border-radius: inherit; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* The play mark shows only when the film is not moving. */
.device-cue {
  position: absolute; left: 50%; top: 50%; width: 4rem; height: 4rem; margin: -2rem; border-radius: 50%;
  background: rgba(20, 32, 28, 0.6); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.7); transition: opacity 0.2s;
}
.device-cue::after { content: ""; position: absolute; left: 54%; top: 50%; translate: -50% -50%; border-left: 1rem solid #fff; border-block: 0.65rem solid transparent; }
.film[data-state="playing"] .device-cue { opacity: 0; }
.film .text-btn { padding: 0.6rem; font-size: var(--body); color: var(--ink); }

/* ---------- how it works, and what you get: a heading and a list ---------- */
.beat-body { display: grid; gap: var(--beat-gap); justify-items: start; }
.steps { display: grid; gap: 1.1rem; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 1.9rem 1fr; }
.steps li::before { content: counter(step); font-family: var(--display); font-size: 1.25em; line-height: 1.2; color: var(--wax); }
.gets { width: 100%; }
.gets li { padding: 0.75rem 0; border-top: 1px solid rgba(29, 58, 50, 0.2); }
.gets li:last-child { border-bottom: 1px solid rgba(29, 58, 50, 0.2); }
.beat-body > p + .small { margin-top: calc(var(--beat-gap) * -0.5); }
.beat-body > .gets + p { margin-top: calc(var(--beat-gap) * -0.35); }

/* ---------- footer ---------- */
.foot { max-width: 34rem; margin-inline: auto; padding: 0 var(--gutter) clamp(3rem, 8vw, 5rem); font-size: var(--small); line-height: 1.55; color: var(--ink-2); }

/* ---------- the start dialog ---------- */
.next {
  width: min(26rem, 100vw - 2rem); padding: 2.2rem clamp(1.4rem, 5vw, 2.2rem); border: 0; border-radius: 0.5rem; text-align: center;
  background-color: var(--paper); background-image: var(--fibre); background-size: 280px; background-blend-mode: multiply; color: var(--ink);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.7);
}
.next::backdrop { background: rgba(9, 22, 18, 0.72); }
.next h2 { font-size: 1.8rem; line-height: 1.1; }
.next p { margin: 0.8rem 0 1.5rem; }

@media (min-width: 62rem) {
  .beat { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); column-gap: var(--gap-5); align-items: start; max-width: 76rem; }
  .beat-list { align-items: start; }
  .beat-film { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; padding-block: var(--section); }
  .beat-text { max-width: 30rem; gap: 1.4rem; }
  .device { --dw: min(19rem, (100svh - 12rem) * 0.462); }
  .beat-body { max-width: 36rem; padding-top: 0.5rem; }
  .foot { max-width: 76rem; }
  .foot p { max-width: 36rem; }
}

/* ---------- the email form in the start dialog ---------- */
.interest, .interest-done { display: flex; flex-direction: column; align-items: center; }
.interest[hidden], .interest-done[hidden], .interest-error[hidden] { display: none; }
.interest p, .interest-done p { margin: 0.8rem 0 1.2rem; }
.interest-field { width: 100%; margin-bottom: 1.2rem; }
.interest-field input {
  width: 100%; padding: 0.3rem 0 0.35rem; text-align: center; background: transparent; color: var(--ink); caret-color: var(--ink);
  border: 0; border-bottom: 1px solid rgba(29, 58, 50, 0.4); border-radius: 0;
  font-family: var(--text); font-style: italic; font-size: 1.3rem; line-height: 1.3;
}
.interest-field input::placeholder { color: rgba(29, 58, 50, 0.5); opacity: 1; }
.interest-field input:focus { outline: 0; border-bottom-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
.interest .interest-error { margin: -0.4rem 0 1rem; color: var(--wax); font-size: var(--small); }
.interest .interest-small { margin: 1rem 0 0; font-size: var(--small); color: var(--ink-2); }
.next > form[method="dialog"] { margin-top: 1rem; }
.next .text-btn { min-height: 44px; }
