/* Welcome page. Tokens and primitives live in base.css. Motion per DESIGN.md v1.1 §5. */
.shell {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  width: 100%; max-width: calc(var(--col) + 2 * var(--gutter));
  min-height: 100vh; min-height: 100dvh;
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) var(--gutter) max(20px, env(safe-area-inset-bottom));
}
.brand { display: flex; justify-content: center; padding: 6px 0 22px; }
.brand-logo { width: 76px; height: 76px; animation: logo-in 900ms var(--ease-out) both; }
.screen { display: flex; flex-direction: column; }

/* Entrance choreography: CSS only, so the page still appears if JS fails. */
@keyframes rise-in { from { opacity: 0; transform: translateY(16px); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes logo-in { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes card-in { from { opacity: 0; transform: translateY(28px) scale(0.97); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes sweep { to { transform: translateX(420%) rotate(8deg); } }
.reveal { animation: rise-in 900ms var(--ease-out) both; }
.r1 { animation-delay: 180ms; }
.r2 { animation-delay: 300ms; }
.r3 { animation-delay: 420ms; }
.r4 { animation: card-in 1000ms var(--ease-out) 600ms both; }
.r5 { animation-delay: 950ms; }
.welcome.settled .reveal, .welcome.settled .r4, .welcome.settled .gift::after { animation: none; }

.hero { margin: 14px 0 26px; font-size: clamp(44px, 12.2vw, 60px); line-height: 1; }
.hero span, .hero em { display: block; }
.hero em { color: var(--gold-bright); }

/* The gift: a certificate-like card with a champagne hairline and one light sweep. */
.gift {
  position: relative; isolation: isolate; overflow: hidden;
  padding: 24px 22px 18px; border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015) 55%), var(--bg-raised);
  box-shadow: var(--shadow-card);
}
.gift::before {
  content: ""; position: absolute; inset: 0; z-index: -1; padding: 1px; border-radius: inherit;
  background: linear-gradient(140deg, rgba(240, 210, 155, 0.75), rgba(240, 210, 155, 0.1) 38%, rgba(127, 200, 194, 0.3));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.gift::after {
  content: ""; position: absolute; top: -50%; bottom: -50%; left: -30%; z-index: 1; width: 45%; pointer-events: none;
  background: linear-gradient(100deg, rgba(255, 244, 222, 0), rgba(255, 244, 222, 0.16) 50%, rgba(255, 244, 222, 0));
  transform: translateX(-120%) rotate(8deg);
  animation: sweep 1400ms var(--ease-out) 1500ms both;
}
.gift-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.gift-badge {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  color: var(--gold-bright); background: var(--gold-wash); border: 1px solid rgba(240, 210, 155, 0.32);
}
.gift-badge .icon { width: 22px; height: 22px; }
.gift-title { margin-bottom: 10px; font-size: 28px; line-height: 1.12; }
.gift-body { color: var(--text-2); font-size: 15.5px; line-height: 1.6; }
.gift-foot {
  display: flex; justify-content: space-between; margin-top: 20px; padding-top: 14px;
  border-top: 1px dashed rgba(240, 210, 155, 0.28);
  font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3);
}
.welcome-cta { margin-top: 24px; }
.welcome-cta .icon { transition: transform 240ms var(--ease-out); }
.welcome-cta .btn:hover .icon { transform: translateX(3px); }
.fineprint { margin-top: 12px; text-align: center; font-size: 13px; color: var(--text-3); }

/* Claim flow */
.progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 4px; }
.progress span { position: relative; height: 3px; overflow: hidden; border-radius: 3px; background: var(--line); }
.progress span::after {
  content: ""; position: absolute; inset: 0; transform: scaleX(0); transform-origin: left;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  transition: transform 600ms var(--ease-out);
}
.progress span.is-done::after { transform: scaleX(1); }
.progress-label { margin: 12px 0 18px; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.step { display: flex; flex-direction: column; }
.step-title { margin-bottom: 8px; font-size: clamp(34px, 9.6vw, 44px); line-height: 1.04; }
.step-sub { margin-bottom: 22px; color: var(--text-2); }

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.tile input, .choice input, .chip input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 16px;
  min-height: 116px; padding: 16px 16px 15px; border-radius: var(--radius-md);
  background: var(--bg-raised); border: 1px solid var(--line);
  font-size: 15px; font-weight: 500; line-height: 1.3; cursor: pointer; user-select: none;
  transition: border-color 220ms var(--ease-out), background-color 220ms var(--ease-out), transform 140ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.tile:active { transform: scale(0.975); }
.tile > .icon:not(.tick) { color: var(--text-2); transition: color 220ms var(--ease-out), transform 320ms var(--ease-spring); }
.tile-label { padding-right: 18px; }
.tile-wide { grid-column: 1 / -1; min-height: 64px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; }
.tick {
  position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; padding: 4px; border-radius: 50%;
  color: var(--on-gold); background: var(--gold-bright); stroke-width: 2.6;
  opacity: 0; transform: scale(0.5);
  transition: opacity 180ms var(--ease-out), transform 320ms var(--ease-spring);
}
.tile-wide .tick, .choice .tick { top: 50%; right: 16px; margin-top: -11px; }
.tile:has(input:checked), .choice:has(input:checked) {
  border-color: var(--gold-line);
  background: linear-gradient(160deg, rgba(216, 180, 122, 0.16), rgba(216, 180, 122, 0.04)), var(--bg-raised);
  box-shadow: 0 10px 30px -18px rgba(216, 180, 122, 0.6);
}
.tile:has(input:checked) > .icon:not(.tick) { color: var(--gold-bright); transform: scale(1.06); }
.tile:has(input:checked) .tick, .choice:has(input:checked) .tick { opacity: 1; transform: none; }
.tile:has(input:focus-visible), .choice:has(input:focus-visible), .chip:has(input:focus-visible) span { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

.choices { display: grid; gap: 10px; }
.choice {
  position: relative; display: flex; align-items: center; gap: 14px;
  min-height: 78px; padding: 14px 52px 14px 14px; border-radius: var(--radius-md);
  background: var(--bg-raised); border: 1px solid var(--line); cursor: pointer; user-select: none;
  transition: border-color 220ms var(--ease-out), background-color 220ms var(--ease-out), transform 140ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.choice:active { transform: scale(0.985); }
.choice-icon {
  display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.05); color: var(--text-2); transition: color 220ms, background-color 220ms;
}
.choice:has(input:checked) .choice-icon { color: var(--gold-bright); background: var(--gold-wash); }
.choice-text { display: flex; flex-direction: column; gap: 2px; }
.choice-text strong { font-size: 16px; font-weight: 600; }
.choice-text span { font-size: 14px; color: var(--text-2); }

.times { margin-top: 26px; }
.times-legend { margin-bottom: 12px; padding: 0; font-size: 14px; font-weight: 600; }
.times-legend span { font-weight: 400; color: var(--text-3); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong); color: var(--text-2); font-size: 15px; cursor: pointer; user-select: none;
  transition: color 200ms var(--ease-out), background-color 200ms var(--ease-out), border-color 200ms var(--ease-out), transform 140ms var(--ease-out);
}
.chip span:active { transform: scale(0.96); }
.chip:has(input:checked) span { color: var(--on-gold); background: var(--gold-bright); border-color: var(--gold-bright); }

.field { margin-bottom: 14px; }
.field label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; }
.field input, .field textarea {
  width: 100%; min-height: 54px; padding: 14px 16px; border-radius: 14px; appearance: none;
  background: var(--bg-raised); border: 1px solid var(--line-strong); font-size: 16px;
  transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out), background-color 200ms var(--ease-out);
}
.field textarea { min-height: 104px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus { border-color: var(--gold); background: var(--bg-raised-2); box-shadow: 0 0 0 4px rgba(216, 180, 122, 0.16); }
.field input:focus-visible, .field textarea:focus-visible { outline: none; }
.field input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-wash); }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--text); box-shadow: 0 0 0 1000px var(--bg-raised-2) inset; caret-color: var(--text); }
.field-error { margin-top: 7px; font-size: 13.5px; color: var(--danger); }
.field-error:empty { display: none; }
#e-contact { margin: -4px 0 12px; }

.note { margin: 2px 0 6px; }
.note summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--gold-bright); font-size: 15px; font-weight: 500; cursor: pointer; list-style: none; }
.note summary::-webkit-details-marker { display: none; }
.note summary .icon { width: 18px; height: 18px; transition: transform 300ms var(--ease-out); }
.note[open] summary .icon { transform: rotate(45deg); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert { margin: 8px 0 4px; padding: 14px 16px; border-radius: 14px; background: var(--danger-wash); border: 1px solid rgba(240, 138, 126, 0.35); font-size: 14.5px; line-height: 1.5; }

.step-actions {
  position: sticky; bottom: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  margin-top: 22px; padding: 18px 0 max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 72%, rgba(11, 18, 32, 0));
}
.link-back { min-height: 44px; padding: 0 18px; border: 0; background: none; color: var(--text-2); font-size: 15px; }
.link-back:hover { color: var(--text); }
.btn[aria-busy="true"] { cursor: progress; }
.privacy { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 6px; text-align: center; font-size: 13px; color: var(--text-3); }
.privacy .icon { width: 15px; height: 15px; }

/* Success */
.success { align-items: center; padding-top: 4px; text-align: center; }
.seal { position: relative; width: 124px; height: 124px; margin: 6px auto 22px; }
.seal::before {
  content: ""; position: absolute; inset: -26px; border-radius: 50%; opacity: 0;
  background: radial-gradient(closest-side, rgba(240, 210, 155, 0.38), rgba(240, 210, 155, 0));
}
.seal-svg { width: 124px; height: 124px; overflow: visible; }
.seal-ring {
  fill: rgba(216, 180, 122, 0.08); stroke: var(--gold-bright); stroke-width: 1.5;
  stroke-dasharray: 327; stroke-dashoffset: 327; transform: rotate(-90deg); transform-origin: 60px 60px;
}
.seal-check { fill: none; stroke: var(--gold-bright); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 62; stroke-dashoffset: 62; }
.success.is-in .seal-ring { animation: draw 800ms var(--ease-out) 80ms forwards; }
.success.is-in .seal-check { animation: draw 460ms var(--ease-out) 620ms forwards; }
.success.is-in .seal::before { animation: glow 1600ms var(--ease-out) 520ms both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes glow { 0% { opacity: 0; transform: scale(0.6); } 35% { opacity: 1; } 100% { opacity: 0; transform: scale(1.45); } }
.sparkles { position: absolute; inset: 0; pointer-events: none; }
.sparkles i {
  position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
  background: var(--gold-bright); box-shadow: 0 0 12px rgba(240, 210, 155, 0.9); opacity: 0;
}
.success-title { margin-bottom: 14px; font-size: clamp(42px, 11vw, 54px); line-height: 1.02; }
.success-body { max-width: 34ch; margin: 0 auto 26px; color: var(--text-2); font-size: 16.5px; line-height: 1.6; }
.summary { width: 100%; padding: 18px; border-radius: var(--radius-md); background: var(--bg-raised); border: 1px solid var(--line); text-align: left; }
.summary .eyebrow { margin-bottom: 12px; }
.summary-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.summary-chips li { padding: 7px 13px; border-radius: var(--radius-pill); background: var(--gold-wash); border: 1px solid rgba(240, 210, 155, 0.3); color: var(--gold-bright); font-size: 13.5px; }
.summary-chips li.is-meta { background: rgba(255, 255, 255, 0.04); border-color: var(--line); color: var(--text-2); }
.success-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; margin-top: 24px; }
.link-call { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text-2); text-decoration: none; font-size: 15px; }
.link-call .icon { width: 18px; height: 18px; }
.success > :not(.seal) { opacity: 0; }
.success.is-in > :not(.seal) { animation: rise-in 800ms var(--ease-out) both; }
.success.is-in > .success-title { animation-delay: 700ms; }
.success.is-in > .success-body { animation-delay: 820ms; }
.success.is-in > .summary { animation-delay: 940ms; }
.success.is-in > .success-actions { animation-delay: 1060ms; }

.noscript { padding: 18px; border-radius: var(--radius-md); background: var(--bg-raised); }
.foot { margin-top: auto; padding-top: 36px; text-align: center; font-size: 12.5px; line-height: 1.6; color: var(--text-3); }
.foot a { color: var(--text-2); text-decoration: none; }

@media (min-width: 768px) {
  .shell { padding-top: 56px; }
  .brand-logo { width: 88px; height: 88px; }
  .hero { font-size: 64px; }
  .step-actions { position: static; padding-bottom: 0; background: none; }
}

@media (prefers-reduced-motion: reduce) {
  .gift::after { display: none; }
}
