/* SendHaven motion layer — shared across all pages. Loaded after Tailwind. */

:root { --sh-green: #10b981; --sh-green-2: #34d399; }

/* --- Scroll progress ------------------------------------------------------ */
.sh-progress { position: fixed; left: 0; top: 0; height: 2px; width: 0; z-index: 61;
  background: linear-gradient(90deg, var(--sh-green), var(--sh-green-2)); box-shadow: 0 0 12px rgba(52,211,153,.8); transition: width .1s linear; }

/* --- Dotted background + drifting particle field --------------------------- */
.bg-grid {
  background-image: radial-gradient(circle, rgba(52,211,153,.10) 1px, transparent 1.4px);
  background-size: 22px 22px;
  animation: sh-dots 24s linear infinite;
}
@keyframes sh-dots { from { background-position: 0 0; } to { background-position: 22px 22px; } }
.sh-particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .38; }
body > *:not(.sh-particles):not(nav):not(.sh-progress) { position: relative; z-index: 1; }

/* --- Load fallback: if CSS animations stall, entrance classes still resolve --- */
html.sh-loaded .animate-fade-in-up, html.sh-loaded .animate-fade-in { opacity: 1 !important; transform: none !important; }

/* --- Orbital hero --------------------------------------------------------- */
.sh-orbit { position: relative; aspect-ratio: 1/1; width: 100%; max-width: 520px; margin: 0 auto; }
.sh-orbit .halo { position: absolute; border-radius: 999px; filter: blur(40px); animation: sh-halo 4.5s ease-in-out infinite; }
.sh-orbit .halo-1 { inset: 20%; background: rgba(16,185,129,.28); }
.sh-orbit .halo-2 { inset: 32%; background: rgba(45,212,191,.28); filter: blur(28px); animation-delay: 1.5s; }
.sh-orbit .halo-3 { inset: 42%; background: rgba(52,211,153,.35); filter: blur(18px); animation-delay: .8s; }
@keyframes sh-halo { 0%,100% { transform: scale(1); opacity: .7; } 50% { transform: scale(1.12); opacity: 1; } }
.sh-orbit .rays { position: absolute; inset: 0; animation: sh-spin 50s linear infinite; opacity: .4; pointer-events: none; }
.sh-orbit .ray { position: absolute; left: 50%; top: 50%; height: 58%; width: 1px; transform-origin: bottom center;
  background: linear-gradient(to top, transparent, rgba(52,211,153,.6), transparent); }
.sh-orbit .ray.gold { background: linear-gradient(to top, transparent, rgba(110,231,183,.85), transparent); }
@keyframes sh-spin { to { transform: rotate(360deg); } }
.sh-orbit .ring { position: absolute; border-radius: 999px; border: 1px solid rgba(52,211,153,.18); }
.sh-orbit .ring-1 { inset: 14%; }
.sh-orbit .ring-2 { inset: 26%; border-style: dashed; border-color: rgba(16,185,129,.2); }
.sh-orbit .node { position: absolute; text-decoration: none; }
.sh-orbit .node .bob { transform: translate(-50%, -50%); animation: sh-bob 3.6s ease-in-out infinite; }
@keyframes sh-bob { 0%,100% { transform: translate(-50%, -50%) translateY(0); } 50% { transform: translate(-50%, -50%) translateY(-8px); } }
.sh-orbit .pill {
  position: relative; width: 70px; height: 70px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a, #020617); border: 2px solid rgba(52,211,153,.55);
  box-shadow: 0 0 28px rgba(16,185,129,.35); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; overflow: hidden;
}
.sh-orbit .pill::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at top left, rgba(255,255,255,.18), transparent 60%); pointer-events: none; }
.sh-orbit .pill svg { width: 30px; height: 30px; color: #6ee7b7; filter: drop-shadow(0 0 6px rgba(0,0,0,.7)); }
.sh-orbit .node:hover .pill { transform: scale(1.12); border-color: #34d399; box-shadow: 0 0 40px rgba(52,211,153,.6); }
.sh-orbit .label {
  position: absolute; left: 50%; transform: translateX(-50%); margin-top: 8px; white-space: nowrap; opacity: 0; transition: opacity .2s ease; pointer-events: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700;
  color: #34d399; background: rgba(2,6,23,.92); border: 1px solid rgba(52,211,153,.5); border-radius: 999px; padding: 4px 10px; backdrop-filter: blur(4px);
}
.sh-orbit .node:hover .label { opacity: 1; }
.sh-orbit .core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.sh-orbit .core .core-halo { position: absolute; inset: -24px; border-radius: 999px; background: rgba(16,185,129,.5); filter: blur(40px); animation: sh-halo 4.5s ease-in-out infinite; }
.sh-orbit .core .core-disc {
  position: relative; width: 150px; height: 150px; border-radius: 999px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #10b981, #047857 60%, #022c22); border: 3px solid #6ee7b7;
  box-shadow: 0 0 70px rgba(16,185,129,.7), inset 0 0 30px rgba(0,0,0,.6);
}
.sh-orbit .core .core-ring { position: absolute; inset: 8px; border-radius: 999px; border: 2px dashed rgba(167,243,208,.55); animation: sh-spin 26s linear infinite; }
.sh-orbit .core .core-ring2 { position: absolute; inset: 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); }
.sh-orbit .core .k { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; letter-spacing: .35em; color: #a7f3d0; }
.sh-orbit .core .v { font-size: 44px; font-weight: 900; color: #fff; line-height: 1; margin-top: 4px; }
@media (max-width: 640px) { .sh-orbit { max-width: 320px; } .sh-orbit .pill { width: 54px; height: 54px; } .sh-orbit .pill svg { width: 22px; height: 22px; } .sh-orbit .core .core-disc { width: 110px; height: 110px; } .sh-orbit .core .v { font-size: 32px; } }

/* --- Hero cursor glow ----------------------------------------------------- */
.sh-cursor-glow { position: absolute; width: 520px; height: 520px; border-radius: 999px; pointer-events: none;
  background: radial-gradient(circle, rgba(16,185,129,.16), transparent 60%); transform: translate(-50%, -50%); transition: left .15s ease-out, top .15s ease-out; opacity: 0; }
section:hover > .sh-cursor-glow { opacity: 1; }

/* --- Card tilt + shine ------------------------------------------------------ */
.sh-tilt { transition: transform .2s ease, box-shadow .25s ease, border-color .25s ease; transform-style: preserve-3d; will-change: transform; }
.sh-tilt:hover { box-shadow: 0 18px 40px -18px rgba(16,185,129,.45); border-color: rgba(52,211,153,.55) !important; }
.sh-shine { position: relative; overflow: hidden; }
.sh-shine::after { content: ""; position: absolute; top: -60%; left: -40%; width: 40%; height: 220%; transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.14), transparent); transition: left .6s ease; pointer-events: none; }
.sh-shine:hover::after { left: 120%; }

/* --- Buttons ----------------------------------------------------------------- */
a.bg-emerald-500 { position: relative; overflow: hidden; }
a.bg-emerald-500::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; background: conic-gradient(from 0deg, transparent 0 70%, rgba(255,255,255,.45) 85%, transparent 100%);
  animation: sh-spin 3.2s linear infinite; opacity: 0; transition: opacity .25s; mix-blend-mode: screen; pointer-events: none; }
a.bg-emerald-500:hover::after { opacity: 1; }

/* --- Count-up ----------------------------------------------------------------- */
.sh-count { font-variant-numeric: tabular-nums; }

/* --- Reduced motion ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .sh-orbit .halo, .sh-orbit .rays, .sh-orbit .node .bob, .sh-orbit .core .core-halo, .sh-orbit .core .core-ring, .bg-grid, a.bg-emerald-500::after { animation: none !important; }
  .sh-tilt { transform: none !important; }
}

/* --- Touch devices: show orbit labels without hover, calmer effects ------- */
@media (hover: none) {
  .sh-orbit .label { opacity: .9; font-size: 9px; padding: 3px 8px; }
  .sh-particles { opacity: .25; }
}

/* --- Promo sticker + aligned pricing cards ---------------------------------- */
.sh-sticker {
  position: absolute; top: -18px; right: -14px; width: 84px; height: 84px; border-radius: 999px; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: conic-gradient(from 20deg, #f59e0b, #fbbf24, #f59e0b, #d97706, #f59e0b);
  color: #1c1917; font-weight: 900; line-height: 1; transform: rotate(12deg);
  box-shadow: 0 10px 30px -8px rgba(245,158,11,.6), inset 0 0 0 3px rgba(255,255,255,.35), inset 0 0 0 5px rgba(0,0,0,.18);
  animation: sh-sticker 3.2s ease-in-out infinite;
}
.sh-sticker .pct { font-size: 24px; letter-spacing: -.5px; }
.sh-sticker .lbl { font-size: 8px; letter-spacing: .14em; text-transform: uppercase; margin-top: 3px; font-weight: 800; opacity: .85; }
@keyframes sh-sticker { 0%,100% { transform: rotate(12deg) scale(1); } 50% { transform: rotate(8deg) scale(1.06); } }
.sh-sticker-hero {
  position: absolute; right: 0; top: -8px; width: 112px; height: 112px;
}
.sh-sticker-hero .pct { font-size: 32px; }
.sh-sticker-hero .lbl { font-size: 10px; }
@media (max-width: 1023px) { .sh-sticker-hero { position: static; margin: 0 auto 22px; transform: rotate(-8deg); width: 96px; height: 96px; } }
.sh-was { color: #64748b; text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: rgba(245,158,11,.8); font-weight: 700; }
.sh-promo-line { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fbbf24; }
.sh-promo-line::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: #fbbf24; box-shadow: 0 0 8px #fbbf24; }
/* fixed-height header rows so all cards align */
.pricing-card { position: relative; }
.pricing-card .ph-tag { height: 16px; font-size: 11px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pricing-card .ph-name { height: 36px; line-height: 36px; }
.pricing-card .ph-sub { height: 40px; line-height: 20px; overflow: hidden; }
.pricing-card .ph-was { height: 22px; line-height: 22px; }
.pricing-card .ph-price { height: 56px; display: flex; align-items: flex-end; gap: 4px; }
.pricing-card .ph-setup { height: 34px; line-height: 17px; overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .sh-sticker { animation: none; } }

/* sticker clearance + no-wrap price row */
.sh-sticker { width: 76px; height: 76px; top: -14px; right: -10px; }
.sh-sticker .pct { font-size: 21px; }
.sh-sticker-hero { width: 112px; height: 112px; top: -8px; right: 0; }
.pricing-card .ph-tag, .pricing-card .ph-name { padding-right: 72px; }
.pricing-card .ph-price { white-space: nowrap; flex-wrap: nowrap; }
.pricing-card .ph-price > span { white-space: nowrap; }

/* promo colour: red (urgency) */
.sh-sticker { background: conic-gradient(from 20deg, #dc2626, #ef4444, #f87171, #dc2626, #b91c1c, #dc2626); color: #fff;
  box-shadow: 0 10px 30px -8px rgba(220,38,38,.65), inset 0 0 0 3px rgba(255,255,255,.35), inset 0 0 0 5px rgba(0,0,0,.18); }
.sh-sticker .lbl { opacity: 1; }
.sh-sticker .lbl2 { font-size: 7px; letter-spacing: .08em; text-transform: uppercase; margin-top: 2px; font-weight: 700; opacity: .9; }
.sh-sticker-hero .lbl2 { font-size: 9px; }
.sh-was { text-decoration-color: rgba(239,68,68,.9); }
.sh-promo-line { color: #f87171; }
.sh-promo-line::before { background: #ef4444; box-shadow: 0 0 8px #ef4444; }

/* particles as a screen-blended overlay so they show over opaque sections */
.sh-particles { z-index: 40; opacity: .8; mix-blend-mode: screen; }
body > *:not(.sh-particles):not(nav):not(.sh-progress) { z-index: auto; }
.bg-grid { background-image: none; animation: none; }
@media (hover: none) { .sh-particles { opacity: .6; } }
