/* Al Hesn — site styles
   Layout idea: a wall built from blocks. Square corners, a visible grid, one amber block that is "live".
   Sections alternate between plaster (light) and fort ink (dark). */
:root {
  --ink: #0E2F36;
  --ink-2: #143B43;
  --slate: #1F4A54;
  --sea: #3F8C8A;
  --stone: #E4D8C0;
  --plaster: #F5F1E8;
  --card: #FBF9F3;
  --amber: #F2A324;
  --amber-deep: #C97F0A;
  --text: #0E2F36;
  --text-soft: #47626A;
  --on-dark: #F5F1E8;
  --on-dark-soft: #A9C0C3;
  --line: #D8CCB3;
  --line-dark: #2A5560;

  --display: "Alexandria", "Kufam", system-ui, sans-serif;
  --body: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "IBM Plex Sans Arabic", ui-monospace, monospace;

  --wrap: 1160px;
  --gutter: clamp(18px, 4vw, 40px);
  --section: clamp(64px, 9vw, 120px);
  --r: 6px;
  --block: 4px;
}
html[lang="ar"] {
  --display: "Kufam", "Alexandria", system-ui, sans-serif;
  --body: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Sans Arabic", "IBM Plex Mono", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--plaster);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html[lang="ar"] body { line-height: 1.85; font-size: 17.5px; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; background: var(--amber); color: var(--ink); padding: 10px 14px; font-weight: 600; z-index: 100; border-radius: var(--r); }
.skip:focus { top: 12px; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; text-wrap: balance; letter-spacing: -0.015em; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.4; }
h1 { font-size: clamp(2.5rem, 6.2vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.3rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: .78rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft);
}
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: .95rem; font-weight: 600; }
.eyebrow::before { content: ""; width: 10px; height: 10px; background: var(--amber); border-radius: 2px; flex: none; }
.dark .eyebrow { color: var(--on-dark-soft); }
.head { display: grid; gap: 16px; max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.lead { font-size: 1.15rem; color: var(--text-soft); max-width: 60ch; }
.dark .lead { color: var(--on-dark-soft); }

section { padding-block: var(--section); }
section[id] { scroll-margin-top: 72px; }
.dark { background: var(--ink); color: var(--on-dark); }
.stone { background: var(--stone); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--display); font-weight: 600; font-size: 1rem; line-height: 1.2;
  padding: 15px 22px; border-radius: var(--r); border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary { background: var(--amber); color: var(--ink); box-shadow: 4px 4px 0 var(--amber-deep); }
[dir="rtl"] .btn-primary { box-shadow: -4px 4px 0 var(--amber-deep); }
.btn-primary:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--amber-deep); }
[dir="rtl"] .btn-primary:hover { transform: translate(-2px, 2px); box-shadow: -2px 2px 0 var(--amber-deep); }
.btn-ghost { border-color: var(--line-dark); color: var(--on-dark); }
.btn-ghost:hover { border-color: var(--on-dark); }
.btn-small { padding: 10px 16px; font-size: .92rem; box-shadow: 3px 3px 0 var(--amber-deep); }
[dir="rtl"] .btn-small { box-shadow: -3px 3px 0 var(--amber-deep); }
.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; box-shadow: none; transform: none; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(14, 47, 54, .96); color: var(--on-dark); border-bottom: 1px solid var(--line-dark); backdrop-filter: blur(8px); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 42px; width: auto; }
.nav { display: flex; align-items: center; gap: 26px; margin-inline-start: auto; }
.nav a { text-decoration: none; font-size: .95rem; color: var(--on-dark-soft); padding-block: 6px; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--on-dark); border-bottom-color: var(--amber); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.lang { font-family: var(--body); font-weight: 600; font-size: .95rem; text-decoration: none; color: var(--on-dark); padding: 8px 12px; border: 1px solid var(--line-dark); border-radius: var(--r); }
.lang:hover { border-color: var(--on-dark); }
.menu-btn { display: none; background: none; border: 1px solid var(--line-dark); border-radius: var(--r); color: var(--on-dark); padding: 9px 11px; cursor: pointer; }
.menu-btn span { display: block; width: 20px; height: 2px; background: currentColor; margin: 4px 0; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(48px, 7vw, 96px) clamp(56px, 8vw, 104px); position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { display: grid; gap: 24px; justify-items: start; }
.hero h1 .live { color: var(--amber); }
.hero p.sub { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--on-dark-soft); max-width: 54ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

.wall-stage { position: relative; margin-bottom: 8%; }
.wall { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; aspect-ratio: 9 / 8; }
.wall i { display: block; background: var(--slate); border-radius: var(--block); animation: rise .5s both; animation-delay: calc(var(--d) * 28ms); transition: background .6s ease; }
.wall i.gap { visibility: hidden; }
.wall i.lit { background: var(--amber); transition: background .15s ease; }
.wall i.pale { background: #2C5E69; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.log {
  position: absolute; inset-inline-start: -8%; bottom: -13%;
  width: min(390px, 92%); background: var(--plaster); color: var(--ink);
  border-radius: var(--r); padding: 16px 18px 14px;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .28);
  font-size: .9rem; line-height: 1.5;
}
[dir="rtl"] .log { box-shadow: -8px 8px 0 rgba(0, 0, 0, .28); }
.log-title { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-soft); display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
html[lang="ar"] .log-title { letter-spacing: 0; font-size: .85rem; }
.log-title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.log li { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding-block: 5px; border-top: 1px solid var(--line); }
.log time { font-family: "IBM Plex Mono", monospace; font-size: .82rem; color: var(--text-soft); direction: ltr; }

/* ---------- promises strip ---------- */
.promises { padding-block: 0; background: var(--ink); color: var(--on-dark); }
.promises ul { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-dark); }
.promises li { padding: 26px 0; padding-inline-end: 24px; display: grid; gap: 4px; }
.promises li + li { padding-inline-start: 24px; border-inline-start: 1px solid var(--line-dark); }
.promises strong { font-family: var(--display); font-size: 1.05rem; font-weight: 600; }
.promises span { color: var(--on-dark-soft); font-size: .95rem; }

/* ---------- services ---------- */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(22px, 3vw, 34px); display: grid; gap: 14px; align-content: start; grid-template-rows: auto auto auto 1fr auto; }
.glyph { display: grid; grid-template-columns: repeat(3, 12px); gap: 3px; }
.glyph i { width: 12px; height: 12px; border-radius: 2px; background: var(--ink); }
.glyph i.o { background: var(--line); }
.glyph i.a { background: var(--amber); }
.card p { color: var(--text-soft); }
.ticks { display: grid; gap: 8px; }
.ticks li { display: grid; grid-template-columns: 10px 1fr; gap: 12px; align-items: baseline; }
.ticks li::before { content: ""; width: 8px; height: 8px; background: var(--sea); border-radius: 2px; transform: translateY(-1px); }
.meta { font-family: var(--mono); font-size: .86rem; color: var(--text); padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px 14px; }
html[lang="ar"] .meta { font-size: .98rem; font-weight: 500; }
.meta b { font-weight: 500; }
.care { margin-top: 20px; background: var(--ink); color: var(--on-dark); border-radius: var(--r); padding: clamp(22px, 3vw, 32px); display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; }
.care .glyph i { background: var(--stone); }
.care .glyph i.a { background: var(--amber); }
.care p { max-width: 62ch; }
.care p strong { font-family: var(--display); font-weight: 600; }

/* ---------- process ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; counter-reset: step; }
.step { background: var(--ink); color: var(--on-dark); border-radius: var(--r); padding: 22px 20px 26px; display: grid; gap: 10px; align-content: start; counter-increment: step; }
.step::before { content: "0" counter(step); font-family: "IBM Plex Mono", monospace; font-size: .85rem; color: var(--amber); letter-spacing: .1em; }
.step h3 { font-size: 1.15rem; }
.step p { font-size: .95rem; color: var(--on-dark-soft); }
.step:last-child { background: var(--amber); color: var(--ink); }
.step:last-child::before, .step:last-child p { color: var(--ink); }

/* ---------- sectors ---------- */
.sectors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 32px; }
.sector { padding-block: 22px; border-top: 2px solid var(--ink); display: grid; gap: 6px; align-content: start; }
.sector p { color: var(--text-soft); }
.note { margin-top: 18px; font-size: .9rem; color: var(--text-soft); }

/* ---------- why ---------- */
.why .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.why h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
.why .statement { display: grid; gap: 18px; position: sticky; top: 110px; }
.principles { display: grid; }
.principles li { padding-block: 24px; border-top: 1px solid var(--line-dark); display: grid; grid-template-columns: 14px 1fr; gap: 18px; }
.principles li:last-child { border-bottom: 1px solid var(--line-dark); }
.principles li::before { content: ""; width: 12px; height: 12px; background: var(--amber); border-radius: 2px; margin-top: .45em; }
.principles h3 { margin-bottom: 6px; }
.principles p { color: var(--on-dark-soft); }

/* ---------- packages ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .98rem; }
th, td { text-align: start; padding: 16px 20px; vertical-align: top; }
thead th { font-family: var(--mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-soft); font-weight: 500; border-bottom: 2px solid var(--ink); white-space: nowrap; }
html[lang="ar"] thead th { letter-spacing: 0; font-size: .9rem; font-weight: 600; }
tbody tr + tr td, tbody tr + tr th { border-top: 1px solid var(--line); }
tbody th { font-family: var(--display); font-weight: 600; white-space: nowrap; }
td.price { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 500; }
td.price small { display: block; font-family: var(--body); font-weight: 400; color: var(--text-soft); white-space: normal; font-size: .85rem; }
td.muted { color: var(--text-soft); }

/* ---------- faq ---------- */
.faq { display: grid; max-width: 860px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 0; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; font-family: var(--display); font-weight: 600; font-size: 1.12rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: "IBM Plex Mono", monospace; font-size: 1.4rem; line-height: 1; width: 30px; height: 30px; display: grid; place-items: center; background: var(--ink); color: var(--amber); border-radius: var(--block); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 24px; color: var(--text-soft); max-width: 68ch; }

/* ---------- contact ---------- */
.contact .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 80px); }
.contact .head { margin-bottom: 28px; }
form { display: grid; gap: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: grid; gap: 6px; font-size: .9rem; font-weight: 500; color: var(--on-dark-soft); }
input, select, textarea {
  font: inherit; color: var(--on-dark); background: var(--ink-2);
  border: 1px solid var(--line-dark); border-radius: var(--r); padding: 13px 14px; width: 100%;
}
input::placeholder, textarea::placeholder { color: #7FA0A5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--amber); outline-offset: 1px; border-color: transparent; }
textarea { min-height: 110px; resize: vertical; }
.form-note { font-size: .88rem; color: var(--on-dark-soft); }
.form-error { font-size: .92rem; color: #FFC977; min-height: 1.4em; }
.direct { display: grid; gap: 0; align-content: start; }
.direct div { padding-block: 20px; border-top: 1px solid var(--line-dark); display: grid; gap: 4px; }
.direct div:last-child { border-bottom: 1px solid var(--line-dark); }
.direct dt { font-family: var(--mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-soft); }
html[lang="ar"] .direct dt { letter-spacing: 0; font-size: .9rem; }
.direct dd { font-family: var(--display); font-size: 1.2rem; font-weight: 600; }
.direct dd a { text-decoration: none; border-bottom: 2px solid var(--amber); }
.direct dd bdi { direction: ltr; unicode-bidi: isolate; }
.soon { border: 1px solid var(--line-dark); border-inline-start: 4px solid var(--amber); border-radius: var(--r); padding: 20px 22px; font-size: 1.08rem; max-width: 52ch; background: var(--ink-2); }
.todo {font-family: var(--body); font-size: .92rem; font-weight: 500; color: var(--amber); border: 1px dashed var(--amber); border-radius: var(--block); padding: 3px 9px; display: inline-block; }

/* ---------- footer ---------- */
.site-footer { background: #0A262C; color: var(--on-dark); padding-block: 48px 36px; }
.site-footer .wrap { display: grid; gap: 28px; }
.foot-top { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; }
.foot-top img { height: 52px; width: auto; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: .95rem; }
.foot-nav a { text-decoration: none; border-bottom: 1px solid transparent; }
.foot-nav a:hover { border-bottom-color: var(--amber); }
.foot-bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .88rem; color: var(--on-dark-soft); border-top: 1px solid var(--line-dark); padding-top: 20px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .nav { display: none; position: absolute; inset-inline: 0; top: 100%; background: var(--ink); flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 18px; border-bottom: 1px solid var(--line-dark); }
  .nav.open { display: flex; }
  .nav a { padding-block: 14px; border-bottom: 1px solid var(--line-dark); font-size: 1.05rem; color: var(--on-dark); }
  .menu-btn { display: block; }
  .header-actions { margin-inline-start: auto; }
  .hero .wrap, .why .wrap, .contact .wrap { grid-template-columns: 1fr; }
  .why .statement { position: static; }
  .wall-stage { max-width: 520px; margin-inline: auto; width: 100%; padding-bottom: 40px; }
  .log { inset-inline-start: 0; bottom: 0; }
  .steps { grid-template-columns: 1fr 1fr; }
  .sectors { grid-template-columns: 1fr 1fr; }
  .care { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .site-header .wrap { min-height: 64px; gap: 12px; }
  .brand img { height: 34px; }
  .header-actions .btn { display: none; }
  .cards, .steps, .sectors, .row2 { grid-template-columns: 1fr; }
  .promises ul { grid-template-columns: 1fr; }
  .promises li, .promises li + li { padding: 18px 0; border-inline-start: 0; }
  .promises li + li { border-top: 1px solid var(--line-dark); }
  .cta-row .btn { width: 100%; }
  /* packages table becomes stacked cards */
  .table-wrap { border: 0; background: none; overflow: visible; }
  table, tbody, tr, th, td { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody tr { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 12px; }
  tbody th, tbody td { padding: 3px 0; border: 0 !important; white-space: normal; }
  tbody th { font-size: 1.1rem; margin-bottom: 4px; }
  td.price { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line) !important; }
  td.muted::before { content: attr(data-label) ": "; font-weight: 500; color: var(--text); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wall i, .log-title::before { animation: none; }
  .btn { transition: none; }
}
