/* site-3d.css (2026-11-07) - shared polish + 3D depth layer for the
   System Optix marketing site. Loaded AFTER each page's own <style>, so it
   only refines the existing identity (navy + teal, Inter, light panels).
   Motion rules: transform/opacity only, pointer:fine only for hover tilt,
   everything static under prefers-reduced-motion. */

/* ---- tokens: contrast-safe variants of the existing palette ---- */
:root{
  --muted-2:#646c80;          /* was #9aa3b1 (2.5:1) -> 5.2:1 on white */
  --accent-ink:#146b5f;       /* teal for text on light surfaces (6.4:1) */
  --accent-btn:#1a786b;       /* teal button fill, white text 5.3:1 */
  --depth-1:0 1px 2px rgba(16,27,61,.06),0 4px 12px rgba(16,27,61,.06);
  --depth-2:0 2px 4px rgba(16,27,61,.06),0 12px 28px rgba(16,27,61,.10);
  --depth-3:0 6px 14px rgba(16,27,61,.10),0 30px 60px rgba(16,27,61,.18);
}

/* ---- base polish ---- */
html{-webkit-text-size-adjust:100%;}
img{max-width:100%;height:auto;}
:where(a,button,summary,input,select,textarea,[tabindex]):focus-visible{
  outline:3px solid #2bb39f;outline-offset:2px;border-radius:6px;
}
.nav-cta,.cta-btn:not(.ghost),.submit-btn,.demo-link-btn,.pop-badge{background-color:var(--accent-btn);color:#fff;}
.nav-cta:hover,.cta-btn:not(.ghost):hover,.submit-btn:hover,.demo-link-btn:hover{background-color:var(--accent-ink);}
section:not(.sec-dark):not(.cta-dark):not(.mod-dark) .section-head .kicker{color:var(--accent-ink);}
section > .wrap{width:100%;}

/* ---- 3D hero stage ---- */
.h3d{position:relative;width:100%;max-width:1040px;margin:40px auto 0;padding:0 24px;box-sizing:border-box;}
.h3d-scene{perspective:1700px;perspective-origin:50% 0%;}
.h3d-stage{position:relative;transform-style:preserve-3d;
  transform:rotateX(var(--h3d-rx,14deg)) rotateY(var(--h3d-ry,-6deg)) rotateZ(var(--h3d-rz,1deg));
  will-change:transform;}
.h3d-layer{transform:translate3d(calc(var(--h3d-px,0) * var(--d,0) * 1px),calc(var(--h3d-py,0) * var(--d,0) * 1px),calc(var(--d,0) * 1px));}
.h3d-win{margin:0;border-radius:14px;overflow:hidden;background:#fff;border:1px solid rgba(16,27,61,.12);box-shadow:var(--depth-3);}
.h3d-bar{display:flex;align-items:center;gap:6px;height:30px;padding:0 12px;background:linear-gradient(180deg,#1b2757,#101b3d);color:rgba(255,255,255,.82);font-size:12px;font-weight:600;}
.h3d-bar i{width:9px;height:9px;border-radius:50%;background:#ff5f57;display:block;}
.h3d-bar i:nth-child(2){background:#febc2e;} .h3d-bar i:nth-child(3){background:#28c840;}
.h3d-bar span{margin-left:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.h3d-win img{display:block;width:100%;height:auto;}
.h3d-card{position:absolute;margin:0;border-radius:12px;overflow:hidden;background:#fff;border:1px solid rgba(16,27,61,.14);box-shadow:var(--depth-3);}
.h3d-card img{display:block;width:100%;height:auto;}
.h3d-card figcaption{position:absolute;left:10px;top:10px;font-size:12px;font-weight:700;color:#fff;background:rgba(16,27,61,.86);padding:4px 10px;border-radius:40px;}
.h3d-a{width:42%;right:-5%;bottom:-6%;--d:70;}
.h3d-b{width:46%;left:-6%;top:15%;--d:45;}
.h3d-phone{position:absolute;right:-3%;top:-9%;width:17%;min-width:120px;margin:0;padding:7px;border-radius:30px;background:#0b1230;box-shadow:var(--depth-3);--d:110;}
.h3d-phone img{display:block;width:100%;height:auto;border-radius:23px;}
.h3d-chip{position:absolute;display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:40px;background:#fff;border:1px solid rgba(16,27,61,.12);box-shadow:var(--depth-2);font-size:13px;font-weight:600;color:#101b3d;white-space:nowrap;}
.h3d-chip .dot{width:8px;height:8px;border-radius:50%;background:#3db67b;box-shadow:0 0 0 4px rgba(61,182,123,.16);}
.h3d-c1{left:-3%;bottom:6%;--d:130;}
.h3d-c2{left:6%;top:-6%;--d:150;}
.hero{isolation:isolate;}
.hero::before{content:"";position:absolute;left:50%;top:0;width:min(1100px,100%);height:min(520px,70%);transform:translateX(-50%);z-index:0;pointer-events:none;
  background:radial-gradient(closest-side,rgba(245,247,251,.94),rgba(245,247,251,.75) 60%,rgba(245,247,251,0));}
@media (max-width:760px){
  .hero::before{width:100%;height:62%;background:linear-gradient(180deg,rgba(245,247,251,.95) 0,rgba(245,247,251,.9) 80%,rgba(245,247,251,0));}
}
/* soft backdrop behind section headings so the animated network never runs through text */
section:not(.sec-dark):not(.cta-dark) .section-head{position:relative;isolation:isolate;}
section:not(.sec-dark):not(.cta-dark) .section-head::before{content:"";position:absolute;inset:-18px min(-40px,0px);z-index:-1;pointer-events:none;border-radius:40px;
  background:radial-gradient(closest-side,rgba(245,247,251,.95),rgba(245,247,251,.85) 70%,rgba(245,247,251,0));}
.tour-note,.h3d-note{background:rgba(245,247,251,.9);display:table;padding:2px 10px;border-radius:20px;}
@media (min-width:761px) and (max-width:1100px){
  .h3d{margin-top:56px;}
  .h3d-c2{display:none;}
  .h3d-phone{top:4%;right:-2%;width:19%;}
  .h3d-a{right:-2%;}
  .h3d-b{left:-2%;}
}
.h3d-note{margin:64px auto 0;position:relative;font-size:13px;color:var(--muted-2);text-align:center;}
.h3d-glow{position:absolute;inset:8% 6% -4% 6%;z-index:-1;background:radial-gradient(60% 60% at 50% 40%,rgba(31,138,122,.22),transparent 70%);filter:blur(30px);transform:translateZ(-120px);}

/* phones / small tablets: flat, readable, no layered parallax */
@media (max-width:760px){
  .h3d{margin-top:28px;padding:0 16px;}
  .h3d-scene{perspective:none;}
  .h3d-stage{transform:none !important;}
  .h3d-layer{transform:none !important;}
  .h3d-a,.h3d-b,.h3d-c2{display:none;}
  .h3d-phone{position:relative;right:auto;top:auto;width:38%;min-width:0;margin:-24% 4% 0 auto;padding:5px;border-radius:22px;}
  .h3d-phone img{border-radius:18px;}
  .h3d-note{margin-top:18px;}
  .h3d-c1{position:relative;left:auto;bottom:auto;margin-top:-18px;}
  .h3d-bar{height:24px;font-size:11px;}
}

/* ---- product tour (new-feature screenshots) ---- */
.tour{padding:72px 0;}
.tour .section-head{margin-bottom:36px;}
.tour-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;perspective:1400px;}
.tour-card{position:relative;display:flex;flex-direction:column;background:var(--panel,#fff);border:1px solid var(--border,#dbe1ec);border-radius:16px;overflow:hidden;box-shadow:var(--depth-1);
  transform-style:preserve-3d;transition:box-shadow .25s ease,transform .25s ease;transform:rotateX(var(--tx,0deg)) rotateY(var(--ty,0deg)) translateZ(var(--tz,0px));}
.tour-shot{position:relative;margin:0;aspect-ratio:16/10;overflow:hidden;background:#eef1f7;border-bottom:1px solid var(--border,#dbe1ec);}
.tour-shot img{display:block;width:100%;height:100%;object-fit:cover;object-position:top left;}
.tour-body{padding:18px 20px 20px;}
.tour-tag{display:inline-block;font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--accent-ink);margin-bottom:6px;}
.tour-card h3{margin:0 0 6px;font-size:18px;line-height:1.3;color:var(--text,#101b3d);}
.tour-card p{margin:0;font-size:15px;line-height:1.55;color:var(--muted,#515774);}
.tour-note{margin:22px 0 0;font-size:13px;color:var(--muted-2);text-align:center;}
@media (max-width:1000px){.tour-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:620px){.tour{padding:48px 0;}.tour-grid{grid-template-columns:1fr;gap:18px;}}

/* ---- screenshot figure used on inner pages ---- */
.shot3d{margin:28px auto 8px;max-width:1040px;perspective:1600px;}
.shot3d figure{margin:0;border-radius:14px;overflow:hidden;border:1px solid var(--border,#dbe1ec);background:#fff;box-shadow:var(--depth-3);
  transform:rotateX(var(--sx,6deg));transform-origin:50% 100%;transition:transform .5s ease;}
.shot3d img{display:block;width:100%;height:auto;}
.shot3d figcaption{padding:10px 14px;font-size:13px;color:var(--muted,#515774);background:var(--panel-2,#f2f4f9);border-top:1px solid var(--border,#dbe1ec);}
.shot3d.in figure{--sx:0deg;}
.shot-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;max-width:1040px;margin:24px auto 0;}
.shot-pair figure{margin:0;border-radius:12px;overflow:hidden;border:1px solid var(--border,#dbe1ec);background:#fff;box-shadow:var(--depth-2);}
.shot-pair img{display:block;width:100%;height:auto;}
.shot-pair figcaption{padding:9px 12px;font-size:13px;color:var(--muted,#515774);border-top:1px solid var(--border,#dbe1ec);}
@media (max-width:700px){.shot-pair{grid-template-columns:1fr;}}

/* ---- hover tilt / raise (only where a precise pointer exists) ---- */
@media (hover:hover) and (pointer:fine){
  [data-tilt]{transform-style:preserve-3d;}
  .tour-card:hover,[data-tilt]:hover{box-shadow:var(--depth-3);}
}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
  /* generic tilt for every card on every page (JS tags them with data-tilt) */
  html [data-tilt]:is(.is-visible,:not([data-reveal])){
    transform:perspective(900px) translate3d(0,var(--lift,0px),var(--tz,0px)) rotateX(var(--tx,0deg)) rotateY(var(--ty,0deg));
    transition:transform .16s ease-out,box-shadow .25s ease,border-color .25s ease;will-change:transform;}
  html [data-tilt]:is(.is-visible,:not([data-reveal])):hover{box-shadow:var(--depth-3);}
  /* buttons: lift off the page, press back in */
  :is(.cta-btn,.nav-cta,.submit-btn,.demo-link-btn,.back,.g3d-btn){transition:transform .16s ease,box-shadow .2s ease,background-color .2s ease,color .2s ease,border-color .2s ease;}
  :is(.cta-btn,.nav-cta,.submit-btn,.demo-link-btn,.back,.g3d-btn):hover{transform:translateY(-2px);box-shadow:0 2px 0 rgba(16,27,61,.10),0 10px 22px rgba(16,27,61,.16);}
  :is(.cta-btn,.nav-cta,.submit-btn,.demo-link-btn,.back,.g3d-btn):active{transform:translateY(1px);box-shadow:0 1px 2px rgba(16,27,61,.14);}
}

/* ---- scroll-driven depth: content rises out of the page ---- */
@media (prefers-reduced-motion:no-preference){
  html [data-reveal]:not(.is-visible),html .rise:not(.in){opacity:0;transform:perspective(1000px) translate3d(0,36px,-140px) rotateX(14deg);}
  html .rise{transition:opacity .8s cubic-bezier(.16,.84,.34,1),transform .8s cubic-bezier(.16,.84,.34,1);transform-origin:50% 100%;}
}

/* ---- reduced motion: no tilt, no parallax, no reveal motion ---- */
@media (prefers-reduced-motion:reduce){
  .h3d-stage{transform:rotateX(8deg) rotateY(-4deg) !important;}
  .h3d-layer{transform:translate3d(0,0,calc(var(--d,0) * 1px)) !important;}
  .tour-card,[data-tilt],.rise,[data-reveal]{transform:none !important;transition:none !important;opacity:1 !important;}
  .g3d-item{transition:none !important;}
  .shot3d figure{transform:none !important;transition:none !important;}
}
@media (prefers-reduced-motion:reduce) and (max-width:760px){
  .h3d-stage,.h3d-layer{transform:none !important;}
}

/* fallback card grid for pages that do not define their own (page styles win) */
:where(.highlight-grid){display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px;margin:20px 0 28px;}
:where(.h-card){background:var(--panel,#fff);border:1px solid var(--border,#dbe1ec);border-radius:14px;padding:18px 20px;box-shadow:var(--depth-1);}
:where(.h-card) h3{font-size:16px;line-height:1.3;margin:0 0 6px;color:var(--text,#101b3d);}
:where(.h-card) p{font-size:14px;line-height:1.55;margin:0;color:var(--muted,#515774);}

@media (max-width:1180px){section:not(.sec-dark):not(.cta-dark) .section-head::before{inset:-14px 0;}}

/* ---- sample-data caption for animated illustrations ---- */
.sample-cap{display:inline-flex;align-items:center;gap:6px;margin:0 0 10px;font-size:12px;font-weight:600;letter-spacing:.02em;color:var(--muted-2);}
.sample-cap::before{content:"";width:6px;height:6px;border-radius:50%;background:#e0a526;}

/* ---- 3D orbit of endpoints around the hero console (canvas, see site-3d.js) ---- */
.h3d-orbit{position:absolute;left:-14%;top:-3%;width:128%;height:112%;pointer-events:none;}
.h3d-orbit.back{z-index:0;} .h3d-orbit.front{z-index:4;}
.h3d-scene{position:relative;}
.h3d-scene > .h3d-stage{z-index:2;}
@media (max-width:760px){.h3d-orbit{left:-6%;width:112%;top:-2%;height:108%;}}

/* ---- 3D screenshot gallery (coverflow) ---- */
.g3d{position:relative;max-width:1040px;margin:28px auto 8px;overflow:hidden;padding:6px 0 4px;border-radius:14px;}
main{overflow-x:clip;}
.g3d-stage{position:relative;perspective:1600px;aspect-ratio:16/8.4;}
.g3d-item{position:absolute;left:22%;top:4%;width:56%;margin:0;border-radius:12px;overflow:hidden;background:#fff;border:1px solid var(--border,#dbe1ec);box-shadow:var(--depth-3);
  transform:translateX(calc(var(--p,0) * 62%)) translateZ(calc(var(--ap,0) * -220px)) rotateY(calc(var(--p,0) * -32deg));
  opacity:calc(1 - var(--ap,0) * .28);z-index:calc(10 - var(--ap,0));transition:transform .6s cubic-bezier(.2,.8,.2,1),opacity .6s ease;cursor:pointer;}
.g3d-item[aria-current="true"]{cursor:default;}
.g3d-item img{display:block;width:100%;height:auto;}
.g3d-item figcaption{padding:8px 12px;font-size:13px;color:var(--muted,#515774);border-top:1px solid var(--border,#dbe1ec);background:var(--panel,#fff);}
.g3d-item[data-hidden="true"]{opacity:0;pointer-events:none;}
.g3d-nav{display:flex;justify-content:center;align-items:center;gap:12px;margin-top:14px;}
.g3d-btn{width:44px;height:44px;border-radius:50%;border:1px solid var(--border,#dbe1ec);background:var(--panel,#fff);color:var(--text,#101b3d);font-size:18px;line-height:1;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;}
.g3d-count{font-size:13px;color:var(--muted-2);min-width:56px;text-align:center;}
.g3d-note{text-align:center;font-size:12.5px;color:var(--muted-2);margin:8px 0 0;}
@media (max-width:760px){
  .g3d-stage{aspect-ratio:auto;perspective:none;display:flex;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory;padding:4px 2px 12px;-webkit-overflow-scrolling:touch;}
  .g3d-item{position:relative;left:auto;top:auto;flex:0 0 86%;scroll-snap-align:center;transform:none !important;opacity:1 !important;}
  .g3d-item[data-hidden="true"]{opacity:1;pointer-events:auto;}
  .g3d-nav{display:none;}
}

/* ---- pricing contact panel ---- */
.price-contact{max-width:860px;margin:0 auto;display:grid;grid-template-columns:1.2fr 1fr;gap:24px;align-items:center;background:var(--panel,#fff);border:1px solid var(--border,#dbe1ec);border-radius:18px;padding:28px;box-shadow:var(--depth-2);}
.price-contact h3{margin:0 0 8px;font-size:22px;}
.price-contact p{margin:0 0 16px;color:var(--muted,#515774);font-size:15px;line-height:1.6;}
.price-contact ul{margin:0;padding:0;list-style:none;display:grid;gap:8px;font-size:14px;color:var(--text,#101b3d);}
.price-contact li{display:flex;gap:8px;align-items:flex-start;}
.price-contact li::before{content:"";flex:0 0 8px;height:8px;margin-top:6px;border-radius:50%;background:var(--accent-btn);}
@media (max-width:760px){.price-contact{grid-template-columns:1fr;padding:22px;}}
