/* SiteFlow public site — Arabic-first, RTL. */
:root {
  /* SiteFlow brand v1.0 — design/brand/README.md */
  --ink: #101D30;          /* Ink Navy */
  --ink-2: #16253B;
  --paper: #F8F6F0;        /* Paper */
  --paper-2: #EFEBE1;      /* Sand */
  --card: #FFFFFF;
  --line: #E1DBCD;
  --muted: #5D6877;        /* Slate — 5.23:1 on Paper */
  --mist: #A8B3C2;         /* secondary text on navy — 7.97:1 */
  --gold: #C9A566;         /* Champagne — details on navy only (2.15:1 on Paper) */
  --bronze: #7D5F27;       /* gold for text on light — 5.49:1 */
  --sapphire: #1F62B3;     /* actions and highlights — 5.62:1 on Paper */
  --sapphire-2: #18508F;
  --sapphire-l: #368CE0;   /* links/focus on navy */
  --radius: 14px;

  --arabic: "Tajawal", "Segoe UI", Tahoma, system-ui, sans-serif;
  --latin: "Tajawal", "Segoe UI", Arial, system-ui, sans-serif;

  --gutter: clamp(18px, 4vw, 48px);
  --section: clamp(72px, 9vw, 120px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 320px;
  font-family: var(--arabic);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p, figure, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--sapphire-l); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1160px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header { position: relative; height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 36px; width: auto; }
.site-nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 36px); font-size: 15px; font-weight: 500; color: #33435A; }
.site-nav a { transition: color .2s ease; }
.site-nav a:hover { color: var(--sapphire); }
.site-nav .nav-login { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px solid var(--ink); border-radius: 8px; color: var(--ink); font-weight: 700; }
.site-nav .nav-login:hover { color: #fff; background: var(--ink); }
.nav-login span { font-family: var(--latin); }
.menu-toggle { display: none; }

/* ---------- Buttons ---------- */
.button { min-height: 50px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid transparent; border-radius: 9px; font-size: 16px; font-weight: 700; white-space: nowrap; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.button:hover { transform: translateY(-2px); }
.button span { font: 700 16px var(--latin); }
.button-primary { color: #fff; background: var(--sapphire); }
.button-primary:hover { background: var(--sapphire-2); }
.button-secondary { color: var(--ink); border-color: #C9C2B2; }
.button-secondary:hover { border-color: var(--ink); }
.button-secondary span { color: var(--sapphire); }

/* ---------- Shared type ---------- */
/* Arabic headings: no negative tracking — it breaks letter joins. */
.eyebrow { margin-bottom: 14px; color: var(--bronze); font-size: 14px; font-weight: 700; }
.section-heading h2 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.45; font-weight: 800; text-wrap: balance; }
.section-heading h2 span { color: var(--sapphire); }
.section-heading > p:not(.eyebrow) { margin-top: 16px; max-width: 46ch; color: var(--muted); font-size: 16px; line-height: 1.95; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(36px, 6vw, 80px) clamp(64px, 8vw, 104px); display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); align-items: center; gap: clamp(32px, 5vw, 72px); }
.hero-title { direction: ltr; text-align: right; font: 800 clamp(52px, 7.2vw, 100px)/1.02 var(--latin); letter-spacing: -.035em; text-wrap: balance; margin-bottom: 28px; }
.hero-title em { font-style: normal; color: var(--sapphire); }
.hero-support { font-size: clamp(21px, 2.1vw, 30px); line-height: 1.6; font-weight: 700; margin-bottom: 12px; }
.hero-description { max-width: 34em; color: var(--muted); font-size: 17px; line-height: 1.95; }
.hero-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }

.hero-stage { padding: clamp(18px, 2.4vw, 32px); border-radius: 22px; background: var(--paper-2); }
.report-card { padding: clamp(18px, 2vw, 24px); border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: 10px; background: var(--card); box-shadow: 0 18px 40px -24px #101D3040; }
.report-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 13px; }
.report-meta b { color: var(--ink); font-family: var(--latin); font-weight: 800; }
.report-card h2 { margin-top: 18px; font-size: clamp(21px, 2vw, 25px); line-height: 1.4; }
.report-project { margin-bottom: 16px; color: var(--muted); font-size: 15px; }
.report-photo img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; }
.report-photo figcaption { margin-top: 8px; font-size: 14px; font-weight: 700; }
.report-rows { margin-top: 14px; }
.report-rows div { display: flex; justify-content: space-between; gap: 12px; padding-block: 11px; border-top: 1px solid var(--line); font-size: 14px; }
.report-rows dt { color: var(--muted); }
.report-rows dd { font-weight: 700; text-align: end; }
.report-card small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }

/* ---------- Features ---------- */
.features { padding-block: var(--section); border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; gap: clamp(36px, 6vw, 80px); }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); }
.feature-list li { padding: clamp(22px, 2.6vw, 32px); background: var(--card); }
.feature-icon { width: 44px; height: 44px; margin-bottom: 18px; display: grid; place-items: center; border-radius: 11px; color: var(--gold); background: var(--ink); }
.feature-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feature-list h3 { margin-bottom: 6px; font-size: 18px; line-height: 1.5; font-weight: 800; }
.feature-list p { color: var(--muted); font-size: 15px; line-height: 1.85; }

/* ---------- Workflow ---------- */
.workflow { padding-block: var(--section); color: #fff; background: var(--ink); }
.workflow-inner { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; gap: clamp(36px, 6vw, 80px); }
.workflow .eyebrow, .workflow h2 span { color: var(--gold); }
.steps li { display: grid; grid-template-columns: 52px 1fr; gap: 18px; padding-block: 24px; border-top: 1px solid #2A3B53; }
.steps li:last-child { border-bottom: 1px solid #2A3B53; }
.step-count { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #C9A56666; border-radius: 50%; color: var(--gold); font-weight: 800; }
.steps h3 { margin-bottom: 4px; font-size: 18px; line-height: 1.5; font-weight: 800; }
.steps p { color: var(--mist); font-size: 15px; }

/* ---------- Download (closing section) ---------- */
.download { padding-block: var(--section); }
.download-panel { padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(28px, 5vw, 64px); border-radius: 22px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, var(--ink-2), var(--ink) 60%); }
.download .eyebrow, .download h2 span { color: var(--gold); }
.download-copy > p:not(.eyebrow) { color: #C9D1DB; }
.download-copy { max-width: 560px; }
.download-actions { width: 260px; display: flex; flex-direction: column; gap: 10px; }
.button-download { color: #fff; border-color: #A8B3C266; }
.button-download span { color: var(--gold); }
.button-download[aria-disabled="true"] { color: var(--mist); cursor: not-allowed; }
.button-download[aria-disabled="true"]:hover { transform: none; }
.download-actions small { color: var(--mist); font-size: 13px; line-height: 1.7; }

/* ---------- Footer ---------- */
.site-footer { min-height: 88px; padding-block: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.brand-footer img { height: 30px; }
.site-footer p { font: 700 13px var(--latin); letter-spacing: .02em; color: var(--ink); }

/* ---------- iPad landscape / small laptop ---------- */
@media (max-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero-title { font-size: clamp(52px, 7vw, 76px); }
}

/* ---------- iPad portrait ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { max-width: 640px; }
  .hero-title { font-size: clamp(56px, 10vw, 84px); }
  .hero-stage { max-width: 600px; }
  .features, .workflow-inner { grid-template-columns: 1fr; }
  .section-heading { max-width: 600px; }
  .download-panel { grid-template-columns: 1fr; }
  .download-actions { width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .download-actions small { flex-basis: 100%; }
}

/* ---------- Phones ---------- */
@media (max-width: 640px) {
  .site-header { height: 68px; }
  .brand img { height: 32px; }
  .menu-toggle { width: 44px; height: 44px; display: grid; place-content: center; gap: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; }
  .menu-toggle span { width: 18px; height: 2px; display: block; border-radius: 2px; background: var(--ink); }
  .site-nav { position: absolute; z-index: 10; top: 62px; inset-inline: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: 0 18px 38px #101D301F; }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 14px; }
  .site-nav .nav-login { margin-top: 6px; justify-content: center; }

  .hero { padding-top: 24px; gap: 36px; }
  .hero-title { font-size: clamp(44px, 13.5vw, 64px); margin-bottom: 18px; }
  .hero-support { font-size: 20px; }
  .hero-description { font-size: 16px; }
  .hero-actions { margin-top: 26px; }
  .hero-actions .button { flex: 1 1 100%; }
  .hero-stage { padding: 12px; border-radius: 16px; }

  .feature-list { grid-template-columns: 1fr; }
  .feature-list li { display: grid; grid-template-columns: 44px 1fr; column-gap: 16px; }
  .feature-icon { grid-row: span 2; margin-bottom: 0; }

  .steps li { grid-template-columns: 40px 1fr; gap: 14px; padding-block: 20px; }
  .steps h3 { font-size: 17px; }

  .download-panel { border-radius: 16px; }
  .download-actions { flex-direction: column; align-items: stretch; }

  .site-footer { justify-content: center; text-align: center; }
}

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

/* =====================================================================
   Experiment: centred, stacked hero (composition after Cruip "Simple
   Light", rebuilt in our own CSS). Slogan → Arabic line → actions read
   in one column, and the daily report becomes a wide showcase below,
   so nothing sits beside empty space at 820px.
   ===================================================================== */
.hero.hero-center { display: block; text-align: center; padding-block: clamp(36px, 6vw, 88px) clamp(64px, 8vw, 112px); }
.hero-center .hero-copy { max-width: 900px; margin-inline: auto; }
.hero-center .hero-title {
  text-align: center; font-size: clamp(50px, 9.4vw, 132px); line-height: 1.04;
  padding-block: .1em .14em; margin-bottom: 26px;
  border-block: 1px solid; border-image: linear-gradient(90deg, transparent, var(--line) 18%, var(--gold) 50%, var(--line) 82%, transparent) 1;
}
.hero-center .hero-support { font-size: clamp(22px, 2.6vw, 34px); margin-bottom: 10px; text-wrap: balance; }
.hero-center .hero-description { margin-inline: auto; max-width: 36em; text-wrap: pretty; }
.hero-center .hero-actions { justify-content: center; margin-top: 30px; }

/* Showcase: navy stage with a gold hairline, the report laid out wide */
.hero-center .hero-stage {
  position: relative; max-width: 1040px; margin: clamp(40px, 6vw, 72px) auto 0; text-align: start;
  padding: clamp(12px, 2.6vw, 36px); border-radius: 24px;
  background: radial-gradient(120% 120% at 50% 0%, var(--ink-2), var(--ink) 65%);
  box-shadow: inset 0 0 0 1px #C9A56638, 0 40px 80px -48px #101D30aa;
}
.hero-center .report-card { border-top-width: 4px; box-shadow: none; }
@media (min-width: 700px) {
  .hero-center .report-card {
    display: grid; column-gap: clamp(20px, 3vw, 36px);
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    grid-template-rows: auto auto auto 1fr auto;
    grid-template-areas: "meta photo" "title photo" "project photo" "rows photo" "note photo";
    padding: clamp(18px, 2.4vw, 28px);
  }
  .hero-center .report-meta { grid-area: meta; }
  .hero-center .report-card h2 { grid-area: title; font-size: clamp(24px, 2.6vw, 32px); }
  .hero-center .report-project { grid-area: project; }
  .hero-center .report-photo { grid-area: photo; align-self: start; }
  .hero-center .report-rows { grid-area: rows; align-self: end; }
  .hero-center .report-card small { grid-area: note; }
  .hero-center .report-rows div { font-size: 15px; padding-block: 13px; }
}
@media (max-width: 640px) {
  .hero.hero-center { padding-top: 20px; }
  .hero-center .hero-title { font-size: clamp(44px, 14vw, 64px); margin-bottom: 18px; }
  .hero-center .hero-support { font-size: 21px; }
  .hero-center .hero-stage { margin-top: 36px; border-radius: 18px; padding: 10px; }
  .hero-center .report-card { padding: 16px; }
  .hero-center .report-card h2 { font-size: 22px; }
}
@media (min-width: 700px) and (max-width: 900px) {
  .hero-center .report-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero-center .report-rows div { gap: 16px; }
  .hero-center .report-rows dd { white-space: nowrap; }
}
