/* Premium depth for the public website: the 3D logo, scroll-driven perspective, the isometric dashboard stack,
   and small interactions. White page, logo colours only. Everything here is skipped for prefers-reduced-motion,
   and the page reads the same without it. Scripts: js/scene3d.js (WebGL logo) and js/depth.js (scroll and pointer depth). */

/* the 3D and ambient layers may extend past the page edge: clip them (clip, unlike hidden, keeps the sticky header working) */
.public { overflow-x: clip; }

/* ------------------------------------------------------------------ the 3D logo */
.logo3d { position: relative; width: 100%; aspect-ratio: 1; }
.logo3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: none; filter: drop-shadow(0 28px 26px rgba(37, 42, 99, .32)); }
.logo3d .logo3d-fb { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; }
.logo3d.is-3d canvas { display: block; }
.logo3d.is-3d .logo3d-fb { display: none; }

.hero-visual { position: relative; perspective: 1200px; }
.hero-visual::before { content: ""; position: absolute; inset: -12% -10% -6% -10%; z-index: -1; background: radial-gradient(40% 40% at 78% 18%, rgba(196, 154, 82, .24), transparent 70%), radial-gradient(46% 46% at 12% 82%, rgba(49, 55, 129, .16), transparent 72%); filter: blur(8px); }
.hero-logo3d { position: absolute; z-index: 3; bottom: -30%; right: 1%; width: 26%; pointer-events: none; }
.hero-visual .phone-demo { position: relative; z-index: 1; }
.hero-visual .float-chip { z-index: 4; }

/* ------------------------------------------------------------------ scroll-driven perspective (--d goes 0 to 1 as an element rises into view) */
[data-d3] { transform-origin: 50% 0; rotate: 1 0 0 calc((1 - var(--d, 1)) * 10deg); scale: calc(.965 + var(--d, 1) * .035); }
.section .wrap { perspective: 1500px; }

/* ------------------------------------------------------------------ isometric dashboard stack (home page) */
.stack-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.stack-text .kicker, .stack-text h2 { text-align: left; }
.stack-text p { color: var(--muted); }
.stack-points { list-style: none; margin: 20px 0 24px; padding: 0; display: grid; gap: 12px; }
.stack-points li { display: flex; gap: 12px; align-items: flex-start; }
.stack-points .ico { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--indigo-tint); color: var(--indigo); }
.stack-points svg { width: 17px; height: 17px; stroke: currentColor; }
.stack-points b { display: block; }
.stack-points span { font-size: 14px; color: var(--muted); }

.iso { --d: .4; position: relative; height: 440px; perspective: 1600px; }
.iso-stage { position: absolute; inset: 0; transform-style: preserve-3d; transform: translateY(-10px) rotateX(54deg) rotateZ(calc(-32deg + var(--px, 0) * 7deg)); transition: transform .5s var(--ease); }
.iso-layer { position: absolute; left: 14%; top: 22%; width: 62%; height: 50%; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 30px 50px -26px rgba(37, 42, 99, .5), -14px 18px 30px -20px rgba(37, 42, 99, .25); transform: translateZ(calc(var(--l) * (24px + var(--d) * 112px))); transition: transform .35s var(--ease); display: grid; gap: 8px; align-content: start; font-size: 12.5px; }
.iso-layer.l0 { --l: 0; }
.iso-layer.l1 { --l: 1; }
.iso-layer.l2 { --l: 2; }
.iso-layer .t { font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.iso-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-hi); }
.iso-row b { font-size: 12.5px; }
.iso-b { max-width: 82%; padding: 8px 11px; border-radius: 11px; line-height: 1.4; background: var(--subtle); }
.iso-b.me { margin-left: auto; background: var(--indigo-tint); }
.iso-bars { display: flex; align-items: flex-end; gap: 8px; height: 70px; }
.iso-bars i { flex: 1; border-radius: 5px 5px 2px 2px; background: linear-gradient(var(--brass), var(--brass-600)); height: var(--h); }
.iso-layer.l2 { border-color: var(--brass); background: linear-gradient(180deg, #fff, var(--brass-tint)); }

/* ------------------------------------------------------------------ calm, minimal finish for every public page */
.public a:hover { text-decoration: none; }                 /* no underlines: links change colour instead */
.public p a:hover, .public .prose a:hover { color: var(--indigo-700); }
.public .btn { height: 38px; padding: 0 16px; font-size: 13.5px; border-radius: 10px; }
.public .btn-lg { height: 42px; padding: 0 20px; font-size: 14px; border-radius: 11px; }
.public .btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.public .eyebrow { padding: 5px 12px; font-size: 12px; }
.public .site-nav { padding-top: 12px; padding-bottom: 12px; }
.public .card { border-radius: 14px; }

/* ------------------------------------------------------------------ footer: logo indigo, paper text, brass headings */
.public .site-foot { margin-top: 56px; padding: 44px 0 26px; background: var(--indigo); color: rgba(244, 242, 238, .72); border-top: 3px solid var(--brass); font-size: 13px; }
.public .site-foot .foot-col b { color: var(--brass-300); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.public .site-foot a, .public .site-foot .foot-col span { color: rgba(244, 242, 238, .72); font-size: 13px; transition: color var(--fast), transform var(--fast) var(--ease); }
.public .site-foot .foot-col a:hover, .public .site-foot .foot-legal a:hover { color: #fff; transform: translateX(2px); }
.public .site-foot .foot-brand p { color: rgba(244, 242, 238, .66); max-width: 300px; }
.public .site-foot .foot-bottom { border-top: 1px solid rgba(244, 242, 238, .16); color: rgba(244, 242, 238, .6); font-size: 12.5px; }
.public .site-foot .foot-legal a { color: rgba(244, 242, 238, .72); }
.brand-on-dark .brand-mark { background: transparent; }
.brand-on-dark .brand-name .c { color: var(--paper); }
.brand-on-dark .brand-name .h { color: var(--brass-300); }
.brand-on-dark .brand-sub { color: rgba(244, 242, 238, .62); }

/* ------------------------------------------------------------------ small interactions */
.site-nav { transition: box-shadow .3s var(--ease), background .3s; }
.site-nav.is-scrolled { box-shadow: 0 10px 28px -18px rgba(37, 42, 99, .5); }
.public .btn-primary, .public .btn-brass { position: relative; overflow: hidden; isolation: isolate; }
.public .btn-primary::before, .public .btn-brass::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%); transform: translateX(-120%); transition: transform .7s var(--ease); }
.public .btn-primary:hover::before, .public .btn-brass:hover::before { transform: translateX(120%); }
.public .btn svg { transition: transform var(--fast) var(--ease); }
.public .btn:hover svg:last-child { transform: translateX(3px); }
.public .link-card, .public .feature, .public .ind-card, .public .price-card { transition: box-shadow var(--mid) var(--ease), border-color var(--fast), transform var(--mid) var(--ease); }
.public .link-card:hover, .public .feature:hover, .public .ind-card:hover, .public .price-card:hover { box-shadow: 0 30px 50px -28px rgba(37, 42, 99, .45); border-color: var(--border-strong); }
.public .feature .ico, .public .link-card .ico { transition: transform var(--mid) var(--ease), background var(--fast), color var(--fast); }
.public .feature:hover .ico, .public .link-card:hover .ico { transform: translateY(-3px) rotate(-6deg) scale(1.06); }
.public .mega-panel { transform-origin: 50% 0; }
.public .section-alt { position: relative; }
.public .section-alt::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 50% at 85% 0%, rgba(196, 154, 82, .08), transparent 70%), radial-gradient(50% 45% at 10% 100%, rgba(49, 55, 129, .06), transparent 70%); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 960px) {
  .stack-grid { grid-template-columns: 1fr; gap: 24px; }
  .iso { height: 340px; }
  .hero-logo3d { width: 34%; top: -8%; right: -2%; }
  [data-d3] { rotate: 1 0 0 calc((1 - var(--d, 1)) * 5deg); }
}
@media (max-width: 600px) {
  .iso { height: 380px; margin-top: 24px; }
  .iso-stage { transform: translateY(26px) rotateX(52deg) rotateZ(calc(-30deg + var(--px, 0) * 7deg)); }
  .iso-layer { left: 20%; top: 28%; width: 54%; height: 46%; padding: 10px; font-size: 10.5px; transform: translateZ(calc(var(--l) * (14px + var(--d) * 48px))); }
  .iso-bars { height: 44px; }
  .hero-logo3d { width: 30%; top: -10%; right: 0; }
  .hero-visual::before { inset: -6%; }
}
@media (prefers-reduced-motion: reduce) {
  [data-d3] { rotate: none; scale: none; }
  .iso-stage, .iso-layer { transition: none; }
  .public .btn-primary::before, .public .btn-brass::before { display: none; }
}
