/* ============================================================
   HACKTECH — "elevate tastefully" enhancement layer
   Purely ADDITIVE. Loaded after styles.css / tech.css so the
   base site is untouched and every effect degrades gracefully.
   All motion is gated on (pointer:fine) + (no reduced-motion),
   applied via the `fx-on` flag that enhance.js sets on <html>.
   Palette reused from styles.css: --c5 teal, --c6 gold.
   ============================================================ */

/* custom cursor removed — the site uses the normal system cursor */

/* ---------- 2. holographic sheen on glass surfaces ---------- */
/* enhance.js tags existing cards/panels with .fx-sheen and feeds
   --mx/--my (0-100%) as the pointer moves across each element. */
.fx-sheen{ position:relative }
.fx-sheen::after{
  content:""; position:absolute; inset:0; border-radius:inherit; z-index:1;
  pointer-events:none; opacity:0; transition:opacity .35s ease;
  background:radial-gradient(420px circle at var(--mx,50%) var(--my,0%),
    rgba(47,168,239,.16), transparent 42%);
  mix-blend-mode:screen;
}
.fx-sheen.is-live::after{ opacity:1 }
/* a hairline that lights up where the cursor is — the "glass edge catching light" */
.fx-sheen::before{
  content:""; position:absolute; inset:0; border-radius:inherit; z-index:1;
  pointer-events:none; opacity:0; transition:opacity .35s ease; padding:1px;
  background:radial-gradient(220px circle at var(--mx,50%) var(--my,50%),
    rgba(47,168,239,.55), rgba(47,168,239,.30) 40%, transparent 60%);
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude;
}
.fx-sheen.is-live::before{ opacity:.9 }
/* keep real content above the overlays */
.fx-sheen>*{ position:relative; z-index:2 }
.section--light .fx-sheen::after{
  background:radial-gradient(420px circle at var(--mx,50%) var(--my,0%),
    rgba(47,168,239,.12), transparent 42%);
}

/* ---------- 3. themed photo frame (blends bright photos into the dark theme) ---------- */
.media-photo{
  position:relative; overflow:hidden; border-radius:var(--r-lg);
  border:1px solid var(--line-2); box-shadow:var(--shadow);
  background:#051622; min-height:320px;
}
.media-photo img{
  width:100%; height:100%; min-height:inherit; object-fit:cover; display:block;
  /* nudge bright stock toward the brand palette without a heavy filter */
  filter:saturate(.92) contrast(1.02);
  transform:scale(1.04); transition:transform 1.1s var(--ease-out-expo);
  will-change:transform;
}
.split:hover .media-photo img,
.media-photo:hover img{ transform:scale(1.10) }
/* teal/ink wash + top vignette so any photo sits in the aurora world */
.media-photo::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:
    linear-gradient(180deg, rgba(4,20,31,.10), rgba(4,20,31,.55)),
    linear-gradient(120deg, rgba(47,168,239,.20), transparent 55%);
  mix-blend-mode:multiply;
}
/* subtle scanline texture for the "engineered" feel — very low contrast */
.media-photo::before{
  content:""; position:absolute; inset:0; z-index:1; pointer-events:none; opacity:.5;
  background:repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 4px);
}
/* floating caption tag, optional via data-tag */
.media-photo[data-tag]::after{ } /* keep wash; tag rendered separately below */
.media-photo .media-tag{
  position:absolute; left:14px; bottom:14px; z-index:3;
  display:inline-flex; align-items:center; gap:8px;
  padding:7px 13px; border-radius:999px; font-family:var(--font-display);
  font-size:12px; letter-spacing:.4px; color:var(--ink);
  background:rgba(10,10,10,.6); border:1px solid var(--line-2);
  backdrop-filter:blur(8px);
}
.media-photo .media-tag::before{
  content:""; width:7px; height:7px; border-radius:50%; background:var(--c5);
  box-shadow:0 0 10px var(--c5);
}
/* gentle parallax: enhance.js sets --py (px) from scroll position */
html.fx-on .media-photo img{ transform:translateY(var(--py,0)) scale(1.08) }
html.fx-on .split:hover .media-photo img{ transform:translateY(var(--py,0)) scale(1.12) }

/* when a photo replaces a gradient split__media, drop the old padding/centering */
.split__media.media-photo{ padding:0; display:block }

/* ---------- 4. reveal: let stock photos fade+rise in like the rest of the site ---------- */
.media-photo.reveal-img{ opacity:0; transform:translateY(28px);
  transition:opacity var(--dur-3) var(--ease-out-expo), transform var(--dur-3) var(--ease-out-expo) }
.media-photo.reveal-img.show{ opacity:1; transform:none }

/* ---------- 4b. photographic service slides (solutions.html) ----------
   Each .ws-right gets a real backdrop via an inline --shot url. A dark
   teal wash keeps the white copy readable; the slider's existing
   saturate/brightness filter already mutes inactive slides and snaps the
   active one vivid — so the photos breathe in and out with the scroll. */
.ws-right.ws-shot{
  background-image:
    linear-gradient(150deg, rgba(10,10,10,.74), rgba(10,16,19,.84)),
    linear-gradient(120deg, rgba(15,111,176,.28), transparent 60%),
    var(--shot);
  background-size:cover; background-position:center; background-repeat:no-repeat;
}
.ws-right.ws-shot .ws-text{ color:#f4f9f8; text-shadow:0 2px 18px rgba(0,0,0,.5) }

/* ---------- 4c. slide choreography: active slide's content rises in ----------
   Swiper stamps .swiper-slide-active; everything below is CSS-only.
   Inactive slides hold content faded+shifted, the active one staggers
   title → caption → text → chips → link on the signature easing. */
.why-slider.swiper-initialized .swiper-slide .ws-title,
.why-slider.swiper-initialized .swiper-slide .ws-cap,
.why-slider.swiper-initialized .swiper-slide .ws-text,
.why-slider.swiper-initialized .swiper-slide .chip-row .chip,
.why-slider.swiper-initialized .swiper-slide .ws-body .card__link{
  opacity:0; translate:0 22px;
  transition:opacity .65s var(--ease-out-expo), translate .65s var(--ease-out-expo);
}
.why-slider .swiper-slide-active .ws-title,
.why-slider .swiper-slide-active .ws-cap,
.why-slider .swiper-slide-active .ws-text,
.why-slider .swiper-slide-active .chip-row .chip,
.why-slider .swiper-slide-active .ws-body .card__link{ opacity:1; translate:0 }
.why-slider .swiper-slide-active .ws-title{ transition-delay:.08s }
.why-slider .swiper-slide-active .ws-cap{ transition-delay:.18s }
.why-slider .swiper-slide-active .ws-text{ transition-delay:.22s }
.why-slider .swiper-slide-active .chip-row .chip:nth-child(1){ transition-delay:.30s }
.why-slider .swiper-slide-active .chip-row .chip:nth-child(2){ transition-delay:.36s }
.why-slider .swiper-slide-active .chip-row .chip:nth-child(3){ transition-delay:.42s }
.why-slider .swiper-slide-active .chip-row .chip:nth-child(4){ transition-delay:.48s }
.why-slider .swiper-slide-active .chip-row .chip:nth-child(5){ transition-delay:.54s }
.why-slider .swiper-slide-active .chip-row .chip:nth-child(6){ transition-delay:.60s }
.why-slider .swiper-slide-active .ws-body .card__link{ transition-delay:.66s }
/* title underline draws itself under the active slide's heading */
.why-slider .ws-title{ position:relative; padding-bottom:10px }
.why-slider .ws-title::after{
  content:""; position:absolute; left:0; bottom:0; height:3px; width:0;
  border-radius:999px; background:var(--grad-line);
  box-shadow:0 0 14px rgba(47,168,239,.5);
  transition:width .7s var(--ease-out-expo) .35s;
}
.why-slider .swiper-slide-active .ws-title::after{ width:64px }
/* slow Ken Burns drift on the active slide's photo */
@keyframes ws-drift{ from{ background-position:center 46% } to{ background-position:center 54% } }
.why-slider .swiper-slide-active .ws-right.ws-shot{
  animation:ws-drift 9s ease-in-out infinite alternate;
}
@media (prefers-reduced-motion:reduce){
  .why-slider .swiper-slide .ws-title, .why-slider .swiper-slide .ws-cap,
  .why-slider .swiper-slide .ws-text, .why-slider .swiper-slide .chip-row .chip,
  .why-slider .swiper-slide .ws-body .card__link{ opacity:1; translate:0; transition:none }
  .why-slider .ws-title::after{ transition:none }
  .why-slider .swiper-slide-active .ws-right.ws-shot{ animation:none }
}

/* ============================================================
   ⌘K command palette (.cp-*) — glass panel, staggered results
   ============================================================ */
.cp{position:fixed;inset:0;z-index:200;display:none}
.cp.is-open{display:block}
.cp__scrim{position:absolute;inset:0;background:rgba(8,10,8,.6);backdrop-filter:blur(6px);
  animation:cp-fade var(--dur-1) var(--ease-out)}
.cp__panel{position:absolute;left:50%;top:14vh;transform:translateX(-50%);
  width:min(620px,92vw);border-radius:18px;overflow:hidden;
  background:rgba(24,29,23,.92);border:1px solid var(--line-2);
  box-shadow:0 40px 90px -30px rgba(0,0,0,.8),0 0 40px -18px rgba(47,168,239,.45);
  backdrop-filter:blur(20px) saturate(130%);
  animation:cp-pop var(--dur-2) var(--ease-out-expo)}
html[data-theme="light"] .cp__panel{background:rgba(255,255,255,.95)}
html[data-theme="light"] .cp__scrim{background:rgba(20,30,20,.35)}
@keyframes cp-fade{from{opacity:0}}
@keyframes cp-pop{from{opacity:0;transform:translateX(-50%) translateY(14px) scale(.97)}}
.cp__head{display:flex;align-items:center;gap:11px;padding:15px 17px;
  border-bottom:1px solid var(--line);color:var(--muted)}
.cp__input{flex:1;background:none;border:0;outline:none;font:inherit;font-size:1.02rem;
  color:var(--ink)}
.cp__input::placeholder{color:var(--faint)}
.cp__esc{font-size:.68rem;padding:3px 7px;border-radius:6px;border:1px solid var(--line-2);
  color:var(--faint);font-family:var(--font-display)}
.cp__list{list-style:none;margin:0;padding:8px;max-height:min(46vh,380px);overflow-y:auto}
.cp__item{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:11px;
  cursor:pointer;animation:cp-item .3s var(--ease-out) backwards;
  animation-delay:calc(var(--d)*.025s)}
@keyframes cp-item{from{opacity:0;transform:translateY(6px)}}
.cp__item b{display:block;font-family:var(--font-display);font-weight:600;font-size:.95rem;color:var(--ink)}
.cp__item small{display:block;color:var(--faint);font-size:.8rem}
.cp__item.is-sel{background:var(--glass-2);box-shadow:inset 0 0 0 1px var(--line-2)}
.cp__ico{width:34px;height:34px;display:grid;place-items:center;border-radius:9px;
  background:var(--glass);border:1px solid var(--line);font-size:15px;flex:none}
.cp__go{margin-left:auto;color:var(--faint);font-size:.8rem;opacity:0;transition:opacity var(--dur-1)}
.cp__item.is-sel .cp__go{opacity:1;color:var(--c5)}
.cp__empty{padding:26px 14px;text-align:center;color:var(--faint);font-size:.92rem}
.cp__foot{display:flex;gap:16px;padding:10px 16px;border-top:1px solid var(--line);
  color:var(--faint);font-size:.75rem}
.cp__brand{margin-left:auto;color:var(--c6);font-family:var(--font-display);letter-spacing:1px}
/* nav hint chip */
.cp-hint{display:inline-flex;gap:3px;margin-left:8px;padding:6px 8px;border-radius:9px;
  background:none;border:1px solid var(--line);cursor:pointer;
  transition:border-color var(--dur-1) var(--ease-out),box-shadow var(--dur-1) var(--ease-out)}
.cp-hint kbd{font-size:.62rem;color:var(--muted);font-family:var(--font-display);
  padding:1px 4px;border-radius:4px;border:1px solid var(--line)}
.cp-hint:hover{border-color:var(--c5);box-shadow:0 0 14px -4px var(--c5)}
@media (prefers-reduced-motion:reduce){
  .cp__panel,.cp__scrim,.cp__item{animation:none}
}

/* hero copy: pure-CSS entrance — no JS wait, so LCP paints immediately */
.hero-enter{animation:hero-enter var(--dur-3) var(--ease-out-expo) backwards}
@keyframes hero-enter{from{opacity:0;transform:translateY(26px)}}
@media (prefers-reduced-motion:reduce){.hero-enter{animation:none}}

/* ---------- 4c. kinetic hero headline ---------- */
.kinetic .kchar{display:inline-block;opacity:0;transform:translateY(.55em) rotate(3deg);
  filter:blur(6px);animation:kchar-in .75s var(--ease-out-expo) forwards;
  animation-delay:calc(.15s + var(--i)*.026s)}
/* inline-block chars fall outside the parent's background-clip:text —
   give plain chars the ramp-start ink; .accent keeps its own gradient */
.kinetic .kword{display:inline-block;white-space:nowrap}
.display.kinetic .kchar{color:var(--c6)}
.display.kinetic .accent.kchar{color:transparent}
@keyframes kchar-in{to{opacity:1;transform:none;filter:none}}
@media (prefers-reduced-motion:reduce){.kinetic .kchar{animation:none;opacity:1;transform:none;filter:none}}

/* ---------- 5. respect user preferences ---------- */
@media (prefers-reduced-motion:reduce){
  .media-photo img{ transform:none !important; transition:none }
  .fx-sheen::after,.fx-sheen::before{ display:none }
}

/* ---------- 6. cinematic FULL-SCREEN video hero (index.html) ----------
   Portrait AI-humanoid footage as a full-bleed hero background. The copy
   sits over a left-weighted scrim so it stays crisp; the robot's face
   shows on the lighter right side. The video's containing block is the
   .hero section (position:relative), so it fills the whole viewport even
   though it's nested inside the centred .container. */
.hero--video .hero__grid{ position:static; display:block; max-width:660px; width:100%; align-items:initial }
.hero--video .hero__copy{ position:relative; z-index:2; min-width:0 }   /* lift copy above the video */
.hero--video .hero__visual{ position:static; display:block }

.hero-portal{ position:absolute; inset:0; z-index:0; width:100%; height:100%;
  border:0; border-radius:0; box-shadow:none; background:#05080b; overflow:hidden; animation:none }
.hero-portal__vid{ position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; object-position:center 30%; filter:saturate(.97) contrast(1.04) }
/* readability scrim: heavy left → clear right, brand tint, fade into the page at the bottom */
.hero-portal::after{ content:""; position:absolute; inset:0; z-index:1; pointer-events:none;
  background:
    linear-gradient(90deg, rgba(7,11,15,.94) 0%, rgba(7,11,15,.74) 36%, rgba(7,11,15,.34) 66%, rgba(7,11,15,.10) 100%),
    linear-gradient(0deg, rgba(10,10,10,1) 1%, rgba(7,11,15,.22) 26%, transparent 50%),
    linear-gradient(155deg, rgba(47,168,239,.16), transparent 42%) }
.hero-portal__grid{ position:absolute; inset:0; z-index:1; pointer-events:none; opacity:.35;
  background:repeating-linear-gradient(0deg, rgba(198,225,247,.04) 0 1px, transparent 1px 5px) }
.hero-portal__scan{ position:absolute; left:0; right:0; height:20%; z-index:1; pointer-events:none;
  background:linear-gradient(180deg, transparent, rgba(198,225,247,.10), transparent);
  animation:hp-scan 6.5s linear infinite }
.hero-portal__corner, .hero-portal__tag{ display:none }   /* drop framed-portal chrome in full-bleed */
#heroCanvas{ display:none }                               /* the video is the background now */
@keyframes hp-scan{ 0%{ transform:translateY(-120%) } 100%{ transform:translateY(560%) } }

@media (max-width:760px){
  /* phones: the portrait video is a perfect full-screen background */
  .hero--video .hero__grid{ max-width:none }
  .hero-portal__vid{ object-position:center 22% }
  .hero-portal::after{ background:
    linear-gradient(0deg, rgba(10,10,10,1) 2%, rgba(7,11,15,.55) 34%, rgba(7,11,15,.5) 100%),
    linear-gradient(155deg, rgba(47,168,239,.16), transparent 42%) }
}
/* reduced motion / no autoplay: show the still poster, no video, no scan */
@media (prefers-reduced-motion:reduce){
  .hero-portal{ animation:none; background:#05080b url('images/hero-poster.webp') center/cover no-repeat }
  .hero-portal__vid{ display:none }
  .hero-portal__scan{ display:none }
}

/* ---------- 7. smart-home demo: <video> replacing the old 15MB GIF ---------- */
.split__media--gif video{
  width:auto; max-width:100%; max-height:600px; height:auto;
  border-radius:18px; box-shadow:var(--shadow); display:block; margin-inline:auto;
}

/* ---------- 11. tamed Services carousel (no scroll-hijack, contained) ---------- */
#services.why-section{ padding:13vh 0 }
#services .why-label{ position:static; text-align:center; margin:0 auto 28px; pointer-events:auto }
#services .why-slider{
  height:auto; width:100%; max-width:var(--maxw); margin-inline:auto;
  padding:0 clamp(40px,6vw,72px); background:transparent; overflow:hidden;
  --swiper-theme-color:var(--c6); --swiper-navigation-size:22px;
}
#services .why-slider .swiper-slide{
  height:auto; border:1px solid var(--line-2); border-radius:var(--r-lg); overflow:hidden;
  box-shadow:var(--shadow);
}
#services .ws-half{ height:auto; min-height:360px; padding:clamp(26px,3.5vw,52px) }
/* nav arrows */
#services .why-slider .swiper-button-prev,
#services .why-slider .swiper-button-next{
  width:44px; height:44px; border-radius:50%;
  background:rgba(10,10,10,.55); border:1px solid var(--line-2); backdrop-filter:blur(8px);
}
#services .why-slider .swiper-button-prev{ left:2px }
#services .why-slider .swiper-button-next{ right:2px }
/* dots below, horizontal */
#services .why-slider .swiper-pagination{
  position:static; right:auto; left:auto; margin-top:20px;
  display:flex; gap:10px; justify-content:center;
}
#services .why-slider .swiper-pagination-bullet{
  width:10px; height:10px; border-radius:50%; margin:0 !important;
  background:var(--muted); opacity:.5;
}
#services .why-slider .swiper-pagination-bullet-active{
  width:26px; height:10px; border-radius:6px; background:var(--c6); opacity:1;
}
@media(max-width:640px){
  #services .why-slider{ padding:0 34px }
  #services .why-slider .swiper-slide{ flex-direction:column }
  #services .ws-half{ width:100%; min-height:0 }
}

/* ---------- 12. decorative videos: never look clickable (no play/skip icon) ----------
   pointer-events:none kills the browser's hover media toolbar (the ▶▶| / PiP
   overlay Edge & Chrome float over a playing video), and the pseudo-element
   rules below strip any native control chrome that would otherwise paint. */
.hero-portal__vid, .sh-demo, .demo-video__vid{ pointer-events:none }
video::-webkit-media-controls,
video::-webkit-media-controls-enclosure,
video::-webkit-media-controls-panel,
video::-webkit-media-controls-overlay-play-button,
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-overlay-enclosure{
  display:none !important; -webkit-appearance:none; appearance:none; opacity:0 !important;
}

/* ---------- 13. SOTMS demo video (demo.html) ---------- */
.demo-video{ position:relative; max-width:980px; margin:0 auto; border-radius:var(--r-lg); overflow:hidden;
  border:1px solid var(--line-2); box-shadow:var(--shadow); background:#000 }
.demo-video__vid{ display:block; width:100%; height:auto; aspect-ratio:16/9 }
/* custom volume-only control (mute / unmute) */
.demo-mute{ position:absolute; right:14px; bottom:14px; z-index:3;
  width:46px; height:46px; border-radius:50%; cursor:pointer; display:grid; place-items:center;
  background:rgba(10,10,10,.6); border:1px solid var(--line-2); backdrop-filter:blur(8px);
  color:var(--c6); transition:background .25s, transform .2s, box-shadow .25s }
.demo-mute:hover{ background:rgba(10,10,10,.82); transform:translateY(-2px); box-shadow:0 8px 20px rgba(0,0,0,.4) }
.demo-mute svg{ width:22px; height:22px }
.demo-mute .ico-sound{ display:none }
.demo-mute.is-on{ color:var(--c5); border-color:var(--c5) }
.demo-mute.is-on .ico-sound{ display:block }
.demo-mute.is-on .ico-muted{ display:none }

/* ---------- 14. team: expanding flex cards (accordion) + 3D tilt (about.html) ---------- */
.team-accordion{ display:flex; gap:14px; height:460px; margin-top:8px; perspective:1500px }
.tcard{ position:relative; flex:1 1 0; min-width:0; border-radius:24px; overflow:hidden;
  cursor:pointer; background:var(--c2); border:1px solid var(--line-2); box-shadow:var(--shadow);
  outline:none; transform:rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));
  will-change:transform, flex-grow;
  transition:flex-grow .6s var(--ease-io), transform .25s ease,
             box-shadow .45s ease, border-color .45s ease }
.tcard.is-active{ flex-grow:5.4; border-color:rgba(47,168,239,.55);
  box-shadow:0 26px 60px -22px rgba(0,0,0,.7), 0 0 0 1px rgba(47,168,239,.18),
             0 0 42px -12px rgba(47,168,239,.32) }
.tcard:focus-visible{ border-color:var(--c5); box-shadow:0 0 0 3px rgba(47,168,239,.35) }
/* no-JS / pure-hover fallback so the cards still expand without enhance.js */
@media (hover:hover){
  .team-accordion:hover .tcard.is-active:not(:hover){ flex-grow:1;
    border-color:var(--line-2); box-shadow:var(--shadow) }
  .tcard:hover{ flex-grow:5.4 }
}
.tcard__bg{ position:absolute; inset:0; background-size:cover; background-position:center;
  transform:scale(1.08); filter:brightness(.6) saturate(.82);
  transition:transform .7s ease, filter .6s ease }
.tcard.is-active .tcard__bg{ transform:scale(1); filter:brightness(.92) saturate(1.05) }
.tcard::after{ content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(to top, rgba(8,8,8,.95) 4%, rgba(8,8,8,.46) 42%, rgba(8,8,8,.04) 72%) }
.tcard__content{ position:absolute; left:0; right:0; bottom:0; z-index:2;
  padding:22px; display:flex; flex-direction:column; gap:12px; overflow:hidden }
.tcard:not(.is-active) .tcard__content{ padding:18px 14px }
.tcard__head{ display:flex; align-items:center; gap:13px; white-space:nowrap }
.tcard__badge{ flex:none; width:46px; height:46px; border-radius:14px; display:grid; place-items:center;
  background:rgba(10,10,10,.55); border:1px solid rgba(47,168,239,.45); backdrop-filter:blur(8px);
  color:var(--c6); box-shadow:0 6px 18px rgba(0,0,0,.4); transition:background .4s, color .4s, border-color .4s }
.tcard__badge svg{ width:22px; height:22px }
.tcard.is-active .tcard__badge{ background:linear-gradient(140deg,var(--c5),var(--c4)); color:#0A0A0A;
  border-color:transparent }
.tcard__meta{ display:flex; flex-direction:column; gap:3px; min-width:0;
  opacity:0; transform:translateX(-8px); transition:opacity .4s .12s ease, transform .4s .12s ease }
.tcard.is-active .tcard__meta{ opacity:1; transform:none }
.tcard__name{ font-family:var(--font-display); font-weight:700; font-size:1.18rem; color:var(--ink); line-height:1.15 }
.tcard__role{ font-family:var(--font-display); font-size:.74rem; font-weight:600; letter-spacing:.09em;
  text-transform:uppercase; color:var(--c5) }
.tcard__bio{ color:var(--ink); font-size:.95rem; line-height:1.5; max-width:46ch;
  opacity:0; transform:translateY(10px); transition:opacity .45s .18s ease, transform .45s .18s ease }
.tcard.is-active .tcard__bio{ opacity:1; transform:none }

@media (max-width:720px){
  .team-accordion{ flex-direction:column; height:auto; gap:12px; perspective:none }
  .tcard{ flex:none; height:84px; transform:none !important;
    transition:height .55s var(--ease-io), box-shadow .45s, border-color .45s }
  .tcard.is-active{ height:324px }
  .tcard__meta{ opacity:1; transform:none }       /* full-width rows — names always readable */
  .tcard__bio{ display:none }
  .tcard.is-active .tcard__bio{ display:block }
}
@media (hover:hover) and (max-width:720px){
  .team-accordion:hover .tcard.is-active:not(:hover){ height:84px }
  .tcard:hover{ height:324px }
}

/* ---------- 15. light-theme patches for the enhancement layer ---------- */
/* the media-tag pill keeps a dark frosted bg on the photo → force light text */
html[data-theme="light"] .media-photo .media-tag{ color:#f3f7ec }
/* team accordion cards sit on dark photos → keep their text light in light mode */
html[data-theme="light"] .tcard__name{ color:#eef5fb }
html[data-theme="light"] .tcard__bio{ color:#d3e5f2 }
html[data-theme="light"] .tcard__role{ color:#C6E1F7 }

/* ===== Portfolio / Our Work ===== */
.work-card{display:flex;flex-direction:column}
.work-card .card__text{flex:1}
.work-tag{position:absolute;top:12px;left:12px;z-index:2;font-family:var(--font-display);
  font-size:.72rem;letter-spacing:.05em;text-transform:uppercase;padding:6px 12px;border-radius:999px;
  background:rgba(10,10,10,.55);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);
  border:1px solid var(--line-2);color:var(--c6)}
.work-result{display:flex;align-items:center;gap:9px;margin-top:16px;padding-top:15px;
  border-top:1px solid var(--line);font-size:.9rem;color:var(--ink);font-weight:500}
.work-result::before{content:"";flex:none;width:7px;height:7px;border-radius:50%;
  background:var(--c5);box-shadow:0 0 10px var(--c5)}
html[data-theme="light"] .work-tag{background:rgba(255,255,255,.82);color:var(--c6)}

/* ===== Portfolio page — Team + Skills (reference layout, gold/onyx) ===== */
/* ===== team: photo-forward cards in a row, story text below ===== */
.pf-team{display:flex;flex-direction:column;gap:46px}
.pf-people{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;
  width:100%;max-width:940px;margin-inline:auto}
@media (max-width:640px){ .pf-people{grid-template-columns:1fr;max-width:340px} }
@property --pfa { syntax:"<angle>"; initial-value:0deg; inherits:false; }
.pf-person{position:relative;display:flex;flex-direction:column;
  padding:18px 18px 22px;border-radius:24px;
  background:var(--card);border:1px solid var(--line);
  transition:transform var(--dur-2) var(--ease-spring),border-color .35s ease,box-shadow .35s ease}
.pf-person:hover{transform:translateY(-9px) scale(1.012);border-color:transparent;
  box-shadow:0 34px 64px -28px rgba(0,0,0,.35),0 0 40px -10px rgba(47,168,239,.45)}
/* rotating azure→amber keyline appears on hover */
.pf-person::before{content:"";position:absolute;inset:0;border-radius:inherit;padding:1.5px;
  background:conic-gradient(from var(--pfa),
    rgba(47,168,239,0) 0deg, rgba(47,168,239,.9) 80deg, rgba(166,214,247,.9) 140deg,
    rgba(255,181,46,.85) 200deg, rgba(47,168,239,0) 300deg);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;mask-composite:exclude;
  opacity:0;transition:opacity .4s ease;pointer-events:none}
.pf-person:hover::before{opacity:1;animation:pf-spin 3.5s linear infinite}
@keyframes pf-spin{to{--pfa:360deg}}
/* inset rounded photo (reference-card style) */
.pf-person__photo{position:relative;aspect-ratio:1/1;overflow:hidden;display:grid;place-items:center;
  border-radius:16px;background:linear-gradient(150deg,#0C3E58,#0F6FB0)}
.pf-person__photo img{width:100%;height:100%;object-fit:cover;
  transition:transform var(--dur-3) var(--ease-out);will-change:transform}
.pf-person:hover .pf-person__photo img{transform:scale(1.07)}
/* light sheen sweeps the photo once on hover */
.pf-person__photo::after{content:"";position:absolute;top:0;left:-130%;width:60%;height:100%;
  background:linear-gradient(115deg,transparent,rgba(255,255,255,.34),transparent);
  transform:skewX(-18deg);transition:left .75s var(--ease-out);pointer-events:none}
.pf-person:hover .pf-person__photo::after{left:150%}
.pf-person__init{font-family:var(--font-display);font-weight:700;font-size:3.2rem;
  color:#fff;letter-spacing:3px;text-shadow:0 6px 24px rgba(0,0,0,.35)}
.pf-person__name{display:block;text-align:left;padding:17px 4px 0;
  font-family:var(--font-display);font-weight:700;font-size:1.22rem;
  letter-spacing:-.01em;color:var(--head)}
/* accent underline grows under the name on hover */
.pf-person__name::after{content:"";display:block;width:26px;height:3px;margin-top:9px;
  border-radius:999px;background:var(--grad-line);
  transition:width .5s var(--ease-out-expo)}
.pf-person:hover .pf-person__name::after{width:58px}
/* founder — amber underline + faint amber wash */
.pf-person--lead{background:linear-gradient(180deg,rgba(245,161,0,.06),transparent 55%),var(--card)}
.pf-person--lead .pf-person__name::after{background:linear-gradient(90deg,#FFB52E,#F5A100)}
@media (prefers-reduced-motion:reduce){
  .pf-person:hover::before{animation:none}
  .pf-person__photo::after{display:none}
}
/* story text sits centered under the cards */
.pf-skills{text-align:center;max-width:760px;margin-inline:auto}
.pf-skills .chip-row{justify-content:center}
.pf-skills .eyebrow{margin-bottom:14px}
.pf-skills .h2{margin-bottom:14px}
.pf-skills .lead{margin-bottom:28px}
.pf-bars{display:flex;flex-direction:column;gap:17px}
.pf-bar__top{display:flex;justify-content:space-between;font-size:.9rem;margin-bottom:8px;
  font-family:var(--font-display);font-weight:500;color:var(--ink)}
.pf-bar__top span:last-child{color:var(--c6)}
.pf-bar__track{height:9px;border-radius:999px;background:rgba(255,255,255,.07);
  overflow:hidden;border:1px solid var(--line)}
.pf-bar__fill{height:100%;width:0;border-radius:999px;
  background:linear-gradient(90deg,var(--c4),var(--c5),var(--c6));
  box-shadow:0 0 14px -2px rgba(47,168,239,.6);transition:width 1.4s cubic-bezier(.22,1,.36,1)}
html[data-theme="light"] .pf-bar__track{background:rgba(10,10,10,.06)}

/* ===== Portfolio page — project cards (reference style) ===== */
.pf-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:24px}
.pf-card{display:flex;flex-direction:column;border-radius:18px;overflow:hidden;
  background:var(--card);border:1px solid var(--line);
  transition:transform var(--dur-2) var(--ease-out),border-color .35s ease,box-shadow .35s ease}
.pf-card:hover{transform:translateY(-6px);border-color:var(--line-2);
  box-shadow:0 26px 56px -26px rgba(0,0,0,.7),0 0 30px -12px rgba(47,168,239,.45)}
.pf-card__shot{position:relative;aspect-ratio:16/10;overflow:hidden}
.pf-card__shot img{width:100%;height:100%;object-fit:cover;
  transition:transform var(--dur-3) var(--ease-out)}
.pf-card:hover .pf-card__shot img{transform:scale(1.06)}
.pf-card__shot::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(180deg,transparent 48%,rgba(10,10,10,.5))}
.pf-badge{position:absolute;top:12px;right:12px;z-index:2;display:inline-flex;align-items:center;gap:5px;
  font-family:var(--font-display);font-size:.72rem;font-weight:600;letter-spacing:.03em;
  padding:5px 11px;border-radius:999px;color:#0A0A0A;
  background:linear-gradient(135deg,var(--c5),var(--c4));
  box-shadow:0 4px 14px -2px rgba(47,168,239,.6),inset 0 0 0 1px rgba(255,255,255,.4)}
.pf-card__body{display:flex;flex-direction:column;gap:9px;padding:20px}
.pf-card__cat{font-family:var(--font-display);font-size:.74rem;letter-spacing:.06em;
  text-transform:uppercase;color:var(--c6)}
.pf-card__title{font-family:var(--font-display);font-size:1.14rem;font-weight:600;
  color:var(--head);line-height:1.25}
.pf-card__text{font-size:.92rem;color:var(--muted);flex:1}
/* clickable project cards — whole card is a link; visible "view" row at the foot */
a.pf-card{color:inherit;text-decoration:none;cursor:pointer}
.pf-card__go{display:inline-flex;align-items:center;gap:6px;margin-top:4px;
  font-family:var(--font-display);font-size:.8rem;font-weight:600;letter-spacing:.03em;
  color:var(--c6)}
.pf-card__go svg{transition:transform var(--dur-1) var(--ease-out)}
a.pf-card:hover .pf-card__go{text-decoration:underline;text-underline-offset:3px}
a.pf-card:hover .pf-card__go svg{transform:translate(2px,-2px)}
a.pf-card:focus-visible{outline:2px solid var(--c5);outline-offset:3px}
.pf-card__body .chip-row{margin-top:6px}

/* project showcase — big split, not a small card */
.pf-show{display:grid;grid-template-columns:1.05fr 1fr;gap:52px;align-items:center;width:100%}
.pf-show--rev .pf-show__media{order:2}
.pf-show__media{position:relative;border-radius:22px;overflow:hidden;border:1px solid var(--line-2);
  aspect-ratio:16/11;box-shadow:0 40px 90px -42px rgba(0,0,0,.85),0 0 50px -18px rgba(47,168,239,.4)}
.pf-show__media img{width:100%;height:100%;object-fit:cover;
  transition:transform var(--dur-3) var(--ease-out)}
.pf-show:hover .pf-show__media img{transform:scale(1.04)}
.pf-show__info .pf-card__cat{font-size:.8rem}
.pf-show__info .h2{margin:12px 0 16px}
.pf-show__info .lead{margin-bottom:20px}
@media(max-width:860px){.pf-show{grid-template-columns:1fr;gap:26px}.pf-show--rev .pf-show__media{order:0}}

/* portfolio sections now scroll normally — they inherit .section spacing.
   .pf-slide is left as an inert hook on the markup; no fullpage/snap rules. */

/* ============================================================
   Rotating edge-light — a bright line that travels around the
   rounded border of every card/box. enhance.js appends an
   <i class="ht-orbit"> into each target; the conic gradient is
   masked to a 1.4px ring and its angle is animated. Falls back
   to a static accent arc where @property is unsupported, and is
   stilled under prefers-reduced-motion.
   ============================================================ */
@property --ht-a { syntax:"<angle>"; inherits:false; initial-value:0deg }
@keyframes ht-orbit-spin { to { --ht-a:360deg } }
.has-orbit { position:relative }
.ht-orbit{
  position:absolute; inset:0; border-radius:inherit; pointer-events:none; z-index:4;
  padding:1.6px; opacity:.82; transition:opacity .45s ease;
  background:conic-gradient(from var(--ht-a),
    transparent 0 72%, var(--c5) 82%, var(--c6) 88%, var(--c5) 93%, transparent 100%);
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude;
  animation:ht-orbit-spin 5.2s linear infinite;
  will-change:--ht-a;
}
.has-orbit:hover > .ht-orbit{ opacity:1 }
@media (prefers-reduced-motion:reduce){
  .ht-orbit{ animation:none; opacity:.35 }
}

/* ============================================================
   Focus-on-hover for project cards — the hovered card zooms up
   and comes forward while its grid-mates blur and fall back.
   Pointer devices only; :has() gates the blur so siblings dim
   ONLY when a card is genuinely hovered (not over the gaps).
   Without :has() support the hovered card still lifts.
   ============================================================ */
@media (hover:hover){
  .grid--2 > .card,
  .grid--3 > .card,
  .grid--4 > .card{
    transition:transform var(--dur-2) var(--ease-out),
               filter .4s ease, opacity .4s ease,
               box-shadow .4s ease, border-color .3s ease, background .3s ease;
  }
  /* dim + blur the grid-mates while a card is focused (classes set by enhance.js) */
  .grid--2.ht-focus > .card:not(.ht-up),
  .grid--3.ht-focus > .card:not(.ht-up),
  .grid--4.ht-focus > .card:not(.ht-up){
    filter:blur(3px) saturate(.9);
    opacity:.5;
    transform:scale(.95);
  }
  /* the hovered card zooms up + comes forward */
  .grid--2 > .card.ht-up,
  .grid--3 > .card.ht-up,
  .grid--4 > .card.ht-up{
    transform:scale(1.06) translateY(-10px);
    z-index:6;
  }
}

/* ============================================================
   MOTION SYSTEM — premium transition layer (all additive).
   Tokens live in styles.css :root (--ease-*, --dur-*). Every
   block below is progressive enhancement: unsupported browsers
   simply keep the base behaviour; reduced-motion gets a calm,
   instant fallback (see the mop-up block at the end).
   ============================================================ */

/* ---- M1. cross-page continuity for floating chrome ----
   During a cross-document view transition the named elements keep
   their place instead of fading/drifting with the page root.
   (Kaira launcher + back-to-top; nav/logo are named in styles.css.)
   view-transition-name is inert outside a transition — zero effect
   on rendering in any browser that doesn't run one. */
.vy-launch{ view-transition-name:kaira-widget }
.to-top{ view-transition-name:ht-totop }

/* ---- M2. scroll progress bar on the compositor ----
   Where scroll-linked animations exist, the bar is a scaleX driven
   directly by scroll(root) — zero main-thread work, buttery under
   load. app.js detects support, adds .sp-css and stops writing
   width; elsewhere the original JS width updates keep working. */
@supports (animation-timeline: scroll()) {
  .scroll-progress.sp-css{
    width:100%; transform:scaleX(0); transform-origin:0 50%;
    animation:ht-sp-grow 1s linear both;
    animation-timeline:scroll(root);
  }
  @keyframes ht-sp-grow{ to{ transform:scaleX(1) } }
}

/* ---- M3. scroll-driven entrances for card grids & steps ----
   Supported engines scrub the entrance with the scroll position
   itself (frame-perfect, no IO latency) and stagger columns via
   nth-child ranges. The base .reveal state is neutralised here so
   the JS reveal (still running underneath) never double-animates —
   in unsupported browsers the JS .reveal remains the one driver.
   fill-mode:backwards = hidden before entry, fully RELEASED after
   the range, so hover transforms/filters (.ht-up/.ht-focus) keep
   working on settled cards. Only opacity/translate/filter animate. */
@supports (animation-timeline: view()) {
  html.fx-on :is(.grid--2,.grid--3,.grid--4,.steps) > .reveal{
    opacity:1; transform:none; filter:none;      /* release the JS reveal */
    animation-name:ht-view-in;
    animation-duration:1s;                       /* fallback… */
    animation-duration:auto;                     /* …auto = fill the range */
    animation-timing-function:linear;            /* scrubbing tracks the thumb */
    animation-fill-mode:backwards;
    animation-timeline:view(block);
    animation-range:entry 0% entry 52%;
  }
  /* column stagger — second and third columns land a beat later */
  html.fx-on :is(.grid--2,.grid--3,.grid--4,.steps) > .reveal:nth-child(3n+2){
    animation-range:entry 8% entry 60%;
  }
  html.fx-on :is(.grid--2,.grid--3,.grid--4,.steps) > .reveal:nth-child(3n){
    animation-range:entry 16% entry 68%;
  }
  @keyframes ht-view-in{
    from{ opacity:0; translate:0 42px; filter:blur(7px) }
  }
}

/* ---- M4. hero entrance choreography (index) ----
   The copy already staggers in via .reveal delays; the backdrop
   video performs a slow 1.06→1 settle underneath it and the scroll
   hint arrives last, once the room is set. `scale` composes — it
   never touches the video's transform/object-position. */
html.fx-on .hero-portal__vid{ animation:ht-hero-settle 2.4s var(--ease-out-expo) both }
@keyframes ht-hero-settle{ from{ scale:1.06 } }
html.fx-on .scroll-hint{
  animation:bob 2s ease-in-out infinite, ht-hint-in 1.2s var(--ease-out-expo) 1.1s backwards;
}
@keyframes ht-hint-in{ from{ opacity:0 } }

/* ---- M5 removed: eyebrow sheen retired with the quiet-kicker redesign ---- */

/* ---- M6. dropdown cascade — menu items drift up into place a beat
   apart when a nav menu opens. Desktop widths only (on mobile the
   menu is static and always visible) and motion-ok only. */
@media (min-width:761px) and (prefers-reduced-motion:no-preference){
  .nav-menu > li{
    opacity:0; translate:0 7px;
    transition:opacity .35s var(--ease-out), translate .35s var(--ease-out);
  }
  .nav-item--has-menu:hover .nav-menu > li,
  .nav-item--has-menu:focus-within .nav-menu > li{ opacity:1; translate:none }
  .nav-item--has-menu:hover .nav-menu > li:nth-child(2),
  .nav-item--has-menu:focus-within .nav-menu > li:nth-child(2){ transition-delay:.04s }
  .nav-item--has-menu:hover .nav-menu > li:nth-child(3),
  .nav-item--has-menu:focus-within .nav-menu > li:nth-child(3){ transition-delay:.08s }
  .nav-item--has-menu:hover .nav-menu > li:nth-child(4),
  .nav-item--has-menu:focus-within .nav-menu > li:nth-child(4){ transition-delay:.12s }
  .nav-item--has-menu:hover .nav-menu > li:nth-child(5),
  .nav-item--has-menu:focus-within .nav-menu > li:nth-child(5){ transition-delay:.16s }
  .nav-item--has-menu:hover .nav-menu > li:nth-child(6),
  .nav-item--has-menu:focus-within .nav-menu > li:nth-child(6){ transition-delay:.2s }
  .nav-item--has-menu:hover .nav-menu > li:nth-child(7),
  .nav-item--has-menu:focus-within .nav-menu > li:nth-child(7){ transition-delay:.24s }
}

/* ---- M7. reduced-motion mop-up for this layer ----
   (the global *{animation:none} in styles.css already stills every
   keyframe above; this pins the remaining states to their calm end.) */
@media (prefers-reduced-motion:reduce){
  .eyebrow::after{ display:none }
  .nav-menu > li{ opacity:1; translate:none; transition:none }
  .scroll-hint{ opacity:1 }
}

/* mobile: the hero video portal never plays on phones — don't ship its
   blank frame or 85KB poster; the copy IS the hero on small screens */
@media(max-width:760px){
  .hero--video .hero__visual{display:none}
  .hero--video{min-height:auto;padding-top:96px;padding-bottom:56px}
}
