/* 1A Forge — styles
   Palette: Forge Black #0B0F14 · Graphite #1B232D · Steel Gray #5D6978
            Warm Ivory #F5F2EA · Pure White #FFFFFF · Forge Orange #FF5A36 */

:root {
  --black: #0B0F14;
  --graphite: #1B232D;
  --steel: #5D6978;
  --steel-soft: #8A97A8;
  --ivory: #F5F2EA;
  --white: #FFFFFF;
  --orange: #FF5A36;
  /* Geist/Space Grotesk don't cover Arabic glyphs; the stack falls through
     per-character to the OS's own Arabic-capable UI font (no extra font
     fetch needed — every major OS ships one). */
  --font-body: 'Geist', -apple-system, 'Segoe UI', Tahoma, Helvetica, Arial, sans-serif;
  --font-head: 'Space Grotesk', -apple-system, 'Segoe UI', Tahoma, Helvetica, Arial, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;
  --gutter: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
main:focus { outline: none; }
h1, h2, h3, p, .proof-item, .tech-tag, .footer-col { overflow-wrap: anywhere; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--black);
  color: var(--ivory);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-width: 320px;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--orange); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.03em; margin: 0; }
p { margin: 0; }
img, svg { max-width: 100%; }
::selection { background: var(--orange); color: var(--black); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; background: var(--orange); color: var(--black);
  padding: 10px 16px; border-radius: 2px; font-weight: 600; z-index: 200; transition: top .15s ease;
}
.skip-link:focus { top: 12px; color: var(--black); }

/* ---------- Nav ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid rgba(105,117,134,.25);
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,15,20,.92);
  backdrop-filter: blur(8px);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ivory); direction: ltr; unicode-bidi: isolate; }
.brand-mark { flex: none; }
.brand-word { font-family: var(--font-head); font-weight: 600; font-size: 17px; letter-spacing: -.02em; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; background: none; border: 1px solid #697586;
  border-radius: 2px; cursor: pointer; padding: 0;
}
.nav-toggle-bar { display: block; height: 2px; width: 18px; margin: 0 auto; background: var(--ivory); }

.nav-links { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 28px); font-size: 14px; color: var(--steel-soft); flex-wrap: wrap; }
.nav-links a:not(.btn) { color: var(--steel-soft); }
.nav-links a:not(.btn):hover { color: var(--ivory); }


.btn {
  display: inline-flex; align-items: center; justify-content: center;
  max-width: 100%; text-align: center; overflow-wrap: anywhere;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 13px 24px; border-radius: 2px; border: 1px solid transparent; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--orange); color: var(--black); }
.btn-primary:hover { background: var(--ivory); color: var(--black); }
.btn-outline { border-color: rgba(138,151,168,.5); color: var(--ivory); background: transparent; }
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }
.nav-cta { padding: 10px 18px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(72px,11vw,150px) var(--gutter) clamp(64px,9vw,120px); }
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(105,117,134,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105,117,134,.09) 1px, transparent 1px);
  background-size: 64px 64px;
}
.hero-inner {
  position: relative; display: flex; gap: clamp(40px,6vw,96px); align-items: flex-end;
  flex-wrap: wrap; max-width: 1280px; margin: 0 auto;
}
.hero-copy { flex: 1 1 520px; min-width: 0; max-width: 100%; }
.eyebrow {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .14em; color: var(--orange);
  text-transform: uppercase; margin-bottom: 26px;
}
.hero h1 {
  font-size: clamp(40px,7vw,88px); line-height: 1.04; margin: 0 0 26px;
}
.caret {
  display: inline-block; width: .22em; height: .74em; background: var(--orange);
  margin-inline-start: .12em; animation: caretBlink 1.1s steps(1) infinite; vertical-align: -0.08em;
}
/* Keep the stationary cursor blink in reduced-motion mode; only its opacity changes. */
@keyframes caretBlink { 0%,55% { opacity: 1; } 56%,100% { opacity: 0; } }
.lead { font-size: clamp(16px,1.6vw,19px); line-height: 1.6; color: var(--steel-soft); max-width: 560px; margin: 0 0 36px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-modules {
  flex: 0 1 340px; min-width: 240px; display: grid; grid-template-columns: repeat(4,1fr); gap: 8px;
}
.hero-module {
  aspect-ratio: 1; border: 1px solid rgba(105,117,134,.35); display: flex; align-items: flex-end; padding: 8px;
}
.hero-module span { font-family: var(--font-mono); font-size: 9px; }
.hero-module.pulse { animation: forgePulse 3.2s ease-in-out infinite; }
.hero-module { color: var(--steel-soft); }
.hero-module.filled { background: var(--graphite); }
.hero-module.pulse { background: var(--orange); color: var(--black); }
@media (prefers-reduced-motion: reduce) { .hero-module.pulse { animation: none; } }
@keyframes forgePulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
@media (max-width: 760px) { .hero-modules { display: none; } }

/* ---------- Sections (shared) ---------- */
.section { padding: clamp(64px,9vw,120px) var(--gutter); }
.section-light { background: var(--ivory); color: var(--black); }
.section-dark { background: var(--black); color: var(--ivory); }
.section-graphite { background: var(--graphite); color: var(--ivory); }
.section-inner { max-width: 1280px; margin: 0 auto; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-bottom: clamp(36px,5vw,60px);
}
.section h2 { font-size: clamp(30px,4vw,46px); }
.section-tag {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--steel);
}
.section-dark .section-tag, .section-graphite .section-tag { color: var(--steel-soft); }
.section-tag.accent { color: var(--orange); }

/* ---------- Proof strip ---------- */
.proof { background: var(--ivory); color: var(--black); padding: 0 var(--gutter); }
.proof-grid {
  max-width: 1280px; margin: 0 auto; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px,1fr));
  border-inline-start: 1px solid rgba(11,15,20,.12);
}
.proof-item {
  border-inline-end: 1px solid rgba(11,15,20,.12); padding: 26px 16px; min-width: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.proof-item .n { font-family: var(--font-mono); font-size: 11px; color: var(--steel); }
.proof-item .t { font-family: var(--font-head); font-weight: 500; font-size: 15px; line-height: 1.35; letter-spacing: -.01em; }

/* ---------- Services ---------- */
.cards-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1px;
  background: rgba(11,15,20,.12); border: 1px solid rgba(11,15,20,.12);
}
.card {
  background: var(--white); padding: 30px 26px; display: flex; flex-direction: column; gap: 12px;
  min-height: 190px; transition: background .15s ease, color .15s ease;
}
.card:hover { background: var(--black); color: var(--ivory); }
.card .n { font-family: var(--font-mono); font-size: 12px; color: #B8371B; }
.card:hover .n { color: var(--orange); }
.card h3 { font-size: 19px; letter-spacing: -.02em; }
.card p { font-size: 14.5px; line-height: 1.6; color: var(--steel); }
.card:hover p { color: var(--steel-soft); }

/* ---------- Industries ---------- */
.industries-inner { display: flex; gap: clamp(40px,6vw,96px); flex-wrap: wrap; }
.industries-intro { flex: 0 1 340px; min-width: 0; }
.industries-intro h2 { margin-bottom: 18px; }
.industries-intro p { font-size: 16px; line-height: 1.6; color: var(--steel-soft); }
.industries-list { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; }
.industry-row {
  display: flex; gap: 22px; align-items: baseline; padding: 22px 4px;
  border-top: 1px solid rgba(105,117,134,.3); transition: border-color .15s ease;
}
.industry-row:hover { border-top-color: var(--orange); }
.industry-row:last-child { border-bottom: 1px solid rgba(105,117,134,.3); }
.industry-row .n { font-family: var(--font-mono); font-size: 12px; color: var(--steel-soft); flex: 0 0 30px; }
.industry-row .txt { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.industry-row .t { font-family: var(--font-head); font-weight: 500; font-size: 19px; letter-spacing: -.02em; }
.industry-row .d { font-size: 14px; line-height: 1.55; color: var(--steel-soft); }

/* ---------- Process ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); gap: 30px; }
.step { display: flex; flex-direction: column; gap: 12px; border-top: 2px solid var(--orange); padding-top: 18px; }
.step .n { font-family: var(--font-mono); font-size: 12px; color: var(--steel-soft); }
.step h3 { font-size: 21px; letter-spacing: -.02em; }
.step p { font-size: 14.5px; line-height: 1.6; color: var(--steel-soft); }
.process-note {
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.8; color: var(--steel-soft);
  margin: clamp(36px,5vw,52px) 0 0; max-width: 720px;
}

/* ---------- Technology ---------- */
.tech-section { padding-top: 0; }
.tech-inner {
  border-top: 1px solid rgba(11,15,20,.12); padding-top: 36px;
  display: flex; gap: 28px; flex-wrap: wrap; align-items: baseline;
}
.tech-tags { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; min-width: 0; }
.tech-tag {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--graphite);
  border: 1px solid rgba(11,15,20,.18); padding: 7px 14px; border-radius: 2px;
}

/* ---------- About ---------- */
.about-inner { max-width: 880px; margin: 0 auto; }
.about-lead {
  font-family: var(--font-head); font-weight: 500; font-size: clamp(21px,3vw,32px); line-height: 1.35;
  letter-spacing: -.02em; margin: 22px 0;
}
.about-body { font-size: 16px; line-height: 1.65; color: var(--steel-soft); }

/* ---------- Contact ---------- */
.contact-inner {
  max-width: 1280px; margin: 0 auto; display: flex; gap: clamp(40px,6vw,96px);
  flex-wrap: wrap; align-items: flex-start;
}
.contact-intro { flex: 1 1 400px; min-width: 0; }
.contact-intro h2 { font-size: clamp(34px,5vw,58px); line-height: 1.08; margin-bottom: 18px; }
.contact-intro p { font-size: 17px; line-height: 1.6; color: var(--steel-soft); max-width: 440px; }
.contact-form { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--steel-soft); }
.contact-form input, .contact-form textarea {
  background: var(--black); border: 1px solid #697586; color: var(--ivory); width: 100%; min-width: 0;
  font-family: var(--font-body); font-size: 16px; padding: 12px 14px; border-radius: 2px; resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--orange); }
.contact-form [aria-invalid="true"] { border-color: var(--orange); }
.field-error { color: var(--orange); font-family: var(--font-body); font-size: 12.5px; text-transform: none; letter-spacing: 0; }
.field-sent { font-family: var(--font-mono); font-size: 12.5px; color: var(--ivory); }
.field-sent:not(:empty) { padding: 16px; border: 1px solid var(--orange); background: var(--black); scroll-margin-top: 120px; }
.contact-form button { align-self: flex-start; }

/* ---------- Footer ---------- */
.footer { background: var(--black); color: var(--steel-soft); padding: 52px var(--gutter) 36px; border-top: 1px solid rgba(105,117,134,.25); }
.footer-inner { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 36px; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-brand { display: flex; flex-direction: column; gap: 12px; max-width: 300px; }
.footer-brand .brand { color: var(--ivory); }
.footer-brand p { font-size: 13.5px; line-height: 1.6; }
.footer-cols { display: flex; gap: clamp(40px,6vw,96px); flex-wrap: wrap; font-size: 13.5px; min-width: 0; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--steel-soft); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid rgba(105,117,134,.2); padding-top: 22px;
  font-family: var(--font-mono); font-size: 12px; color: var(--steel-soft);
}

/* ---------- Privacy page ---------- */
.privacy-page { padding-top: clamp(48px,7vw,88px); }
.privacy-inner { max-width: 760px; margin: 0 auto; }
.privacy-back { display: inline-block; margin-bottom: 28px; font-family: var(--font-mono); font-size: 13px; color: var(--steel-soft); }
.privacy-page h1 { font-size: clamp(30px,4vw,44px); margin-bottom: 10px; }
.privacy-updated { font-family: var(--font-mono); font-size: 12px; color: var(--steel-soft); margin-bottom: 28px; }
.privacy-intro { font-size: 16px; line-height: 1.6; color: var(--steel-soft); margin-bottom: 8px; }
.privacy-page h2 { font-size: 19px; margin: 34px 0 10px; letter-spacing: -.01em; }
.privacy-page p { font-size: 15px; line-height: 1.65; color: var(--steel-soft); }

/* ---------- RTL ---------- */
html[dir="rtl"] .caret { margin-inline-start: .12em; margin-inline-end: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav { flex-wrap: wrap; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: flex; position: static; width: 100%; inset-inline: 0; top: 100%;
    background: var(--black); border-bottom: 1px solid rgba(105,117,134,.25);
    flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px var(--gutter) 20px;
  }
  .nav-enhanced .nav-links { display: none; position: absolute; max-height: calc(100dvh - 86px); overflow-y: auto; }
  .nav-enhanced .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 10px 0; width: 100%; }
  .lang-switch { padding: 8px 0; }
  .nav-cta { margin-top: 8px; }
}
@media (max-width: 520px) {
  .proof-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* Keep the original native selector; navigation loads one complete language page. */
.lang-switch select {
  min-width: 64px; min-height: 38px; max-width: 100%;
  background: var(--black); color: var(--steel-soft); border: 1px solid #697586;
  border-radius: 2px; padding: 6px 8px; font-family: var(--font-mono); font-size: 12px; cursor: pointer;
}
.lang-switch select:hover, .lang-switch select:focus { color: var(--ivory); border-color: var(--orange); }
.lang-switch select option { background: var(--black); color: var(--ivory); }
.language-fallback { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.footer-langs { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.footer-langs a { padding: 6px 0; }
.footer-langs a[aria-current] { text-decoration: underline; text-underline-offset: 4px; }
.section, .hero { scroll-margin-top: 84px; }
.about-inner > .section-tag, .tech-inner > .section-tag { font-family: var(--font-mono); font-size: 12px; font-weight: 400; letter-spacing: .12em; }
.contact-form > .field { min-width: 0; }
.contact-email { display: inline-block; margin-top: 18px; font-size: 19px; text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
.contact-intro .contact-privacy { margin-top: 18px; font-size: 14px; }
.contact-privacy a, .privacy-page p a { text-decoration: underline; text-underline-offset: 3px; }
.contact-required { color: var(--steel-soft); font-size: 13px; }
.contact-help { color: var(--steel-soft); font-size: 13px; line-height: 1.6; }
.contact-help p + p { margin-top: 6px; }
.contact-help a { text-decoration: underline; text-underline-offset: 3px; }
.contact-draft { display: flex; flex-direction: column; gap: 12px; }
.draft-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.field-error:empty, .field-sent:empty { display: none; }
.field-error, .field-sent { line-height: 1.6; }
@media (max-width: 1024px) { .cards-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 860px) {
  .lang-switch { max-width: 100%; }
}
@media (max-width: 640px) {
  .cards-grid { grid-template-columns: minmax(0,1fr); }
  .tech-tags { flex-basis: 100%; }
  .hero-ctas > .btn { width: 100%; }
  .card { padding: 26px 20px; }
}

@media (max-width: 860px) { .nav:not(.nav-enhanced) { position: relative; } }

/* Email addresses are revealed only after an explicit visitor action. */
.email-reveal { font: inherit; color: inherit; background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: start; }
.revealed-email { display: inline-block; overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 3px; }
.contact-fallback .email-control { display: block; margin-top: 18px; font-size: 19px; }
#contact-challenge { min-width: 0; max-width: 100%; }
