/* XCyber — shared design system */
:root {
  --brand: #E8501C;
  --brand-deep: #C43F0E;
  --brand-glow: #FF7A3C;
  --ink: #0B1220;
  --ink-2: #1A2333;
  --ink-3: #2A3447;
  --paper: #F6F5F1;
  --paper-2: #ECEAE2;
  --line: rgba(11,18,32,0.12);
  --line-strong: rgba(11,18,32,0.22);
  --muted: #5B6476;
  --success: #0A7A5E;
  --warn: #E8501C;

  --radius: 2px;
  --radius-card: 4px;

  --font-sans: 'IBM Plex Sans', 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --font-ar: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-serif: 'IBM Plex Serif', Georgia, serif;
}

[data-theme="dark"] {
  --ink: #F6F5F1;
  --ink-2: #D9DAE0;
  --ink-3: #9AA3B5;
  --paper: #0A0F1A;
  --paper-2: #11172A;
  --line: rgba(246,245,241,0.10);
  --line-strong: rgba(246,245,241,0.22);
  --muted: #7B8599;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-feature-settings: "ss01","cv11"; -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; }
body { min-height: 100vh; line-height: 1.5; transition: background .35s ease, color .35s ease; }

html[dir="rtl"] { font-family: var(--font-ar); }
html[dir="rtl"] body { font-family: var(--font-ar); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }

/* Monospace eyebrow label */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  background: currentColor;
  opacity: .6;
}
html[dir="rtl"] .eyebrow { letter-spacing: 0; }

/* Typography scale */
.display {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(44px, 6.2vw, 104px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}
.display em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--brand);
}
.h1 { font-size: clamp(32px, 4vw, 56px); font-weight: 600; line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }
.h2 { font-size: clamp(24px, 2.4vw, 36px); font-weight: 600; line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
.h3 { font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.lead { font-size: clamp(18px, 1.4vw, 22px); line-height: 1.45; color: var(--ink-2); max-width: 62ch; text-wrap: pretty; }
.body { font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.mono { font-family: var(--font-mono); }

html[dir="rtl"] .display { letter-spacing: 0; }
html[dir="rtl"] .h1, html[dir="rtl"] .h2, html[dir="rtl"] .h3 { letter-spacing: 0; }

/* Layout */
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 700px) { .wrap { padding: 0 20px; } }

.rule { height: 1px; background: var(--line); width: 100%; }
.rule-strong { height: 1px; background: var(--line-strong); width: 100%; }

/* Top nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 28px; padding: 14px 32px; max-width: 1360px; margin: 0 auto; }
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo img { height: 28px; width: auto; max-width: none; display: block; }
[data-theme="dark"] .nav-logo img.light-only { display: none; }
[data-theme="dark"] .nav-logo img.dark-only { display: block; }
.nav-logo img.dark-only { display: none; }
/* Unit X page + footer sit on dark bg — show dark-bg variant */
body.on-dark .nav-logo img.light-only, footer .nav-logo img.light-only { display: none; }
body.on-dark .nav-logo img.dark-only, footer .nav-logo img.dark-only { display: block; }
.nav-links { display: flex; gap: 4px; margin-inline-start: 24px; }
.nav-link { padding: 8px 14px; font-size: 14px; color: var(--ink-2); border-radius: var(--radius); transition: color .2s, background .2s; }
.nav-link:hover { color: var(--ink); background: var(--paper-2); }
.nav-link.active { color: var(--ink); }
.nav-spacer { flex: 1; }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink-2); transition: all .2s;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
}
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }

/* Language dropdown */
.lang-switch { position: relative; display: inline-block; }
.lang-switch > .icon-btn[data-lang-toggle] {
  width: auto; min-width: 52px; padding: 0 10px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.lang-menu {
  position: absolute; top: calc(100% + 6px); inset-inline-end: 0;
  min-width: 180px; background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  padding: 4px; display: none; z-index: 100;
}
.lang-menu.open { display: block; }
.lang-menu button {
  width: 100%; display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; padding: 9px 12px; background: transparent; border: 0;
  text-align: start; cursor: pointer; border-radius: 6px;
  color: var(--ink-2); transition: background .15s, color .15s;
}
.lang-menu button:hover { background: var(--paper-2); color: var(--ink); }
.lang-menu button.is-active { color: var(--ink); background: var(--paper-2); }
.lang-menu button .lang-code {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .04em; min-width: 24px;
}
.lang-menu button .lang-name { font-size: 13px; }
[data-theme="dark"] .lang-menu,
body.on-dark .lang-menu {
  background: #14161B; border-color: rgba(246,245,241,.12);
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
body.on-dark .lang-menu button { color: #B6BBC8; }
body.on-dark .lang-menu button:hover,
body.on-dark .lang-menu button.is-active { background: rgba(246,245,241,.08); color: var(--paper); }

.cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; background: var(--ink); color: var(--paper);
  font-family: var(--font-mono); font-size: 13px; font-weight: 500; letter-spacing: 0.02em;
  border-radius: var(--radius); transition: all .2s;
  border: 1px solid var(--ink);
}
.cta:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.cta.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.cta.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cta.brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.cta.brand:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.cta .arrow { transition: transform .25s; }
.cta:hover .arrow { transform: translateX(3px); }
html[dir="rtl"] .cta:hover .arrow { transform: translateX(-3px); }

/* Sections */
section { padding: 96px 0; position: relative; }
section + section { border-top: 1px solid var(--line); }
@media (max-width: 700px) { section { padding: 64px 0; } }

.section-head { display: grid; grid-template-columns: 1fr 2fr; gap: 64px; align-items: end; margin-bottom: 56px; }
@media (max-width: 900px) { .section-head { grid-template-columns: 1fr; gap: 20px; margin-bottom: 40px; } }

/* Grid cards */
.card {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 28px;
  transition: border-color .2s, transform .3s;
  position: relative;
}
.card:hover { border-color: var(--line-strong); }
.card .num {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--muted); letter-spacing: .1em;
}
.card h3 { margin: 16px 0 8px; }
.card p { color: var(--ink-2); font-size: 14px; line-height: 1.55; }

/* Footer */
footer {
  background: var(--ink); color: var(--paper);
  padding: 80px 0 32px;
}
footer .wrap { color: var(--paper); }
footer .foot-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px; padding-bottom: 56px; border-bottom: 1px solid rgba(246,245,241,.15);
}
@media (max-width: 900px) { footer .foot-grid { grid-template-columns: 1fr 1fr; } }
footer h4 {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: #7b8599;
  margin-bottom: 18px;
}
footer ul { list-style: none; display: grid; gap: 10px; }
footer li a { color: #D9DAE0; font-size: 14px; transition: color .2s; }
footer li a:hover { color: var(--brand-glow); }
footer .foot-bottom {
  display: flex; justify-content: space-between; align-items: center; padding-top: 28px;
  font-family: var(--font-mono); font-size: 11px; color: #7b8599; letter-spacing: .06em;
}
@media (max-width: 700px) { footer .foot-bottom { flex-direction: column; gap: 12px; } }

/* Utility */
.stack > * + * { margin-top: var(--gap, 16px); }
.stack-lg { --gap: 32px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Fade-in animations */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Corner ticks (brand motif) */
.tick-corners { position: relative; }
.tick-corners::before, .tick-corners::after {
  content: ""; position: absolute; width: 10px; height: 10px;
  border-color: var(--brand); border-style: solid; border-width: 0;
}
.tick-corners::before { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; }
.tick-corners::after { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; }

/* Brand X mark */
.x-mark {
  display: inline-block; width: 1em; height: 1em;
  background: var(--brand);
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M15 20 L35 20 L50 40 L65 20 L85 20 L60 50 L85 80 L65 80 L50 60 L35 80 L15 80 L40 50 Z" fill="black"/></svg>') center/contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M15 20 L35 20 L50 40 L65 20 L85 20 L60 50 L85 80 L65 80 L50 60 L35 80 L15 80 L40 50 Z" fill="black"/></svg>') center/contain no-repeat;
}

/* RTL flips */
html[dir="rtl"] .arrow { transform: scaleX(-1); }


/* ====== Four Pillars (home) ====== */
.pillars-home { padding: 112px 0; }
.pillars-home h2 { font-size: clamp(40px, 4.8vw, 68px); font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.pillars-home h2 em { font-family: var(--font-serif); font-style: italic; color: var(--brand); font-weight: 400; }
.pillars-home .sub { color: var(--ink-2); max-width: 60ch; margin-top: 16px; font-size: 16px; line-height: 1.55; }
.pillars-home-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 56px; border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); }
@media (max-width: 1000px) { .pillars-home-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .pillars-home-grid { grid-template-columns: 1fr; } }
.pillar-home { padding: 36px 28px 32px; border-inline-end: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; min-height: 340px; background: var(--paper); position: relative; transition: background .2s; }
.pillar-home:hover { background: var(--paper-2); }
.pillar-home .m { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; color: var(--brand); }
.pillar-home h3 { font-size: 28px; font-weight: 600; letter-spacing: -.015em; margin: 14px 0 10px; line-height: 1.05; }
.pillar-home h3 em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--brand); }
.pillar-home p { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.pillar-home ul { list-style: none; margin-top: 14px; display: grid; gap: 6px; }
.pillar-home ul li { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; padding-inline-start: 12px; position: relative; }
.pillar-home ul li::before { content: "·"; position: absolute; inset-inline-start: 2px; color: var(--brand); font-weight: 700; }
.pillar-home .go { margin-top: auto; padding-top: 20px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; color: var(--ink); border-top: 1px dashed var(--line-strong); }
.pillar-home .go .arrow { transition: transform .2s; display: inline-block; }
.pillar-home:hover .go .arrow { transform: translateX(3px); }

/* ====== Partners band (home) ====== */
.partners-band { padding: 112px 0; border-top: 1px solid var(--line); background: var(--paper-2); }
.partners-band .pb-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: end; }
@media (max-width: 900px) { .partners-band .pb-grid { grid-template-columns: 1fr; gap: 32px; } }
.partners-band h2 { font-size: clamp(36px, 4vw, 56px); font-weight: 600; letter-spacing: -.02em; line-height: 1; max-width: 16ch; text-wrap: balance; }
.partners-band h2 em { font-family: var(--font-serif); font-style: italic; color: var(--brand); font-weight: 400; }
.partners-band p.sub { color: var(--ink-2); font-size: 15px; line-height: 1.6; margin-top: 18px; max-width: 48ch; }
.partners-band .three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line-strong); border-inline-start: 1px solid var(--line-strong); margin-top: 12px; }
.partners-band .three > div { padding: 22px 18px; border-inline-end: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); background: var(--paper); }
.partners-band .three .m { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; color: var(--brand); }
.partners-band .three h5 { font-size: 16px; font-weight: 600; margin-top: 8px; }
.partners-band .three p { font-size: 12px; color: var(--ink-2); line-height: 1.5; margin-top: 6px; }
.partners-band .row { margin-top: 28px; }

/* ====== Cookie consent banner ====== */
.xc-cookie {
  position: fixed; bottom: 16px; inset-inline-start: 16px; inset-inline-end: 16px;
  max-width: 720px; margin-inline: auto;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--line-strong);
  padding: 18px 22px; z-index: 9999;
  display: none; align-items: center; gap: 18px;
  font-size: 13.5px; line-height: 1.5;
  box-shadow: 0 18px 60px rgba(0,0,0,.18);
}
.xc-cookie.is-open { display: flex; }
@media (max-width: 700px) {
  .xc-cookie { flex-direction: column; align-items: stretch; padding: 16px; gap: 12px; }
}
.xc-cookie p { color: #D9DAE0; flex: 1; margin: 0; }
.xc-cookie p a { color: var(--brand-glow); text-decoration: underline; text-underline-offset: 2px; }
.xc-cookie p a:hover { color: var(--paper); }
.xc-cookie .actions { display: flex; gap: 10px; flex: none; }
.xc-cookie button {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 10px 16px; border: 1px solid var(--line-strong);
  background: transparent; color: var(--paper);
  cursor: pointer; transition: background .2s, border-color .2s;
}
.xc-cookie button:hover { border-color: var(--brand); }
.xc-cookie button.primary {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.xc-cookie button.primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }

/* ====== Form consent block ====== */
.consent-block {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px;
  margin: 16px 0 24px; padding: 14px 16px;
  border: 1px solid var(--line); background: var(--paper-2);
  font-size: 13px; line-height: 1.55; color: var(--ink-2);
}
.consent-block input[type="checkbox"] {
  width: 18px; height: 18px; margin-top: 2px;
  accent-color: var(--brand); cursor: pointer;
}
.consent-block label { font-family: inherit; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.consent-block label a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.consent-block label a:hover { color: var(--ink); }

/* ====== Contact form additions ====== */
.consent-block.consent-opt-in { background: var(--paper); }
.consent-block .hint, form .hint {
  display: block; font-family: inherit; font-size: 12px;
  color: var(--muted); letter-spacing: 0; text-transform: none;
  margin-top: 6px; line-height: 1.4;
}
form input:invalid:not(:placeholder-shown), form select:invalid:not([data-pristine]) {
  /* gentle invalid state — only after user has touched */
}
form .field.field-error input,
form .field.field-error select,
form .field.field-error textarea { border-color: var(--brand); }
form .field.field-error .hint { color: var(--brand); font-weight: 500; }

#form-status {
  margin-top: 24px; padding: 18px 22px;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.55;
  border: 1px solid var(--line);
}
#form-status[data-state="success"] {
  border-color: var(--success); color: var(--success);
  background: rgba(10, 122, 94, 0.06);
}
#form-status[data-state="error"] {
  border-color: var(--brand); color: var(--brand);
  background: rgba(232, 80, 28, 0.06);
}
#form-status[data-state="loading"] { color: var(--ink-2); }
#form-status[data-state="loading"]::before {
  content: "◐"; display: inline-block; margin-inline-end: 8px;
  animation: form-spin 1s linear infinite;
}
@keyframes form-spin { to { transform: rotate(360deg); } }

/* Cloudflare Turnstile container — make it fit the design */
.cf-turnstile { min-height: 65px; }
