/* ==========================================================================
   ASLcode — design tokens
   Saudi tech identity (cf. Elm, Foodics, Thiqah): deep navy ink, Saudi green
   primary, sand accent, IBM Plex type, flat surfaces, Sadu-weave motif.
   ========================================================================== */
:root {
  --bg: #FFFFFF;
  --bg-alt: #F7F4EE;          /* warm sand tint */
  --ink: #0B1E3F;             /* deep navy */
  --ink-soft: #4A5568;
  --navy: #0B1E3F;
  --navy-2: #13294F;
  --green: #006C35;           /* Saudi green */
  --green-dark: #00552A;
  --sand: #C9A96E;
  --border: #E4DFD4;
  --border-dark: rgba(255,255,255,0.14);

  --font: 'IBM Plex Sans', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --radius: 4px;
  --dir: 1;      /* flips off-canvas nav in RTL */
  --end: right;  /* inline-end side, for gradients */

  /* Sadu weave band: alternating green / sand triangles */
  --sadu: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='8'%3E%3Cpath d='M0 8 6 0 12 8z' fill='%23006C35'/%3E%3Cpath d='M12 0h12l-6 8z' fill='%23C9A96E'/%3E%3C/svg%3E");
  /* Najdi diamond lattice for large surfaces */
  --lattice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M24 2 46 24 24 46 2 24z' fill='none' stroke='%23C9A96E' stroke-width='1'/%3E%3Cpath d='M24 16 32 24 24 32 16 24z' fill='%23C9A96E'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  counter-reset: section;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
h1, h2, h3, h4 { font-weight: 600; margin: 0 0 0.5em; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 3.4vw, 42px); max-width: 22ch; }
h3 { font-size: 19px; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--ink-soft); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.center h2 { margin-left: auto; margin-right: auto; }
.center .btn { margin-top: 12px; }
.small { font-size: 14px; }
.hl { color: var(--green); }
.section { padding: 104px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 760px; margin: 0 0 56px; }

/* Numbered mono labels: "01 / Services" */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--green); margin-bottom: 18px;
}
.eyebrow::before {
  counter-increment: section; content: counter(section, decimal-leading-zero);
  color: var(--ink); padding-inline-end: 10px; border-inline-end: 1px solid var(--border);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: var(--radius);
  font: 600 15px/1 var(--font); border: 1px solid transparent; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-sm { padding: 11px 18px; font-size: 14px; }

/* ---------------- Header ---------------- */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--border); transition: box-shadow .3s ease; }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(11,30,63,.08); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; transition: height .3s ease; }
.scrolled .header-inner { height: 64px; }
.brand { font-weight: 700; font-size: 23px; letter-spacing: -0.03em; color: var(--ink); }
.brand span { color: var(--green); }
.brand .logo-img { display: block; height: 36px; width: auto; max-width: 200px; object-fit: contain; }
.scrolled .brand .logo-img { height: 32px; }
.site-footer .brand .logo-img { height: 40px; }
.logo-invert { filter: brightness(0) invert(1); }
.main-nav { display: flex; align-items: center; gap: 24px; white-space: nowrap; }
.main-nav > a:not(.btn) { font-size: 15px; font-weight: 500; color: var(--ink); padding: 6px 0; border-bottom: 2px solid transparent; transition: border-color .2s ease, color .2s ease; }
.main-nav > a:not(.btn):hover, .main-nav > a.active { border-bottom-color: var(--green); }
.main-nav > a.active { color: var(--green); }
/* Language switcher */
.lang-switch { display: flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.lang-switch a { padding: 6px 10px; font-size: 13px; font-weight: 600; line-height: 1.2; color: var(--ink-soft); }
.lang-switch a + a { border-inline-start: 1px solid var(--border); }
.lang-switch a:hover { color: var(--ink); background: var(--bg-alt); }
.lang-switch a.active { background: var(--ink); color: #fff; }
.lang-switch a[lang="ar"] { font-family: 'IBM Plex Sans Arabic', var(--font); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 10px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); }

/* ---------------- Hero ---------------- */
.hero { position: relative; padding: 88px 0 96px; background: var(--bg); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.hero-content { position: relative; z-index: 1; }
.hero-visual { position: relative; padding: 28px 0 40px; }
.hero-visual::before {
  content: ''; position: absolute; inset: 0 -40px -10px 40px; background: var(--lattice); opacity: .5;
  -webkit-mask-image: radial-gradient(closest-side, #000, transparent); mask-image: radial-gradient(closest-side, #000, transparent);
}
[dir="rtl"] .hero-visual::before { inset: 0 40px -10px -40px; }
.hero-photo { position: relative; margin: 0; border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 4.4; box-shadow: 0 30px 60px -20px rgba(11,30,63,.45); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.08); transition: transform 1.6s cubic-bezier(.2,.7,.2,1); }
.hero-visual.is-in .hero-photo img { transform: scale(1); }
.hero-photo::after { content: ''; position: absolute; inset: auto 0 0 0; height: 8px; background: var(--sadu) repeat-x; }
.float-card {
  position: absolute; background: #fff; border-radius: 8px; padding: 14px 16px;
  box-shadow: 0 18px 40px -12px rgba(11,30,63,.35); border: 1px solid var(--border);
  translate: calc(var(--px, 0) * 1px) calc(var(--py, 0) * 1px);
  animation: float 6s ease-in-out infinite;
}
.fc-chart { top: 64px; inset-inline-start: -48px; width: 220px; }
.fc-toast { top: 46%; inset-inline-end: -36px; display: flex; gap: 12px; align-items: center; animation-delay: -2s; }
.fc-users { bottom: 12px; inset-inline-start: 24px; animation-delay: -4s; }
.fc-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--ink-soft); }
.fc-value { display: block; font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fc-delta { font-family: var(--mono); font-size: 12px; color: var(--green); }
.spark { display: block; width: 100%; height: 40px; margin-top: 6px; }
.spark path { fill: none; stroke: var(--green); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 200; stroke-dashoffset: 200; transition: stroke-dashoffset 1.6s ease .4s; }
.hero-visual.is-in .spark path { stroke-dashoffset: 0; }
.fc-toast strong { display: block; font-size: 14px; }
.fc-toast span { font-size: 12px; color: var(--ink-soft); font-family: var(--mono); }
.fc-ok { width: 34px; height: 34px; border-radius: 50%; background: #e6f3ec; color: var(--green); display: grid; place-items: center; flex: none; }
.fc-ok .icon { width: 18px; height: 18px; stroke-width: 2.5; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulse 2s infinite; }
.hero h1 { font-size: clamp(38px, 5vw, 68px); line-height: 1.02; letter-spacing: -0.035em; margin-bottom: 28px; }
.hero .lead { color: var(--ink); font-size: 21px; font-weight: 500; max-width: 36ch; }
.hero p { font-size: 17px; max-width: 62ch; }
.hero-actions { display: flex; gap: 12px; margin: 32px 0; flex-wrap: wrap; }
.center .hero-actions { justify-content: center; }
.hero-tags { font-family: var(--mono); font-size: 13px !important; letter-spacing: 0.04em; color: var(--ink-soft); }

/* ---------------- Strip / chips ---------------- */
.strip { padding: 72px 0 64px; background: var(--bg-alt); position: relative; }
.strip::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--sadu) repeat-x; }
.strip h2 { font-size: 26px; max-width: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.center .chips { justify-content: center; }
.chip { padding: 8px 14px; border-radius: var(--radius); font-size: 14px; font-weight: 500; background: #fff; border: 1px solid var(--border); color: var(--ink); }

/* ---------------- Grids (hairline, flat) ---------------- */
.grid-3 {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border); border-inline-start: 1px solid var(--border);
}
.card {
  padding: 36px 32px; display: flex; flex-direction: column; background: transparent;
  border-inline-end: 1px solid var(--border); border-bottom: 1px solid var(--border);
  position: relative; transition: background .2s ease;
}
.card::before { content: ''; position: absolute; inset-inline-start: -1px; top: -1px; width: 0; height: 3px; background: var(--green); transition: width .25s ease; }
.card:hover { background: #fff; }
.card:hover::before { width: calc(100% + 2px); }
.section-alt .card:hover { background: #fff; }
.card-tagline { color: var(--ink); font-weight: 500; }
.card-tags { font-family: var(--mono); font-size: 12px; color: var(--green); margin-bottom: 1.2em; }
.card-link { margin-top: auto; font-weight: 600; color: var(--green); }
.card-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.section-dark { background: var(--navy); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: rgba(255,255,255,0.72); }
.section-dark .eyebrow { color: var(--sand); }
.section-dark .eyebrow::before { color: #fff; border-color: var(--border-dark); }
.section-dark .grid-3 { border-color: var(--border-dark); }
.section-dark .card { border-color: var(--border-dark); }
.section-dark .card:hover { background: var(--navy-2); }
.section-dark .card::before { background: var(--sand); }
.section-dark .center { margin-top: 48px; }

/* ---------------- Steps ---------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 2px solid var(--border); position: relative; }
.steps::before { content: ''; position: absolute; top: -2px; inset-inline: 0; height: 2px; background: var(--green); transform: scaleX(var(--fill, 1)); transform-origin: var(--start, left); transition: transform 1.4s cubic-bezier(.2,.7,.2,1); }
[dir="rtl"] .steps::before { --start: right; }
.step-num { transition: color .3s ease; }
.steps[data-reveal] .step { opacity: 0; transform: translateY(14px); }
.steps .step { transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.steps.is-in .step { opacity: 1; transform: none; }
.steps .step:nth-child(2) { transition-delay: .15s; } .steps .step:nth-child(3) { transition-delay: .3s; }
.steps .step:nth-child(4) { transition-delay: .45s; } .steps .step:nth-child(5) { transition-delay: .6s; } .steps .step:nth-child(6) { transition-delay: .75s; }
.step { padding: 28px; padding-inline-start: 0; border-bottom: 1px solid var(--border); }
.step:not(:nth-child(3n+1)) { padding-inline-start: 28px; border-inline-start: 1px solid var(--border); }
.step-num { display: block; font-family: var(--mono); font-size: 13px; color: var(--green); margin-bottom: 14px; }

/* ---------------- Split / panel ---------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; }
.check-list li { padding: 12px 0; padding-inline-start: 22px; position: relative; font-weight: 500; border-bottom: 1px solid var(--border); }
.check-list li::before { content: ''; position: absolute; inset-inline-start: 0; top: 20px; width: 8px; height: 8px; background: var(--green); transform: rotate(45deg); }
.quote { font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; color: var(--ink); line-height: 1.3; letter-spacing: -0.02em; margin: 36px 0; padding-inline-start: 24px; border-inline-start: 3px solid var(--sand); }

.cta-band { background: var(--green); position: relative; }
.cta-band::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--sadu) repeat-x; }
.cta-band h2, .cta-band p, .cta-band strong { color: #fff; }
.cta-band .btn-primary { background: #fff; color: var(--green); }
.cta-band .btn-primary:hover { background: var(--bg-alt); }
.cta-band .btn-outline { border-color: #fff; color: #fff; }
.cta-band .btn-outline:hover { background: #fff; color: var(--green); }

/* ---------------- Contact ---------------- */
.contact { background: linear-gradient(var(--bg-alt), var(--bg-alt)) top / 100% 55% no-repeat, var(--bg); }
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 64px; align-items: start; }
.contact-intro { position: sticky; top: 110px; }
.contact-line { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-top: 1px solid var(--border); transition: color .2s ease; }
.contact-line:last-child { border-bottom: 1px solid var(--border); }
.contact-line .card-icon { margin: 0; width: 44px; height: 44px; }
.contact-line small { display: block; font-size: 12px; color: var(--ink-soft); }
.contact-line strong { font-size: 16px; }
.contact-line:hover { color: var(--green); }
.contact-line:hover .card-icon { background: var(--green); color: #fff; }
.contact-intro p:last-of-type { margin-bottom: 28px; }

.form-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 40px;
  box-shadow: 0 30px 60px -30px rgba(11,30,63,.25); position: relative; overflow: hidden;
}
.form-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--sadu) repeat-x; background-size: 18px 6px; }

/* Project type: native radios styled as selectable tiles */
.type-picker { border: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
.type-picker legend, .field label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 10px; padding: 0; }
.optional { font-weight: 400; font-size: 12px; color: var(--ink-soft); margin-inline-start: 6px; }
.type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.type-option { position: relative; cursor: pointer; }
.type-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.type-tile {
  display: flex; flex-direction: column; gap: 8px; height: 100%; min-height: 92px;
  padding: 14px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg);
  font-size: 13px; font-weight: 500; line-height: 1.35; color: var(--ink);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.type-tile .icon { width: 20px; height: 20px; color: var(--ink-soft); transition: color .2s ease; }
.type-option:hover .type-tile { border-color: var(--sand); transform: translateY(-2px); }
.type-option input:focus-visible + .type-tile { outline: 2px solid var(--green); outline-offset: 2px; }
.type-option input:checked + .type-tile { border-color: var(--green); background: #eef7f1; box-shadow: inset 0 0 0 1px var(--green); }
.type-option input:checked + .type-tile .icon { color: var(--green); }
.type-option input:checked + .type-tile::after {
  content: ''; position: absolute; top: 10px; inset-inline-end: 10px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
  animation: pop .25s ease;
}

/* Text fields */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field input, .field textarea {
  width: 100%; min-height: 50px; padding: 13px 16px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg);
  font: 16px var(--font); color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.field input:hover, .field textarea:hover { border-color: #cfc6b3; }
.field input:focus, .field textarea:focus { outline: none; background: #fff; border-color: var(--green); box-shadow: 0 0 0 4px rgba(0,108,53,.12); }
.field.has-error input, .field.has-error textarea { border-color: #c2410c; background: #fff; }
.field.has-error input:focus, .field.has-error textarea:focus { box-shadow: 0 0 0 4px rgba(194,65,12,.12); }
.field.is-valid input { border-color: #b7dcc7; }
.field-error { margin: 6px 0 0; font-size: 13px; color: #b3261e; min-height: 0; }
.field-error:empty { display: none; }
.field-error::before { content: '!'; display: inline-grid; place-items: center; width: 16px; height: 16px; margin-inline-end: 6px; border-radius: 50%; background: #b3261e; color: #fff; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.field-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 6px; }
.field-hint { margin: 0; font-size: 13px; }
.char-count { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); white-space: nowrap; }

/* Submit */
.form-submit { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.btn-lg { padding: 16px 30px; font-size: 16px; min-height: 52px; }
.form-note { margin: 0; font-size: 13px; }
.spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.is-loading .spinner { display: inline-block; }
.is-loading .arrow { display: none; }
.is-loading { pointer-events: none; opacity: .85; }

/* Success state */
.form-success { text-align: center; padding: 40px 12px; }
.form-success p { max-width: 42ch; margin: 0 auto 24px; }
.success-mark { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 20px; display: grid; place-items: center; background: var(--green); color: #fff; animation: pop .5s cubic-bezier(.2,.7,.2,1.4); }
.success-mark .icon { width: 34px; height: 34px; stroke-width: 2.5; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s .3s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #e6f3ec; color: #00552A; border: 1px solid #b7dcc7; }
.alert-error { background: #fdecec; color: #8a2e28; border: 1px solid #f5c6c3; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.8); padding-top: 72px; position: relative; }
.site-footer::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--sadu) repeat-x; }
.site-footer .brand { color: #fff; display: inline-block; margin-bottom: 14px; }
.site-footer .brand span { color: var(--sand); }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.site-footer h4 { color: var(--sand); font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 18px; }
.site-footer p { color: rgba(255,255,255,0.65); font-size: 14px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: rgba(255,255,255,0.8); font-size: 14px; }
.footer-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { border-top: 1px solid var(--border-dark); padding: 20px 0; font-size: 13px; color: rgba(255,255,255,0.55); }
.footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-link { color: rgba(255,255,255,0.45); font-size: 12px; }

/* ---------------- Icons ---------------- */
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-icon {
  width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 22px; flex: none;
  border-radius: 6px; background: #e6f3ec; color: var(--green);
  transition: background .3s ease, color .3s ease, transform .3s ease;
}
.card:hover .card-icon, .ai-item:hover .card-icon { background: var(--green); color: #fff; transform: translateY(-3px) rotate(-4deg); }
.section-dark .card-icon { background: rgba(201,169,110,.14); color: var(--sand); }
.section-dark .ai-item:hover .card-icon { background: var(--sand); color: var(--navy); }

/* ---------------- Marquee ---------------- */
.marquee {
  --gap: 16px; display: flex; overflow: hidden; gap: var(--gap); margin-top: 36px; padding: 6px 0 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; align-items: center; gap: var(--gap); flex: none; min-width: 100%; justify-content: space-around; margin: 0; padding: 0; list-style: none; animation: marquee 40s linear infinite; }
.marquee-reverse .marquee-track { animation-direction: reverse; animation-duration: 55s; }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* Offerings row: cards with an icon tile */
.mq-card {
  display: flex; align-items: center; gap: 14px; white-space: nowrap;
  padding: 12px 22px 12px 12px; padding-inline: 12px 22px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  font-size: 16px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em;
  box-shadow: 0 1px 2px rgba(11,30,63,.04), 0 10px 24px -14px rgba(11,30,63,.22);
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.mq-icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 8px; background: #e6f3ec; color: var(--green); transition: background .25s ease, color .25s ease; }
.mq-icon .icon { width: 22px; height: 22px; }
.mq-card:hover { border-color: #b7dcc7; transform: translateY(-3px); box-shadow: 0 1px 2px rgba(11,30,63,.04), 0 18px 32px -16px rgba(0,108,53,.35); }
.mq-card:hover .mq-icon { background: var(--green); color: #fff; }

/* Technology row: logo-strip style, icon + label divided by sand diamonds */
#technology .marquee { --gap: 44px; margin: 12px 0 20px; padding: 18px 0; border-block: 1px solid var(--border); }
.mq-item { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 17px; font-weight: 500; color: var(--ink-soft); position: relative; transition: color .2s ease; }
.mq-item .icon { width: 22px; height: 22px; color: var(--ink); opacity: .55; transition: color .2s ease, opacity .2s ease; }
.mq-item::after { content: ''; position: absolute; inset-inline-end: calc(var(--gap) / -2 - 3px); width: 6px; height: 6px; background: var(--sand); transform: rotate(45deg); }
.mq-item:hover { color: var(--ink); }
.mq-item:hover .icon { color: var(--green); opacity: 1; }

/* ---------------- Buttons & links: motion ---------------- */
.btn .arrow, .card-link .arrow { display: inline-block; transition: transform .25s ease; }
.btn:hover .arrow, .card-link:hover .arrow { transform: translateX(calc(4px * var(--dir))); }
[dir="rtl"] .btn:hover .arrow, [dir="rtl"] .card-link:hover .arrow { transform: scaleX(-1) translateX(4px); }
.btn:active { transform: scale(.98); }

/* ---------------- AI: list + chat ---------------- */
.ai-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.ai-list { display: flex; flex-direction: column; }
.ai-item { display: flex; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--border-dark); }
.ai-item:first-child { border-top: 1px solid var(--border-dark); }
.ai-item .card-icon { margin: 0; width: 42px; height: 42px; }
.ai-item h3 { font-size: 17px; margin-bottom: 4px; }
.ai-item p { margin: 0; font-size: 15px; }
.ai-list .btn { margin-top: 32px; align-self: flex-start; }
.chat {
  position: sticky; top: 110px; background: #fff; color: var(--ink); border-radius: 10px; overflow: hidden;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.5);
}
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.chat-head strong { display: block; font-size: 15px; }
.chat-head div > span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-soft); }
.chat-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; }
.chat-avatar .icon { width: 20px; height: 20px; }
.chat-body { padding: 22px 20px; min-height: 290px; display: flex; flex-direction: column; gap: 12px; background: var(--bg-alt); }
.msg { max-width: 85%; padding: 12px 16px; border-radius: 14px; font-size: 15px; line-height: 1.55; transition: opacity .35s ease, transform .35s ease; }
.msg-user { align-self: flex-end; background: var(--navy); color: #fff; border-end-end-radius: 4px; }
.msg-bot { align-self: flex-start; background: #fff; border: 1px solid var(--border); border-end-start-radius: 4px; }
.msg-typing { align-self: flex-start; background: #fff; border: 1px solid var(--border); display: flex; gap: 4px; padding: 14px 16px; }
.msg-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft); animation: typing 1.2s infinite; }
.msg-typing i:nth-child(2) { animation-delay: .15s; } .msg-typing i:nth-child(3) { animation-delay: .3s; }
.msg-actions { display: flex; gap: 8px; flex-wrap: wrap; transition: opacity .35s ease, transform .35s ease; }
.msg-actions .chip { font-size: 13px; padding: 6px 12px; color: var(--green); border-color: #b7dcc7; }
.chat-input { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-top: 1px solid var(--border); color: var(--ink-soft); font-size: 14px; }
.chat-send { width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; }
.chat-send .icon { width: 16px; height: 16px; }
[dir="rtl"] .chat-send .icon { transform: scaleX(-1); }
/* Chat states driven by main.js (hidden only once JS has taken control) */
.chat.is-scripted .msg, .chat.is-scripted .msg-actions { opacity: 0; transform: translateY(8px); }
.chat.is-scripted .msg.show, .chat.is-scripted .msg-actions.show { opacity: 1; transform: none; }
.chat.is-scripted .msg:not(.show).msg-typing, .chat.is-scripted .msg:not(.show).msg-bot { display: none; }

/* ---------------- SaaS dashboard mockup ---------------- */
.list-title { margin-top: 28px; }
.dash { background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: 0 30px 60px -24px rgba(11,30,63,.3); }
.dash-top { display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.dots { display: flex; gap: 6px; } .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.dots i:first-child { background: #f87171; } .dots i:nth-child(2) { background: #fbbf24; } .dots i:last-child { background: #34d399; }
.dash-url { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); background: #fff; padding: 3px 12px; border-radius: 4px; border: 1px solid var(--border); }
.dash-body { display: grid; grid-template-columns: 56px 1fr; }
.dash-side { background: var(--navy); display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px 0; }
.dash-side b { width: 26px; height: 26px; border-radius: 6px; background: var(--green); margin-bottom: 10px; }
.dash-side i { width: 22px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.2); }
.dash-side i.on { background: var(--sand); }
.dash-main { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi { border: 1px solid var(--border); border-radius: 6px; padding: 10px 12px; }
.kpi > span { display: block; font-size: 11px; color: var(--ink-soft); }
.kpi strong { display: block; font-size: 17px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--green); }
.kpi em.down { color: var(--green); }
.chart-card { border: 1px solid var(--border); border-radius: 6px; padding: 12px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-top: 10px; }
.bars i { flex: 1; height: var(--h); background: linear-gradient(var(--green), #2f8f5b); border-radius: 3px 3px 0 0; transform-origin: bottom; transform: scaleY(var(--grow, 1)); transition: transform .8s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i) * 60ms); }
.bars i:last-child { background: var(--sand); }
.dash-rows { display: flex; flex-direction: column; gap: 8px; }
.dash-row { display: grid; grid-template-columns: 24px 1fr auto auto; align-items: center; gap: 10px; font-size: 13px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; transition: opacity .5s ease, transform .5s ease; transition-delay: calc(.6s + var(--i) * 120ms); }
.dash-row b { width: 24px; height: 24px; border-radius: 50%; background: var(--bg-alt); border: 1px solid var(--border); }
.dash-row em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--navy); background: var(--bg-alt); padding: 2px 8px; border-radius: 4px; }
.dash-row small { font-size: 11px; color: var(--green); font-weight: 600; }

/* ---------------- Phone mockup ---------------- */
.mobile-split { align-items: center; }
.phone-stage { position: relative; display: grid; place-items: center; padding: 20px 0; }
.phone-stage::before { content: ''; position: absolute; width: 360px; height: 360px; border-radius: 50%; border: 1px dashed var(--sand); animation: spin 40s linear infinite; }
.phone { position: relative; width: 270px; height: 550px; background: var(--navy); border-radius: 40px; padding: 12px; box-shadow: 0 40px 80px -24px rgba(11,30,63,.5); }
.phone-notch { position: absolute; top: 20px; left: 50%; width: 80px; height: 22px; margin-left: -40px; background: var(--navy); border-radius: 12px; z-index: 2; }
.phone-screen { height: 100%; background: var(--bg-alt); border-radius: 30px; overflow: hidden; padding: 52px 16px 16px; display: flex; flex-direction: column; gap: 10px; position: relative; }
.app-head span { display: block; font-size: 12px; color: var(--ink-soft); }
.app-head strong { font-size: 19px; }
.app-hero { background: var(--green); color: #fff; border-radius: 14px; padding: 14px; }
.app-hero > span { font-size: 12px; opacity: .8; }
.app-hero strong { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.mini-bars { display: flex; align-items: flex-end; gap: 5px; height: 38px; margin-top: 8px; }
.mini-bars i { flex: 1; height: var(--h); background: rgba(255,255,255,.35); border-radius: 2px; }
.mini-bars i:last-child { background: var(--sand); }
.app-row { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: center; background: #fff; border-radius: 12px; padding: 10px 12px; transition: opacity .5s ease, transform .5s ease; transition-delay: calc(.3s + var(--i) * 150ms); }
.app-row b { width: 10px; height: 10px; border-radius: 50%; }
.app-row b.ok { background: #22c55e; } .app-row b.go { background: var(--sand); } .app-row b.wait { background: #94a3b8; }
.app-row strong { display: block; font-size: 13px; }
.app-row div > span { font-size: 11px; color: var(--ink-soft); }
.app-row em { font-style: normal; font-size: 12px; font-weight: 600; }
.app-tabbar { margin-top: auto; display: flex; justify-content: space-around; background: #fff; border-radius: 14px; padding: 12px; }
.app-tabbar i { width: 20px; height: 20px; border-radius: 6px; background: var(--border); }
.app-tabbar i.on { background: var(--green); }
.orbit-chip { position: absolute; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; font-family: var(--mono); font-size: 12px; box-shadow: 0 10px 24px -10px rgba(11,30,63,.3); animation: float 5s ease-in-out infinite; }
.oc-1 { top: 60px; inset-inline-start: 6%; } .oc-2 { top: 48%; inset-inline-end: 4%; animation-delay: -1.6s; } .oc-3 { bottom: 70px; inset-inline-start: 12%; animation-delay: -3.2s; }

/* ---------------- Industry photo cards ---------------- */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.photo-card { background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .3s ease, transform .3s ease; }
.photo-grid .photo-card:hover { box-shadow: 0 24px 48px -20px rgba(11,30,63,.35); transform: translateY(-4px); }
.photo-card-img { aspect-ratio: 3 / 2; overflow: hidden; position: relative; }
.photo-card-img::after { content: ''; position: absolute; inset: auto 0 0 0; height: 4px; background: var(--green); transform: scaleX(0); transform-origin: var(--start, left); transition: transform .4s ease; }
[dir="rtl"] .photo-card-img::after { --start: right; }
.photo-card:hover .photo-card-img::after { transform: scaleX(1); }
.photo-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.photo-card:hover .photo-card-img img { transform: scale(1.07); }
.photo-card-body { padding: 24px 24px 28px; }
.photo-card-body p { margin: 0; font-size: 15px; }

/* ---------------- About photo ---------------- */
.about-split { align-items: center; }
.about-photo { position: relative; margin: 0; }
.about-photo img { width: 100%; height: auto; display: block; border-radius: 8px; position: relative; z-index: 1; }
.about-photo::before { content: ''; position: absolute; inset: 24px -24px -24px 24px; background: var(--lattice); border: 1px solid var(--sand); border-radius: 8px; }
[dir="rtl"] .about-photo::before { inset: 24px 24px -24px -24px; }

/* ---------------- Misc motion ---------------- */
.cta-band::before { animation: drift 20s linear infinite; }
.site-footer::before { animation: drift 30s linear infinite reverse; }
.alert { animation: pop .45s cubic-bezier(.2,.7,.2,1); }

/* Scroll reveal: [data-reveal] is added by main.js, so no-JS visitors see everything. */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 90ms); }
[data-reveal].is-in { opacity: 1; transform: none; }
.steps[data-reveal] { --fill: 0; }
.steps.is-in { --fill: 1; }
.dash[data-reveal] .bars i { --grow: 0; }
.dash.is-in .bars i { --grow: 1; }
.dash[data-reveal] .dash-row, .phone-stage[data-reveal] .app-row { opacity: 0; transform: translateX(calc(-16px * var(--dir))); }
.dash.is-in .dash-row, .phone-stage.is-in .app-row { opacity: 1; transform: none; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); } 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
@keyframes marquee { to { transform: translateX(calc((-100% - var(--gap)) * var(--dir))); } }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { to { background-position: 240px 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .steps[data-reveal] { --fill: 1; }
  .dash[data-reveal] .bars i { --grow: 1; }
  .dash[data-reveal] .dash-row, .phone-stage[data-reveal] .app-row { opacity: 1; transform: none; }
  .spark path { stroke-dashoffset: 0; }
  .success-mark .icon { stroke-dashoffset: 0; }
  .hero-photo img { transform: none; }
  .marquee { flex-wrap: wrap; justify-content: center; -webkit-mask-image: none; mask-image: none; }
  .marquee-track[aria-hidden] { display: none; }
  .marquee-track { flex-wrap: wrap; justify-content: center; row-gap: 14px; padding-inline: 16px; }
  .mq-item::after { display: none; }
}

/* ---------------- Responsive ---------------- */
/* 7 links + language switch + CTA need ~1180px (Turkish labels are longest). */
@media (max-width: 1180px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; top: 76px; left: 0; right: 0; bottom: 0;
    background: #fff; flex-direction: column; align-items: flex-start;
    padding: 28px 24px; gap: 18px; transform: translateX(calc(100% * var(--dir)));
    transition: transform .25s ease; overflow-y: auto;
  }
  .main-nav.open { transform: translateX(0); }
}
@media (max-width: 960px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step, .step:not(:nth-child(3n+1)) { padding: 24px; padding-inline-start: 0; border-inline-start: 0; }
  .step:nth-child(even) { padding-inline-start: 24px; border-inline-start: 1px solid var(--border); }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .contact-intro { position: static; }
  .hero-grid, .ai-layout { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { max-width: 560px; margin-inline: auto; width: 100%; }
  .chat { position: relative; top: 0; }
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hero::after { width: 60%; opacity: .2; }
}
@media (max-width: 640px) {
  .grid-3, .steps, .form-row, .check-list, .footer-inner { grid-template-columns: 1fr; }
  .step:nth-child(even) { padding-inline-start: 0; border-inline-start: 0; }
  .card { padding: 28px 22px; }
  .hero { padding: 72px 0 64px; }
  .section { padding: 64px 0; }
  .form-card { padding: 28px 20px; }
  .type-grid { grid-template-columns: 1fr 1fr; }
  .photo-grid, .kpis { grid-template-columns: 1fr; }
  #technology .marquee { --gap: 32px; }
  .mq-card { font-size: 15px; padding-block: 10px; }
  .mq-icon { width: 38px; height: 38px; }
  .mq-item { font-size: 15px; }
  .kpis .kpi:nth-child(n+2) { display: none; }
  .fc-chart { inset-inline-start: 0; width: 180px; top: 40px; }
  .fc-toast { inset-inline-end: 0; }
  .fc-users { inset-inline-start: 12px; }
  .hero-visual::before { display: none; }
  .phone { width: 240px; height: 490px; }
  .phone-stage::before { width: 290px; height: 290px; }
  .about-photo::before { inset: 14px -12px -14px 14px; }
  [dir="rtl"] .about-photo::before { inset: 14px 14px -14px -12px; }
}

/* ---------------- Arabic / RTL ---------------- */
[dir="rtl"] { --dir: -1; --end: left; }
:lang(ar) body, body:lang(ar) { font-family: 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, sans-serif; line-height: 1.8; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3, :lang(ar) .quote { letter-spacing: 0; line-height: 1.35; }
:lang(ar) .eyebrow, :lang(ar) .hero-tags, :lang(ar) .card-tags, :lang(ar) .site-footer h4 { font-family: inherit; letter-spacing: 0; }
[dir="rtl"] .arrow { display: inline-block; transform: scaleX(-1); }
/* Chat without the script (no JS / reduced motion) shows the finished conversation. */
.chat:not(.is-scripted) .msg-typing { display: none; }
