/* ============================================================================
   RPACPC — Thank-you page (after contact / sales / demo form submit)
   Builds on css/styles.css tokens + css/access.css (.process / .steps).
   ============================================================================ */

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.ty-hero {
  position: relative; overflow: hidden; color: #fff; text-align: center;
  padding: calc(96px * var(--pad)) 0 calc(104px * var(--pad));
  background: linear-gradient(135deg, var(--primary) 0%, #2A6FD0 50%, var(--green) 100%);
}
.ty-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(640px 320px at 50% -10%, rgba(255,255,255,.26), transparent 70%),
    radial-gradient(520px 360px at 100% 110%, rgba(11,20,55,.28), transparent 70%);
}
.ty-hero-inner { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }

.ty-check {
  width: 112px; height: 112px; margin: 0 auto 28px; border-radius: 50%;
  background: rgba(255,255,255,.16); box-shadow: 0 0 0 14px rgba(255,255,255,.08), 0 0 0 28px rgba(255,255,255,.04);
  display: flex; align-items: center; justify-content: center;
  animation: tyPop .6s cubic-bezier(.22,1.4,.36,1) both;
}
.ty-check svg { width: 76px; height: 76px; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.ty-check circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: tyDraw .7s .25s var(--ease) forwards; }
.ty-check path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: tyDraw .45s .85s var(--ease) forwards; }

.ty-eyebrow { font-family: var(--f-mono); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; opacity: .88; margin: 0; }
.ty-title {
  font-family: var(--f-display); font-weight: 700; color: #fff;
  font-size: clamp(48px, 9vw, 96px); letter-spacing: -.04em; line-height: .98; margin: 14px 0 20px;
  animation: tyRise .7s .15s var(--ease) both;
}
.ty-lead { font-size: clamp(16px, 2vw, 19px); line-height: 1.6; max-width: 580px; margin: 0 auto; color: rgba(255,255,255,.92); animation: tyRise .7s .3s var(--ease) both; }

.ty-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; animation: tyRise .7s .42s var(--ease) both; }
.ty-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.24); font-size: 13.5px; font-weight: 500;
}
.ty-pill svg { width: 16px; height: 16px; }
.ty-hero-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; animation: tyRise .7s .54s var(--ease) both; }
.ty-hero .btn-on-dark { border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.1); }
.ty-hero .btn-on-dark:hover { background: rgba(255,255,255,.2); }

/* ── Confetti ─────────────────────────────────────────────────────────────── */
.ty-confetti { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.ty-confetti i {
  position: absolute; top: -24px; border-radius: 2px; opacity: 0;
  animation-name: tyFall; animation-timing-function: cubic-bezier(.3,.6,.5,1); animation-fill-mode: forwards;
}

/* ── Steps (rendered by js/thank-you.js; staggered entrance) ──────────────── */
.ty-step { animation: tyRise .6s var(--ease) both; }
.ty-step.d1 { animation-delay: .7s; }
.ty-step.d2 { animation-delay: .8s; }
.ty-step.d3 { animation-delay: .9s; }
.ty-step.d4 { animation-delay: 1s; }

/* ── "While you wait" link cards ──────────────────────────────────────────── */
.ty-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.ty-link {
  display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: inherit;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.ty-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.ty-link-ico { width: 42px; height: 42px; border-radius: 11px; background: var(--primary-tint); color: var(--primary); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.ty-link-ico svg { width: 21px; height: 21px; }
.ty-link b { font-family: var(--f-display); font-size: 17px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.ty-link span { font-size: 13.5px; line-height: 1.55; color: var(--body); flex: 1; }
.ty-link em { font-style: normal; font-size: 13.5px; font-weight: 600; color: var(--primary); margin-top: 6px; }

/* ── Motion ───────────────────────────────────────────────────────────────── */
@keyframes tyDraw { to { stroke-dashoffset: 0; } }
@keyframes tyPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tyRise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes tyFall {
  0%   { opacity: 1; transform: translate(0, 0) rotate(0); }
  85%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), 110vh) rotate(var(--rot)); }
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 980px) { .ty-links { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .ty-hero { padding: 64px 0 72px; }
  .ty-check { width: 92px; height: 92px; margin-bottom: 22px; }
  .ty-check svg { width: 62px; height: 62px; }
  .ty-links { grid-template-columns: 1fr; }
  .ty-hero-btns .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .ty-check, .ty-title, .ty-lead, .ty-meta, .ty-hero-btns, .ty-step { animation: none; }
  .ty-check circle, .ty-check path { animation: none; stroke-dashoffset: 0; }
}
