/* ═════════════════════════════════════════════════════════════════════════════
   iDrive2 marketing site.

   ONE stylesheet serves English and Arabic. Everything directional is written
   with logical properties — margin-inline-start, padding-inline, inset-inline —
   so `dir="rtl"` on <html> mirrors the whole layout with no second stylesheet
   and no `[dir="rtl"]` overrides to keep in sync. A physical `margin-left`
   anywhere in here is a bug.
   ═════════════════════════════════════════════════════════════════════════════ */

:root {
  --navy: #1a3c6e;
  --navy-dark: #12294c;
  --accent: #f0a500;
  --ink: #1f2933;
  --muted: #5a6572;
  --line: #e4e8ee;
  --bg-soft: #f6f8fb;
  --radius: 14px;
  --max: 1080px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  color: var(--ink);
  line-height: 1.65;
  background: #fff;
}

/* Arabic reads better a touch larger at the same nominal size, and the system
   Arabic faces have a smaller x-height than the Latin ones. */
html[lang="ar"] body {
  font-size: 1.05rem;
  line-height: 1.85;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--navy);
}

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

/* ── Skip link ──────────────────────────────────────────────────────────────
   Visible only when focused. A keyboard user should not have to tab through
   the whole header on every page. */
.skip {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip:focus {
  inset-inline-start: 0;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

header.site {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  z-index: 20;
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--navy);
  text-decoration: none;
  font-size: 1.15rem;
}

.brand img {
  width: 34px;
  height: 34px;
}

nav.site a {
  margin-inline-start: 18px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.93rem;
}

nav.site a:hover {
  color: var(--navy);
}

.lang-switch {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--navy);
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  padding-block: 72px 80px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.15;
  margin: 0 0 18px;
  max-width: 18ch;
}

.hero p.lede {
  font-size: 1.15rem;
  max-width: 60ch;
  margin: 0 0 28px;
  color: #d8e2f0;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #23282e;
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

/* ── Sections ───────────────────────────────────────────────────────────── */

section {
  padding-block: 64px;
}

section.soft {
  background: var(--bg-soft);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 12px;
  color: var(--navy);
}

.section-lede {
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 34px;
}

.grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--navy);
}

.card p {
  margin: 0;
  color: var(--muted);
}

.step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
  margin-bottom: 12px;
}

/* ── FAQ ─────────────────────────────────────────────────────────────────
   <details> rather than JS. It is keyboard accessible for free, and the answer
   text is in the DOM for crawlers whether or not it is open. */

details.faq {
  border-bottom: 1px solid var(--line);
  padding-block: 16px;
}

details.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
  list-style: none;
}

details.faq summary::-webkit-details-marker {
  display: none;
}

details.faq summary::after {
  content: "+";
  float: inline-end;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--muted);
}

details.faq[open] summary::after {
  content: "\2212";
}

details.faq p {
  color: var(--muted);
  margin: 10px 0 0;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

footer.site {
  background: var(--navy-dark);
  color: #c7d3e4;
  padding-block: 44px 34px;
  font-size: 0.92rem;
}

footer.site a {
  color: #fff;
  text-decoration: none;
}

footer.site a:hover {
  text-decoration: underline;
}

.foot-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 28px;
}

.foot-grid h4 {
  color: #fff;
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.foot-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot-grid li {
  margin-bottom: 6px;
}

.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

/* ── Policy pages ───────────────────────────────────────────────────────── */

article.policy {
  max-width: 78ch;
  margin-inline: auto;
}

article.policy h1 {
  color: var(--navy);
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  margin-bottom: 6px;
}

article.policy h2 {
  font-size: 1.25rem;
  margin-top: 36px;
}

article.policy h3 {
  font-size: 1.05rem;
  margin-top: 26px;
  color: var(--navy-dark);
}

article.policy blockquote {
  margin: 0 0 26px;
  padding: 12px 18px;
  background: var(--bg-soft);
  border-inline-start: 3px solid var(--accent);
  color: var(--muted);
  font-size: 0.9rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* Mirrors with the text, because the radius is physical and would otherwise
   sit on the wrong corners in Arabic. */
html[dir="rtl"] article.policy blockquote {
  border-radius: var(--radius) 0 0 var(--radius);
}

article.policy table {
  width: 100%;
  border-collapse: collapse;
  margin-block: 18px;
  font-size: 0.92rem;
}

article.policy th,
article.policy td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: start;
}

article.policy th {
  background: var(--bg-soft);
}

.policy-index {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.policy-index a {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  font-weight: 600;
}

.policy-index a:hover {
  border-color: var(--navy);
}

/* ── Print ──────────────────────────────────────────────────────────────── */

@media print {
  header.site,
  footer.site,
  .skip {
    display: none;
  }

  body {
    font-size: 11pt;
  }
}
