/* iCore Premium Polish Layer
   Non-destructive enhancement layer. Keeps the existing visual system intact. */

:root{
  --polish-ease:cubic-bezier(.22,.61,.36,1);
  --polish-ease-out:cubic-bezier(.16,1,.3,1);
  --polish-ring:0 0 0 3px rgba(44,194,216,.22);
}

html{scroll-behavior:smooth}
body{overflow-x:hidden}

/* Accessible skip link */
.icore-skip-link{
  position:fixed;left:16px;top:12px;z-index:10050;
  padding:10px 14px;border-radius:10px;background:#fff;color:#07102b;
  font:600 13px/1.2 var(--ff-body,Arial,sans-serif);
  transform:translateY(-140%);transition:transform .2s var(--polish-ease-out);
  box-shadow:0 12px 28px rgba(7,16,43,.16)
}
.icore-skip-link:focus{transform:translateY(0);outline:none}

/* Navigation refinement without changing layout */
.nav{
  transition:background-color .28s ease,box-shadow .28s ease,border-color .28s ease,backdrop-filter .28s ease;
}
.nav.icore-nav-scrolled{
  box-shadow:0 12px 36px rgba(7,16,43,.08);
  backdrop-filter:saturate(150%) blur(18px);
  -webkit-backdrop-filter:saturate(150%) blur(18px)
}

/* Hero receives depth, not a redesign */
.hero.hero-dark{isolation:isolate}
.hero.hero-dark::after{
  content:"";position:absolute;inset:0;pointer-events:none;z-index:0;
  background:radial-gradient(54rem 32rem at var(--icore-hero-x,72%) var(--icore-hero-y,36%),rgba(44,194,216,.095),transparent 58%);
  opacity:.9;transition:opacity .4s ease
}
.hero.hero-dark .hero-in,.hero.hero-dark .scroll-cue{position:relative;z-index:2}
.hero-copy h1,.hero-sub,.hero-actions,.hero-metrics{transform:translateZ(0)}

/* Premium interactive feedback */
.btn,a.btn,button.btn{
  position:relative;overflow:hidden;
  transition:transform .2s var(--polish-ease-out),box-shadow .24s ease,border-color .24s ease,background-color .24s ease,color .24s ease
}
.btn::after{
  content:"";position:absolute;inset:-1px;pointer-events:none;
  background:linear-gradient(110deg,transparent 20%,rgba(255,255,255,.16) 46%,transparent 72%);
  transform:translateX(-135%);transition:transform .65s var(--polish-ease-out)
}
.btn:hover::after{transform:translateX(135%)}
.btn:hover{transform:translateY(-1px)}
.btn:active{transform:translateY(0) scale(.985)}

/* Keyboard focus across the entire site */
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{
  outline:2px solid #2cc2d8!important;outline-offset:3px!important;box-shadow:var(--polish-ring)
}

/* Existing cards: subtle material improvement only */
.case,.cap-card,.tool-card,.insight-card,.prod-card,.challenge-card,.pillar,.industry-card{
  transition:transform .28s var(--polish-ease-out),box-shadow .28s ease,border-color .28s ease
}
@media (hover:hover) and (pointer:fine){
  .case:hover,.cap-card:hover,.tool-card:hover,.insight-card:hover,.prod-card:hover,.challenge-card:hover,.pillar:hover,.industry-card:hover{
    transform:translateY(-4px)
  }
}

/* Reading progress appears only on article/case/brief pages */
.icore-reading-progress{
  position:fixed;top:0;left:0;width:100%;height:2px;z-index:10020;
  pointer-events:none;background:transparent
}
.icore-reading-progress>i{
  display:block;height:100%;width:0;
  background:linear-gradient(90deg,#2cc2d8,#6f78ff);
  box-shadow:0 0 12px rgba(44,194,216,.35)
}

/* Optional audio control — deliberately unobtrusive */
.icore-sound-toggle{
  position:fixed;left:18px;bottom:18px;z-index:9800;
  display:flex;align-items:center;gap:8px;height:38px;padding:0 12px;
  border:1px solid rgba(255,255,255,.14);border-radius:999px;
  background:rgba(8,15,35,.78);color:rgba(255,255,255,.88);
  backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  box-shadow:0 10px 28px rgba(3,8,24,.18);
  font:600 11px/1 var(--ff-body,Arial,sans-serif);letter-spacing:.02em;
  cursor:pointer;transition:transform .2s var(--polish-ease-out),background .2s ease,border-color .2s ease,opacity .2s ease
}
.icore-sound-toggle:hover{transform:translateY(-2px);background:rgba(8,15,35,.92);border-color:rgba(44,194,216,.36)}
.icore-sound-toggle svg{width:15px;height:15px;display:block}
.icore-sound-toggle .sound-on{display:none}
.icore-sound-toggle[aria-pressed="true"] .sound-on{display:block}
.icore-sound-toggle[aria-pressed="true"] .sound-off{display:none}
.icore-sound-toggle .sound-state{opacity:.78}

/* Compact command search */
.icore-search-overlay{
  position:fixed;inset:0;z-index:10040;display:none;align-items:flex-start;justify-content:center;
  padding:12vh 18px 24px;background:rgba(5,10,26,.58);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)
}
.icore-search-overlay.open{display:flex}
.icore-search-panel{
  width:min(720px,100%);max-height:72vh;overflow:hidden;border-radius:22px;
  background:rgba(255,255,255,.985);box-shadow:0 28px 90px rgba(4,9,27,.28);border:1px solid rgba(10,28,62,.08)
}
.icore-search-head{display:flex;align-items:center;gap:12px;padding:16px 18px;border-bottom:1px solid rgba(10,28,62,.08)}
.icore-search-head svg{width:20px;height:20px;color:#58708c;flex:none}
.icore-search-input{width:100%;border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;color:#0b1736;font:600 17px/1.35 var(--ff-body,Arial,sans-serif)}
.icore-search-kbd{flex:none;border:1px solid rgba(10,28,62,.12);background:#f5f7fb;color:#66738b;border-radius:7px;padding:5px 7px;font-size:10px}
.icore-search-results{max-height:calc(72vh - 66px);overflow:auto;padding:8px}
.icore-search-result{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 14px;border-radius:14px;color:#102142;text-decoration:none}
.icore-search-result:hover,.icore-search-result.active{background:#f2f7fb}
.icore-search-result b{display:block;font:650 14px/1.2 var(--ff-body,Arial,sans-serif)}
.icore-search-result span{display:block;margin-top:4px;color:#708097;font:500 11px/1.2 var(--ff-body,Arial,sans-serif)}
.icore-search-result em{font-style:normal;color:#8ca0b5;font-size:16px}
.icore-search-empty{padding:28px 18px 34px;text-align:center;color:#738196;font:500 13px/1.6 var(--ff-body,Arial,sans-serif)}

/* Page transition, progressive enhancement */
.icore-page-curtain{
  position:fixed;inset:0;z-index:10060;pointer-events:none;background:#07102b;
  opacity:0;transition:opacity .18s ease
}
.icore-page-curtain.show{opacity:.12}

/* Better touch behavior */
button,a,[role="button"]{-webkit-tap-highlight-color:transparent}

@media(max-width:767px){
  .icore-sound-toggle{left:12px;bottom:12px;height:36px;padding:0 10px}
  .icore-sound-toggle .sound-state{display:none}
  .icore-search-overlay{padding-top:8vh}
  .icore-search-panel{border-radius:18px}
  .hero.hero-dark::after{background:radial-gradient(34rem 24rem at 70% 28%,rgba(44,194,216,.075),transparent 62%)}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .btn,.case,.cap-card,.tool-card,.insight-card,.prod-card,.challenge-card,.pillar,.industry-card{transition:none!important}
  .btn::after{display:none!important}
  .hero.hero-dark::after{transition:none}
}

/* ============================================================
   Phase 2 — Spatial depth, edge safety & interaction refinement
   ============================================================ */
:root{
  --icore-gutter:clamp(20px,3vw,34px);
  --icore-depth-shadow:0 26px 80px -34px rgba(7,16,43,.34),0 12px 28px -20px rgba(30,62,200,.18);
}

/* Edge-safe page rhythm: prevents copy and controls from kissing the viewport. */
.wrap{padding-left:var(--icore-gutter)!important;padding-right:var(--icore-gutter)!important}
@media(max-width:720px){
  :root{--icore-gutter:20px}
  .wrap,.hero .wrap{padding-left:var(--icore-gutter)!important;padding-right:var(--icore-gutter)!important}
  .section,.phero,.lab-hero,.cs-hero,.nl-hero,.reach,.story,.explore{overflow-x:clip}
  .sec-head,.hero-copy,.phero .wrap>*,.lab-hero .wrap>*,.cs-hero .wrap>*{min-width:0}
  h1,h2,h3,p,.eyebrow{overflow-wrap:anywhere}
}
@media(max-width:390px){:root{--icore-gutter:18px}}

/* Keep floating controls away from device edges/safe areas. */
.icore-sound-toggle{left:max(18px,env(safe-area-inset-left));bottom:max(18px,env(safe-area-inset-bottom))}
@media(max-width:767px){.icore-sound-toggle{left:max(12px,env(safe-area-inset-left));bottom:max(12px,env(safe-area-inset-bottom))}}

/* Multi-layer spatial depth: a restrained "5D" feel without changing the design language. */
.icore-depth-scene{perspective:1200px;transform-style:preserve-3d;isolation:isolate}
.icore-depth-card{transform-style:preserve-3d;will-change:transform;transition:transform .38s var(--polish-ease-out),box-shadow .38s ease,border-color .3s ease!important}
.icore-depth-card::before{
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;opacity:0;
  background:radial-gradient(320px circle at var(--icore-card-x,50%) var(--icore-card-y,50%),rgba(44,194,216,.12),transparent 58%);
  transition:opacity .3s ease;z-index:0
}
.icore-depth-card:hover::before{opacity:1}
.icore-depth-card>*{position:relative;z-index:1}
@media(hover:hover) and (pointer:fine){
  .icore-depth-card:hover{box-shadow:var(--icore-depth-shadow)}
}

/* Hero gets layered spatial movement while preserving its current composition. */
.hero.hero-dark .hero-in{perspective:1600px;transform-style:preserve-3d}
.hero.hero-dark .hero-copy,.hero.hero-dark .core-stage{will-change:transform;transition:transform .42s var(--polish-ease-out)}
.hero.hero-dark .core-stage::after{
  content:"";position:absolute;inset:12%;border-radius:50%;pointer-events:none;z-index:-1;
  background:radial-gradient(circle,rgba(44,194,216,.12),rgba(59,91,234,.06) 35%,transparent 72%);
  filter:blur(26px);transform:translateZ(-80px) scale(1.08);opacity:.72
}

/* Atmospheric section depth: appears only on selected signature sections added by JS. */
.icore-ambient-depth{isolation:isolate;overflow:hidden}
.icore-ambient-depth::after{
  content:"";position:absolute;inset:-20%;pointer-events:none;z-index:0;opacity:.42;
  background:
    radial-gradient(28rem 24rem at var(--icore-sx,18%) var(--icore-sy,25%),rgba(44,194,216,.08),transparent 66%),
    radial-gradient(32rem 28rem at calc(100% - var(--icore-sx,18%)) 80%,rgba(110,92,240,.055),transparent 68%);
  transform:translate3d(0,var(--icore-parallax,0px),0);transition:transform .12s linear
}
.icore-ambient-depth>.wrap{position:relative;z-index:1}

/* Click experience: crisp ripple + press response. */
.icore-ripple-host{position:relative;overflow:hidden!important}
.icore-click-ripple{position:absolute!important;z-index:30!important;border-radius:50%;pointer-events:none!important;
  width:10px;height:10px;background:rgba(255,255,255,.32);transform:translate(-50%,-50%) scale(0);opacity:1;
  animation:icore-ripple .55s var(--polish-ease-out) forwards!important}
.btn-ghost .icore-click-ripple,.btn-quiet .icore-click-ripple,.tool-card .icore-click-ripple,.cap-card .icore-click-ripple{background:rgba(30,62,200,.12)}
@keyframes icore-ripple{to{transform:translate(-50%,-50%) scale(20);opacity:0}}

/* Links feel deliberate rather than abrupt. */
.nav-links a,.mega a,.fcol a{transition:color .2s ease,background .2s ease,transform .22s var(--polish-ease-out),opacity .2s ease}
@media(hover:hover) and (pointer:fine){.mega a:hover{transform:translateX(3px)}}

/* Small cinematic depth on media / dashboard shells. */
.prod-screen,.dash,.viz3d,.ba-stage,.ccard .cc-vis,.featured-case .fc-vis,.viz-canvas-wrap{
  transform-style:preserve-3d;backface-visibility:hidden
}
.icore-media-depth{box-shadow:0 34px 90px -46px rgba(4,12,40,.45),0 16px 42px -28px rgba(30,62,200,.24)}

/* Sound control gains a tiny live equalizer when enabled. */
.icore-sound-toggle[aria-pressed="true"]::after{
  content:"";width:12px;height:11px;margin-left:1px;
  background:linear-gradient(to top,currentColor 0 100%) 0 100%/2px 45% no-repeat,
             linear-gradient(to top,currentColor 0 100%) 5px 100%/2px 85% no-repeat,
             linear-gradient(to top,currentColor 0 100%) 10px 100%/2px 60% no-repeat;
  opacity:.58;animation:icore-eq 1s ease-in-out infinite alternate
}
@keyframes icore-eq{0%{transform:scaleY(.65)}100%{transform:scaleY(1)}}

/* Slightly richer section entrances; only applied by JS and never to reduced-motion users. */
.icore-cinematic-in{opacity:0;transform:translate3d(0,22px,0) scale(.992);filter:blur(3px)}
.icore-cinematic-in.icore-in{opacity:1;transform:none;filter:none;transition:opacity .72s ease,transform .72s var(--polish-ease-out),filter .6s ease}

@media(max-width:900px){
  .icore-depth-card{transform:none!important}
  .icore-depth-card::before{display:none}
  .icore-ambient-depth::after{opacity:.24}
}
@media(prefers-reduced-motion:reduce){
  .icore-depth-card,.hero.hero-dark .hero-copy,.hero.hero-dark .core-stage,.icore-ambient-depth::after{transform:none!important;transition:none!important}
  .icore-cinematic-in{opacity:1!important;transform:none!important;filter:none!important}
  .icore-click-ripple,.icore-sound-toggle::after{display:none!important}
}

.icore-depth-card{position:relative}
