/* Elzomoroda Group landing page (Views/Home/Index.cshtml + wwwroot/js/group.js). Scoped to .zg.
   Motion: the emerald behind the logo draws itself, lights up and breathes; product cards appear and fade at the hero's sides;
   the headline rises; numbers count up; company panels open on hover (brand-tinted factory photo -> product photo).
   Everything stops for prefers-reduced-motion. */
.zg { --zg-bg: #060b1a; --zg-line: rgba(255,255,255,.1); --zg-muted: #9aa6c4; --zg-em: #10b981; --zg-em-2: #34d399;
    --zg-ease: cubic-bezier(.2,.8,.2,1); background: var(--zg-bg); color: #e8edf8; overflow-x: clip; }
.zg a { text-decoration: none; }
.zg h1, .zg h2 { color: #fff; }

/* top bar: transparent over the hero, frosted once the page scrolls */
.zg-top { position: fixed; inset: 0 0 auto; z-index: 60; color: #fff; --zl-on: #0b1531; transition: background .4s, box-shadow .4s; }
.zg-top .container { display: flex; align-items: center; justify-content: space-between; height: 84px; transition: height .4s var(--zg-ease); }
.zg-top.is-solid { background: rgba(6,11,26,.8); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); box-shadow: 0 1px 0 var(--zg-line); }
.zg-top.is-solid .container { height: 66px; }
.zg .zg-logo img, .zg .zg-foot-logo { display: block; width: auto; height: 46px; transition: height .4s var(--zg-ease); } /* white copy of logo-2.png (a CSS filter here glitches under Safari's backdrop blur) */
.zg-top.is-solid .zg-logo img { height: 38px; }
.zg-top .zg-logo { visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .4s, transform .4s var(--zg-ease), visibility .4s; } /* the hero has the big logo; this one comes in on scroll (hidden = no click, no Tab stop) */
.zg-top.is-solid .zg-logo { visibility: visible; opacity: 1; transform: none; }

/* ---------- hero: the logo (its diamond filled with the emerald), one line, a quiet row of numbers ---------- */
.zg-hero { position: relative; isolation: isolate; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 100px 0 90px; overflow: hidden; text-align: center;
    background: radial-gradient(ellipse 60% 50% at 50% 38%, #10203f, transparent 70%), var(--zg-bg); }
.zg-hero-in { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; max-width: 760px; }
.zg-kicker { display: inline-flex; align-items: center; gap: 12px; color: var(--zg-em-2); font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.zg-kicker::before, .zg-kicker::after { content: ""; width: 32px; height: 2px; border-radius: 2px; background: currentColor; }
.zg-hero h1 { margin: 34px 0 14px; font-size: clamp(36px, 4.6vw, 64px); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; animation: zg-fade 1s var(--zg-ease) .5s both; }
.zg:lang(ar) .zg-hero h1, .zg:lang(ar) .zg-head h2 { letter-spacing: 0; } /* tracking breaks Arabic joining */
.zg-hero p { max-width: 560px; margin: 0; color: var(--zg-muted); font-size: clamp(16px, 1.3vw, 18px); line-height: 1.8; animation: zg-fade 1s var(--zg-ease) .7s both; }

.zg-emblem { position: relative; width: min(340px, 78vw); /* logo-2.png is only 258px wide: larger looks soft */ animation: zg-fade 1.2s var(--zg-ease) .1s both; }
.zg .zg-emblem-logo { position: relative; display: block; width: 100%; height: auto; max-width: none; }
.zg-gem { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.zg-facets { opacity: .5; animation: zg-breathe 8s ease-in-out 3s infinite; } /* faint: the logo's white strokes stay in front */
.zg-facets polygon { opacity: 0; transform-box: fill-box; transform-origin: center; animation: zg-facet .9s var(--zg-ease) calc(.7s + var(--i) * .1s) forwards; }
.zg-facets polygon:nth-child(1) { fill: #34d399; } .zg-facets polygon:nth-child(2) { fill: #a7f3d0; } .zg-facets polygon:nth-child(3) { fill: #10b981; }
.zg-facets polygon:nth-child(4) { fill: #6ee7b7; } .zg-facets polygon:nth-child(5) { fill: #10b981; } .zg-facets polygon:nth-child(6) { fill: #34d399; }
.zg-facets polygon:nth-child(7) { fill: #047857; } .zg-facets polygon:nth-child(8) { fill: #0d9467; } .zg-facets polygon:nth-child(9) { fill: #065f46; }
.zg-edges { fill: none; stroke: rgba(255,255,255,.4); stroke-width: .6; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: zg-draw 1.8s var(--zg-ease) .5s forwards; }
.zg-gem-shine { mix-blend-mode: screen; transform: skewX(-18deg); animation: zg-shine 7s ease-in-out 3s infinite; }
.zg-spark { fill: #fff; transform-box: fill-box; transform-origin: center; transform: scale(0); animation: zg-twinkle 4.5s ease-in-out 2.4s infinite; }

/* intro (.zg-intro, set by the view's inline script): a symmetric emerald builds itself big and alone in the middle of the screen,
   a glint crosses it, it flies into the logo's diamond at 1.5s-2.3s (group.js) and hands over to the logo's own emerald; then the rest comes in */
.zg-intro-gem { display: none; }
.zg-intro .zg-intro-gem { display: block; position: absolute; left: .388%; top: 2.667%; width: 41.47%; height: 89.33%; overflow: visible; opacity: 0; } /* the logo diamond's box (x 1..108, y 2..69 of 258 x 75); group.js shows and flies it */
.zg-intro-gem polygon { opacity: 0; transform-box: fill-box; transform-origin: center; animation: zg-facet .8s var(--zg-ease) calc(.15s + var(--i) * .05s) forwards; }
.zg-ig-edges { fill: none; stroke: rgba(255,255,255,.6); stroke-width: .5; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: zg-draw 1.1s var(--zg-ease) .1s forwards; }
.zg-ig-glint { mix-blend-mode: screen; transform: skewX(-18deg); animation: zg-shine 2s ease-in-out .85s both; } /* one pass, .85s-1.45s */
.zg-intro .zg-emblem { animation: none; }
.zg-intro .zg-gem { animation: zg-show .6s ease 2s both; }
.zg-intro .zg-emblem-logo { animation: zg-show .7s ease 1.9s both; }
.zg-intro .zg-hero h1 { animation-delay: 2.1s; }
.zg-intro .zg-hero p { animation-delay: 2.25s; }
.zg-intro .zg-stats { animation-delay: 2.4s; }
.zg-intro .zg-top, .zg-intro .zg-side, .zg-intro .zg-scroll { animation: zg-show 1s ease 2.3s both; }

/* product cards at the hero's sides: in each slot two cards take turns appearing and fading */
.zg-side { position: absolute; inset: 0; pointer-events: none; }
.zg-slot { position: absolute; width: clamp(128px, 11vw, 172px); aspect-ratio: 3 / 4; animation: zg-bob 7s ease-in-out infinite; animation-delay: calc(var(--s) * -1.8s); }
.zg-slot:nth-child(1) { top: 15%; inset-inline-start: 4.5vw; rotate: -6deg; }
.zg-slot:nth-child(2) { top: 47%; inset-inline-start: 11vw; rotate: 4deg; }
.zg-slot:nth-child(3) { top: 13%; inset-inline-end: 10vw; rotate: 5deg; }
.zg-slot:nth-child(4) { top: 45%; inset-inline-end: 4vw; rotate: -4deg; }
.zg-card { position: absolute; inset: 0; margin: 0; overflow: hidden; border-radius: 22px; background: #0b1531; opacity: 0; visibility: hidden; pointer-events: auto;
    box-shadow: 0 26px 50px -22px rgba(0,0,0,.85), inset 0 0 0 1px rgba(255,255,255,.14); animation: zg-swap 12s var(--zg-ease) calc(1.6s + var(--s) * 1.5s) infinite; }
.zg-card + .zg-card { animation-delay: calc(7.6s + var(--s) * 1.5s); }
.zg .zg-card img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.zg-card span { position: absolute; inset: auto 10px 10px; display: flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 12px; background: rgba(6,11,26,.82); color: #fff; font-size: 13px; font-weight: 700; line-height: 1.25; text-align: start; }
.zg-card span::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }

.zg-stats { display: flex; justify-content: center; margin: 40px 0 0; padding: 0; list-style: none; animation: zg-fade 1s var(--zg-ease) .9s both; }
.zg-stats li { display: flex; flex-direction: column; gap: 4px; padding: 0 30px; color: var(--zg-muted); font-size: 14px; }
.zg-stats li + li { border-inline-start: 1px solid var(--zg-line); }
.zg-stats b { color: #fff; font-size: 28px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
/* scroll hint: a thin line with a light running down it */
.zg-scroll { position: absolute; bottom: 26px; left: 50%; width: 1px; height: 48px; margin-left: -.5px; overflow: hidden; background: var(--zg-line); }
.zg-scroll span { position: absolute; left: 0; top: 0; width: 1px; height: 16px; background: linear-gradient(transparent, #fff); animation: zg-run 2.2s ease-in-out infinite; }

/* ---------- section heads ---------- */
.zg-companies { position: relative; padding: 110px 0; }
.zg-head { max-width: 780px; margin: 0 auto 50px; text-align: center; }
.zg-head h2 { margin: 16px 0 12px; font-size: clamp(32px, 4.4vw, 58px); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.zg-head p { margin: 0; color: var(--zg-muted); font-size: 18px; line-height: 1.7; }
.zg-head.is-armed { opacity: 0; transform: translateY(34px); }
.zg-head.is-in { opacity: 1; transform: none; transition: opacity .9s var(--zg-ease), transform .9s var(--zg-ease); }

/* ---------- company panels: one open at a time (JS moves .is-open with the mouse / focus) ---------- */
.zg-panels { display: flex; gap: 14px; height: clamp(480px, 74vh, 700px); }
.zg-panel { position: relative; isolation: isolate; flex: 1 1 0; min-width: 0; overflow: hidden; border-radius: 28px; background: #0b1531; color: #fff !important;
    transition: flex-grow .8s var(--zg-ease), box-shadow .6s; }
.zg-panel.is-open { flex-grow: 2.7; box-shadow: 0 34px 70px -34px var(--c); }
.zg .zg-ph { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; max-width: none; object-fit: cover; /* .zg: beats the template's img:not([draggable]) { height: auto } */
    filter: grayscale(1) contrast(1.1) brightness(.75); transition: transform 1.4s var(--zg-ease), opacity .8s; }
.zg .zg-ph-product { z-index: -2; opacity: 0; transform: scale(1.14); filter: none; }
.zg-panel.is-open .zg-ph { transform: scale(1.05); }
.zg-panel.is-open .zg-ph-product { opacity: 1; transform: none; }
.zg-panel::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--c); mix-blend-mode: color; opacity: .7; transition: opacity .8s; } /* brand duotone on the factory photo */
.zg-panel.is-open::before { opacity: 0; }
.zg-panel::after { content: ""; position: absolute; inset: 0; z-index: -1; /* readability gradient + a soft light under the cursor */
    background: radial-gradient(380px circle at var(--x, 50%) var(--y, 30%), rgba(255,255,255,.12), transparent 60%),
                linear-gradient(to top, rgba(6,11,26,.96) 0, rgba(6,11,26,.55) 45%, rgba(6,11,26,.1) 100%); }
.zg-panel:focus-visible { outline: 3px solid var(--c); outline-offset: -5px; }
.zg-num { position: absolute; top: 26px; inset-inline-start: 28px; display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.8); font-size: 15px; font-weight: 800; letter-spacing: .1em; }
.zg-num::after { content: ""; width: 26px; height: 2px; border-radius: 2px; background: var(--c); transition: width .7s var(--zg-ease); }
.zg-panel.is-open .zg-num::after { width: 70px; }
.zg-soon { position: absolute; top: 20px; inset-inline-end: 20px; padding: 5px 13px; border-radius: 999px; background: #fff; color: #0b1531; font-size: 13px; font-weight: 800; }
.zg-pbody { position: absolute; inset: auto 0 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 30px 28px; }
.zg-tag { white-space: nowrap; padding: 4px 12px; border-radius: 999px; background: var(--c); color: #0b1531; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.zg-ptitle { font-size: clamp(19px, 1.7vw, 27px); font-weight: 800; line-height: 1.25; }
.zg-pmore { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .7s var(--zg-ease); }
.zg-pmore > span { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; min-width: 300px; overflow: hidden; opacity: 0; transform: translateY(16px); transition: opacity .4s, transform .6s var(--zg-ease); }
.zg-panel.is-open .zg-pmore { grid-template-rows: 1fr; }
.zg-panel.is-open .zg-pmore > span { opacity: 1; transform: none; transition-delay: .3s; }
.zg-ptext { max-width: 440px; color: #d5dcef; font-size: 16px; line-height: 1.65; }
.zg-go { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 22px; border-radius: 999px; background: #fff; color: #0b1531; font-size: 15px; font-weight: 800; transition: background .3s; }
.zg-go i { font-style: normal; transition: transform .3s; }
.zg-panel:hover .zg-go { background: var(--c); }
.zg-panel:hover .zg-go i { transform: translateX(4px); }
.zg:lang(ar) .zg-go i { transform: scaleX(-1); }
.zg:lang(ar) .zg-panel:hover .zg-go i { transform: scaleX(-1) translateX(4px); }
/* curtain reveal when the section comes into view */
.zg-panels.is-armed .zg-panel { clip-path: inset(100% 0 0 0 round 28px); }
.zg-panels.is-in .zg-panel { clip-path: inset(0 0 0 0 round 28px); transition: clip-path 1.1s var(--zg-ease) calc(var(--i) * .12s), flex-grow .8s var(--zg-ease), box-shadow .6s; }

/* ---------- footer ---------- */
.zg-foot { padding: 50px 0 28px; border-top: 1px solid var(--zg-line); background: #040815; }
.zg-foot-top { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; padding-bottom: 28px; border-bottom: 1px solid var(--zg-line); }
.zg-foot-links { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.zg-foot-links a { display: inline-flex; align-items: center; gap: 9px; color: #c3cbe0; font-weight: 600; transition: color .2s; }
.zg-foot-links a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px rgba(255,255,255,.06); }
.zg-foot-links a:hover { color: #fff; }
.zg-foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; color: var(--zg-muted); font-size: 14px; }

@keyframes zg-fade { from { opacity: 0; transform: translateY(18px); } }
@keyframes zg-breathe { 50% { opacity: .2; } }
@keyframes zg-show { from { opacity: 0; } }
@keyframes zg-swap { 0% { opacity: 0; visibility: visible; transform: translateY(28px) scale(.92); } 7%, 43% { opacity: 1; transform: none; } 50%, 100% { opacity: 0; visibility: hidden; transform: translateY(-22px) scale(.96); } } /* hidden while faded out: the card on top must not catch the click meant for the one showing */
@keyframes zg-bob { 50% { translate: 0 -14px; } }
@keyframes zg-draw { to { stroke-dashoffset: 0; } }
@keyframes zg-facet { from { opacity: 0; transform: scale(.82); } to { opacity: .94; transform: none; } }
@keyframes zg-shine { 0% { transform: translateX(0) skewX(-18deg); } 30%, 100% { transform: translateX(150px) skewX(-18deg); } }
@keyframes zg-twinkle { 0%, 70%, 100% { transform: scale(0) rotate(0); } 82% { transform: scale(1) rotate(45deg); } }
@keyframes zg-run { from { transform: translateY(-16px); } to { transform: translateY(48px); } }

@media (max-width: 1199px) { .zg-side { display: none; } } /* no room beside the text */
/* ---------- tablet & phone: panels stack, everything visible, product photo shown ---------- */
@media (max-width: 991px) {
    .zg-hero { padding: 90px 0 70px; }
    .zg-stats li { padding: 0 16px; }
    .zg-stats b { font-size: 24px; }
    .zg-companies { padding: 80px 0; }
    .zg-panels { flex-direction: column; height: auto; }
    .zg-panel, .zg-panel.is-open { flex: none; height: 440px; }
    .zg-ph:not(.zg-ph-product), .zg-panel::before { display: none; }
    .zg .zg-ph-product { opacity: 1; transform: none; }
    .zg-pmore { grid-template-rows: 1fr; }
    .zg-pmore > span { min-width: 0; opacity: 1; transform: none; }
}
@media (max-width: 575px) {
    .zg-top .container { height: 66px; }
    .zg-logo img { height: 36px; }
    .zg-head p { font-size: 16px; }
    .zg-panel, .zg-panel.is-open { height: 400px; border-radius: 22px; }
    .zg-pbody { padding: 22px; }
    .zg-foot-top, .zg-foot-bottom { flex-direction: column; text-align: center; }
    .zg-foot-links { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .zg *, .zg *::before, .zg *::after { animation: none !important; transition: none !important; }
    .zg-facets polygon { opacity: .94; }
    .zg-edges { stroke-dashoffset: 0; }
    .zg-panels.is-armed .zg-panel { clip-path: none; }
    .zg-card:first-child { opacity: 1; visibility: visible; }
    .zg-head.is-armed { opacity: 1; transform: none; }
}
