/* =====================================================================
   ZIOTECHES BRAND PORTAL — Design System
   Brand-accurate tokens (per Zioteches Brand Book). Logical properties
   make a single stylesheet serve both RTL (ar) and LTR (en).
   ===================================================================== */

:root {
  /* Brand colors */
  --ignition-orange: #FF9100;
  --gold-rush: #FFD600;
  --neural-black: #0A0A0A;
  --deep-graphite: #151515;
  --carbon: #1C1C1E;
  --precision-silver: #E5E7EB;
  --muted: #9AA0A6;
  --muted-2: #6B7077;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --glass: rgba(255, 255, 255, 0.03);
  --glass-2: rgba(255, 255, 255, 0.05);

  /* Type */
  --font-ar: 'Cairo', system-ui, sans-serif;
  --font-en: 'Montserrat', system-ui, sans-serif;
  --font: var(--font-ar);

  /* Scale */
  --maxw: 1180px;
  --radius: 22px;
  --radius-lg: 36px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  --shadow-orange: 0 18px 50px rgba(255, 145, 0, 0.18);
  --grad-orange: linear-gradient(135deg, var(--ignition-orange), var(--gold-rush));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[lang="en"], [dir="ltr"] { --font: var(--font-en); }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--neural-black);
  color: #fff;
  line-height: 1.8;
  overflow-x: hidden;
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(255, 145, 0, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(255, 214, 0, 0.04), transparent 55%);
  background-attachment: fixed;
}
[dir="ltr"] body { line-height: 1.7; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.en { font-family: var(--font-en); }
.ar { font-family: var(--font-ar); }

.container { max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.muted { color: var(--muted); }
.accent { color: var(--ignition-orange); }
.gold { color: var(--gold-rush); }

/* ── Skip link (a11y) ─────────────────────────────────────────── */
.skip-link {
  position: absolute; inset-inline-start: -999px; top: 8px; z-index: 200;
  background: var(--ignition-orange); color: #000; padding: 10px 18px;
  border-radius: 10px; font-weight: 800;
}
.skip-link:focus { inset-inline-start: 8px; }

/* ── Header / Nav ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background .3s var(--ease);
}
.nav { display: flex; align-items: center; gap: 18px; height: 70px; }
.nav__brand { display: flex; align-items: center; gap: 12px; font-weight: 900; }
.nav__brand img { height: 34px; width: auto; }
.nav__brand span { font-size: 18px; letter-spacing: .5px; }
.nav__links { display: flex; gap: 6px; margin-inline-start: auto; align-items: center; }
.nav__links a {
  font-size: 13px; font-weight: 700; color: var(--muted);
  padding: 8px 12px; border-radius: 10px; transition: all .2s var(--ease); white-space: nowrap;
}
.nav__links a:hover { color: #fff; background: var(--glass-2); }
.nav__links a.active { color: var(--ignition-orange); }
.nav__actions { display: flex; gap: 10px; align-items: center; margin-inline-start: 8px; }
.lang-toggle {
  font-size: 12px; font-weight: 800; border: 1px solid var(--line-strong);
  padding: 7px 14px; border-radius: 999px; color: #fff; transition: all .2s var(--ease);
}
.lang-toggle:hover { background: var(--ignition-orange); color: #000; border-color: var(--ignition-orange); }
.nav__burger { display: none; background: none; border: 0; color: #fff; cursor: pointer; padding: 8px; }
.nav__burger svg { width: 26px; height: 26px; }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  font-family: inherit; font-weight: 800; font-size: 14px; border: 0;
  padding: 14px 26px; border-radius: 999px; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.btn--primary { background: var(--grad-orange); color: #000; box-shadow: var(--shadow-orange); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 22px 60px rgba(255, 145, 0, 0.3); }
.btn--ghost { background: var(--glass-2); color: #fff; border: 1px solid var(--line-strong); }
.btn--ghost:hover { border-color: var(--ignition-orange); color: var(--ignition-orange); }

/* ── Hero ─────────────────────────────────────────────────────── */
.hero { position: relative; padding-block: clamp(64px, 12vw, 140px) clamp(48px, 8vw, 90px); text-align: center; overflow: hidden; }
.hero::after {
  content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}
.hero__logo { width: clamp(160px, 26vw, 240px); margin-inline: auto; margin-bottom: 30px; filter: drop-shadow(0 0 40px rgba(255, 145, 0, 0.25)); }
.hero__eyebrow { color: var(--ignition-orange); font-weight: 900; letter-spacing: 4px; font-size: 12px; text-transform: uppercase; margin-bottom: 16px; }
.hero h1 { font-size: clamp(34px, 6vw, 64px); font-weight: 900; line-height: 1.1; }
.hero h1 .en, .hero h1 .ar { display: block; font-size: clamp(16px, 2.4vw, 26px); color: rgba(255,255,255,.4); letter-spacing: 2px; margin-top: 6px; }
.hero h1 .en { font-style: italic; text-transform: uppercase; }
.hero__tag { color: var(--ignition-orange); font-weight: 800; letter-spacing: 3px; text-transform: uppercase; margin-block: 18px 28px; font-size: clamp(13px, 1.6vw, 16px); }
.hero__lead { max-width: 680px; margin-inline: auto; color: #C9CDD4; font-size: 17px; margin-bottom: 30px; }
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Section shell ────────────────────────────────────────────── */
.section { padding-block: clamp(56px, 9vw, 110px); border-bottom: 1px solid var(--line); position: relative; }
.section__tag { display: inline-block; color: #000; background: var(--grad-orange); font-weight: 900; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; padding: 5px 14px; border-radius: 7px; margin-bottom: 18px; }
.section h2 { font-size: clamp(26px, 4vw, 40px); font-weight: 900; line-height: 1.2; margin-bottom: 14px; }
.section h2 .num { color: var(--ignition-orange); }
.section__lead { color: var(--muted); max-width: 720px; font-size: 16px; margin-bottom: 44px; }

/* ── Cards / grids ────────────────────────────────────────────── */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(255,145,0,.4); box-shadow: var(--shadow); }
.card h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; }
.card__icon { width: 52px; height: 52px; border-radius: 14px; background: rgba(255,145,0,.1); color: var(--ignition-orange); display: grid; place-items: center; margin-bottom: 20px; }
.card__icon svg { width: 26px; height: 26px; }

/* ── Values list ──────────────────────────────────────────────── */
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; }
.value { background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.value b { display: block; color: var(--ignition-orange); font-size: 16px; margin-bottom: 6px; }
.value span { color: var(--muted); font-size: 13.5px; }

/* ── Logo system ──────────────────────────────────────────────── */
.logo-stage { background: var(--deep-graphite); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(28px,5vw,56px); text-align: center; box-shadow: var(--shadow); }
.logo-stage img { max-height: 200px; margin-inline: auto; }
.logo-variants { margin-top: 22px; }
.logo-variant { background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 26px; display: grid; place-items: center; gap: 14px; min-height: 160px; }
.logo-variant.is-dark { background: #fff; }
.logo-variant.is-mid { background: #2A2A2A; }
.logo-variant img { max-height: 76px; }
.logo-variant small { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }

/* ── Color swatches ───────────────────────────────────────────── */
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 18px; }
.swatch { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: transform .25s var(--ease); position: relative; }
.swatch:hover { transform: translateY(-5px); }
.swatch__chip { height: 130px; display: flex; align-items: flex-end; padding: 14px; }
.swatch__chip .copy-hint { font-size: 11px; font-weight: 800; opacity: 0; transition: opacity .2s; background: rgba(0,0,0,.35); padding: 4px 8px; border-radius: 6px; }
.swatch:hover .copy-hint { opacity: 1; }
.swatch__body { padding: 16px 18px; background: var(--glass); }
.swatch__body b { font-size: 15px; }
.swatch__body code { display: block; color: var(--ignition-orange); font-size: 13px; margin-top: 4px; font-family: 'Montserrat', monospace; letter-spacing: .5px; }
.swatch__body span { color: var(--muted-2); font-size: 12px; }

/* ── Typography specimen ──────────────────────────────────────── */
.type-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 22px; }
.type-card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.type-card .label { color: var(--ignition-orange); font-weight: 800; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 14px; }
.type-card .specimen { font-size: clamp(40px,6vw,72px); font-weight: 900; line-height: 1; }
.type-card .weights { color: var(--muted); margin-top: 18px; font-size: 14px; }
.type-card .weights span { display: inline-block; margin-inline-end: 14px; }

/* ── Voice do/dont ────────────────────────────────────────────── */
.voice { display: grid; grid-template-columns: repeat(2,1fr); gap: 22px; }
.voice__col { border-radius: var(--radius); padding: 28px; border: 1px solid var(--line); }
.voice__col.do { background: rgba(76,175,80,.06); border-color: rgba(76,175,80,.25); }
.voice__col.dont { background: rgba(244,67,54,.05); border-color: rgba(244,67,54,.2); }
.voice__col h4 { font-size: 16px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.voice__col.do h4 { color: #7BD389; }
.voice__col.dont h4 { color: #F0857D; }
.voice__col li { list-style: none; padding-block: 8px; border-bottom: 1px dashed var(--line); color: #D7DBE0; font-size: 14.5px; }
.voice__col li:last-child { border-bottom: 0; }
.keywords { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.keyword { background: var(--glass-2); border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 16px; font-size: 13px; font-weight: 700; }

/* ── Applications gallery ─────────────────────────────────────── */
.apps { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.app-card { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--deep-graphite); min-height: 230px; display: flex; flex-direction: column; }
.app-card img { width: 100%; height: 180px; object-fit: cover; }
.app-card__body { padding: 18px 20px; }
.app-card__body b { font-size: 16px; }
.app-card__body p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.app-card--wide { grid-column: span 2; }

/* ── Downloads ────────────────────────────────────────────────── */
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 18px; }
.download { display: flex; align-items: center; gap: 16px; background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 20px; transition: all .25s var(--ease); }
.download:hover { border-color: rgba(255,145,0,.45); transform: translateY(-3px); }
.download__ic { width: 46px; height: 46px; border-radius: 12px; background: rgba(255,145,0,.12); color: var(--ignition-orange); display: grid; place-items: center; flex: none; }
.download b { font-size: 15px; }
.download span { color: var(--muted); font-size: 12.5px; }

/* ── Contact / form ───────────────────────────────────────────── */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact__info p { color: var(--muted); margin-bottom: 22px; }
.contact__row { display: flex; gap: 14px; align-items: center; padding-block: 12px; border-bottom: 1px solid var(--line); }
.contact__row .k { color: var(--ignition-orange); font-weight: 800; min-width: 90px; font-size: 14px; }
.contact__row .v { font-weight: 600; }
.form { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.field input, .field textarea, .field select {
  width: 100%; background: var(--neural-black); border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 13px 16px; color: #fff; font-family: inherit; font-size: 14.5px; transition: border-color .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ignition-orange); }
.field textarea { resize: vertical; min-height: 110px; }
.form__status { margin-top: 14px; font-size: 14px; font-weight: 700; min-height: 22px; }
.form__status.ok { color: #7BD389; }
.form__status.err { color: #F0857D; }
.form__note { color: var(--muted-2); font-size: 12px; margin-top: 10px; }

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer { padding-block: 60px 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.site-footer h5 { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.site-footer a { color: #C9CDD4; font-size: 14px; display: block; padding-block: 6px; transition: color .2s; }
.site-footer a:hover { color: var(--ignition-orange); }
.site-footer__brand img { height: 36px; margin-bottom: 16px; }
.site-footer__brand p { color: var(--muted); font-size: 14px; max-width: 320px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 26px; color: var(--muted-2); font-size: 12px; font-weight: 700; letter-spacing: 1px; }

/* ── Scroll reveal ────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ── Toast ────────────────────────────────────────────────────── */
.toast {
  position: fixed; inset-block-end: 26px; inset-inline-start: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ignition-orange); color: #000; font-weight: 800; padding: 12px 22px; border-radius: 999px;
  box-shadow: var(--shadow-orange); opacity: 0; pointer-events: none; transition: all .3s var(--ease); z-index: 300; font-size: 14px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 960px) {
  .grid--3, .grid--4, .apps, .type-grid, .voice, .contact { grid-template-columns: 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
  .app-card--wide { grid-column: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .nav__links { display: none; position: absolute; inset-inline: 12px; top: 70px; flex-direction: column; background: rgba(10,10,10,.97); border: 1px solid var(--line); border-radius: 18px; padding: 14px; gap: 4px; }
  .nav__links.open { display: flex; }
  .nav__links a { padding: 12px; }
  .nav__burger { display: block; margin-inline-start: auto; }
  .nav__links { margin-inline-start: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
