/* ============================================================
   Ziatan — Photo heroes, animated icons, SVG scenes
   Loaded on about / partners / contact / service pages (after site.css).
   GPU-friendly; all continuous motion respects prefers-reduced-motion.
   Tokens come from base.css. JS hooks live in assets/js/scenes.js.
   ============================================================ */

/* ============================================================
   Photo hero — full-bleed image + brand scrim + parallax layer
   ============================================================ */
.zt-hero-photo {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: 440px;
    padding: 104px 0 72px;
    text-align: center;
}
.zt-hero-photo-media { position: absolute; inset: -12% 0; z-index: -3; }
.zt-hero-photo-media img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center 38%;
    will-change: transform;
}
/* Dark legibility scrim */
.zt-hero-photo::after {
    content: ''; position: absolute; inset: 0; z-index: -2;
    background: linear-gradient(180deg, rgba(12,8,32,0.74) 0%, rgba(12,8,32,0.55) 38%, rgba(12,8,32,0.95) 100%);
}
/* Brand-tinted wash for cohesion with the rest of the site */
.zt-hero-photo-tint {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(120% 90% at 80% 0%, rgba(243,107,31,0.20) 0%, transparent 55%),
                linear-gradient(135deg, rgba(115,6,78,0.40) 0%, rgba(0,4,170,0.26) 70%);
    mix-blend-mode: screen;
}
.zt-hero-photo .zt-container { position: relative; z-index: 1; }
.zt-hero-photo h1 { font-size: clamp(32px, 6vw, 58px); letter-spacing: -0.025em; text-wrap: balance; }
.zt-hero-photo p { margin: 18px auto 0; max-width: 660px; color: rgba(255,255,255,0.86); font-size: clamp(15px, 2.6vw, 19px); font-weight: 500; }
.zt-hero-photo .zt-eyebrow { background: rgba(243,107,31,0.18); border-color: rgba(243,107,31,0.42); }
.zt-hero-photo-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 32px; }
@media (min-width: 768px) { .zt-hero-photo { min-height: 560px; padding: 140px 0 100px; } }

/* ============================================================
   Animated stroke icons  (paths carry pathLength="1" + data-draw)
   JS adds .is-drawn when the icon scrolls into view.
   ============================================================ */
/* .zt-aicon is a pure animation hook — it never changes layout, so it can be
   layered onto any existing icon badge. Sizing stays with the badge's own rule. */
.zt-aicon svg { overflow: visible; }
.zt-aicon [data-draw] {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
}
.zt-aicon.is-drawn [data-draw] {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s cubic-bezier(0.65, 0, 0.35, 1);
    transition-delay: calc(var(--di, 0) * 0.14s);
}
.zt-aicon [data-fade] { opacity: 0; transform: scale(0.4); transform-origin: center; transform-box: fill-box; }
.zt-aicon.is-drawn [data-fade] {
    opacity: 1; transform: scale(1);
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.34,1.56,0.64,1);
    transition-delay: calc(0.5s + var(--di, 0) * 0.12s);
}
/* Without JS, never hide the icon */
body:not(.zt-js) .zt-aicon [data-draw] { stroke-dashoffset: 0; }
body:not(.zt-js) .zt-aicon [data-fade] { opacity: 1; transform: none; }

/* Continuous micro-motion (only once drawn; disabled for reduced-motion) */
@keyframes ztFloat   { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes ztBob     { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes ztSpin    { to { transform: rotate(360deg); } }
.zt-aicon.is-drawn.zt-aicon--float svg { animation: ztFloat 4.5s ease-in-out infinite; }

/* Icon badge wrapper used in cards */
.zt-ibadge {
    width: 58px; height: 58px; flex: 0 0 auto;
    display: grid; place-items: center; border-radius: 16px;
    background: rgba(243,107,31,0.12); border: 1px solid rgba(243,107,31,0.30);
    color: var(--accent-primary-hi);
    transition: transform var(--t-power), background var(--t-smooth), border-color var(--t-smooth), box-shadow var(--t-smooth);
}
.zt-ibadge svg { width: 28px; height: 28px; }
.zt-ibadge--lg { width: 68px; height: 68px; border-radius: 19px; }
.zt-ibadge--lg svg { width: 34px; height: 34px; }
/* Card hover lifts + lights the badge */
.zt-lift { transition: transform var(--t-power), border-color var(--t-smooth), box-shadow var(--t-smooth), background var(--t-smooth); }
@media (hover: hover) {
    .zt-lift:hover { transform: translateY(-6px); border-color: var(--border-glass-hover); box-shadow: var(--shadow-card-hover); }
    .zt-lift:hover .zt-ibadge { transform: translateY(-2px) scale(1.08) rotate(-4deg); background: rgba(243,107,31,0.20); box-shadow: 0 0 22px rgba(243,107,31,0.45); }
}

/* ============================================================
   SVG scene primitives — used inside bespoke illustrations
   ============================================================ */
.zt-scene { display: block; width: 100%; height: auto; overflow: visible; }
.zt-scene-glow { filter: drop-shadow(0 0 14px rgba(243,107,31,0.45)); }

/* Concentric signal waves (Wi-Fi / 5G / broadcast) */
.zt-wave { transform-origin: center; transform-box: fill-box; opacity: 0; }
@keyframes ztWavePulse { 0% { opacity: 0; transform: scale(0.45); } 28% { opacity: 0.85; } 100% { opacity: 0; transform: scale(1.65); } }
.zt-scene.is-live .zt-wave { animation: ztWavePulse 2.8s ease-out infinite; }
.zt-scene.is-live .zt-wave:nth-of-type(2) { animation-delay: 0.55s; }
.zt-scene.is-live .zt-wave:nth-of-type(3) { animation-delay: 1.1s; }
.zt-scene.is-live .zt-wave:nth-of-type(4) { animation-delay: 1.65s; }

/* Data dots travelling along a connection line (uses stroke-dash trick) */
.zt-flow { stroke-dasharray: 4 10; animation: ztFlow 1.4s linear infinite; }
@keyframes ztFlow { to { stroke-dashoffset: -28; } }
.zt-scene:not(.is-live) .zt-flow { animation: none; }

/* Gentle float for whole scene objects (e.g., a router, a phone) */
.zt-floaty { transform-box: fill-box; transform-origin: center; }
.zt-scene.is-live .zt-floaty { animation: ztFloat 5s ease-in-out infinite; }
.zt-scene.is-live .zt-floaty--slow { animation: ztBob 6.5s ease-in-out infinite; }

/* Blinking status dot */
@keyframes ztBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }
.zt-scene.is-live .zt-blink { animation: ztBlink 1.8s ease-in-out infinite; }

/* Ambient orbs behind a scene (decorative) */
.zt-scene-orbs { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.zt-scene-orb { position: absolute; border-radius: 50%; filter: blur(46px); opacity: 0.5; }

/* ============================================================
   Media row — alternating text + illustration/photo (service pages)
   ============================================================ */
.zt-media-row { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
.zt-media-figure {
    position: relative; border-radius: var(--radius-card); overflow: hidden;
    border: 1px solid var(--border-glass); background: linear-gradient(160deg, rgba(31,14,74,0.5), rgba(12,8,32,0.85));
    min-height: 260px; display: grid; place-items: center; padding: 28px;
}
.zt-media-figure img { border-radius: var(--radius-md); width: 100%; height: 100%; object-fit: cover; }
.zt-media-figure .zt-scene { max-width: 360px; }
.zt-media-copy h3 { font-size: clamp(22px, 3vw, 30px); margin-bottom: 12px; }
.zt-media-copy p { color: var(--text-secondary); font-size: 15.5px; line-height: 1.75; }
@media (min-width: 880px) {
    .zt-media-row { grid-template-columns: 1fr 1fr; gap: 56px; }
    .zt-media-row--flip .zt-media-copy { order: 2; }
    .zt-media-row--flip .zt-media-figure { order: 1; }
}

/* Scroll parallax targets get GPU lift */
[data-parallax], [data-hero-parallax] { will-change: transform; }

/* ============================================================
   Reduced motion — kill continuous loops + parallax, keep one-shots
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .zt-scene.is-live .zt-wave,
    .zt-scene.is-live .zt-flow,
    .zt-scene.is-live .zt-floaty,
    .zt-scene.is-live .zt-floaty--slow,
    .zt-scene.is-live .zt-blink,
    .zt-aicon.is-drawn.zt-aicon--float svg { animation: none !important; }
    .zt-wave { opacity: 0.5; }
    .zt-hero-photo-media img { transform: none !important; }
}
