/* ==========================================================================
   TerraTech: from the surface to the subsurface
   Plain CSS, mobile-first. Logical properties (inline/block) so RTL works.
   ========================================================================== */

:root {
  /* Brand */
  --navy: #121a24;
  --navy-2: #1b2632;
  --ink: #14202b;
  --ink-soft: #3c4a57;
  --gold: #f0bd52;
  --gold-hover: #f5cc72;
  --teal: #4fd8c4;
  --teal-700: #0d7068;
  --green: #2f8a57;

  /* Surface (sky) */
  --sky-0: #f7fcfd;
  --sky-1: #e8f6f9;
  --sky-2: #cfeef5;

  /* Subsurface strata */
  --sand: #f4e7cc;
  --ochre: #ecd5a6;
  --terra: #a9512c;
  --rust: #7a3721;
  --umber: #3b2922;
  --bedrock: #1d2730;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 64px;
  --container: 1160px;
  --gutter: 20px;
  --shadow-sm: 0 1px 2px rgba(18, 26, 36, .06), 0 2px 8px rgba(18, 26, 36, .05);
  --shadow-md: 0 8px 30px rgba(18, 26, 36, .10);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

html[lang="ar"] {
  --font-sans: "Cairo", "Tajawal", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  --font-display: "Cairo", "Tajawal", system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--sky-0);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul[role="list"], ol { list-style: none; padding: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 700;
}
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.35; }
html[lang="ar"] body { line-height: 1.8; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[dir="rtl"] .icon-flip { transform: scaleX(-1); }

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

:focus-visible {
  outline: 3px solid var(--teal-700);
  outline-offset: 3px;
  border-radius: 4px;
}
.site-header :focus-visible,
.layer-terra :focus-visible, .layer-rust :focus-visible, .layer-umber :focus-visible,
.layer-bedrock :focus-visible, .site-footer :focus-visible {
  outline-color: var(--gold);
}

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

main:focus { outline: none; }

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

/* Hide text while a non-default language is loading (set inline in <head>). */
.i18n-pending main,
.i18n-pending .site-footer,
.i18n-pending .nav-list,
.i18n-pending .nav-cta { visibility: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 48px;
  padding: .75em 1.35em;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--navy); box-shadow: 0 6px 18px rgba(240, 189, 82, .35); }
.btn-gold:hover { background: var(--gold-hover); }
.btn-ghost { border-color: rgba(20, 32, 43, .25); color: var(--ink); background: rgba(255, 255, 255, .6); }
.btn-ghost:hover { border-color: var(--teal-700); color: var(--teal-700); background: #fff; }
.btn-sm { min-height: 40px; padding: .5em 1.1em; font-size: .925rem; box-shadow: none; }
.btn-lg { min-height: 56px; padding: .9em 1.8em; font-size: 1.075rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 26, 36, .96);
  color: #f5efe6;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  transition: box-shadow .25s;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; margin-inline-end: auto; border-radius: 8px; }
.brand img { height: 40px; width: auto; }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: .875rem;
}
.lang-switch button {
  min-width: 36px;
  min-height: 36px;
  padding: 0 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #b9c4cf;
  font-weight: 600;
  cursor: pointer;
  transition: color .2s, background-color .2s;
}
.lang-switch button:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.lang-switch button[aria-pressed="true"] { color: var(--gold); }
.lang-switch .lang-ar { font-family: "Cairo", "Tajawal", Tahoma, sans-serif; font-size: 1.2rem; line-height: 1; }
.lang-sep { color: #5a6876; }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: #f5efe6;
  transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu panel */
.main-nav {
  position: fixed;
  inset-inline: 0;
  top: var(--header-h);
  padding: 12px var(--gutter) 24px;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .25);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, transform .25s var(--ease), visibility 0s linear .25s;
}
.main-nav.is-open {
  transform: none;
  opacity: 1;
  visibility: visible;
  transition: opacity .2s, transform .25s var(--ease), visibility 0s;
}
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  color: #e7edf2;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
}
.nav-list a:hover, .nav-list a.is-active { color: var(--gold); }
.nav-cta { margin-top: 18px; width: 100%; }

@media (min-width: 960px) {
  :root { --header-h: 72px; }
  .nav-toggle { display: none; }
  .main-nav {
    position: static;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    transform: none;
    opacity: 1;
    visibility: visible;
    transition: none;
  }
  .nav-list { display: flex; gap: 2px; }
  .nav-list a {
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    font-size: .95rem;
    color: #cdd6de;
  }
  .nav-list a:hover { background: rgba(255, 255, 255, .06); }
  .nav-cta { margin: 0 0 0 0; margin-inline-start: 10px; width: auto; }
  .lang-switch { margin-inline-start: 10px; padding-inline-start: 12px; border-inline-start: 1px solid rgba(255, 255, 255, .12); }
  .brand img { height: 44px; }
}

/* ---------- Sections (shared) ---------- */
section[id], #main { scroll-margin-top: var(--header-h); }

.section { padding-block: 72px 88px; position: relative; }
@media (min-width: 960px) { .section { padding-block: 104px 120px; } }

.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.9rem, 4.4vw, 2.75rem); }
.section-sub { margin-top: 14px; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-soft); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal-700);
}
html[lang="ar"] .kicker { letter-spacing: 0; font-size: .95rem; text-transform: none; }
.kicker-mark {
  width: 0; height: 0;
  border-inline: 6px solid transparent;
}
.kicker-up { border-bottom: 9px solid currentColor; }
.kicker-down { border-top: 9px solid currentColor; }

/* ---------- Hero (sky) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: 40px 64px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='640' height='640' viewBox='0 0 640 640'%3E%3Cg fill='none' stroke='%230d7068' stroke-opacity='.09' stroke-width='1.2'%3E%3Cpath d='M320 80c140 0 250 90 250 230S455 570 310 570 70 460 70 320 180 80 320 80z'/%3E%3Cpath d='M322 140c108 0 190 72 190 176S420 512 314 512 130 428 130 322s86-182 192-182z'/%3E%3Cpath d='M326 200c76 0 128 52 128 120s-62 132-136 132-128-60-128-128 60-124 136-124z'/%3E%3Cpath d='M330 258c40 0 66 28 66 62s-32 72-74 72-68-32-68-68 34-66 76-66z'/%3E%3C/g%3E%3C/svg%3E") right -180px top -120px / 760px no-repeat,
    linear-gradient(180deg, var(--sky-2) 0%, var(--sky-1) 45%, var(--sky-0) 100%);
}
[dir="rtl"] .hero { background-position: left -180px top -120px, 0 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  padding-inline: 10px 14px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .75);
  border: 1px solid rgba(13, 112, 104, .18);
  color: var(--teal-700);
  font-size: .875rem;
  font-weight: 600;
}
.hero h1 {
  font-size: clamp(2.2rem, 7vw, 4.2rem);
  max-width: 22ch;
}
html[lang="ar"] .hero h1 { max-width: none; font-size: clamp(2.2rem, 6.6vw, 3.8rem); }
.hero h1 span { display: block; }
.hero h1 .accent { color: var(--teal-700); }
.lead {
  margin-top: 22px;
  max-width: 60ch;
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  color: var(--ink-soft);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

@media (min-width: 960px) {
  .hero { padding-block: 96px 120px; }
}

/* ---------- Above the surface ---------- */
.above {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='480' height='240' viewBox='0 0 480 240'%3E%3Cg fill='none' stroke='%230d7068' stroke-opacity='.06'%3E%3Cpath d='M0 60c80-30 160 30 240 0s160-30 240 0M0 120c80-30 160 30 240 0s160-30 240 0M0 180c80-30 160 30 240 0s160-30 240 0'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 480px 240px,
    var(--sky-0);
  padding-bottom: 40px;
}
@media (min-width: 960px) { .above { padding-bottom: 56px; } }

.cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 1000px) {
  .cards-above { grid-template-columns: repeat(6, 1fr); }
  .cards-above .card { grid-column: span 2; }
  .cards-above .card:nth-child(4) { grid-column: 2 / span 2; }
  .cards-below { grid-template-columns: repeat(4, 1fr); }
}

.card {
  position: relative;
  padding: 26px 24px 28px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(13, 112, 104, .10);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(13, 112, 104, .25); }
.card h3 { font-size: 1.2rem; margin-top: 18px; }
.card p { margin-top: 8px; color: var(--ink-soft); }
.card-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e1f7f3, #c8eef0);
  color: var(--teal-700);
  font-size: 1.35rem;
}

/* ---------- Ground line ---------- */
.ground {
  position: relative;
  background: var(--sky-0);
  margin-bottom: -1px;
}
.ground-profile { width: 100%; height: 70px; }
@media (min-width: 960px) { .ground-profile { height: 110px; } }
.ground-label {
  position: absolute;
  inset-inline: 0;
  bottom: 6px;
  display: flex;
  justify-content: flex-end;
}
.ground-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--gold);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: var(--shadow-md);
}
html[lang="ar"] .ground-chip { letter-spacing: 0; font-size: .875rem; }
.ground-tick { width: 18px; height: 2px; background: var(--gold); position: relative; }
.ground-tick::after { content: ""; position: absolute; inset-inline-end: -1px; top: -4px; width: 2px; height: 10px; background: var(--gold); }

/* ---------- Strata (subsurface layers) ---------- */
.stratum { background-color: var(--layer); color: var(--layer-ink, var(--ink)); }
/* Wavy upper boundary of each layer */
.stratum + .stratum::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 100%;
  height: 34px;
  background-color: var(--layer);
  -webkit-mask: var(--edge) center bottom / 100% 100% no-repeat;
  mask: var(--edge) center bottom / 100% 100% no-repeat;
  pointer-events: none;
}
@media (min-width: 960px) { .stratum + .stratum::before { height: 54px; } }

.layer-sand {
  --layer: var(--sand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='80'%3E%3Cg fill='%238a5a2b' fill-opacity='.10'%3E%3Ccircle cx='12' cy='14' r='1.4'/%3E%3Ccircle cx='70' cy='30' r='1.1'/%3E%3Ccircle cx='130' cy='10' r='1.3'/%3E%3Ccircle cx='40' cy='58' r='1.2'/%3E%3Ccircle cx='104' cy='66' r='1.5'/%3E%3Ccircle cx='150' cy='44' r='1'/%3E%3C/g%3E%3C/svg%3E");
}
.layer-ochre {
  --layer: var(--ochre);
  --edge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 54' preserveAspectRatio='none'%3E%3Cpath d='M0 30C160 10 300 8 470 22s300 26 470 8 330-20 500 0V54H0z'/%3E%3C/svg%3E");
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='60'%3E%3Cg stroke='%237a3721' stroke-opacity='.10' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M10 15h26M120 30h14M60 48h30M180 12h18'/%3E%3C/g%3E%3C/svg%3E");
}
.layer-terra {
  --layer: var(--terra);
  --layer-ink: #fff;
  --edge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 54' preserveAspectRatio='none'%3E%3Cpath d='M0 18c200 20 380 30 560 16S880 4 1060 14s260 22 380 12V54H0z'/%3E%3C/svg%3E");
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='70'%3E%3Cg stroke='%23000' stroke-opacity='.08' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M14 20h20M100 40h30M190 18h14M60 60h18'/%3E%3C/g%3E%3C/svg%3E");
}
.layer-rust {
  --layer: var(--rust);
  --layer-ink: #fff;
  --edge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 54' preserveAspectRatio='none'%3E%3Cpath d='M0 26C140 6 320 10 500 26s340 20 520 2 300-14 420 2V54H0z'/%3E%3C/svg%3E");
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='80'%3E%3Cg fill='%23000' fill-opacity='.10'%3E%3Cpath d='M20 20l6-4 5 5-6 3zM120 50l7-3 4 6-8 2zM170 16l5-2 3 4-6 2zM70 66l6-4 4 4-7 3z'/%3E%3C/g%3E%3C/svg%3E");
}
.layer-umber {
  --layer: var(--umber);
  --layer-ink: #fff;
  --edge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 54' preserveAspectRatio='none'%3E%3Cpath d='M0 14c180 24 340 30 520 14S860 0 1040 16s260 20 400 6V54H0z'/%3E%3C/svg%3E");
}
.layer-bedrock {
  --layer: var(--bedrock);
  --layer-ink: #fff;
  --edge: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 54' preserveAspectRatio='none'%3E%3Cpath d='M0 30l160-14 200 18 240-22 220 20 260-16 200 18 160-12V54H0z'/%3E%3C/svg%3E");
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='120'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.04' stroke-width='1.5'%3E%3Cpath d='M0 40l60-20 50 30 70-26 80 22M0 100l70-24 60 30 60-26 70 18'/%3E%3C/g%3E%3C/svg%3E");
}

.below { padding-top: 48px; }
.below .kicker, .layer-ochre .kicker { color: #8a3c1f; }
.below .section-sub, .layer-ochre .section-sub { color: #5b4636; }

/* Subsurface cards: "core sample" stripe on the leading edge */
.card.core {
  background: #fffaf0;
  border-color: rgba(122, 55, 33, .12);
  padding-inline-start: 34px;
  overflow: hidden;
}
.card.core::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 10px;
  background: linear-gradient(180deg, #2f8a57 0 6%, #ecd3a0 6% 30%, #d9a35a 30% 52%, #c0643a 52% 74%, #8f4126 74% 90%, #5a2a1b 90%);
}
.card.core:hover { border-color: rgba(122, 55, 33, .3); }
.card.core .card-icon { background: linear-gradient(135deg, #f8e2c4, #f1cfa6); color: #8a3c1f; }
.card.core p { color: #5b4636; }

/* ---------- Deliverables ---------- */
.deliverables { display: grid; gap: 28px; }
@media (min-width: 760px) { .deliverables { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .deliverables { grid-template-columns: repeat(3, 1fr); } }

.deliv {
  display: flex;
  flex-direction: column;
  padding: 14px 14px 26px;
  border-radius: calc(var(--radius) + 4px);
  background: rgba(255, 250, 240, .75);
  border: 1px solid rgba(122, 55, 33, .14);
  box-shadow: var(--shadow-sm);
}
.deliv h3 { font-size: 1.2rem; margin: 22px 10px 0; }
.deliv p { margin: 8px 10px 0; color: #5b4636; }

.mock {
  direction: ltr;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(18, 26, 36, .10);
  box-shadow: 0 10px 30px rgba(90, 42, 27, .14);
}
.mock svg { width: 100%; height: auto; }
.mock-plain { background: #e8f5f8; }
.mock-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding-inline: 10px;
  background: #eef1f4;
  border-bottom: 1px solid #e1e7ec;
}
.mock-bar i { width: 8px; height: 8px; border-radius: 50%; background: #cfd6dd; }
.mock-bar i:first-child { background: #e5533d; }
.mock-bar i:nth-child(2) { background: #f0bd52; }
.mock-bar i:nth-child(3) { background: #2f8a57; }
.mock-url {
  margin-inline-start: 8px;
  padding: 1px 10px;
  border-radius: 6px;
  background: #fff;
  color: #5a6773;
  font-size: .68rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mock-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 0;
  padding: 8px 12px;
  list-style: none;
  border-top: 1px solid #e1e7ec;
  font-size: .78rem;
  color: var(--ink-soft);
}
.mock-legend li { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 50%; }
.sw-bore { background: #2f8a57; box-shadow: 10px 0 0 #e39b2d, 20px 0 0 #e5533d; margin-inline-end: 20px; }
.sw-risk { border-radius: 2px; background: repeating-linear-gradient(45deg, #e5533d 0 2px, #fde4df 2px 5px); }
.deliv-note { margin-top: 22px; font-size: .875rem; color: #5b4636; }

/* ---------- Sectors ---------- */
.layer-terra .section-head h2,
.layer-rust .section-head h2,
.layer-umber .section-head h2,
.layer-bedrock h2 { color: #fff; }

.sectors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 760px) { .sectors { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.sector {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  min-height: 100%;
  padding: 20px 18px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .14);
  border: 1px solid rgba(255, 255, 255, .16);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.35;
  transition: background-color .25s, transform .3s var(--ease);
}
.sector:hover { background: rgba(0, 0, 0, .22); transform: translateY(-2px); }
.sector-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .14);
  color: #ffe3b0;
  font-size: 1.3rem;
}
@media (min-width: 760px) {
  .sector { flex-direction: row; align-items: center; padding: 22px; font-size: 1.08rem; }
}

/* ---------- Process timeline ---------- */
.timeline {
  position: relative;
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0;
}
/* Vertical "borehole" line on mobile */
.timeline::before {
  content: "";
  position: absolute;
  inset-inline-start: 25px;
  top: 26px;
  bottom: 26px;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--gold), rgba(240, 189, 82, .25));
}
.step {
  position: relative;
  padding-inline-start: 76px;
  min-height: 52px;
}
.step-node {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--navy);
  border: 3px solid var(--gold);
  color: var(--gold);
  font-size: 1.3rem;
}
.step-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .1em;
  color: #ffd79a;
}
.step h3 { color: #fff; font-size: 1.3rem; margin-top: 2px; }
.step p { margin-top: 8px; color: rgba(255, 255, 255, .88); }

@media (min-width: 900px) {
  .timeline { grid-template-columns: repeat(4, 1fr); gap: 28px; }
  .timeline::before {
    /* from the first node to the last one: column width = (100% - 3 gaps) / 4 */
    inset-inline: 27px calc((100% - 84px) / 4 - 27px);
    top: 25px;
    bottom: auto;
    width: auto;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), rgba(240, 189, 82, .3));
  }
  [dir="rtl"] .timeline::before { background: linear-gradient(270deg, var(--gold), rgba(240, 189, 82, .3)); }
  .step { padding-inline-start: 0; padding-top: 74px; }
}

/* ---------- Why ---------- */
.why-grid { display: grid; gap: 8px; }
.why-grid .section-head { margin-bottom: 24px; }
.why-list { display: grid; gap: 16px; }
.why-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .10);
}
.why-item p { color: #fff; font-size: clamp(1.1rem, 2vw, 1.3rem); font-weight: 500; line-height: 1.5; }
.why-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gold);
  color: var(--navy);
  font-size: 1.3rem;
}
@media (min-width: 900px) {
  .why-grid { grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
  .why-list { grid-template-columns: 1fr 1fr; }
  .why-item { flex-direction: column; padding: 28px; min-height: 100%; }
}

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.contact h2 { font-size: clamp(2rem, 5vw, 3rem); }
.contact-list {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 640px;
  margin: 36px 0;
}
@media (min-width: 640px) { .contact-list { grid-template-columns: 1fr 1fr; } }
.contact-item {
  padding: 20px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .10);
}
.contact-item dt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #b9c4cf;
  font-size: .875rem;
  font-weight: 600;
}
.contact-item dt .icon { color: var(--teal); }
.contact-item dd { margin-top: 6px; color: #fff; font-weight: 600; font-size: 1.05rem; overflow-wrap: anywhere; }
.contact-item a { color: #fff; text-decoration-color: rgba(240, 189, 82, .7); text-underline-offset: 4px; }
.contact-item a:hover { color: var(--gold); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #b9c4cf;
  padding-top: 56px;
  font-size: .95rem;
}
.footer-grid { display: grid; gap: 32px; padding-bottom: 40px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand img { height: 46px; width: auto; }
.footer-tagline {
  margin-top: 14px;
  color: var(--teal);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
}
html[lang="ar"] .footer-tagline { letter-spacing: 0; font-size: .95rem; }
.footer-title { color: #fff; font-weight: 700; margin-bottom: 12px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer a { color: #d5dde4; text-decoration: none; display: inline-block; padding-block: 4px; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 4px; }
.footer-contact p + p { margin-top: 4px; }
.footer-bottom {
  padding-block: 20px 28px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: .85rem;
  color: #9fb0bf;
}

/* ---------- Depth gauge ---------- */
.depth-meter {
  position: fixed;
  z-index: 40;
  bottom: 20px;
  inset-inline-end: 20px;
  display: none;
  flex-direction: column;
  align-items: center;
  min-width: 88px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(18, 26, 36, .9);
  border: 1px solid rgba(240, 189, 82, .35);
  color: #fff;
  box-shadow: var(--shadow-md);
  line-height: 1.2;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s;
}
.depth-meter.is-on { opacity: 1; }
.dm-label { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: #9fb0bf; }
html[lang="ar"] .dm-label { letter-spacing: 0; font-size: .8rem; }
.dm-value { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--teal); font-variant-numeric: tabular-nums; }
.dm-value { display: flex; gap: .3em; direction: ltr; }
.depth-meter.is-below .dm-value { color: var(--gold); }
@media (min-width: 1100px) { .js .depth-meter { display: flex; } }

/* ---------- Animations ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@keyframes flow { to { stroke-dashoffset: -44; } }
@keyframes ring { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }

@media (prefers-reduced-motion: no-preference) {
  /* Only run while the illustration is on screen (class set by main.js) */
  .in-view .flow { animation: flow 2.2s linear infinite; }
  .in-view .pulse-ring { transform-box: fill-box; transform-origin: center; animation: ring 2s ease-out infinite; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Local file notice ---------- */
.file-notice {
  position: fixed;
  z-index: 60;
  inset-inline: 12px;
  bottom: 12px;
  max-width: 640px;
  margin-inline: auto;
  padding: 12px 44px 12px 16px;
  border-radius: 12px;
  background: #fff4e0;
  border: 1px solid #e39b2d;
  color: #4a2e08;
  font-size: .9rem;
  box-shadow: var(--shadow-md);
  direction: ltr;
  text-align: left;
}
.file-notice[hidden] { display: none; }
.file-notice code { font-size: .85em; background: rgba(0,0,0,.06); padding: 1px 4px; border-radius: 4px; }
.file-notice-close {
  position: absolute; top: 6px; right: 6px;
  width: 32px; height: 32px;
  border: 0; border-radius: 8px; background: transparent;
  font-size: 1.3rem; line-height: 1; cursor: pointer;
}
