/* ==========================================================================
   Page-specific motion (each page has its own; nothing here reuses the
   homepage's set pieces).
   ========================================================================== */

/* ---------- Site-wide: page transitions, magnetic buttons, reading progress ---------- */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-old(root) { animation: vt-out .35s cubic-bezier(.6, 0, .05, 1) both; }
::view-transition-new(root) { animation: vt-in .6s cubic-bezier(.6, 0, .05, 1) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-28px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(36px); } }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }

.magnetic { transition: translate .45s cubic-bezier(.2, .7, .2, 1), background-color .3s ease, color .3s ease, box-shadow .3s ease; }

.read-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--c-accent); transform-origin: left; transform: scaleX(0); pointer-events: none; }
.site-header[data-theme="dark"] .read-progress { background: var(--c-accent-2); }

/* Network: copy + Rive side by side */
.net-intro { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(24px, 5vw, 80px); max-width: 1360px; margin: 0 auto; padding: clamp(48px, 7vh, 88px) clamp(20px, 6vw, 96px) 24px; }
.net-intro .copy { display: grid; gap: 20px; }
.net-intro .art { width: min(100%, 520px); aspect-ratio: 1; justify-self: center; }
.net-intro .art fx-rive { width: 100%; height: 100%; }
@media (width < 900px) { .net-intro { grid-template-columns: 1fr; } .net-intro .art { max-width: 340px; } }

/* ---------- Services: typing hero ---------- */
fx-type { display: grid; gap: 6px; min-height: 142px; font: 400 14px/1.5 ui-monospace, "SFMono-Regular", Consolas, monospace; color: var(--c-muted); }
fx-type .type-row { display: flex; align-items: center; gap: 10px; }
fx-type .tick { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--c-line); display: grid; place-items: center; transition: background-color .3s, border-color .3s; }
fx-type .done .tick { background: var(--c-accent); border-color: var(--c-accent); }
fx-type .done .tick::after { content: ""; width: 7px; height: 4px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); }
fx-type .typing .txt::after { content: "\258D"; margin-left: 2px; color: var(--c-accent); animation: caret .8s steps(1) infinite; }
fx-type .done .txt { color: var(--c-ink-2); }
@keyframes caret { 50% { opacity: 0; } }

/* ---------- Services: free-zone flow ---------- */
.freezone fx-scroll-progress { height: 240vh; }
.freezone .sticky { display: grid; grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; align-content: center; gap: 28px; padding: calc(var(--header-h) + 24px) clamp(20px, 6vw, 96px) 32px; }
.freezone .head { display: grid; gap: 14px; max-width: 880px; }
fx-flow { display: block; width: 100%; max-width: 1280px; margin: 0 auto; align-self: center; }
fx-flow svg { width: 100%; height: auto; overflow: visible; }
fx-flow .mobile { display: none; }
fx-flow .route-bg { fill: none; stroke: var(--c-line); stroke-width: 3; stroke-dasharray: 2 8; stroke-linecap: round; }
fx-flow .route-trail { fill: none; stroke: var(--c-accent); stroke-width: 3; stroke-linecap: round; }
fx-flow .zone { fill: #e8f3fa; }
fx-flow .zone-label { font: 600 13px var(--font-body); letter-spacing: 1.2px; fill: var(--c-accent); text-transform: uppercase; }
fx-flow [data-gate] circle { fill: #fff; stroke: var(--c-line); stroke-width: 3; transition: fill .4s, stroke .4s; }
fx-flow [data-gate].passed circle { fill: var(--c-accent); stroke: var(--c-accent); }
fx-flow [data-gate] .t1 { font: 500 17px var(--font-display); fill: var(--c-faint); transition: fill .4s; }
fx-flow [data-gate] .t2 { font: 400 14px var(--font-body); fill: var(--c-faint); transition: fill .4s; }
fx-flow [data-gate].passed .t1 { fill: var(--c-ink); }
fx-flow [data-gate].passed .t2 { fill: var(--c-muted); }
fx-flow [data-package] rect { fill: #c99b63; stroke: var(--c-ink); stroke-width: 2; }
fx-flow [data-package] path { stroke: var(--c-ink); stroke-width: 2; fill: none; }
@media (width < 800px) {
  fx-flow .desktop { display: none; }
  fx-flow .mobile { display: block; max-height: 60vh; margin: 0 auto; width: auto; }
  .freezone .head .title-l { font-size: 26px; }
}
.fz-points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 48px; max-width: 1200px; margin: 0 auto; padding: 16px clamp(20px, 6vw, 96px) clamp(48px, 7vh, 88px); }
@media (width < 800px) { .fz-points { grid-template-columns: 1fr; } }

/* ---------- Leadership: 3D flip cards ---------- */
.flip { perspective: 1200px; height: 100%; min-height: 270px; cursor: pointer; outline: none; }
.flip-inner { position: relative; height: 100%; min-height: 270px; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.6, 0, .05, 1); }
.flip:hover .flip-inner, .flip:focus-visible .flip-inner, .flip.flipped .flip-inner { transform: rotateY(180deg); }
.flip:focus-visible .flip-inner { outline: 2px solid var(--c-accent); outline-offset: 4px; border-radius: 20px; }
.flip .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 20px; padding: 28px 24px; display: flex; flex-direction: column; background: #fff; }
.flip .front { justify-content: flex-end; }
.flip .front .avatar { width: 72px; height: 72px; font-size: 22px; margin-bottom: auto; }
.flip .front h3 { font: 400 26px/1.2 var(--font-display); margin: 0 0 6px; color: var(--c-ink); }
.flip .front .role { color: var(--c-accent); font-size: 14px; font-weight: 500; margin: 0; }
.flip .front .hint { margin-top: 14px; font-size: 12px; color: var(--c-faint); display: flex; align-items: center; gap: 6px; }
.flip .front .hint::before { content: "sync"; font-family: "Material Symbols Outlined"; font-size: 16px; }
.flip .back { transform: rotateY(180deg); background: var(--c-accent); color: #fff; justify-content: center; gap: 12px; }
.flip .back h3 { font: 400 20px/1.2 var(--font-display); margin: 0; }
.flip .back p { margin: 0; font-size: 15px; line-height: 1.6; color: #e8f3fa; }
@media (prefers-reduced-motion: reduce) { .flip-inner { transition: none; } }

/* ---------- Contact: campus zoom map ---------- */
.campus { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 24px; overflow: hidden; background: #000; }
.campus fx-rive { position: absolute; inset: 0; }
.campus .pin { position: absolute; left: var(--x); top: var(--y); margin: 0; transform: translate(18px, -50%); color: #fff; font-size: 14px; font-weight: 500; white-space: nowrap; line-height: 1.25; }
.campus .pin.left { transform: translate(calc(-100% - 14px), -50%); text-align: right; }
.campus .pin small { display: block; color: #9aa0a6; font-size: 12px; font-weight: 400; }
@media (width < 600px) { .campus .pin { font-size: 11px; } .campus .pin small { display: none; } }
.campus .pins, .campus .pins-layer { position: absolute; inset: 0; pointer-events: none; }

/* ---------- Product photos always fit whole inside their frame ----------
   The frame takes the photo's own edge color (sampled in effects.js), so the
   letterbox space blends into the studio background instead of showing bars. */
fx-carousel .slide img, .product .ph img, .tt-stage img { object-fit: contain !important; object-position: center !important; }
fx-carousel .slide .frame, .product .ph, .tt-stage fx-sequence figure { transition: background-color .35s ease; }

/* measure hyphenated words (cut-and-sew) as one unit, so the split lines match the final layout */
.fx-w { white-space: nowrap; }
