/* Livora link pages — same "Studio" look as the app and the emails. */
:root {
  --page: #f4f3f1;
  --card: #ffffff;
  --ink: #16161a;
  --muted: #5e5c63;
  --line: #e6e3df;
  --accent: #6b2d5c;
  --accent-soft: #f3e8ef;
  --success: #1f7a4d;
  --success-soft: #e5eee7;
  --danger: #b42318;
  --danger-soft: #fdecea;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', 'Segoe UI', Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px;
}
.card {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 1px 2px rgba(22, 22, 26, 0.04);
}
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.brand img { width: 40px; height: 40px; border-radius: 12px; display: block; }
.brand b { display: block; font-size: 20px; line-height: 22px; font-weight: 800; }
.brand small { display: block; font-size: 9px; letter-spacing: 3px; font-weight: 700; color: var(--accent); }
.icon { width: 52px; height: 52px; border-radius: 26px; display: grid; place-items: center; margin-bottom: 16px; font-size: 26px; }
.icon.ok { background: var(--success-soft); color: var(--success); }
.icon.bad { background: var(--danger-soft); color: var(--danger); }
.icon.wait { background: var(--accent-soft); color: var(--accent); }
h1 { margin: 0 0 6px; font-size: 24px; line-height: 30px; font-weight: 800; letter-spacing: -0.2px; }
h2 { margin: 18px 0 4px; font-size: 16px; line-height: 22px; font-weight: 700; }
p { margin: 0 0 6px; font-size: 15px; line-height: 22px; color: var(--muted); }
.en { font-size: 14px; }
.actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.btn {
  appearance: none; border: 0; cursor: pointer; text-decoration: none; text-align: center;
  font: inherit; font-weight: 700; font-size: 15px; padding: 15px 20px; border-radius: 14px;
  background: var(--ink); color: #fff;
}
.btn.outline { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn[disabled] { opacity: 0.5; cursor: default; }
label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
input {
  width: 100%; font: inherit; font-size: 15px; padding: 14px; border-radius: 14px;
  border: 1.5px solid transparent; background: var(--page); color: var(--ink); outline: none;
}
input:focus { border-color: var(--accent); }
.note { font-size: 12px; line-height: 18px; color: var(--muted); margin-top: 8px; }
.msg { margin-top: 12px; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 20px; }
.msg.bad { background: var(--danger-soft); color: var(--danger); }
.msg.ok { background: var(--success-soft); color: var(--success); }
.hidden { display: none !important; }
footer { margin-top: 18px; font-size: 11px; color: #8e8b91; text-align: center; }

/* ---------------------------------------------------------------------------------------------
   Celebration (same moment as "Order placed" in the app): the card rises, an aubergine circle
   pops in, a white check draws itself, confetti bursts once, the text follows line by line.
   People who turned off motion get the finished page, still.
   ------------------------------------------------------------------------------------------- */
body.celebrate { overflow-x: hidden; }
.glow {
  position: fixed; inset: -20vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38vmax 38vmax at 18% 20%, rgba(233, 184, 214, 0.55), transparent 60%),
    radial-gradient(34vmax 34vmax at 85% 30%, rgba(251, 232, 223, 0.9), transparent 60%),
    radial-gradient(40vmax 40vmax at 60% 95%, rgba(229, 238, 231, 0.9), transparent 60%);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(2vmax, -2vmax, 0) scale(1.05); } }

.rise { animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(0.98); } }

.stagger > * { animation: fade-up 0.5s ease-out both; }
.stagger > *:nth-child(1) { animation-delay: 0.55s; }
.stagger > *:nth-child(2) { animation-delay: 0.65s; }
.stagger > *:nth-child(3) { animation-delay: 0.75s; }
.stagger > *:nth-child(4) { animation-delay: 0.85s; }
.stagger > *:nth-child(5) { animation-delay: 0.95s; }
.stagger > *:nth-child(6) { animation-delay: 1.05s; }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } }

/* A shine passes over the main button now and then */
.btn.shine { position: relative; overflow: hidden; }
.btn.shine::after {
  content: ''; position: absolute; inset: 0 auto 0 -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-18deg); animation: shine 3.6s 1.6s ease-in-out infinite;
}
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }

/* Friendly "uh-oh" for a broken link */
.icon.bad.wobble { animation: wobble 0.7s 0.35s ease-in-out both; }
@keyframes wobble {
  0% { transform: scale(0); } 40% { transform: scale(1.08) rotate(-8deg); }
  60% { transform: rotate(6deg); } 80% { transform: rotate(-3deg); } 100% { transform: none; }
}

.center { text-align: center; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .glow, .rise, .stagger > *, .icon.bad.wobble, .btn.shine::after { animation: none !important; }
}

/* =============================================================================================
   Full-screen moment (used by the link pages): soft brand background with floating shapes,
   logo on top, one big animated message in the middle, confetti over the whole screen.
   ============================================================================================= */
body.full {
  position: relative; display: grid; place-items: center; min-height: 100vh; min-height: 100svh;
  padding: 96px 20px 48px; overflow-x: hidden;
  background: linear-gradient(160deg, #f3e8ef 0%, #f4f3f1 48%, #fbe8df 100%);
}
.blobs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blobs span { position: absolute; border-radius: 50%; filter: blur(46px); opacity: 0.55; animation: wander 16s ease-in-out infinite alternate; }
.blobs span:nth-child(1) { width: 42vmax; height: 42vmax; left: -12vmax; top: -10vmax; background: #e9b8d6; }
.blobs span:nth-child(2) { width: 34vmax; height: 34vmax; right: -10vmax; top: 18vh; background: #fbe8df; animation-duration: 19s; }
.blobs span:nth-child(3) { width: 30vmax; height: 30vmax; left: 20vw; bottom: -14vmax; background: #e5eee7; animation-duration: 22s; }
.blobs span:nth-child(4) { width: 16vmax; height: 16vmax; right: 18vw; top: -6vmax; background: #d9c2d2; animation-duration: 14s; }
@keyframes wander { to { transform: translate3d(4vmax, 3vmax, 0) scale(1.12); } }

.full-logo { position: absolute; top: 28px; left: 50%; transform: translateX(-50%); z-index: 2; margin: 0; animation: fade-up 0.6s ease-out both; }
.moment { position: relative; z-index: 1; width: 100%; max-width: 600px; text-align: center; }
.moment h1 { font-size: clamp(34px, 7vw, 58px); line-height: 1.04; letter-spacing: -1.4px; margin: 6px 0 12px; }
.moment .lead { font-size: clamp(16px, 2.4vw, 19px); line-height: 1.5; color: var(--muted); margin: 0 auto; max-width: 520px; }
.moment .lead-en { font-size: clamp(14px, 2vw, 16px); line-height: 1.5; color: #8e8b91; margin: 8px auto 0; max-width: 520px; }
.moment .actions { align-items: center; margin-top: 30px; }
.moment .actions .btn { min-width: 260px; }
.moment .note { max-width: 420px; margin: 4px auto 0; }

/* The big mark with ripples */
.big-mark { position: relative; width: 168px; height: 168px; margin: 0 auto 18px; }
.big-mark .ring {
  position: absolute; inset: 22px; border-radius: 50%; border: 2px solid rgba(107, 45, 92, 0.35);
  animation: ripple 2.4s 1.1s ease-out infinite; opacity: 0;
}
.big-mark .ring:nth-child(2) { animation-delay: 1.9s; }
.big-mark .halo { position: absolute; inset: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.7);
  animation: halo 0.7s 0.15s cubic-bezier(0.2, 0.8, 0.2, 1) both, breathe 3.2s 1.2s ease-in-out infinite; }
.big-mark .disc {
  position: absolute; inset: 22px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #8a3f78, #6b2d5c 60%, #4f1f44);
  box-shadow: 0 18px 40px rgba(107, 45, 92, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.18);
  animation: pop 0.6s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.big-mark svg { width: 64px; height: 64px; overflow: visible; }
.big-mark svg path { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw 0.5s 0.65s ease-out forwards; }
.big-mark.bad .disc { background: radial-gradient(circle at 30% 25%, #d0453a, #b42318 60%, #8f1c13); box-shadow: 0 18px 40px rgba(180, 35, 24, 0.3); }
.big-mark.bad .disc b { color: #fff; font-size: 64px; line-height: 1; font-weight: 800; animation: fade-up 0.4s 0.6s both; }
.big-mark.bad .ring { border-color: rgba(180, 35, 24, 0.3); }
.big-mark.wait .disc { background: radial-gradient(circle at 30% 25%, #8a3f78, #6b2d5c 60%, #4f1f44); }
.big-mark.wait .disc b { color: #fff; font-size: 54px; line-height: 1; animation: fade-up 0.4s 0.6s both; }
@keyframes ripple { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(1.75); opacity: 0; } }

/* Confetti over the whole screen (pieces made by links.js → fillRain) */
.rain { position: fixed; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.rain i {
  position: absolute; top: -20px; left: var(--l); width: 9px; height: 14px; border-radius: 2px; background: var(--c);
  opacity: 0; animation: fall var(--d) var(--w) cubic-bezier(0.3, 0.6, 0.4, 1) forwards;
}
.rain i.round { width: 10px; height: 10px; border-radius: 50%; }
@keyframes fall {
  0% { opacity: 1; transform: translate3d(0, 0, 0) rotate(0); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--s), 105vh, 0) rotate(var(--r)); }
}

/* Form panel inside the full-screen moment */
.moment .panel { margin: 26px auto 0; text-align: left; max-width: 420px; box-shadow: 0 20px 50px rgba(22, 22, 26, 0.08); }
.full-foot { position: relative; z-index: 1; margin-top: 36px; font-size: 12px; color: #8e8b91; text-align: center; }

@media (max-width: 520px) {
  body.full { padding-top: 88px; }
  .big-mark { width: 140px; height: 140px; }
  .big-mark svg { width: 54px; height: 54px; }
  .moment .actions .btn { width: 100%; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .blobs span, .big-mark .ring, .big-mark .halo, .big-mark .disc, .full-logo { animation: none !important; }
  .big-mark svg path { animation: none; stroke-dashoffset: 0; }
  .rain { display: none; }
}

/* Form box inside the full-screen moment (reset password) */
.panel {
  width: 100%; max-width: 440px; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(10px);
  border-radius: 28px; padding: 30px 28px; box-shadow: 0 24px 60px rgba(107, 45, 92, 0.12);
}
.moment .panel { margin: 0 auto; }
.moment .panel h1 { font-size: 28px; line-height: 34px; letter-spacing: -0.4px; margin: 0 0 8px; }
.moment .panel h2 { margin-top: 12px; }
.moment .panel .icon { margin-bottom: 14px; }
.moment .panel .big-mark { width: 132px; height: 132px; }
.moment .panel .big-mark svg { width: 50px; height: 50px; }
