/* The fan page, laid out for a phone first. Each section is sized against the height of the
   screen that is actually visible (svh) less the bar pinned to its foot, so the thing a section
   shows and the words that explain it are on screen together. */
:root { --foot: 66px; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 12px var(--gutter) 6px; max-width: var(--measure); margin: 0 auto; }
@media (min-width: 900px) { .top { padding: 22px var(--gutter); } }

/* ---- The fan ---- */
.hero { position: relative; overflow: hidden; padding-bottom: 8px; }
.hero h1 { font-size: 7.9vw; white-space: nowrap; }
.hero .sub { margin-top: 8px; font-size: clamp(14.5px, 4.1vw, 16.5px); line-height: 1.32; color: var(--soft); max-width: 23em; }
.hero .sub strong { color: var(--ink); font-weight: 600; }
.hero h1 { margin-top: 8px; }
@media (min-width: 561px) { .hero h1 { font-size: clamp(44px, 6vw, 72px); } }
@media (min-width: 900px) { .hero h1, .hero .sub { text-align: center; margin-inline: auto; } .hero .sub { font-size: 20px; } }

/* The cards are held in a fan. They are dealt out as the page opens, then turn slowly through the
   hand; the one that reaches the middle lifts and plays. A card is as big as the screen allows. */
.ring { --w: clamp(150px, min(54vw, (100svh - 344px) * .5628), 230px); --reach: 760px; height: calc(var(--w) * 1.777 + 64px); margin-top: 6px; }
.card { left: 50%; top: 26px; width: var(--w); margin-left: calc(var(--w) / -2); aspect-ratio: 390 / 693; transform-origin: 50% calc(50% + var(--reach)); }
.leaf { position: absolute; inset: 0; padding: 6px; border-radius: 16px; background: #fffefb; transform: translateY(calc(-14px * var(--near, 0))) scale(calc(1 + .07 * var(--near, 0))); box-shadow: 0 1px 0 rgb(21 19 26 / .08), 0 calc(10px + 22px * var(--near, 0)) calc(18px + 30px * var(--near, 0)) -12px rgb(21 19 26 / calc(.3 + .2 * var(--near, 0))); }
.leaf span { position: absolute; inset: 6px; border-radius: 11px; overflow: hidden; background: var(--stone); }
/* The colour of the card in the middle, glowing on the paper behind the hand. */
.glow { position: absolute; left: 50%; top: 150px; width: 330px; height: 330px; margin-left: -165px; border-radius: 50%; filter: blur(64px); opacity: .5; background: var(--stone); transition: background-color 1.2s ease; pointer-events: none; }

/* Under the fan: whose invitation is in front. The words are the button that opens it. */
.caption { margin-top: 2px; }
.caption-words { display: grid; gap: 2px; padding: 4px 0; border: 0; background: none; color: inherit; cursor: pointer; }
.caption-name { color: var(--carmine); font-size: 27px; transition: opacity .25s ease; }
.caption-name.out { opacity: 0; }
.caption-for { font: 400 15px/1.3 var(--body); opacity: 1; color: var(--soft); margin: 0; }
.caption-for u { color: var(--ink); text-underline-offset: 3px; }

.go { display: grid; gap: 12px; padding-top: 20px; padding-bottom: 30px; }
.go .button { width: 100%; }
.go p { font-size: 17px; text-align: center; }
.go .now { font-size: 19px; }
.go strong { color: var(--ink); }
@media (min-width: 900px) { .go { justify-items: center; text-align: center; } .go .button { width: auto; } }

/* ---- How it works ---- */
.talk { padding: 26px 0 34px; border-top: 1px solid var(--rule); }
.talk h2 { font-size: 7.4vw; white-space: nowrap; margin-bottom: 12px; }
.talk h2 em { display: inline; }
@media (min-width: 561px) { .talk h2 { font-size: clamp(40px, 4.4vw, 56px); text-align: center; } }

/* Four steps, all named, two to a row. The one on screen is lit; pressing one plays from there. */
.steps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; max-width: 460px; }
.steps-grid button { display: flex; align-items: center; gap: 8px; width: 100%; height: 42px; padding: 0 10px 0 6px; border: 0; border-radius: 21px; background: var(--stone); color: var(--ink); text-align: left; cursor: pointer; transition: background-color .35s ease, color .35s ease; }
.steps-grid b { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; font-size: 15px; background: var(--paper); transition: background-color .35s ease, color .35s ease; }
.steps-grid span { font-weight: 600; font-size: 14px; line-height: 1.12; }
.steps-grid li.done b { color: var(--carmine); }
.steps-grid li.on button { background: var(--ink); color: var(--paper); }
.steps-grid li.on b { background: var(--carmine); color: #fff; }
@media (min-width: 561px) { .steps-grid { margin-inline: auto; } }

/* The phone is as tall as the screen has room for under the heading and the steps. */
.chat-stage { --h: clamp(300px, calc(100svh - var(--foot) - 196px), 560px); position: relative; display: grid; width: calc(var(--h) * 390 / 844); margin: 0 auto; container-type: inline-size; }
.chat-stage .phone { grid-area: 1 / 1; width: 100%; border-width: 2.4cqw; border-radius: 13cqw; }
/* The invitation grows from where its link sits in the chat. */
.chat-stage .made { transform-origin: 24% 66%; transform: scale(.16); opacity: 0; transition: transform .6s cubic-bezier(.2, .85, .25, 1), opacity .28s ease; pointer-events: none; }
.chat-stage.show-made .made { transform: none; opacity: 1; }

/* The chat, drawn as WhatsApp looks. Every size follows the phone's width. */
.chat { display: grid; grid-template-rows: auto 1fr; background: #efe7dd; font: 400 6.7cqw/1.3 system-ui, -apple-system, "Segoe UI", sans-serif; color: #111b21; }
.chat-head { display: flex; align-items: center; gap: .6em; padding: 1.5em .8em .6em; background: #f6f5f3; border-bottom: 1px solid rgb(0 0 0 / .08); font-weight: 600; }
.chat-head i { width: 2.1em; height: 2.1em; border-radius: 50%; background: var(--carmine) url("/logo/postmark-paper.svg") center / 82% no-repeat; }
.chat-head small { display: block; font-weight: 400; font-size: .78em; color: #667781; }
.chat-body { display: flex; flex-direction: column; justify-content: flex-start; gap: .45em; padding: .7em .6em 1em; overflow: hidden; }
.msg { max-width: 88%; padding: .42em .65em; border-radius: .65em; border-top-left-radius: .15em; background: #fff; box-shadow: 0 1px .5px rgb(0 0 0 / .13); align-self: flex-start; animation: msg-in .28s ease both; white-space: pre-line; }
.msg.me { align-self: flex-end; background: #d9fdd3; border-top-left-radius: .65em; border-top-right-radius: .15em; }
.msg b { font-weight: 600; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.voice { display: flex; align-items: center; gap: .6em; min-width: 11em; }
.voice::before { content: ""; width: 0; height: 0; border-left: .8em solid #54656f; border-block: .5em solid transparent; }
.voice span { flex: 1; height: 1.3em; background: repeating-linear-gradient(90deg, #8fa39b 0 2px, transparent 2px 5px); -webkit-mask: radial-gradient(ellipse 60% 100% at 30% 50%, #000 40%, rgb(0 0 0 / .45)); mask: radial-gradient(ellipse 60% 100% at 30% 50%, #000 40%, rgb(0 0 0 / .45)); }
.voice small { font-size: .8em; color: #667781; }
.link { display: grid; grid-template-columns: 3.6em 1fr; gap: .6em; align-items: center; margin-top: .4em; padding: .35em; border-radius: .45em; background: #f0f2f5; font-size: .92em; }
.link img { width: 3.6em; height: 3.6em; object-fit: cover; object-position: 50% 70%; border-radius: .3em; }
.link small { display: block; color: #667781; }
.typing { align-self: flex-start; display: flex; gap: .3em; padding: .75em .8em; border-radius: .65em; background: #fff; }
.typing i { width: .45em; height: .45em; border-radius: 50%; background: #9aa5ab; animation: typing 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 50% { opacity: .3; } }
/* The couple's own words, pinned to the part of the invitation they became. */
.said { position: absolute; z-index: 2; left: 50%; bottom: 2.5%; translate: -50% 0; max-width: 92%; width: max-content; padding: .5em .8em; background: #d9fdd3; color: #111b21; border-radius: .65em .65em .15em .65em; font: 500 6.7cqw/1.3 system-ui, sans-serif; box-shadow: 0 6px 18px rgb(0 0 0 / .35); opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease; }
.said.on { opacity: 1; transform: none; }
/* ---- What you get ---- */
.price { padding: 48px 0 52px; }
.price h2 { font-size: clamp(30px, 8.2vw, 56px); white-space: nowrap; }
.price h2 em { display: inline; font-size: 1.5em; line-height: .9; }
.terms { margin-top: 10px; color: var(--soft); }
.included { margin: 20px 0 26px; }
.included li { padding: 12px 0 12px 36px; font-size: 18px; }
.included li::before { top: 16px; }
.refund { margin-top: 18px; text-align: center; }
@media (min-width: 900px) { .refund { text-align: left; } }

.questions { padding: 48px 0 40px; }
.questions h2 { margin-bottom: 18px; }
.qa summary { padding: 17px 0; font-size: 18px; }
.foot { display: grid; gap: 8px; padding-bottom: calc(var(--foot) + 28px); }
.foot a { color: inherit; margin: 0 8px; text-underline-offset: 3px; }
.sticky { min-height: var(--foot); }
.sticky[hidden] { display: none; }
.sticky span { font-weight: 400; }
@media (min-width: 900px) { .price .wrap, .questions .wrap { max-width: 760px; } .qa { grid-template-columns: 1fr; } }
