/* =========================================================
   CREATE STORY — Groundwater Desalination Plants
   Mobile-first stylesheet (RTL)
   ========================================================= */

:root {
  --cyan: #11ACEA;
  --blue: #037CC6;
  --deep: #075F9C;
  --navy: #032D5B;
  --light-cyan: #E6F6FE;
  --pale: #EAF5FB;
  --white: #FFFFFF;

  --text: #032D5B;
  --muted: #3F5F7E;
  --line: #D3E6F2;
  --error: #B3261E;

  --font-ar: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  --font-en: "Montserrat", "IBM Plex Sans Arabic", "Segoe UI", Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(3, 45, 91, .08);
  --header-h: 68px;
  --container: 1180px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-ar);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  background: var(--white);
  padding-bottom: 64px; /* mobile action bar */
}

[lang="en"], .ltr { font-family: var(--font-en); }
.ltr { unicode-bidi: isolate; direction: ltr; display: inline-block; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 { line-height: 1.35; margin: 0 0 .6em; color: var(--navy); font-weight: 700; }
h1 { font-size: clamp(1.85rem, 6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4.2vw, 2.15rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }

a { color: var(--blue); }
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.narrow { max-width: 860px; }

.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--navy); color: var(--white); padding: 8px 14px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 24px;
  border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--deep); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--blue); }
.btn-outline:hover { background: var(--light-cyan); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--light-cyan); }
.btn-sm { min-height: 40px; padding: 6px 18px; font-size: .95rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(8px);
}
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(3, 45, 91, .07); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); }
.brand img { width: 130px; height: auto; }

.main-nav {
  position: absolute; inset-inline: 0; top: 100%;
  background: var(--white); border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 24px rgba(3, 45, 91, .08);
  display: none;
}
.main-nav.is-open { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 8px 20px 16px; }
.main-nav a {
  display: block; padding: 12px 4px; color: var(--navy); text-decoration: none; font-weight: 500;
  border-bottom: 1px solid var(--pale);
}
.main-nav a:hover { color: var(--blue); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-phone { display: none; align-items: center; gap: 6px; color: var(--navy); text-decoration: none; font-weight: 600; }
.header-phone svg { width: 18px; height: 18px; fill: var(--blue); }
.header-cta { display: none; }

.nav-toggle {
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--white);
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    linear-gradient(var(--pale) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--pale) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(180deg, var(--white), var(--light-cyan));
  padding: 36px 0 48px;
  border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; gap: 32px; align-items: center; }
.eyebrow {
  display: inline-block; margin-bottom: 14px;
  font-size: .78rem; font-weight: 600; letter-spacing: .02em; color: var(--deep);
  background: var(--white); border: 1px solid var(--line); border-inline-start: 3px solid var(--cyan);
  padding: 6px 12px; border-radius: 8px; max-width: 100%;
}
.hero h1 { margin-bottom: .45em; }
.hero-lead { font-size: 1.06rem; color: var(--muted); max-width: 58ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 22px; }
.hero-actions .btn { flex: 1 1 160px; }
.hero-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hero-points li { position: relative; padding-inline-start: 26px; font-weight: 500; color: var(--navy); }
.hero-points li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .55em;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--light-cyan); border: 4px solid var(--cyan);
}

.hero-media { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--navy); }
.hero-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.media-tag {
  position: absolute; inset-inline-start: 14px; bottom: 14px;
  background: rgba(3, 45, 91, .88); color: var(--white);
  font-size: .85rem; font-weight: 500; padding: 6px 12px; border-radius: 8px;
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-tint { background: var(--pale); }
.section-navy { background: var(--navy); color: var(--white); }
.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head p { color: var(--muted); }
.section-head.on-dark h2 { color: var(--white); }
.section-head.on-dark p { color: #C5DDEE; }
.section-kicker {
  font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 6px;
}
.section-navy .section-kicker { color: var(--cyan); }

/* About */
.about-grid { display: grid; gap: 32px; align-items: start; }
.about-text > p { color: var(--muted); }
.notice {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--light-cyan); border: 1px solid #BFE6FA; border-inline-start: 4px solid var(--blue);
  border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 8px;
}
.notice svg { flex: 0 0 22px; width: 22px; height: 22px; fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; margin-top: 3px; }
.notice p { margin: 0; font-size: .95rem; color: var(--navy); }
.notice-soft { background: var(--white); }

.flow-card {
  margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; box-shadow: var(--shadow);
}
.flow-card figcaption { font-weight: 600; color: var(--navy); margin-bottom: 16px; font-size: .98rem; }
.flow { list-style: none; margin: 0; padding: 0; position: relative; }
.flow::before {
  content: ""; position: absolute; inset-inline-start: 17px; top: 18px; bottom: 18px;
  width: 2px; background: repeating-linear-gradient(var(--cyan) 0 6px, transparent 6px 11px);
}
.flow li { position: relative; display: grid; grid-template-columns: 36px 1fr; column-gap: 14px; align-items: center; padding: 8px 0; }
.flow-num {
  grid-row: span 2; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--blue); color: var(--white);
  font-family: var(--font-en); font-weight: 700; font-size: .9rem; position: relative; z-index: 1;
  box-shadow: 0 0 0 4px var(--white);
}
.flow-name { font-weight: 600; line-height: 1.4; }
.flow-en { font-size: .78rem; color: var(--deep); line-height: 1.3; justify-self: start; }
.flow-note { margin: 14px 0 0; font-size: .85rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 12px; }

/* Services */
.cards-grid { display: grid; gap: 18px; }
.service-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px; display: flex; flex-direction: column;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.service-card:hover { border-color: #9FD7F3; box-shadow: var(--shadow); transform: translateY(-2px); }
.service-card p { color: var(--muted); font-size: .96rem; flex: 1; }
.icon-box {
  width: 56px; height: 56px; border-radius: 14px; background: var(--light-cyan);
  display: grid; place-items: center; margin-bottom: 16px;
}
.icon-box svg { width: 32px; height: 32px; fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.card-link { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.card-link::after { content: "←"; font-family: var(--font-en); transition: transform .2s; }
.card-link:hover::after { transform: translateX(-4px); }

.services-strip {
  margin-top: 28px; display: grid; gap: 0; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.strip-media { margin: 0; background: var(--navy); }
.strip-media img { width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.strip-text { padding: 24px 22px; }
.strip-text p { color: var(--muted); }

/* Why */
.why-grid { display: grid; gap: 32px; align-items: start; }
.why-intro > p { color: var(--muted); }
.why-media { margin: 20px 0 0; border-radius: var(--radius); overflow: hidden; background: var(--navy); }
.why-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.why-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.why-list li {
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; background: var(--white);
}
.why-list h3 { margin-bottom: .2em; font-size: 1.05rem; }
.why-list p { margin: 0; color: var(--muted); font-size: .95rem; }
.why-icon { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; }
.why-icon svg { width: 18px; height: 18px; fill: none; stroke: var(--white); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* Process */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.step {
  position: relative; background: rgba(255, 255, 255, .06); border: 1px solid rgba(17, 172, 234, .35);
  border-radius: var(--radius-sm); padding: 18px 18px 16px;
}
.step-num { font-family: var(--font-en); font-weight: 700; font-size: 1.5rem; color: var(--cyan); display: block; line-height: 1; margin-bottom: 10px; }
.step h3 { color: var(--white); font-size: 1.04rem; margin-bottom: .3em; }
.step p { color: #C5DDEE; margin: 0; font-size: .93rem; }
.center-cta { text-align: center; margin-top: 32px; }

/* Coverage */
.coverage-grid { display: grid; gap: 32px; align-items: center; }
.coverage-text > p { color: var(--muted); }
.regions { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.regions li { background: var(--pale); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-size: .9rem; font-weight: 500; }
.map-card { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.ksa-map { width: 100%; height: auto; }
.map-card figcaption { text-align: center; font-weight: 600; color: var(--deep); margin-top: 10px; }

/* Request */
.request-grid { display: grid; gap: 32px; align-items: start; }
.request-intro > p { color: var(--muted); }
.contact-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.contact-box h3 { font-size: 1rem; margin-bottom: 8px; }
.contact-line { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--navy); text-decoration: none; font-weight: 500; }
.contact-line + .contact-line { border-top: 1px solid var(--pale); }
.contact-line svg { flex: 0 0 22px; width: 22px; height: 22px; fill: none; stroke: var(--blue); stroke-width: 1.8; stroke-linejoin: round; }
.contact-line:first-of-type svg { fill: var(--blue); stroke: none; }
.contact-line:hover { color: var(--blue); }

.request-form {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 20px; box-shadow: var(--shadow);
  display: grid; gap: 16px;
}
.form-hint { margin: 0; font-size: .88rem; color: var(--muted); }
.field { margin: 0; min-width: 0; }
fieldset.field { border: 0; padding: 0; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; padding: 0; }
.req { color: var(--blue); }
.optional { font-weight: 400; color: var(--muted); font-size: .88rem; }
.field input[type="text"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  font: inherit; font-size: 1rem; color: var(--navy);
  background: var(--white); border: 1.5px solid #BFD6E6; border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
}
.field input[dir="ltr"] { text-align: right; }
.field input[dir="ltr"]::placeholder { text-align: right; }
.field textarea { resize: vertical; min-height: 110px; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--blue) 50%), linear-gradient(135deg, var(--blue) 50%, transparent 50%); background-position: 18px 21px, 24px 21px; background-size: 6px 6px; background-repeat: no-repeat; padding-left: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(17, 172, 234, .2); outline: none; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--error); }
.field-error { margin: 4px 0 0; font-size: .85rem; color: var(--error); min-height: 0; }
.field-error:empty { display: none; }
.field-help { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice {
  display: inline-flex !important; align-items: center; gap: 8px; margin: 0 !important; font-weight: 500 !important;
  border: 1.5px solid #BFD6E6; border-radius: 999px; padding: 8px 16px; cursor: pointer; min-height: 44px;
}
.choice input { accent-color: var(--blue); width: 18px; height: 18px; margin: 0; }
.choice:has(input:checked) { border-color: var(--blue); background: var(--light-cyan); }
.form-note { margin: 8px 0 0; font-size: .84rem; color: var(--muted); text-align: center; }
.form-status { border-radius: var(--radius-sm); padding: 14px 16px; font-size: .95rem; }
.form-status.is-success { background: #E8F7EF; border: 1px solid #A6DDBF; color: #11512F; }
.form-status.is-error { background: #FCECEB; border: 1px solid #F0B7B3; color: var(--error); }
.form-status a { font-weight: 600; }

/* FAQ */
.faq-list { display: grid; gap: 12px; }
.faq-list details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
.faq-list details[open] { border-color: #9FD7F3; box-shadow: var(--shadow); }
.faq-list summary {
  list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--light-cyan); color: var(--blue);
  font-family: var(--font-en); font-weight: 700;
}
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: 0; padding: 0 18px 18px; color: var(--muted); }

/* Footer */
.site-footer { background: var(--navy); color: #C5DDEE; padding: 48px 0 0; }
.footer-grid { display: grid; gap: 28px; }
.footer-logo { display: inline-block; background: var(--white); border-radius: 12px; padding: 8px 12px; margin-bottom: 12px; }
.footer-logo img { width: 150px; }
.footer-brand p { font-size: .93rem; max-width: 42ch; }
.footer-col h2 { color: var(--white); font-size: 1rem; margin-bottom: 10px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .93rem; }
.footer-col a { color: #C5DDEE; text-decoration: none; }
.footer-col a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 32px; padding-top: 16px; padding-bottom: 16px; font-size: .85rem; }
.footer-bottom p { margin: 0; }

/* Mobile action bar */
.mobile-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--white); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 18px rgba(3, 45, 91, .08);
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-bar a { display: grid; place-items: center; min-height: 56px; text-decoration: none; font-weight: 600; color: var(--navy); font-size: .95rem; }
.mobile-bar a + a { border-inline-start: 1px solid var(--line); }
.mobile-bar a.is-primary { background: var(--blue); color: var(--white); }

/* ---------- ≥ 600px ---------- */
@media (min-width: 600px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .request-form { grid-template-columns: repeat(2, 1fr); padding: 28px; }
  .request-form > .form-hint, .field-full, .form-status { grid-column: 1 / -1; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .brand img { width: 150px; }
  .header-cta { display: inline-flex; }
  .hero-actions .btn { flex: 0 0 auto; min-width: 180px; }
}

/* ---------- ≥ 900px ---------- */
@media (min-width: 900px) {
  :root { --header-h: 78px; }
  body { padding-bottom: 0; }
  .mobile-bar { display: none; }

  .main-nav { position: static; display: block; background: none; border: 0; box-shadow: none; }
  .main-nav ul { display: flex; gap: 4px; padding: 0; }
  .main-nav a { border: 0; padding: 8px 10px; border-radius: 8px; font-size: .95rem; }
  .main-nav a:hover { background: var(--pale); }
  .nav-toggle { display: none; }
  .header-cta { display: inline-flex; }
  .brand img { width: 160px; }

  .hero { padding: 64px 0 72px; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 48px; }
  .hero-media img { aspect-ratio: 4 / 3; }

  .section { padding: 88px 0; }
  .about-grid { grid-template-columns: 1.2fr 1fr; gap: 48px; }
  .cards-grid { grid-template-columns: repeat(4, 1fr); }
  .services-strip { grid-template-columns: minmax(0, 420px) 1fr; align-items: center; }
  .strip-text { padding: 32px 40px; }
  .why-grid { grid-template-columns: 1fr 1.2fr; gap: 48px; }
  .steps { grid-template-columns: repeat(5, 1fr); }
  .step::after {
    content: ""; position: absolute; top: 30px; inset-inline-end: -14px; width: 14px; height: 2px; background: var(--cyan);
  }
  .step:last-child::after { display: none; }
  .coverage-grid { grid-template-columns: 1fr 1.1fr; gap: 56px; }
  .request-grid { grid-template-columns: 1fr 1.35fr; gap: 48px; }
}

@media (min-width: 1100px) {
  .header-phone { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
