:root {
  --bg: #080807;            /* exactly the logo's background colour */
  --surface: #11130f;
  --surface-2: #171a14;
  --line: #262b22;
  --field-line: #6b7767;   /* >= 3:1 against the card and field fills (WCAG 1.4.11) */
  --text: #f4f7f2;
  --muted: #a9b4a6;
  --green: #65de3f;         /* wordmark green */
  --green-light: #9af145;   /* emblem highlight */
  --danger: #ff7a7a;
  --radius: 16px;
  --max: 1040px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Arabic", "Tahoma", sans-serif;
  line-height: 1.65;
}
html[lang="ar"] body { line-height: 1.85; }

a { color: var(--green); }
a:hover { color: var(--green-light); }
:focus-visible { outline: 3px solid var(--green-light); outline-offset: 3px; border-radius: 6px; }

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

.skip {
  position: absolute; inset-inline-start: 12px; top: -60px;
  background: var(--green); color: #031003; padding: 10px 16px; border-radius: 8px; font-weight: 700; z-index: 20;
}
.skip:focus { top: 12px; }

.demo-banner {
  background: #3a2f00; color: #ffe08a; text-align: center; padding: 8px 16px; font-size: 0.92rem; border-bottom: 1px solid #5a4700;
}

/* Top bar */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(8, 8, 7, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.top nav { display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 6px 2px; }
.top nav a:hover { color: var(--text); }
.top nav a.lang { color: var(--green); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; }
@media (max-width: 720px) { .top nav .hide-sm { display: none; } }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; padding: 48px 0 16px; }
.hero-text { text-align: start; }
.hero-logo { width: min(300px, 72%); height: auto; display: block; margin: 0 0 22px; }
.hero h1 { margin: 0 0 16px; max-width: 16ch; font-size: clamp(2rem, 5.2vw, 3.2rem); line-height: 1.12; letter-spacing: -0.03em; }
html[lang="ar"] .hero h1 { line-height: 1.35; letter-spacing: 0; max-width: 18ch; }
.hero p { margin: 0 0 26px; max-width: 54ch; color: var(--muted); font-size: clamp(1.02rem, 2.4vw, 1.18rem); }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-start; }
.hero-photo { margin: 0; }
.hero-photo img {
  display: block; width: 100%; height: auto; border-radius: 20px; border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(101, 222, 63, 0.14);
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 32px; }
  .hero h1 { max-width: none; }
}

.btn {
  display: inline-block; text-decoration: none; cursor: pointer; font: inherit; font-weight: 800;
  padding: 14px 26px; border-radius: 999px; border: 2px solid var(--green);
}
.btn-primary { background: linear-gradient(135deg, var(--green-light), var(--green)); color: #041004; }
.btn-primary:hover { color: #041004; filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--green); }
.btn-ghost:hover { background: rgba(101, 222, 63, 0.1); color: var(--green-light); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* Sections */
section { padding: 56px 0 8px; }
h2 { margin: 0 0 22px; font-size: clamp(1.4rem, 3.6vw, 1.9rem); letter-spacing: -0.02em; }
html[lang="ar"] h2 { letter-spacing: 0; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 0 0 6px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--muted); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 12px;
  border-radius: 50%; background: linear-gradient(135deg, var(--green-light), var(--green)); color: #041004; font-weight: 800;
}
.steps h3 { margin: 0 0 6px; font-size: 1.08rem; }
.steps p { margin: 0; color: var(--muted); }

.deal .card { border-color: #2f5a22; background: linear-gradient(180deg, #11190f, var(--surface)); }
.deal .big { font-size: clamp(2.2rem, 7vw, 3.2rem); font-weight: 800; line-height: 1; color: var(--green); margin-bottom: 8px; }

details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; padding: 14px 0; }
details p { margin: 0 0 14px; color: var(--muted); }

/* Form */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.fields { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
label, legend { font-weight: 700; font-size: 0.95rem; }
input[type="text"], input[type="tel"], input[type="email"], input[type="number"], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface-2);
  border: 1.5px solid var(--field-line); border-radius: 10px; padding: 12px 14px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: 2px solid transparent; outline-offset: 2px; box-shadow: 0 0 0 3px rgba(101, 222, 63, 0.25); }
::placeholder { color: #a9b4a6; opacity: 1; }
.field[data-invalid="true"] input, .field[data-invalid="true"] select, .field[data-invalid="true"] textarea { border-color: var(--danger); }
fieldset { border: 0; padding: 0; margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.checks label { font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--green); }
.err { color: var(--danger); font-size: 0.9rem; min-height: 1.2em; margin: 0; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.consent input { margin-top: 3px; flex: none; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 16px; }
.form-status .ok { border: 1px solid #2f5a22; background: #10190d; border-radius: 12px; padding: 18px; }
.form-status .ok h3 { margin: 0 0 4px; color: var(--green); }
.form-status .ok p { margin: 0; }
.form-status .bad { border: 1px solid #6a2b2b; background: #1d0f0f; color: #ffc7c7; border-radius: 12px; padding: 14px 18px; }

.contact-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.contact-card dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
.contact-card dt { color: var(--muted); font-weight: 600; }
.contact-card dd { margin: 0; }

footer { margin-top: 64px; border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: 0.95rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* Document pages (privacy, 404) */
.doc { max-width: 760px; padding: 40px 0 0; }
.doc h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 5vw, 2.5rem); letter-spacing: -0.02em; }
html[lang="ar"] .doc h1 { letter-spacing: 0; }
.doc .updated { color: var(--muted); margin: 0 0 24px; }
.doc h2 { margin: 30px 0 8px; font-size: 1.2rem; }
.doc p { margin: 0 0 12px; }

@media (max-width: 520px) {
  .form-card { padding: 18px; }
  .contact-card dl { grid-template-columns: 1fr; gap: 0; }
  .contact-card dt { margin-top: 8px; }
}

/* Utility classes (no inline styles, so the strict CSP can stay) */
.submit-row { margin: 18px 0 0; }
.section-intro { color: var(--muted); margin-top: -8px; }
.contact-intro { margin: 0 0 10px; }
.doc-back { margin-top: 28px; }
.second-lang { margin-top: 32px; }
