/* A card table: every screen is a playing card on felt. Felt, card stock, the two pip colours, the blue of a card back. One typeface: Besley, a Clarendon. */
@font-face { font-family: Besley; src: url(/fonts/besley.woff2) format('woff2'); font-weight: 400 900; font-display: swap; }
:root {
  --felt: #17603f; --felt-deep: #0c3d29; --stock: #fbfaf5; --ink: #17181a; --pip: #c9212e; --back: #24408e; --print: #f4ecd2;
  --font: Besley, Georgia, 'Times New Roman', serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
[hidden] { display: none !important; }
body {
  margin: 0; height: 100dvh; overflow: hidden; display: flex; flex-direction: column;
  color: var(--print); font: 400 17px/1.45 var(--font);
  background: radial-gradient(130% 85% at 50% 18%, #1f7550 0%, var(--felt) 42%, var(--felt-deep) 100%);
}
/* the nap of the felt */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; opacity: .22; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.brand, main { position: relative; width: 100%; max-width: 480px; margin: 0 auto; padding: 0 20px; }
.brand { padding-top: max(16px, env(safe-area-inset-top)); font-weight: 700; font-size: 16px; letter-spacing: .01em; }
main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-bottom: max(16px, env(safe-area-inset-bottom)); }

.fine { margin: 10px 0 0; text-align: center; font-size: 14px; color: rgba(244, 236, 210, .78); }
.fine a { color: inherit; }

.btn { display: block; width: 100%; border: 0; border-radius: 12px; padding: 16px 18px; cursor: pointer; background: var(--ink); color: var(--stock); font: 800 19px/1.2 var(--font); }
.btn:active { transform: translateY(2px); }
.btn:disabled { opacity: .55; }
:focus-visible { outline: 3px solid var(--back); outline-offset: 2px; }

/* --- every later step is one playing card --- */
.stack { position: relative; margin: auto 0; }
/* the cards still to come, face down under this one: their top edges show */
.stack::before, .stack::after { content: ''; position: absolute; inset: 0; border-radius: 20px; border: 5px solid var(--stock); box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
  background-color: var(--back); background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .16) 0 2px, transparent 2px 9px), repeating-linear-gradient(-45deg, rgba(255, 255, 255, .16) 0 2px, transparent 2px 9px); }
.stack::before { transform: translateY(-20px) scaleX(.88); }
.stack::after { transform: translateY(-10px) scaleX(.94); }
.stack[data-behind='1']::before, .stack[data-behind='0']::before, .stack[data-behind='0']::after { display: none; }
.card { position: relative; z-index: 1; display: flex; flex-direction: column; aspect-ratio: 5 / 7; max-height: calc(100dvh - 150px); width: 100%; padding: 22px 22px 20px; border-radius: 20px; background: var(--stock); color: var(--ink); box-shadow: 0 14px 28px rgba(0, 0, 0, .36); }
.card.dealt { animation: deal .28s cubic-bezier(.2, .8, .3, 1); }
@keyframes deal { from { transform: translate(18px, -46px) rotate(5deg); opacity: 0; } }
/* the corner index: the step number as the card's rank */
.index { display: inline-flex; flex-direction: column; align-items: center; align-self: flex-start; font-size: 22px; line-height: .95; }
.index b { font-weight: 800; font-size: 28px; }
.index.red { color: var(--pip); }
h2 { margin: 14px 0 0; font-weight: 800; font-size: clamp(24px, 7.2vw, 30px); line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.card > p { margin: 14px 0 0; }
.options { display: grid; gap: 10px; margin-top: auto; }
.options button { text-align: left; padding: 15px 16px; border: 1.5px solid var(--ink); border-radius: 12px; background: none; color: var(--ink); font: 600 18px/1.25 var(--font); cursor: pointer; }
.options button:active { background: var(--ink); color: var(--stock); }

.plan { list-style: none; margin: 12px 0 0; padding: 0; font-size: 16px; line-height: 1.35; }
.plan li { padding: 9px 0; border-top: 1px solid rgba(23, 24, 26, .16); }
.plan li:last-child { border-bottom: 1px solid rgba(23, 24, 26, .16); }
.price { margin-top: auto; padding-top: 10px; }
.price p { margin: 0; }
.price .now { font-size: 18px; }
.price .now b { font-weight: 900; font-size: clamp(44px, 14vw, 58px); letter-spacing: -.03em; line-height: 1; margin-right: 4px; }
.price .was { font-size: 15px; color: var(--pip); font-weight: 600; }
.price .was s { text-decoration-thickness: 2px; }
.price + .btn { margin-top: 12px; }

form { display: grid; gap: 8px; margin-top: auto; }
label { font-weight: 700; font-size: 15px; }
input { width: 100%; padding: 15px 14px; border: 1.5px solid var(--ink); border-radius: 12px; background: #fff; color: var(--ink); font: 400 18px/1.3 var(--font); }
input::placeholder { color: rgba(23, 24, 26, .42); }
.error { min-height: 1.4em; margin: 0; font-size: 15px; font-weight: 600; color: var(--pip); }

@media (prefers-reduced-motion: reduce) { .card.dealt { animation: none; } }

/* the privacy page is an ordinary scrolling document, on one long card */
body.doc { display: block; height: auto; overflow: auto; }
.doc .brand { display: block; color: var(--print); text-decoration: none; }
.doc main { display: block; margin-top: 18px; margin-bottom: 30px; width: calc(100% - 40px); padding: 26px 22px; border-radius: 20px; background: var(--stock); color: var(--ink); }
.doc h1 { margin: 0; font-size: 34px; }
.doc h2 { font-size: 20px; margin-top: 24px; }
.doc ul { padding-left: 20px; }
.doc a { color: var(--back); }
