@charset "utf-8";
/* ==========================================================
   home.css — homepage only (loaded after style.css)
   ========================================================== */

:root{
    --orange: #f39a1e;
    --gold-soft: rgba(245,187,46,.12);
    --r-lg: 22px;
    --r-md: 14px;
}

.home .h-section{ padding: 6.5rem 0; }
.h-head{ margin-bottom: 2.75rem; max-width: 62ch; }
.h-head h2{ font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 600; line-height: 1.45; }

/* ---------- Header: floating glass bar ---------- */
.home header{ background: transparent; border-bottom-color: transparent; backdrop-filter: none; }
.home header .header-bar{ transition: background .3s ease, box-shadow .3s ease, border-color .3s ease; border: 1px solid transparent; border-radius: 18px; }
.home header.scrolled{ background: transparent; box-shadow: none; }
.home header.scrolled .header-bar{
    background: rgba(9,14,32,.78);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-color: var(--line);
    box-shadow: 0 12px 34px -12px rgba(0,0,0,.6);
    height: 64px;
    margin-top: 8px;
}
.home .nav-links a{ position: relative; border-bottom: 0; }
.home .nav-links a::after{
    content: ""; position: absolute; right: 0; left: 0; bottom: -2px; height: 2px;
    background: var(--gold); border-radius: 2px;
    transform: scaleX(0); transform-origin: right; transition: transform .25s ease;
}
.home .nav-links a:hover::after, .home .nav-links a.active::after{ transform: scaleX(1); }
.home .nav-links a.active{ color: var(--ink); }
.home .mobile-nav{ margin: 0 1rem; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }

/* ---------- Hero ---------- */
.h-hero{ position: relative; padding: 4.5rem 0 5rem; overflow: hidden; }
.h-hero::before{
    content: ""; position: absolute; z-index: -1; inset: -20% -10% auto auto;
    width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
    background: radial-gradient(closest-side, rgba(245,187,46,.16), transparent 70%);
    left: -8%; right: auto; pointer-events: none;
}
.h-hero-grid{ display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; }

.h-kicker{
    display: inline-flex; align-items: center; gap: .6rem;
    font-size: .9rem; color: var(--ink-soft);
    padding: .4rem .95rem .4rem 1.1rem;
    border: 1px solid var(--line-strong); border-radius: 999px;
    background: rgba(255,255,255,.03);
    margin-bottom: 1.6rem;
}

.h-title{
    font-size: clamp(2rem, 4.2vw, 3.3rem);
    font-weight: 700;
    line-height: 1.42;         /* Arabic needs room for dots and marks (تُشغّل) */
    letter-spacing: 0;         /* negative tracking breaks Arabic joins and makes letters collide */
    margin-bottom: 1.5rem;
}
.h-title > span{ display: block; }
.h-rotator{ font-size: .86em; line-height: 1.45; height: 1.65em; white-space: nowrap; } /* fixed height: the line keeps its size even while the word is erased */
#rotator{
    display: inline-block;
    padding: .1em 0 .12em;     /* keeps the gradient from clipping dots above/below the letters */
    line-height: 1.4;
    vertical-align: bottom;
    background: linear-gradient(90deg, var(--gold-light), var(--gold) 60%, var(--orange));
    -webkit-background-clip: text; background-clip: text; color: transparent;
    -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.caret{
    display: inline-block; width: 3px; height: .9em; margin-inline-start: .08em;
    background: var(--gold); vertical-align: -.08em; border-radius: 2px;
    animation: caretBlink 1s steps(1) infinite;
}
@keyframes caretBlink{ 50%{ opacity: 0; } }

.h-lead{ color: var(--ink-soft); font-size: 1.12rem; max-width: 50ch; margin-bottom: 2.2rem; }

.h-facts{
    display: flex; flex-wrap: wrap; gap: 1rem 2.75rem;
    margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--line);
}
.h-facts div{ display: flex; flex-direction: column; }
.h-facts .stat-num{ font-size: 1.9rem; line-height: 1.2; unicode-bidi: plaintext; }
.h-facts dd{ color: var(--ink-soft); font-size: .88rem; }

/* stage: the logo "bursting" like the bag in the logo */
.h-stage{
    position: relative; aspect-ratio: 1; width: min(460px, 100%); justify-self: center;
    display: grid; place-items: center;
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform .4s ease-out;
}
.h-logo{
    position: relative; width: 74%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
    box-shadow: 0 0 0 1px var(--line-strong), 0 40px 80px -30px rgba(0,0,0,.8), 0 0 90px -10px rgba(245,187,46,.3);
    z-index: 2;
}
.h-logo img{ width: 100%; height: 100%; object-fit: cover; transform: scale(1.18); display: block; }
.h-logo::after{
    content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 2px;
    background: conic-gradient(from var(--spin, 0deg), transparent 0 60%, var(--gold) 75%, var(--cyan) 90%, transparent);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    animation: spin 6s linear infinite;
}
@property --spin{ syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin{ to{ --spin: 360deg; } }

.h-orbit{ position: absolute; border: 1px dashed rgba(255,255,255,.1); border-radius: 50%; animation: orbit 30s linear infinite; }
.h-orbit-1{ inset: 4%; }
.h-orbit-2{ inset: -6%; animation-duration: 46s; animation-direction: reverse; border-style: solid; border-color: rgba(255,255,255,.05); }
.h-orbit span{ position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px var(--cyan); }
.h-orbit-2 span{ background: var(--green); box-shadow: 0 0 14px var(--green); width: 7px; height: 7px; top: -3.5px; }
@keyframes orbit{ to{ transform: rotate(360deg); } }

.h-burst{ position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.bit{
    position: absolute; left: 50%; top: 44%;
    font-family: var(--font-code); font-weight: 700; white-space: nowrap;
    text-shadow: 0 0 12px currentColor;
    will-change: transform, opacity;
}

/* ---------- Bento services ---------- */
.bento{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.tile{
    --mx: 50%; --my: 0%;
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem;
    padding: 1.9rem; border-radius: var(--r-lg);
    background:
        radial-gradient(420px circle at var(--mx) var(--my), rgba(245,187,46,.09), transparent 45%),
        linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line);
    transition: border-color .25s ease;
}
.tile:hover{ border-color: rgba(245,187,46,.35); }
.tile-wide{ grid-column: span 2; flex-direction: row; align-items: stretch; }
.tile-wide .tile-body{ flex: 1 1 50%; }
.tile-icon{ color: var(--gold); margin-bottom: 1.1rem; }
.tile h3{ font-size: 1.2rem; font-weight: 600; margin-bottom: .5rem; }
.tile p{ color: var(--ink-soft); font-size: .95rem; max-width: 42ch; }
.tile-tags{ list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.2rem; }
.tile-tags li{
    direction: ltr; font-size: .76rem; color: var(--ink-soft);
    padding: .22rem .7rem; border-radius: 999px; border: 1px solid var(--line-strong);
}

.code-win{
    flex: 1 1 50%; direction: ltr; text-align: left;
    border-radius: var(--r-md); border: 1px solid var(--line-strong);
    background: #070b19; overflow: hidden; align-self: center; min-width: 0;
}
.code-bar{ display: flex; align-items: center; gap: .4rem; padding: .6rem .85rem; border-bottom: 1px solid var(--line); }
.code-bar i{ width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.14); }
.code-bar i:first-child{ background: #ff5f57; } .code-bar i:nth-child(2){ background: #febc2e; } .code-bar i:nth-child(3){ background: #28c840; }
.code-bar span{ margin-left: .5rem; font-size: .75rem; color: var(--ink-soft); font-family: var(--font-code); }
.code-win pre{ margin: 0; padding: 1rem 1.1rem; font-family: var(--font-code); font-size: .82rem; line-height: 1.75; color: #cfd6ea; overflow-x: auto; }
.c-k{ color: #c792ea; } .c-s{ color: var(--green); } .c-t{ color: var(--cyan); } .c-a{ color: var(--gold-light); }
.code-caret{ display: inline-block; width: 7px; height: 1em; background: var(--gold); vertical-align: -.15em; margin-left: 2px; animation: caretBlink 1s steps(1) infinite; }

.mini-dash{
    flex: 1 1 45%; align-self: center; padding: 1.2rem 1.3rem;
    border-radius: var(--r-md); border: 1px solid var(--line-strong); background: #070b19;
}
.md-row{ display: flex; justify-content: space-between; align-items: baseline; color: var(--ink-soft); font-size: .85rem; }
.md-row b{ font-family: var(--font-display); font-size: 1.6rem; color: var(--ink); font-weight: 600; }
.md-bars{ display: flex; align-items: flex-end; gap: 8px; height: 90px; margin-top: 1rem; }
.md-bars i{
    flex: 1; height: var(--h); border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, var(--gold), rgba(245,187,46,.25));
    transform-origin: bottom; transform: scaleY(.15); transition: transform .9s cubic-bezier(.2,.8,.2,1);
}
.md-bars i:nth-child(odd){ background: linear-gradient(180deg, var(--cyan), rgba(34,217,242,.2)); }
.visible .md-bars i{ transform: scaleY(1); }
.md-bars i:nth-child(2){ transition-delay: .06s; } .md-bars i:nth-child(3){ transition-delay: .12s; }
.md-bars i:nth-child(4){ transition-delay: .18s; } .md-bars i:nth-child(5){ transition-delay: .24s; }
.md-bars i:nth-child(6){ transition-delay: .3s; }  .md-bars i:nth-child(7){ transition-delay: .36s; }

/* ---------- Architecture: security pipeline ---------- */
:root{ --red: #ff4d5e; }
.h-arch{ background: linear-gradient(180deg, transparent, rgba(13,19,39,.6) 25%, rgba(13,19,39,.6) 75%, transparent); }
.arch-grid{ display: grid; grid-template-columns: 1fr 330px; gap: 1.5rem; align-items: start; }

.pipe{
    position: relative; overflow: hidden;
    padding: 1.6rem 1.5rem 2rem; border-radius: var(--r-lg);
    border: 1px solid var(--line);
    background:
        radial-gradient(500px 260px at 50% 0%, rgba(245,187,46,.07), transparent 70%),
        rgba(6,10,24,.65);
}
.pipe-clients{ display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.client-chip{
    font-size: .82rem; padding: .4rem .9rem; border-radius: 999px;
    border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink-soft);
    transition: border-color .3s ease, color .3s ease, box-shadow .3s ease;
}
.client-chip.lit{ border-color: var(--gold); color: var(--ink); box-shadow: 0 0 16px -4px rgba(245,187,46,.6); }
.client-chip.lit-res{ border-color: var(--cyan); color: var(--ink); box-shadow: 0 0 16px -4px rgba(34,217,242,.6); }
.pipe-hub{
    display: block; width: 14px; height: 14px; margin: 1.4rem auto .6rem; border-radius: 50%;
    background: var(--bg); border: 2px solid var(--gold); box-shadow: 0 0 0 5px rgba(245,187,46,.12);
    position: relative; z-index: 2;
}

.layers{
    list-style: none; position: relative;
    display: grid; grid-template-columns: 1fr 64px 1fr; grid-auto-rows: 38px;
}
/* the spine + a data stream flowing down it */
.layers::before, .layers::after{
    content: ""; position: absolute; left: 50%; width: 2px; margin-left: -1px;
    top: -18px; bottom: 57px; border-radius: 2px;
}
.layers::before{ background: var(--line-strong); }
.layers::after{
    background: repeating-linear-gradient(180deg, rgba(245,187,46,.55) 0 6px, transparent 6px 18px);
    background-size: 2px 18px; animation: stream 1.1s linear infinite; opacity: .6;
}
@keyframes stream{ to{ background-position: 0 18px; } }

.layer{ display: contents; }
.layer-node, .layer-card{ grid-row: var(--row) / span 3; align-self: center; }
.layer-node{
    grid-column: 2; justify-self: center; position: relative; z-index: 2;
    width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
    background: var(--bg); border: 1.5px solid var(--line-strong);
    font-family: var(--font-display); font-size: .72rem; color: var(--ink-soft);
    transition: border-color .35s ease, color .35s ease, box-shadow .35s ease, background .35s ease;
}
.layer-node b{ font-weight: 600; }
.layer-card{
    position: relative; display: flex; align-items: flex-start; gap: .8rem;
    padding: .85rem 1rem; border-radius: var(--r-md);
    border: 1px solid var(--line); background: var(--panel);
    transition: border-color .45s ease, box-shadow .45s ease, background .45s ease;
}
.side-r .layer-card{ grid-column: 1; }
.side-l .layer-card{ grid-column: 3; }
/* connector from card to the spine */
.layer-card::after{ content: ""; position: absolute; top: 50%; width: 19px; height: 1.5px; background: var(--line-strong); transition: background .35s ease; }
.side-r .layer-card::after{ left: -19px; }
.side-l .layer-card::after{ right: -19px; }

.layer-icon{ color: var(--gold); flex-shrink: 0; margin-top: .15rem; transition: color .35s ease; }
.layer-en{ display: block; font-family: var(--font-code); font-size: .72rem; color: var(--gold-light); opacity: .85; text-align: right; }
.layer-card h3{ font-size: .98rem; font-weight: 600; line-height: 1.4; }
.layer-card p{ color: var(--ink-soft); font-size: .82rem; line-height: 1.5; }
.is-db .layer-card{ border-color: rgba(34,217,242,.3); background: linear-gradient(180deg, rgba(34,217,242,.07), var(--panel)); }
.is-db .layer-icon{ color: var(--cyan); }

/* states set by script.js */
.layer-card.pass-req{ border-color: rgba(245,187,46,.6); box-shadow: 0 0 22px -8px rgba(245,187,46,.7); transition-duration: .1s; }
.layer-card.pass-req::after, .layer-card.pass-res::after{ background: currentColor; }
.layer-card.pass-req::after{ color: var(--gold); }
.layer-card.pass-res{ border-color: rgba(34,217,242,.5); box-shadow: 0 0 20px -8px rgba(34,217,242,.7); transition-duration: .1s; }
.layer-card.pass-res::after{ color: var(--cyan); }
.layer-node.pass-req{ border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 5px rgba(245,187,46,.16); transition-duration: .1s; }
.layer-node.pass-res{ border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 0 5px rgba(34,217,242,.16); transition-duration: .1s; }

.layer-card.blocked{
    border-color: var(--red); background: linear-gradient(180deg, rgba(255,77,94,.12), var(--panel));
    box-shadow: 0 0 26px -8px rgba(255,77,94,.8); animation: shake .4s ease; transition-duration: .1s;
}
.layer-card.blocked .layer-icon{ color: var(--red); }
.layer-card.blocked::after{ background: var(--red); }
.layer-node.blocked{ border-color: var(--red); color: #fff; background: var(--red); transition-duration: .1s; }
.layer-node.blocked::after{
    content: ""; position: absolute; inset: -2px; border-radius: 50%;
    border: 2px solid var(--red); animation: shieldRing .7s ease-out forwards;
}
@keyframes shieldRing{ from{ transform: scale(1); opacity: 1; } to{ transform: scale(3.2); opacity: 0; } }
@keyframes shake{ 0%,100%{ transform: none; } 20%{ transform: translateX(-4px); } 40%{ transform: translateX(4px); } 60%{ transform: translateX(-2px); } 80%{ transform: translateX(2px); } }

.layer-flag{
    position: absolute; top: -.7rem; inset-inline-end: .8rem;
    font-size: .72rem; font-weight: 700; color: #fff; background: var(--red);
    padding: .1rem .6rem; border-radius: 999px; white-space: nowrap;
    opacity: 0; transform: translateY(4px); transition: opacity .25s ease, transform .25s ease; pointer-events: none;
}
.layer-card.flagged .layer-flag{ opacity: 1; transform: none; }

/* packets */
.packets{ position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.packet{
    position: absolute; left: 0; top: 0; width: 12px; height: 12px; margin: -6px 0 0 -6px;
    border-radius: 50%; will-change: transform;
}
.packet.req{ background: var(--gold); box-shadow: 0 0 10px 2px rgba(245,187,46,.8), 0 0 26px rgba(245,187,46,.5); }
.packet.res{ background: var(--cyan); box-shadow: 0 0 10px 2px rgba(34,217,242,.8), 0 0 26px rgba(34,217,242,.5); }
.packet.atk{
    width: 18px; height: 18px; margin: -9px 0 0 -9px;
    background: var(--red); color: #fff; display: grid; place-items: center;
    font: 800 11px/1 var(--font-display);
    box-shadow: 0 0 12px 3px rgba(255,77,94,.75); animation: atkPulse .6s ease-in-out infinite alternate;
}
@keyframes atkPulse{ to{ box-shadow: 0 0 22px 6px rgba(255,77,94,.9); } }
.ghost{
    position: absolute; left: 0; top: 0; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%;
    animation: ghost .6s ease-out forwards;
}
.ghost.req{ background: var(--gold); } .ghost.res{ background: var(--cyan); } .ghost.atk{ background: var(--red); }
@keyframes ghost{ to{ opacity: 0; scale: .2; } }

/* console */
.sec-console{
    position: sticky; top: calc(var(--header-h) + 1rem);
    border-radius: var(--r-lg); border: 1px solid var(--line-strong);
    background: #070b19; overflow: hidden;
}
.sec-head{ display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.sec-dots{ display: flex; gap: .35rem; }
.sec-dots i{ width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.15); }
.sec-dots i:first-child{ background: #ff5f57; } .sec-dots i:nth-child(2){ background: #febc2e; } .sec-dots i:nth-child(3){ background: #28c840; }
.sec-title{ font-family: var(--font-code); font-size: .78rem; color: var(--ink-soft); }
.sec-live{ margin-inline-start: auto; display: inline-flex; align-items: center; gap: .45rem; font-size: .78rem; color: var(--cyan); }
.sec-live .live-dot{ width: 8px; height: 8px; }

.sec-stats{ display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.sec-stats div{ padding: 1rem 1.1rem; display: flex; flex-direction: column; }
.sec-stats div + div{ border-right: 1px solid var(--line); }
.sec-stats b{ font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; color: var(--gold); line-height: 1.2; font-variant-numeric: tabular-nums; }
.sec-stats .bad b{ color: var(--red); }
.sec-stats span{ font-size: .8rem; color: var(--ink-soft); }
.sec-stats b.bump{ animation: bump .35s ease; }
@keyframes bump{ 50%{ transform: scale(1.18); } }

.sec-log{ list-style: none; padding: .6rem .5rem; height: 252px; overflow: hidden; display: flex; flex-direction: column; gap: .15rem; }
.sec-log li{
    display: flex; align-items: baseline; gap: .6rem; padding: .45rem .6rem; border-radius: 8px;
    font-size: .84rem; line-height: 1.45; animation: logIn .35s ease;
}
.sec-log li > :nth-child(2){ flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-log bdi{ font-family: var(--font-code); font-size: .78rem; color: #cfd6ea; }
.sec-log small{ color: var(--ink-soft); font-size: .74rem; }
.sec-log .code{ font-family: var(--font-code); font-size: .74rem; font-weight: 700; padding: .05rem .4rem; border-radius: 5px; }
.sec-log .ok .code{ color: #0b1a06; background: var(--green); }
.sec-log .bad{ background: rgba(255,77,94,.08); }
.sec-log .bad .code{ color: #fff; background: var(--red); }
@keyframes logIn{ from{ opacity: 0; transform: translateY(-8px); background: rgba(255,255,255,.06); } }

.sec-legend{ display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; padding: .9rem 1.1rem; border-top: 1px solid var(--line); font-size: .82rem; color: var(--ink-soft); }
.sec-legend span{ display: inline-flex; align-items: center; gap: .45rem; }
.lg{ width: 9px; height: 9px; border-radius: 50%; }
.lg.req{ background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.lg.res{ background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.lg.atk{ background: var(--red); box-shadow: 0 0 6px var(--red); }
.sec-note{ padding: 0 1.1rem 1rem; font-size: .74rem; color: var(--ink-soft); opacity: .75; }

/* ---------- Industries ---------- */
.ind-list{ list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.ind-list li{
    display: flex; gap: 1rem; align-items: flex-start;
    padding: 1.75rem 1.6rem; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line);
    transition: background .25s ease;
}
.ind-list li:hover{ background: rgba(255,255,255,.025); }
.ind-list svg{ color: var(--cyan); flex-shrink: 0; margin-top: .15rem; }
.ind-list h3{ font-size: 1.02rem; font-weight: 600; margin-bottom: .25rem; }
.ind-list p{ color: var(--ink-soft); font-size: .9rem; }
.ind-more{ background: var(--gold-soft); }
.ind-more a{ display: flex; flex-direction: column; gap: .2rem; width: 100%; }
.ind-more b{ font-family: var(--font-display); color: var(--gold-light); font-weight: 600; }
.ind-more span{ color: var(--ink-soft); font-size: .9rem; }
.ind-more:hover{ background: rgba(245,187,46,.18) !important; }

/* ---------- Timeline ---------- */
.timeline{ list-style: none; position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; padding-top: 2.5rem; }
.timeline::before, .timeline::after{
    content: ""; position: absolute; top: .9rem; right: 0; height: 2px; border-radius: 2px;
}
.timeline::before{ left: 0; background: var(--line-strong); }
.timeline::after{ width: calc(var(--p, 0) * 100%); background: linear-gradient(270deg, var(--gold), var(--cyan)); transition: width 1.4s cubic-bezier(.3,.7,.2,1); }
.timeline li{ position: relative; }
.timeline li::before{
    content: ""; position: absolute; top: -2.05rem; right: 0;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--bg); border: 2px solid var(--line-strong); z-index: 1;
    transition: border-color .3s ease, background .3s ease, box-shadow .3s ease;
}
.timeline.go li::before{ border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 5px rgba(245,187,46,.15); }
.timeline.go li:nth-child(1)::before{ transition-delay: .05s; } .timeline.go li:nth-child(2)::before{ transition-delay: .45s; }
.timeline.go li:nth-child(3)::before{ transition-delay: .85s; } .timeline.go li:nth-child(4)::before{ transition-delay: 1.25s; }
.tl-num{ font-family: var(--font-display); font-weight: 600; color: var(--gold); font-size: .95rem; }
.timeline h3{ font-size: 1.1rem; font-weight: 600; margin: .35rem 0 .45rem; }
.timeline p{ color: var(--ink-soft); font-size: .93rem; }

/* ---------- Why ---------- */
.home #why .why-item h3{ font-weight: 600; }

/* ---------- Contact ---------- */
.home .contact, .h-contact{ background: none; border: 0; }
.contact-card{
    position: relative; display: grid; grid-template-columns: .9fr 1.1fr; gap: 3rem;
    padding: clamp(1.6rem, 4vw, 3.2rem); border-radius: 28px;
    background:
        radial-gradient(600px circle at 90% 0%, rgba(245,187,46,.14), transparent 55%),
        radial-gradient(500px circle at 0% 100%, rgba(34,217,242,.08), transparent 55%),
        var(--panel);
    border: 1px solid var(--line-strong);
}
.contact-card h2{ font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 600; }
.contact-card .contact-info > p{ color: var(--ink-soft); margin-top: .6rem; }

.quick-links{ display: flex; flex-direction: column; gap: .7rem; margin-top: 2rem; }
.quick-link{
    display: flex; align-items: center; gap: .9rem; padding: .9rem 1.1rem;
    border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(6,10,24,.5);
    transition: border-color .2s ease, transform .2s ease;
}
a.quick-link:hover{ border-color: rgba(245,187,46,.45); transform: translateX(-4px); }
.quick-link svg{ color: var(--gold); flex-shrink: 0; }
.quick-link span{ display: flex; flex-direction: column; line-height: 1.4; }
.quick-link small{ color: var(--ink-soft); font-size: .88rem; }
.quick-link small[dir="ltr"]{ text-align: right; }

.home .contact-form{ background: rgba(6,10,24,.6); border-radius: var(--r-lg); }
.chips{ border: 0; display: flex; flex-direction: row; flex-wrap: wrap; gap: .5rem; }
.chips legend{ font-size: .88rem; color: var(--ink-soft); margin-bottom: .5rem; width: 100%; float: right; }
.chips label{ cursor: pointer; }
.chips input{ position: absolute; opacity: 0; pointer-events: none; }
.chips span{
    display: inline-block; padding: .45rem .95rem; border-radius: 999px; font-size: .88rem;
    border: 1px solid var(--line-strong); color: var(--ink-soft); transition: all .15s ease;
}
.chips label:hover span{ border-color: var(--ink-soft); color: var(--ink); }
.chips input:checked + span{ background: var(--gold); border-color: var(--gold); color: #14100a; font-weight: 600; }
.chips input:focus-visible + span{ outline: 2px solid var(--gold); outline-offset: 2px; }

.form-error{ color: #ff8a80; font-size: .9rem; }
.form-foot{ display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; }
.form-foot small{ color: var(--ink-soft); font-size: .82rem; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"]{ border-color: #ff8a80; }

/* ---------- Footer ---------- */
.h-footer{ border-top: 1px solid var(--line); padding-top: 3.5rem; }
.footer-grid{ display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2rem; }
.footer-brand p{ color: var(--ink-soft); font-size: .9rem; margin-top: 1rem; max-width: 34ch; }
.footer-col{ display: flex; flex-direction: column; gap: .55rem; }
.footer-col h3{ font-size: .95rem; font-weight: 600; margin-bottom: .3rem; }
.footer-col a{ color: var(--ink-soft); font-size: .9rem; transition: color .15s ease; width: fit-content; }
.footer-col a:hover{ color: var(--gold); }
.footer-col a[dir="ltr"]{ text-align: right; }
.footer-bottom{ margin-top: 2.5rem; padding: 1.4rem 1.75rem; border-top: 1px solid var(--line); }

/* ---------- Responsive ---------- */
.pipe-legend{ display: none; }

/* small laptops: keep the hero stage inside its column */
@media (max-width: 1180px){
    .h-stage{ width: min(400px, 88%); }
    .arch-grid{ grid-template-columns: 1fr 300px; }
}

/* ===== tablet (and below) ===== */
@media (max-width: 1000px){
    .home .h-section{ padding: 5rem 0; }
    .h-head{ margin-bottom: 2.25rem; }

    /* hero: centered, logo on top */
    .h-hero{ padding: 2.5rem 0 3.5rem; }
    .h-hero-grid{ grid-template-columns: 1fr; gap: 1.75rem; text-align: center; }
    .h-hero::before{ left: 50%; transform: translateX(-50%); top: -10%; width: 110vw; height: 110vw; }
    .h-stage{ order: -1; width: min(320px, 70%); }
    .h-hero-copy{ display: flex; flex-direction: column; align-items: center; }
    .h-lead{ margin-inline: auto; }
    .hero-actions{ justify-content: center; }
    .h-facts{
        width: 100%; max-width: 560px; margin-top: 2.5rem;
        display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
    }
    .h-facts div{ align-items: center; }
    .h-facts .stat-num{ justify-content: center; }

    /* services */
    .bento{ grid-template-columns: 1fr 1fr; }
    .tile-wide{ grid-column: span 2; }

    /* pipeline: the log becomes a sticky live bar above the pipeline */
    .arch-grid{ grid-template-columns: 1fr; gap: 1rem; }
    .sec-console{
        order: -1; position: sticky; top: 84px; z-index: 10;
        display: grid; grid-template-columns: auto 1fr; align-items: center;
        border-radius: 16px;
        background: rgba(7,11,25,.9);
        backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 14px 30px -14px rgba(0,0,0,.8);
    }
    .sec-head, .sec-legend, .sec-note{ display: none; }
    .sec-stats{ border-bottom: 0; border-left: 1px solid var(--line); }
    .sec-stats div{ padding: .55rem .9rem; flex-direction: row; align-items: baseline; gap: .4rem; }
    .sec-stats b{ font-size: 1.25rem; }
    .sec-stats span{ font-size: .74rem; white-space: nowrap; }
    .sec-log{ height: 44px; padding: .3rem .4rem; min-width: 0; }
    .sec-log li{ flex-shrink: 0; }
    .sec-log li:not(:first-child){ display: none; }
    .pipe-legend{
        display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem 1rem;
        margin-top: .9rem; font-size: .78rem; color: var(--ink-soft);
    }
    .pipe-legend span{ display: inline-flex; align-items: center; gap: .4rem; }

    /* industries */
    .ind-list{ grid-template-columns: 1fr 1fr; }

    /* process: 2 × 2 cards instead of a horizontal line */
    .timeline{ grid-template-columns: 1fr 1fr; gap: 1rem; padding-top: 0; }
    .timeline::before, .timeline::after, .timeline li::before{ display: none; }
    .timeline li{ padding: 1.4rem; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel); }

    /* why */
    .home .why-grid{ grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

    /* contact */
    .contact-card{ grid-template-columns: 1fr; gap: 2rem; }
    .quick-links{ display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
    .quick-link{ flex-direction: column; align-items: flex-start; gap: .5rem; }
    a.quick-link:hover{ transform: translateY(-3px); }

    /* footer */
    .footer-grid{ grid-template-columns: repeat(3, 1fr); row-gap: 2.25rem; }
    .footer-brand{ grid-column: 1 / -1; }
}

/* ===== pipeline in one column ===== */
@media (max-width: 760px){
    .pipe{ padding: 1.2rem .9rem 1.5rem; }
    .layers{ grid-template-columns: 44px 1fr; grid-auto-rows: auto; row-gap: .6rem; }
    .layers::before, .layers::after{ left: auto; right: 21px; margin-left: 0; top: -18px; bottom: 30px; }
    .layer-node, .layer-card{ grid-row: var(--m); }
    .layer-node{ grid-column: 1; }
    .side-r .layer-card, .side-l .layer-card{ grid-column: 2; }
    .side-r .layer-card::after, .side-l .layer-card::after{ left: auto; right: -9px; width: 9px; }
    .pipe-hub{ margin-inline: 15px auto; }
    .pipe-clients{ justify-content: flex-start; }
    .pipe-legend{ justify-content: flex-start; }
    .layer-card{ padding: .75rem .9rem; }
}

/* ===== phones ===== */
@media (max-width: 640px){
    .home .h-section{ padding: 3.75rem 0; }
    .h-head{ margin-bottom: 1.75rem; }
    .h-head h2{ font-size: clamp(1.55rem, 7vw, 1.9rem); }
    .section-lead{ font-size: .95rem; }

    .h-hero{ padding: 1.25rem 0 2.75rem; }
    .h-stage{ width: min(250px, 66%); }
    .h-kicker{ margin-bottom: 1.1rem; font-size: .82rem; }
    .h-title{ font-size: clamp(1.65rem, 7.2vw, 2.2rem); margin-bottom: 1.1rem; }
    .h-rotator{ white-space: nowrap; height: 1.65em; }
    .h-lead{ font-size: 1rem; margin-bottom: 1.6rem; }
    .hero-actions{ width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
    .hero-actions .btn{ padding: .85rem 1rem; }
    .h-facts{ margin-top: 2rem; padding-top: 1.4rem; gap: .5rem; }
    .h-facts .stat-num{ font-size: 1.45rem; }
    .h-facts dd{ font-size: .76rem; line-height: 1.45; }

    .bento{ grid-template-columns: 1fr; gap: .85rem; }
    .tile{ padding: 1.4rem; border-radius: 18px; }
    .tile-wide{ grid-column: auto; flex-direction: column; }
    .tile-wide .tile-body{ flex: none; }
    .code-win, .mini-dash{ align-self: stretch; flex: none; }
    .code-win pre{ font-size: .76rem; }

    .sec-console{ top: 80px; grid-template-columns: 1fr; }
    .sec-stats{ border-left: 0; border-bottom: 1px solid var(--line); }
    .sec-stats div{ justify-content: center; }
    .sec-log{ height: 40px; }
    .sec-log small{ display: none; }
    .layer-card h3{ font-size: .93rem; }
    .layer-card p{ font-size: .8rem; }

    .ind-list{ grid-template-columns: 1fr; }
    .ind-list li{ padding: 1.2rem 1.1rem; }

    /* process: vertical timeline with a line that fills */
    .timeline{ grid-template-columns: 1fr; gap: 0; padding-right: 2.1rem; }
    .timeline::before, .timeline::after{
        display: block; top: .5rem; bottom: .5rem; right: 6px; left: auto; width: 2px; height: auto;
    }
    .timeline::after{
        bottom: auto; width: 2px; height: calc(var(--p, 0) * (100% - 1rem));
        background: linear-gradient(180deg, var(--gold), var(--cyan)); transition: height 1.4s cubic-bezier(.3,.7,.2,1);
    }
    .timeline li{ padding: 0 0 1.75rem; border: 0; background: none; border-radius: 0; }
    .timeline li:last-child{ padding-bottom: 0; }
    .timeline li::before{ display: block; top: .3rem; right: -2.1rem; }
    .timeline h3{ margin-top: .1rem; }

    .home .why-grid{ grid-template-columns: 1fr; gap: 1.5rem; }

    .contact-card{ padding: 1.4rem 1.1rem; border-radius: 22px; gap: 1.5rem; }
    .quick-links{ grid-template-columns: 1fr; margin-top: 1.4rem; }
    .quick-link{ flex-direction: row; align-items: center; }
    .home .contact-form{ padding: 1.25rem 1rem; }
    .field input, .field textarea{ font-size: 16px; } /* stops iOS from zooming into the field */
    .form-foot .btn{ width: 100%; }

    .footer-grid{ grid-template-columns: 1fr 1fr; gap: 1.75rem 1rem; }
    .footer-col:last-child{ grid-column: 1 / -1; }
    .footer-bottom{ padding: 1.2rem 1.25rem; text-align: center; }
}

@media (max-width: 380px){
    .h-facts dd{ font-size: .7rem; }
    .hero-actions{ grid-template-columns: 1fr; }
    .chips span{ padding: .45rem .8rem; font-size: .84rem; }
}

@media (prefers-reduced-motion: reduce){
    .caret, .code-caret, .h-orbit, .h-logo::after{ animation: none !important; }
    .h-stage{ transform: none !important; }
    .layers::after{ animation: none; }
    .sec-live .live-dot{ animation: none; }
    .md-bars i{ transform: none; transition: none; }
    .timeline::after{ transition: none !important; }
}
.h-logo picture{ display: block; width: 100%; height: 100%; }

/* ==========================================================
   Mobile / tablet: wider contact card on the homepage
   ========================================================== */
@media (max-width: 1080px){
    .contact-card{ grid-template-columns: 1fr; gap: 2rem; }
    .quick-links{ display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
    .quick-link{ flex-direction: column; align-items: flex-start; gap: .5rem; }
}

@media (max-width: 640px){
    #contact > .wrap{ padding: 0 .75rem; }
    .contact-card{ padding: 1.4rem 1rem; border-radius: 20px; gap: 1.5rem; }
    .quick-links{ grid-template-columns: 1fr; }
    .quick-link{ flex-direction: row; align-items: center; }
    /* no box inside a box on phones: the form uses the card's full width */
    .home .contact-form{ padding: 1.25rem 0 0; background: none; border: 0; border-radius: 0; border-top: 1px solid var(--line); }
}
