/* EngiCore site v8.6 · visual layer on top of site.css.
   Changes look and motion only: no copy, no headings, no section order.
   Everything that moves sits behind `.js` and prefers-reduced-motion: no-preference. */

::selection { background: var(--blue); color: #fff; }

/* ---------- nav: reading progress and current section ---------- */
.nav::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--blue); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); pointer-events: none; }
.nav-l a { position: relative; transition: color .2s var(--ease); }
.nav-l a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 1.5px; background: var(--ink); transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s var(--ease); }
.nav-l a.cur { color: var(--ink); }
.nav-l a.cur::after { transform: scaleX(1); }

/* ---------- buttons ---------- */
.btn { transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(20, 22, 26, .55); }
.btn:active { transform: translateY(0) scale(.985); box-shadow: none; }
.btn.ghost .play { transition: transform .2s var(--ease); }
.btn.ghost:hover .play { transform: translateX(2px); }

/* ---------- drafting grid behind the hero and the closing section ---------- */
.hero, .close { position: relative; isolation: isolate; }
.hero::before, .close::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(20, 22, 26, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(20, 22, 26, .055) 1px, transparent 1px),
    linear-gradient(rgba(20, 22, 26, .028) 1px, transparent 1px), linear-gradient(90deg, rgba(20, 22, 26, .028) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px; background-position: 50% 0; }
.hero::before { -webkit-mask-image: radial-gradient(90% 70% at 62% 62%, #000 0%, rgba(0, 0, 0, .5) 45%, transparent 78%); mask-image: radial-gradient(90% 70% at 62% 62%, #000 0%, rgba(0, 0, 0, .5) 45%, transparent 78%); }
.close { overflow: hidden; }
.close::before { -webkit-mask-image: radial-gradient(70% 120% at 100% 50%, #000 0%, rgba(0, 0, 0, .45) 50%, transparent 80%); mask-image: radial-gradient(70% 120% at 100% 50%, #000 0%, rgba(0, 0, 0, .45) 50%, transparent 80%); }

/* ---------- the product section: depth instead of a flat navy ---------- */
.sec.dark { position: relative; isolation: isolate; overflow: hidden; }
.sec.dark::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(50% 28% at 84% 0%, rgba(47, 99, 235, .34), transparent 70%),
    radial-gradient(42% 24% at 0% 38%, rgba(47, 99, 235, .16), transparent 70%),
    radial-gradient(46% 22% at 100% 78%, rgba(47, 99, 235, .14), transparent 70%); }
.sec.dark::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(157, 187, 238, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(157, 187, 238, .06) 1px, transparent 1px);
  background-size: 56px 56px; background-position: 50% 0;
  -webkit-mask-image: linear-gradient(#000, transparent 22%, transparent 78%, #000); mask-image: linear-gradient(#000, transparent 22%, transparent 78%, #000); }
.sec.dark .app { box-shadow: 0 50px 110px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(157, 187, 238, .22), 0 0 90px -20px rgba(47, 99, 235, .45); }
.tab { transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease); }
.tab:active { transform: scale(.98); }

/* film card: larger poster, same words */
.filmcard { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.film-btn { box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(157, 187, 238, .22); }
.film-btn img { transition: transform .8s var(--ease); }
.film-btn:hover img { transform: scale(1.035); }
.film-btn::before { background: #fff; }
.play.big { border-left-color: var(--ink); z-index: 1; }
.film-btn::after { content: ''; position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .7); pointer-events: none; opacity: 0; }

/* moat table and drawing types */
.moat-r { position: relative; transition: background .25s var(--ease); }
.moat-r::before { content: ''; position: absolute; left: -16px; top: -1px; bottom: -1px; width: 2px; background: var(--blue); transform: scaleY(0); transform-origin: 50% 0; transition: transform .3s var(--ease); }
.moat-r:hover { background: linear-gradient(90deg, rgba(31, 79, 216, .05), transparent 70%); }
.moat-r:hover::before { transform: scaleY(1); }
.type { transition: background .2s var(--ease); }
.type:hover { background: var(--paper); }
.type.on em::before { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 7px 1px 0; border-radius: 50%; background: var(--blue); vertical-align: middle; }

/* FAQ */
.faq summary { transition: color .2s var(--ease); }
.faq summary:hover { color: var(--blue-ink); }
.faq summary::after { transition: transform .3s var(--ease), color .2s var(--ease); }
.faq details[open] summary::after { content: '+'; transform: rotate(45deg); color: var(--blue); }

/* redrawn figures carry soft shadows that may fall outside their own box */
.illus > svg { overflow: visible; }

/* travelling pulses on the links inside illustrations (added by motion.js) */
.illus .pulse { fill: none; stroke-width: 2.6; stroke-linecap: round; opacity: 0; pointer-events: none; stroke-dasharray: 16px calc(var(--L) * 1px + 16px); stroke-dashoffset: 16px; }
.illus[data-illus="h1"] .pulse:not(.pl) { stroke: #fff; }

@media (prefers-reduced-motion: no-preference) {
  /* headings come up word by word */
  .js .sw .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .16em; margin-bottom: -.16em; }
  .js .sw .w > span { display: inline-block; transform: translateY(112%); transition: transform .95s var(--ease); transition-delay: calc(var(--i) * 42ms); will-change: transform; }
  .js .sw.in .w > span { transform: none; }
  .js .hero .lead, .js .hero .cta { animation: v86-up .9s var(--ease) both; }
  .js .hero .lead { animation-delay: .35s; }
  .js .hero .cta { animation-delay: .5s; }

  /* grouped items arrive one after another; their top rule draws in */
  .js .st { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i) * 90ms); }
  .js .st.in { opacity: 1; transform: none; }
  .js .st.ln { position: relative; border-top-color: transparent; }
  .js .st.ln::after { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--ln, currentColor); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.1s var(--ease); transition-delay: calc(var(--i) * 90ms + 80ms); }
  .js .st.ln.in::after { transform: scaleX(1); }
  .js .cap-row.rv .cap-v { transform: scale(.975); transition: transform .9s var(--ease); }
  .js .cap-row.rv.in .cap-v { transform: none; }

  /* product views */
  .tp:not([hidden]) { animation: v86-fade .35s var(--ease) both; }
  #p-approve:not(:disabled):not(.done) { animation: v86-ring 1.9s ease-out infinite; }
  .p-sheet .canvas:has(.s-done)::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, transparent 35%, rgba(31, 79, 216, .16) 50%, transparent 65%); animation: v86-sweep 1.2s var(--ease) both; }
  .film-btn::after { animation: v86-halo 2.4s ease-out infinite; }
  .type.on em::before { animation: v86-blink 2.2s ease-in-out infinite; }

  /* illustrations stay alive after their entrance */
  .illus.live:not(.off) .pulse { opacity: .95; animation: v86-run 2.8s cubic-bezier(.45, 0, .55, 1) var(--d, 0s) infinite; }
  .illus.live:not(.off) .flow { animation: dash 1.1s linear infinite; }
  .illus.live .ly3, .illus.live .graph, .illus.live .ly2, .illus.live .card, .illus.live .stamp { transition: translate .5s cubic-bezier(.2, .7, .2, 1); }
  .illus.live .ly3, .illus.live .graph { translate: calc(var(--mx, 0) * -7px) calc(var(--my, 0) * -5px); }
  .illus.live .ly2 { translate: calc(var(--mx, 0) * -3.5px) calc(var(--my, 0) * -2.5px); }
  .illus.live .card, .illus.live .stamp { translate: calc(var(--mx, 0) * 6px) calc(var(--my, 0) * 4px); }
}

@keyframes v86-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes v86-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes v86-ring { 0% { box-shadow: 0 0 0 0 rgba(31, 79, 216, .45); } 70%, 100% { box-shadow: 0 0 0 12px rgba(31, 79, 216, 0); } }
@keyframes v86-sweep { from { transform: translateX(-70%); opacity: 1; } to { transform: translateX(70%); opacity: 0; } }
@keyframes v86-halo { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(1.9); opacity: 0; } }
@keyframes v86-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes v86-run { 0% { stroke-dashoffset: 16px; } 70%, 100% { stroke-dashoffset: calc(var(--L) * -1px); } }

@media (max-width: 1020px) { .filmcard { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 720px) {
  .moat-r::before { display: none; }
  .hero::before { -webkit-mask-image: linear-gradient(transparent, #000 45%, transparent); mask-image: linear-gradient(transparent, #000 45%, transparent); }
}
