/* ── BaseLD site motion (shared by every marketing page except the homepage,
   which carries its own tested copy of these effects) ──────────────────────
   Loaded after each page's own styles. Pairs with site-motion.js.
   Everything here is visual polish only: if this file fails to load,
   every page still looks and works exactly as before. */

/* ── Page header: contour lines that draw themselves in ── */
.page-header.sm-has-topo::before { display: none !important; }        /* replaces the static topo image */
.page-header > svg.sm-topo {
  position: absolute !important; inset: -8% -4%; width: 108%; height: 116%;
  z-index: 0 !important; opacity: .36; pointer-events: none;
}
body.light .page-header > svg.sm-topo { opacity: .2; }
.page-header.sm-has-topo > *:not(.sm-topo) { position: relative; z-index: 1; }
.sm-topo .tl { fill: none; stroke-width: .55; stroke-dasharray: var(--len, 4000); stroke-dashoffset: var(--len, 4000);
  animation: smDraw 3.2s cubic-bezier(.4,0,.2,1) forwards; animation-delay: var(--d, 0s); }
.sm-topo .tl.mj { stroke-width: 1.5; }
@keyframes smDraw { to { stroke-dashoffset: 0; } }
.sm-drift { animation: smDrift 40s ease-in-out infinite alternate; transform-origin: center; }
@keyframes smDrift { from { transform: scale(1) translate(0,0); } to { transform: scale(1.06) translate(-1.5%,1%); } }

/* ── Page header: content rises in, in order (pure CSS, so there is no flash) ── */
.page-header > *:not(.sm-topo) { animation: smRise .8s cubic-bezier(.2,.7,.2,1) both; }
.page-header > *:nth-child(1) { animation-delay: .05s; }
.page-header > *:nth-child(2) { animation-delay: .15s; }
.page-header > *:nth-child(3) { animation-delay: .7s; }
.page-header > *:nth-child(4) { animation-delay: .85s; }
.page-header > *:nth-child(5) { animation-delay: 1s; }
.page-header > *:nth-child(n+6) { animation-delay: 1.1s; }
/* the title's words rise one at a time once site-motion.js splits them */
.page-header .page-title.sm-split { animation: none; opacity: 1; transform: none; }
.sm-w { display: inline-block; opacity: 0; transform: translateY(24px); animation: smRise .8s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes smRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ── Scroll reveal (classes are added by site-motion.js, so content always shows without it) ── */
.sm-rv { opacity: 0; transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--rd, 0s); }
.sm-rv.in { opacity: 1; transform: none; }

/* ── Cards lift on hover ── */
.value-card, .mission-card, .plan-card, .blog-card, .stack-item, .who-item {
  transition: background .2s, border-color .2s, transform .3s, box-shadow .3s; }
.value-card:hover, .mission-card:hover, .plan-card:hover, .blog-card:hover, .stack-item:hover, .who-item:hover {
  transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.28); position: relative; z-index: 1; }
body.light .value-card:hover, body.light .mission-card:hover, body.light .plan-card:hover,
body.light .blog-card:hover, body.light .stack-item:hover, body.light .who-item:hover { box-shadow: 0 18px 40px rgba(13,30,53,.12); }

/* ── Buttons: small lift, and the 2-minute tour button in each closing section ── */
.btn-orange, .btn-white, .btn-outline, .plan-btn { transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s; }
.btn-orange:hover, .btn-white:hover, .plan-btn:hover { transform: translateY(-2px); }
.sm-cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; }
.sm-cta-actions button { white-space: nowrap; }
.sm-tour-btn {
  display: inline-flex; align-items: center; gap: 10px; background: transparent; color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.55); border-radius: 8px; cursor: pointer;
  font-family: var(--font); font-size: 11px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase;
  padding: 14px 30px; transition: background .2s, border-color .2s, transform .2s;
}
.sm-tour-btn:hover { background: rgba(255,255,255,.1); border-color: #ffffff; transform: translateY(-2px); }
.sm-play { width: 18px; height: 18px; border-radius: 50%; background: #e8a020; display: inline-grid; place-items: center; flex-shrink: 0; }
.sm-play::after { content: ""; border-left: 6px solid #0f0f0f; border-top: 4px solid transparent; border-bottom: 4px solid transparent; margin-left: 2px; }

@media (max-width: 520px) {
  .sm-cta-actions button { width: 100%; justify-content: center; }
}

/* ── Respect visitors who turn motion off ── */
@media (prefers-reduced-motion: reduce) {
  .page-header > *, .sm-w, .sm-drift, .sm-topo .tl { animation: none !important; opacity: 1 !important; transform: none !important; }
  .sm-topo .tl { stroke-dashoffset: 0 !important; }
  .sm-rv { opacity: 1; transform: none; transition: none; }
  .value-card, .mission-card, .plan-card, .blog-card, .stack-item, .who-item,
  .btn-orange, .btn-white, .plan-btn, .sm-tour-btn { transition: none; }
  .value-card:hover, .mission-card:hover, .plan-card:hover, .blog-card:hover, .stack-item:hover, .who-item:hover { transform: none; }
}
