/* TriTech Solutions — shared styles for / (English) and /ar/ (Arabic).
   Layout uses logical properties (inline-start/end) so one stylesheet serves both directions. */

:root {
  --bg: #F6F7FA;
  --surface: #FFFFFF;
  --ink: #0E1530;
  --ink-soft: #3A4259;
  --body: #4A5268;
  --subtle: #687087;
  --line: #E2E5EC;
  --line-strong: #CBD1DD;
  --accent: #1E60FF;
  --accent-hover: #1447C7;
  --accent-tint: rgba(30, 96, 255, 0.08);

  --band: #0E1530;
  --band-ink: #F2F4FA;
  --band-body: #B3BAD3;
  --band-line: rgba(242, 244, 250, 0.14);
  --band-accent: #7AA2FF;

  --radius: 8px;
  --radius-lg: 12px;
  --gutter: clamp(20px, 4.5vw, 64px);
  --header-h: 76px;

  --font: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.75; }

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, figure { margin: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #FFFFFF;
}
.skip-link:focus { top: 12px; color: #FFFFFF; }

.container {
  width: 100%;
  max-width: calc(1312px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
html[lang="ar"] .btn { font-size: 17px; }
.btn svg { width: 16px; height: 16px; flex: none; }
[dir="rtl"] .btn .icon-arrow { transform: scaleX(-1); }

.btn-primary { background: var(--accent); color: #FFFFFF; }
.btn-primary:hover { background: var(--accent-hover); color: #FFFFFF; }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }

.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }

.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
html[lang="ar"] .btn-sm { font-size: 16px; }

.button-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Shared type ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: currentColor;
}
html[lang="ar"] .eyebrow { font-family: var(--font-ar); font-size: 15px; letter-spacing: 0; text-transform: none; }

.section { padding-block: clamp(72px, 9vw, 120px); }

.section-head { display: flex; flex-direction: column; gap: 20px; max-width: 760px; }

.section-title {
  font-size: clamp(32px, 3.4vw, 46px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
html[lang="ar"] .section-title { line-height: 1.4; letter-spacing: 0; }

.section-intro {
  max-width: 640px;
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--body);
  text-wrap: pretty;
}
html[lang="ar"] .section-intro { line-height: 1.85; }

.block { margin-top: clamp(72px, 8vw, 104px); }

.block-title {
  margin-bottom: 32px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  text-wrap: balance;
}
html[lang="ar"] .block-title { letter-spacing: 0; line-height: 1.5; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 247, 250, 0.94);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand img { width: auto; height: 36px; }

.nav { display: flex; align-items: center; gap: 36px; }
.nav a { color: var(--ink-soft); font-size: 15px; font-weight: 500; }
html[lang="ar"] .nav a { font-size: 16px; }
.nav a:hover { color: var(--ink); }
.nav .nav-cta { display: none; }

.header-actions { display: flex; align-items: center; gap: 20px; }

.lang-link { padding: 10px 2px; color: var(--ink-soft); font-size: 15px; font-weight: 500; }
.lang-link:hover { color: var(--ink); }
.lang-link:lang(ar) { font-family: var(--font-ar); }
.lang-link:lang(en) { font-family: var(--font); }

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.menu-toggle svg { width: 20px; height: 20px; }

/* ---------- Hero ---------- */

.hero { position: relative; overflow: hidden; }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 610px) minmax(0, 1fr);
  gap: 64px;
  padding-block: 96px 64px;
}

.hero-copy { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 28px; }

.hero-title {
  font-size: clamp(40px, 4.2vw, 60px);
  line-height: 1.07;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
html[lang="ar"] .hero-title { font-size: clamp(36px, 3.9vw, 56px); line-height: 1.32; letter-spacing: 0; }

.hero-lead { font-size: clamp(17px, 1.35vw, 19px); line-height: 1.6; color: var(--body); text-wrap: pretty; }
html[lang="ar"] .hero-lead { font-size: clamp(18px, 1.4vw, 20px); line-height: 1.8; }

.hero-copy .button-row { margin-top: 8px; }

.hero-visual { position: relative; min-height: 560px; }
.hero-visual .frame { position: absolute; top: -40px; inset-inline-start: 0; width: 900px; }

/* ---------- Screenshot frame ---------- */

.frame {
  overflow: hidden;
  border: 1px solid #DDE1EA;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(14, 21, 48, 0.06), 0 30px 70px rgba(14, 21, 48, 0.14);
}
.frame img { width: 100%; }

.frame-bar {
  display: flex;
  align-items: center;
  height: 36px;
  padding-inline: 16px;
  border-bottom: 1px solid #EEF0F5;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--subtle);
  white-space: nowrap;
  overflow: hidden;
}
html[lang="ar"] .frame-bar { font-family: var(--font-ar); font-size: 13px; }
html[lang="ar"] .frame-bar [dir="ltr"] { font-family: var(--mono); font-size: 12px; }

/* ---------- Proof strip ---------- */

.proof { padding-bottom: clamp(72px, 8vw, 104px); }

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.proof-item { display: flex; flex-direction: column; gap: 6px; padding-top: 22px; border-top: 1px solid var(--line-strong); }

.proof-figure {
  font-family: var(--mono);
  font-size: clamp(34px, 3vw, 44px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.proof-label { font-size: 15px; line-height: 1.45; color: var(--body); }
html[lang="ar"] .proof-label { font-size: 16px; line-height: 1.6; }

.proof-note { margin-top: 22px; font-size: 13px; color: var(--subtle); }
html[lang="ar"] .proof-note { font-size: 14px; }

/* ---------- Atriom ---------- */

.section-atriom { background: var(--surface); border-block: 1px solid var(--line); }

.atriom-head {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  align-items: end;
}
.atriom-summary { display: flex; flex-direction: column; gap: 28px; }

.atriom-visual { position: relative; margin-top: 64px; padding-bottom: 120px; }
.atriom-visual .frame-main { width: 76%; }
.atriom-visual .frame-portal { position: absolute; bottom: 0; inset-inline-end: 0; width: 44%; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; border-top: 1px solid var(--line-strong); }
.step-num { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--accent); }
.step h4 { font-size: 18px; font-weight: 600; line-height: 1.35; }
.step p { font-size: 15px; line-height: 1.6; color: var(--body); }
html[lang="ar"] .step p { font-size: 16px; line-height: 1.75; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; }

.surfaces {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.surface-for {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--subtle);
}
html[lang="ar"] .surface-for { font-family: var(--font-ar); font-size: 14px; letter-spacing: 0; text-transform: none; }
.surface h4 { margin-bottom: 6px; font-size: 17px; font-weight: 600; }
.surface p { font-size: 15px; line-height: 1.6; color: var(--body); }
html[lang="ar"] .surface p { font-size: 16px; line-height: 1.75; }

.checklist { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.checklist li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-block: 14px;
  border-top: 1px solid var(--line);
  font-size: 17px;
}
.checklist li:last-child { border-bottom: 1px solid var(--line); }
.checklist svg { flex: none; width: 20px; height: 20px; color: var(--accent); }

/* ---------- Services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}
.service {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--accent);
}
.service-icon svg { width: 22px; height: 22px; }
.service h3 { margin-top: 10px; font-size: 21px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
html[lang="ar"] .service h3 { line-height: 1.5; letter-spacing: 0; }
.service p { font-size: 16px; line-height: 1.65; color: var(--body); }
html[lang="ar"] .service p { font-size: 17px; line-height: 1.8; }

/* ---------- How we build (dark band) ---------- */

.section-band { background: var(--band); color: var(--band-ink); }
.section-band .eyebrow { color: var(--band-accent); }
.section-band .section-intro { color: var(--band-body); }

.standards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 64px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}
.standard { display: flex; flex-direction: column; gap: 10px; padding-top: 24px; border-top: 1px solid var(--band-line); }
.standard h3 { font-size: 20px; font-weight: 600; line-height: 1.35; }
.standard p { font-size: 16px; line-height: 1.65; color: var(--band-body); }
html[lang="ar"] .standard p { font-size: 17px; line-height: 1.8; }

.process {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.process li { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; border-top: 1px solid var(--band-line); }
.process .step-num { color: var(--band-accent); }
.process h4 { font-size: 18px; font-weight: 600; line-height: 1.35; }
.process p { font-size: 15px; line-height: 1.6; color: var(--band-body); }
html[lang="ar"] .process p { font-size: 16px; line-height: 1.75; }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  align-items: start;
}
.contact-copy { display: flex; flex-direction: column; gap: 20px; }

.channels { margin: 20px 0 0; padding: 0; list-style: none; }
.channels li { border-top: 1px solid var(--line); }
.channels li:last-child { border-bottom: 1px solid var(--line); }
.channel {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  color: var(--ink);
  font-size: 16px;
}
a.channel:hover { color: var(--accent-hover); }
.channel svg { flex: none; width: 20px; height: 20px; color: var(--accent); }
.channel-value { margin-inline-start: auto; color: var(--body); }
a.channel:hover .channel-value { color: inherit; }

.form-card {
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.form { display: grid; gap: 20px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field label,
.field legend { padding: 0; font-size: 14px; font-weight: 500; color: var(--ink); }
html[lang="ar"] .field label,
html[lang="ar"] .field legend { font-size: 15px; }
.field legend { margin-bottom: 8px; }

.input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(30, 96, 255, 0.18); }
textarea.input { min-height: 140px; resize: vertical; }

.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 15px;
  cursor: pointer;
}
.choice input:checked + span { border-color: var(--accent); background: var(--accent-tint); color: var(--accent-hover); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.hp { position: absolute; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form-status { font-size: 15px; color: var(--body); }
.form-status[data-state="ok"] { color: #0F7B4B; }
.form-status[data-state="error"] { color: #B42318; }

/* ---------- Footer ---------- */

.site-footer { padding-block: 56px 32px; border-top: 1px solid var(--line); background: var(--surface); }

.footer-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 32px; }
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-brand img { width: auto; height: 36px; }
.footer-brand p { font-size: 15px; color: var(--body); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 32px; padding-top: 6px; }
.footer-nav a { color: var(--ink-soft); font-size: 15px; }
.footer-nav a:hover { color: var(--ink); }
.footer-social { display: flex; gap: 10px; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
}
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--subtle);
}

/* ---------- Responsive ---------- */

@media (max-width: 1023px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 48px; padding-block: 64px 56px; }
  .hero-copy { max-width: 640px; }
  .hero-visual { min-height: 0; }
  .hero-visual .frame { position: relative; top: 0; width: max(100%, 560px); }

  .atriom-head,
  .split,
  .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }

  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services-grid { grid-template-columns: minmax(0, 1fr); }
  .standards { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  :root { --header-h: 64px; }

  .menu-toggle { display: inline-flex; }

  .nav {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px var(--gutter) 20px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
  }
  .nav.is-open { display: flex; }
  .nav a { padding-block: 14px; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav .nav-cta { display: inline-flex; margin-top: 16px; padding-block: 0; border-bottom: 0; color: #FFFFFF; }
}

@media (max-width: 720px) {
  .proof-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }

  .atriom-visual { padding-bottom: 0; }
  .atriom-visual .frame-main { width: 100%; }
  .atriom-visual .frame-portal { position: relative; width: 86%; margin-top: -40px; margin-inline-start: auto; }

  .steps,
  .surfaces,
  .process,
  .field-row { grid-template-columns: minmax(0, 1fr); }

  .service { padding: 24px; }
}

@media (max-width: 520px) {
  .header-cta { display: none; }
  .hero-copy .button-row .btn,
  .atriom-summary .button-row .btn { flex: 1 1 100%; }
  .form-foot .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
