/* =====================================================================
   FirewallX — home (c-home.css · "Core")
   VOICE   calm, heavy, cinematic — a film about one attack that fails
   IDEA    your server is a core inside a shield of hex plates; the page
           is a camera moving around it while you scroll
   PICTURE the WebGL scene (c-scene.js), fixed behind everything
   COLOUR  void black, white type; ice blue and fire red only in the 3D
   TYPE    Unbounded / Alexandria for display, Instrument Sans / Plex Arabic
   ===================================================================== */

html.cine {
  --void: #05060a;
  --t1: #eef2f8;
  --t2: #a3abbd;
  --t3: #6b7387;
  --hair: rgba(238, 242, 248, 0.12);
  --hair2: rgba(238, 242, 248, 0.24);
  --ice: #8fd8ff;
  --fire: #ff3b2f;
  --abyss: #05060a;
  --bone: #eef2f8;
  --d: "Unbounded", "Alexandria", system-ui, sans-serif;
  --b: "Instrument Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --m: "JetBrains Mono", ui-monospace, monospace;
  --wrapw: 1320px;
  background: var(--void);
}
html.cine[lang="ar"] { --d: "Alexandria", "Unbounded", sans-serif; --b: "IBM Plex Sans Arabic", "Instrument Sans", sans-serif; }
html.cine body { background: var(--void); color: var(--t1); font-family: var(--b); font-size: 16px; line-height: 1.6; }
html.cine ::selection { background: var(--ice); color: var(--void); }

#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; }
.c-fallback { position: fixed; inset: 0; z-index: 0; display: grid; place-items: center; background: radial-gradient(40vmax 40vmax at 70% 50%, rgba(47, 140, 255, 0.18), transparent 70%), var(--void); }
.c-fallback img { width: min(40vmin, 360px); opacity: 0.5; filter: saturate(0.7); margin-inline-start: 30vw; }
html.has-scene .c-fallback { display: none; }
/* side scrim so text always reads over the scene */
.c-veil { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(5, 6, 10, 0.82) 0%, rgba(5, 6, 10, 0.35) 42%, transparent 62%); transition: background 0.6s; }
html[dir="rtl"] .c-veil { background: linear-gradient(-90deg, rgba(5, 6, 10, 0.82) 0%, rgba(5, 6, 10, 0.35) 42%, transparent 62%); }
.c-veil.is-right { background: linear-gradient(-90deg, rgba(5, 6, 10, 0.82) 0%, rgba(5, 6, 10, 0.35) 42%, transparent 62%); }
html[dir="rtl"] .c-veil.is-right { background: linear-gradient(90deg, rgba(5, 6, 10, 0.82) 0%, rgba(5, 6, 10, 0.35) 42%, transparent 62%); }
.c-veil.is-full { background: rgba(5, 6, 10, 0.55); }

main, .c-head, .c-foot { position: relative; z-index: 2; }
.c-wrap { width: min(var(--wrapw), 100% - 48px); margin-inline: auto; }
.c-label { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--t2); }
.c-label::before { content: ""; width: 28px; height: 1px; background: var(--t2); }
.c-h2 { font-family: var(--d); font-weight: 600; font-size: clamp(2rem, 4.2vw, 3.8rem); line-height: 1.02; letter-spacing: -0.03em; text-transform: none; text-wrap: balance; }
html[lang="ar"] .c-h2 { letter-spacing: 0; line-height: 1.35; font-weight: 800; }
.c-p { color: var(--t2); font-size: clamp(1rem, 1.2vw, 1.125rem); max-width: 56ch; }
.c-sec { padding: clamp(110px, 14vw, 200px) 0; }

/* buttons */
.c-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--hair2); color: var(--t1); font-weight: 600; font-size: 15px; white-space: nowrap; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.c-btn:hover { border-color: var(--t1); }
.c-btn--solid { background: var(--t1); color: var(--void); border-color: var(--t1); }
.c-btn--solid:hover { background: var(--ice); border-color: var(--ice); }
.c-btn--lg { min-height: 58px; padding: 0 30px; font-size: 16px; }
.c-link { font-size: 15px; font-weight: 500; color: var(--t2); }
.c-link:hover { color: var(--t1); }

/* header */
.c-head { position: fixed; top: 0; inset-inline: 0; z-index: 50; transition: background 0.35s, backdrop-filter 0.35s; }
.c-head.is-solid { background: rgba(5, 6, 10, 0.7); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.c-head__in { display: flex; align-items: center; gap: 28px; height: 76px; }
.c-brand { display: flex; align-items: center; gap: 10px; }
.c-brand img { width: 34px; height: 34px; border-radius: 50%; }
.c-brand b { font-family: var(--d); font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.c-nav { display: flex; gap: 26px; margin-inline-start: auto; }
.c-nav a { position: relative; font-size: 15px; color: var(--t2); transition: color 0.2s; }
.c-nav a::after { content: ""; position: absolute; inset-inline: 0; bottom: -6px; height: 1px; background: var(--t1); transform: scaleX(0); transform-origin: left; transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
html[dir="rtl"] .c-nav a::after { transform-origin: right; }
.c-nav a:hover, .c-nav a.is-active { color: var(--t1); }
.c-nav a:hover::after, .c-nav a.is-active::after { transform: scaleX(1); }
.c-head__act { display: flex; align-items: center; gap: 16px; }
html.cine .fx-lang { border-color: var(--hair2); border-radius: 999px; overflow: hidden; }
html.cine .fx-lang button { color: var(--t2); }
html.cine .fx-lang button + button { border-color: var(--hair2); }
html.cine .fx-lang button[aria-pressed="true"] { background: var(--t1); color: var(--void); }
.c-burger { display: none; width: 44px; height: 44px; border: 1px solid var(--hair2); border-radius: 999px; background: none; cursor: pointer; place-items: center; align-content: center; gap: 6px; }
.c-burger i { display: block; width: 16px; height: 1.5px; background: var(--t1); transition: transform 0.3s; }
.c-burger[aria-expanded="true"] i:first-child { transform: translateY(3.75px) rotate(45deg); }
.c-burger[aria-expanded="true"] i:last-child { transform: translateY(-3.75px) rotate(-45deg); }
.c-mnav { display: none; }
@media (max-width: 1060px) {
  .c-nav { display: none; }
  .c-head__act { margin-inline-start: auto; }
  .c-hide-m { display: none; }
  .c-burger { display: grid; }
  .c-head__act .c-btn--solid { display: none; }
  .c-mnav.is-open { display: grid; gap: 4px; padding: 10px 24px 26px; background: rgba(5, 6, 10, 0.96); }
  .c-mnav a { padding: 14px 0; font-family: var(--d); font-size: 22px; border-bottom: 1px solid var(--hair); }
  .c-mnav .fx-lang { margin-top: 16px; justify-self: start; }
}

/* hero */
.c-hero { min-height: 100svh; display: flex; align-items: flex-end; padding: 110px 0 44px; }
.c-hero__in { display: grid; gap: 26px; }
.c-hero__kind { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--t2); }
.c-sep { color: var(--t3); }
.c-hero__title { font-family: var(--d); font-weight: 800; font-size: clamp(2.7rem, 7.2vw, 7.4rem); line-height: 0.95; letter-spacing: -0.045em; max-width: 12.5ch; text-transform: none; }
html[lang="ar"] .c-hero__title { letter-spacing: 0; line-height: 1.28; font-size: clamp(2.3rem, 5.4vw, 5.2rem); max-width: 14ch; }
.c-hero__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; }
.c-hero__lead { max-width: 50ch; color: var(--t2); font-size: 1.06rem; }
.c-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.c-stats { display: flex; flex-wrap: wrap; gap: 10px 48px; margin: 18px 0 0; padding-top: 22px; border-top: 1px solid var(--hair); }
.c-stats dt { font-size: 13px; color: var(--t3); }
.c-stats dd { margin: 2px 0 0; font-family: var(--d); font-weight: 600; font-size: clamp(1.6rem, 2.6vw, 2.4rem); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.c-stats div:nth-child(2) dd { color: var(--fire); }
.c-stats div:nth-child(3) dd { color: var(--ice); }
.c-scroll { position: absolute; inset-inline-end: max(24px, calc((100vw - var(--wrapw)) / 2)); bottom: 48px; display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--t2); }
.c-scroll i { position: relative; width: 1px; height: 44px; background: var(--hair2); overflow: hidden; }
.c-scroll i::after { content: ""; position: absolute; left: 0; width: 1px; height: 14px; background: var(--t1); animation: cCue 1.8s cubic-bezier(0.76, 0, 0.24, 1) infinite; }
@keyframes cCue { from { top: -14px; } to { top: 44px; } }
@media (max-width: 760px) { .c-scroll { display: none; } .c-hero__cta .c-btn { flex: 1 1 100%; } }

/* attack chapter */
.c-attack { height: 420vh; }
.c-attack__stick { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; }
.c-attack__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 40px; }
.c-attack__text { grid-column: 2; display: grid; gap: 22px; }
.c-phases { display: grid; }
.c-phase { grid-area: 1 / 1; opacity: 0; transform: translateY(24px); transition: opacity 0.5s, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); pointer-events: none; }
.c-phase.is-on { opacity: 1; transform: none; pointer-events: auto; }
.c-phase h2 { font-family: var(--d); font-weight: 600; font-size: clamp(1.9rem, 3.6vw, 3.4rem); line-height: 1.04; letter-spacing: -0.03em; text-transform: none; margin-bottom: 18px; }
html[lang="ar"] .c-phase h2 { letter-spacing: 0; line-height: 1.35; font-weight: 800; }
.c-phase p { color: var(--t2); max-width: 46ch; font-size: 1.06rem; }
.c-meter { grid-column: 2; grid-row: 2; display: grid; gap: 10px; padding-top: 22px; border-top: 1px solid var(--hair); max-width: 440px; }
.c-meter__n { font-family: var(--d); font-weight: 800; font-size: clamp(3.4rem, 7vw, 6.4rem); line-height: 0.9; letter-spacing: -0.05em; }
.c-meter__n b { font-weight: 800; transition: color 0.3s; }
.c-meter__n span { color: var(--t3); }
.c-meter__bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.c-meter__bar i { height: 4px; background: var(--hair2); transition: background 0.3s; }
.c-meter__cap { font-size: 13px; color: var(--t3); }
.c-meter__state { position: relative; height: 1.6em; font-family: var(--d); font-weight: 600; font-size: 1.05rem; }
.c-meter__state span { position: absolute; inset-inline-start: 0; opacity: 0; transform: translateY(8px); transition: opacity 0.35s, transform 0.35s; }
.c-meter[data-state="idle"] [data-s="idle"], .c-meter[data-state="hit"] [data-s="hit"], .c-meter[data-state="lock"] [data-s="lock"], .c-meter[data-state="restore"] [data-s="restore"] { opacity: 1; transform: none; }
.c-meter[data-state="hit"] .c-meter__n b, .c-meter[data-state="lock"] .c-meter__n b { color: var(--fire); }
.c-meter[data-state="lock"] [data-s="lock"] { color: var(--fire); }
.c-meter[data-state="restore"] [data-s="restore"], .c-meter[data-state="restore"] .c-meter__n b { color: var(--ice); }
.c-meter .c-meter__bar i.on { background: var(--fire); }
.c-meter[data-state="restore"] .c-meter__bar i.on { background: var(--ice); }
.c-attack__prog { position: absolute; inset-inline: max(24px, calc((100vw - var(--wrapw)) / 2)); bottom: 40px; height: 1px; background: var(--hair); }
.c-attack__prog i { display: block; height: 100%; background: var(--t1); transform-origin: left; transform: scaleX(0); }
html[dir="rtl"] .c-attack__prog i { transform-origin: right; }
@media (max-width: 900px) {
  .c-attack__in { grid-template-columns: 1fr; align-content: end; padding-bottom: 80px; height: 100%; }
  .c-attack__text, .c-meter { grid-column: 1; }
  .c-meter { grid-row: auto; }
  .c-attack__stick { align-items: stretch; }
}

/* actions */
.c-actions__head { display: grid; gap: 22px; max-width: 760px; margin-bottom: 56px; }
.c-acts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 40px; }
.c-acts__g { display: contents; }
.c-act { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: center; padding: 16px 0; border-top: 1px solid var(--hair); }
.c-act__n { font-weight: 600; }
.c-act__k { grid-column: 1; font-family: var(--m); font-size: 12px; color: var(--t3); }
.c-act__l { grid-row: 1 / span 2; grid-column: 2; display: flex; align-items: center; gap: 10px; font-family: var(--d); font-weight: 600; font-size: 1.6rem; }
.c-act__l i { display: inline-flex; gap: 3px; }
.c-act__l i b { width: 5px; height: 20px; background: var(--hair2); border-radius: 1px; transition: background 0.4s; }
.c-act.is-armed .c-act__l i b.on { background: var(--ice); }
.c-act:hover .c-act__l i b.on { background: var(--fire); }
.c-act__g { grid-column: 1 / -1; padding: 30px 0 8px; font-size: 13px; color: var(--t3); }
.c-resp { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px 64px; margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--hair2); }
.c-resp h3 { font-family: var(--d); font-weight: 600; font-size: 1.4rem; letter-spacing: -0.02em; text-transform: none; margin-bottom: 20px; }
html[lang="ar"] .c-resp h3 { letter-spacing: 0; }
.c-resp ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 32px; }
.c-resp li b { display: block; font-weight: 600; }
.c-resp li span { color: var(--t3); font-size: 14px; }
.c-resp__restore p { color: var(--t2); }
.c-resp__restore h3 { color: var(--ice); }
@media (max-width: 860px) { .c-resp { grid-template-columns: 1fr; } .c-resp ul { grid-template-columns: 1fr; } }

/* systems */
.c-systems { height: 620vh; }
.c-systems__stick { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; }
.c-systems__in { width: min(var(--wrapw), 100% - 48px); display: grid; gap: 28px; }
.c-systems__count { margin-inline-start: auto; font-family: var(--m); font-size: 13px; }
.c-slides { position: relative; display: grid; }
.c-slide { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 40px 64px; align-items: center; opacity: 0; visibility: hidden; }
.c-slide.is-on { opacity: 1; visibility: visible; }
.c-slide__t h3 { font-family: var(--d); font-weight: 800; font-size: clamp(2.2rem, 5vw, 4.6rem); line-height: 0.95; letter-spacing: -0.045em; text-transform: none; margin-bottom: 18px; }
html[lang="ar"] .c-slide__t h3 { letter-spacing: 0; line-height: 1.3; }
.c-slide__sum { font-size: 1.15rem; color: var(--t1); max-width: 40ch; margin-bottom: 22px; }
.c-slide ol { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 12px; }
.c-slide ol li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 12px; color: var(--t2); font-size: 15px; }
.c-slide ol li::before { content: counter(s); font-family: var(--m); font-size: 12px; color: var(--ice); padding-top: 3px; }
.c-slide__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.c-slide__chips span { padding: 6px 12px; border: 1px solid var(--hair2); border-radius: 999px; font-size: 13px; color: var(--t2); }
.c-slide__cmd { font-family: var(--m); font-size: 13px; color: var(--ice); margin-top: 16px; }
.c-screen { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--hair2); background: #05070d; box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.9), 0 0 0 8px rgba(238, 242, 248, 0.03); }
.c-screen img { display: block; width: 100%; height: auto; aspect-ratio: 720 / 450; }
.c-systems__dots { position: absolute; inset-inline-start: max(24px, calc((100vw - var(--wrapw)) / 2)); bottom: 40px; display: flex; gap: 6px; }
.c-systems__dots i { width: 22px; height: 2px; background: var(--hair2); transition: background 0.3s, width 0.3s; }
.c-systems__dots i.on { background: var(--t1); width: 44px; }
@media (max-width: 900px) {
  .c-systems { height: auto; }
  .c-systems__stick { position: static; height: auto; padding: 100px 0; }
  .c-slides { gap: 70px; }
  .c-slide { grid-area: auto; grid-template-columns: 1fr; opacity: 1; visibility: visible; }
  .c-systems__dots, .c-systems__count { display: none; }
}

/* commands */
.c-cmds__in { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px 80px; align-items: start; }
.c-cmds__in > div:first-child { display: grid; gap: 22px; position: sticky; top: 120px; }
.c-logline { margin-top: 18px; padding-top: 22px; border-top: 1px solid var(--hair); }
.c-logline h3 { font-family: var(--d); font-weight: 600; font-size: 1.2rem; text-transform: none; margin-bottom: 8px; }
.c-logline p { color: var(--t2); font-size: 15px; }
.c-cmdlist { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.c-cmdlist > div { padding: 18px 0; border-top: 1px solid var(--hair); }
.c-cmdlist dt { font-family: var(--m); font-size: 1.05rem; color: var(--t1); text-align: start; unicode-bidi: plaintext; }
.c-cmdlist > div:hover dt { color: var(--ice); }
.c-cmdlist dd { margin: 6px 0 0; color: var(--t3); font-size: 14px; }
@media (max-width: 900px) { .c-cmds__in { grid-template-columns: 1fr; } .c-cmds__in > div:first-child { position: static; } }
@media (max-width: 560px) { .c-cmdlist { grid-template-columns: 1fr; } }

/* faq */
.c-faq__in { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px 80px; }
.c-faq__list details { border-top: 1px solid var(--hair); }
.c-faq__list details:last-child { border-bottom: 1px solid var(--hair); }
.c-faq__list summary { list-style: none; cursor: pointer; padding: 24px 0; display: flex; justify-content: space-between; gap: 20px; font-size: 1.15rem; font-weight: 500; }
.c-faq__list summary::-webkit-details-marker { display: none; }
.c-faq__list summary::after { content: ""; flex: none; width: 14px; height: 14px; margin-top: 6px; background: linear-gradient(var(--t1), var(--t1)) center / 100% 1.5px no-repeat, linear-gradient(var(--t1), var(--t1)) center / 1.5px 100% no-repeat; transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.c-faq__list details[open] summary::after { transform: rotate(45deg); }
.c-faq__list p { padding-bottom: 24px; color: var(--t2); max-width: 60ch; }
@media (max-width: 900px) { .c-faq__in { grid-template-columns: 1fr; } }

/* final */
.c-final { min-height: 120vh; display: flex; align-items: center; }
.c-final__in { display: grid; justify-items: center; text-align: center; gap: 26px; }
.c-final__in .c-label::before { display: none; }
.c-final__title { font-family: var(--d); font-weight: 800; font-size: clamp(2.6rem, 6.6vw, 6.8rem); line-height: 0.96; letter-spacing: -0.045em; max-width: 14ch; text-transform: none; }
html[lang="ar"] .c-final__title { letter-spacing: 0; line-height: 1.3; font-size: clamp(2.2rem, 5vw, 4.8rem); }
.c-final .c-hero__cta { justify-content: center; }

/* footer */
.c-foot { padding: 70px 0 32px; border-top: 1px solid var(--hair); background: var(--void); color: var(--t2); font-size: 15px; }
.c-foot__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.c-foot__grid p { margin-top: 14px; max-width: 40ch; color: var(--t3); }
.c-foot h4 { font-family: var(--b); text-transform: none; font-size: 14px; font-weight: 600; color: var(--t1); margin-bottom: 12px; }
.c-foot__grid a:not(.c-brand) { display: block; padding: 4px 0; }
.c-foot__grid a:not(.c-brand):hover { color: var(--t1); }
.c-foot__base { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--hair); color: var(--t3); font-size: 13px; }
@media (max-width: 760px) { .c-foot__grid { grid-template-columns: 1fr 1fr; } .c-foot__grid > :first-child { grid-column: 1 / -1; } }

/* hidden until the entrance runs (CSS failsafe after 2.5s) */
html.fx-js:not(.fx-ready) .c-in { opacity: 0; animation: rbFailsafe 0s linear 2.5s forwards; }
