/* OneCar website. Brand: docs/brand.md (black, one yellow, Studio Lacquer).
   Logical properties (inline-start/end) so Arabic flips by itself with dir="rtl". */

:root {
  --headlight: #FFE600;
  --bg: #000;
  --surface: #0E0E0E;
  --raised: #1C1C1E;
  --stroke: #242424;
  --chalk: #fff;
  --muted: #A4A4A4;
  --signal: #FF453A;
  --r-l: 16px;
  --r-m: 12px;
  --gutter: 20px;
  --max: 1120px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--chalk);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html[lang="ar"] body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Arabic", "Geeza Pro", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  font-size: 18px;
  line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--headlight); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--headlight); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.latin { direction: ltr; unicode-bidi: isolate; }

/* ---------- Top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(0, 0, 0, .78);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--chalk); direction: ltr; }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: auto; }
.wordmark { font-weight: 800; font-size: 22px; letter-spacing: -.03em; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif; }
.top nav { display: flex; align-items: center; gap: 18px; font-size: 15px; }
.top nav a { color: var(--muted); }
.top nav a:hover { color: var(--chalk); text-decoration: none; }
.top nav a.lang { color: var(--chalk); padding: 6px 12px; border-radius: 999px; background: linear-gradient(#232325, #141415); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
@media (max-width: 560px) { .top nav .hide-sm { display: none; } }

/* ---------- Type ---------- */
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.35; }
h1 { font-size: clamp(40px, 8vw, 76px); }
h2 { font-size: clamp(30px, 5vw, 46px); }
h3 { font-size: 20px; font-weight: 700; }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 34em; margin: 18px 0 0; }
.kicker { color: var(--headlight); font-weight: 600; font-size: 15px; margin: 0 0 10px; }
.small { font-size: 14px; color: var(--muted); }
p { margin: 12px 0 0; }

/* ---------- Lacquer ---------- */
.lacquer {
  background: linear-gradient(180deg, #171717 0%, #0B0B0B 100%);
  border-radius: var(--r-l);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 24px 48px -12px rgba(0, 0, 0, .9);
}
.soon {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 20px 12px 16px; border-radius: var(--r-m);
  background: linear-gradient(180deg, #242426, #121213);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 10px 30px -10px rgba(0,0,0,.9);
  color: var(--chalk);
}
html[dir="rtl"] .soon { padding: 12px 16px 12px 20px; }
.soon svg { width: 26px; height: 26px; flex: none; }
.soon b { display: block; font-size: 17px; line-height: 1.2; }
.soon span { display: block; font-size: 13px; color: var(--muted); line-height: 1.3; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 30px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 56px 0 40px; overflow: hidden; }
.hero::before { /* the spotlight from above */
  content: ""; position: absolute; inset: -20% -10% auto; height: 120%;
  background: radial-gradient(50% 45% at 50% 0%, rgba(255, 230, 0, .10), transparent 70%),
              radial-gradient(40% 50% at 70% 35%, rgba(255, 255, 255, .06), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art .phone { width: min(300px, 70vw); }
.hero-note { margin-top: 22px; }
@media (max-width: 860px) {
  .hero { padding-top: 36px; }
  .hero .wrap { grid-template-columns: 1fr; }
}

/* ---------- Phone frame (real app screenshots) ---------- */
.phone {
  position: relative; margin: 0;
  border-radius: 46px; padding: 9px;
  background: linear-gradient(160deg, #3a3a3c, #121212 40%, #2a2a2c);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 40px 80px -20px rgba(0,0,0,1), 0 0 0 1px #000;
}
.phone img { border-radius: 38px; width: 100%; aspect-ratio: 1320 / 2868; object-fit: cover; background: #000; }
.phone.sm { width: min(260px, 72vw); }
.reflect { position: relative; }
.reflect::after { /* glossy floor under the phone */
  content: ""; position: absolute; left: 10%; right: 10%; bottom: -26px; height: 40px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255,255,255,.10), transparent 70%);
  filter: blur(6px);
}

/* ---------- CarPlay screen (drawn frame, real widget pictures) ---------- */
.carplay {
  direction: ltr; /* the car's screen doesn't flip; the widgets inside are already localised */
  display: grid; grid-template-columns: 56px 1fr; gap: 14px;
  padding: 14px; border-radius: 26px;
  background: linear-gradient(180deg, #121214, #050505);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 0 0 10px #0a0a0a, 0 0 0 11px #2a2a2a, 0 40px 80px -20px #000;
  width: 100%; max-width: 620px; margin: 0 auto;
}
.carplay .dock { display: flex; flex-direction: column; gap: 10px; align-items: center; padding-top: 4px; }
.carplay .dock i { display: block; width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(#2c2c2e, #1a1a1b); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.carplay .dock i.on { background: linear-gradient(#FFF27A, #FFE600 50%, #E0C400); }
.carplay .dock .clock { font: 600 13px -apple-system, BlinkMacSystemFont, sans-serif; color: #fff; }
.carplay .tiles { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.carplay .tiles img { border-radius: 18px; width: 100%; aspect-ratio: 1; background: #000; }
.carplay .tiles .music { border-radius: 18px; aspect-ratio: 1; background: linear-gradient(#1d1d1f, #111); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; gap: 6px; }
.carplay .tiles .music i { display: block; height: 7px; border-radius: 4px; background: #2e2e30; }
.carplay .tiles .music i:first-child { width: 70%; background: #3a3a3c; }
.carplay .tiles .music i:last-child { width: 45%; }
@media (max-width: 520px) {
  .carplay { grid-template-columns: 40px 1fr; padding: 10px; gap: 10px; border-radius: 20px; }
  .carplay .dock i { width: 30px; height: 30px; border-radius: 8px; }
  .carplay .tiles { gap: 8px; }
  .carplay .tiles img, .carplay .tiles .music { border-radius: 12px; }
}
.caption { text-align: center; margin-top: 18px; }

/* ---------- Sections ---------- */
section.block { padding: 72px 0; border-top: 1px solid rgba(255,255,255,.05); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.flip > :first-child { order: 2; }
.split .art { display: flex; justify-content: center; gap: 18px; }
.split .art .phone:nth-child(2) { margin-top: 48px; }
@media (max-width: 860px) {
  section.block { padding: 56px 0; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split.flip > :first-child { order: 0; }
  .split .art .phone.sm { width: min(220px, 44vw); }
  .split .art .phone:nth-child(2) { margin-top: 32px; }
}

ul.points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
ul.points li { position: relative; padding-inline-start: 26px; color: #E6E6E6; }
ul.points li::before { content: ""; position: absolute; inset-inline-start: 0; top: .62em; width: 10px; height: 10px; border-radius: 3px; background: var(--headlight); box-shadow: 0 0 10px rgba(255,230,0,.5); }
ul.points li b { color: var(--chalk); }

/* Widget gallery */
.designs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 36px; }
.designs figure { margin: 0; }
.designs img { border-radius: 22px; width: 100%; aspect-ratio: 1; box-shadow: 0 0 0 1px #1d1d1d, 0 20px 40px -16px #000; }
.designs figcaption { margin-top: 10px; font-weight: 600; font-size: 15px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--raised); color: var(--muted); }
.tag.free { background: var(--headlight); color: #000; }
@media (max-width: 860px) { .designs { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .designs { grid-template-columns: repeat(2, 1fr); gap: 14px; } }

.path { display: inline-block; margin-top: 16px; padding: 10px 14px; border-radius: var(--r-m); background: var(--raised); font-size: 15px; color: #E6E6E6; }

/* Privacy band */
.promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.promise .lacquer { padding: 22px; }
.promise h3 { font-size: 19px; }
.promise p { color: var(--muted); font-size: 16px; }
@media (max-width: 760px) { .promise { grid-template-columns: 1fr; } }

/* Pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 32px; align-items: stretch; }
.plan { padding: 28px; display: flex; flex-direction: column; }
.plan h3 { font-size: 24px; }
.plan .sub { color: var(--muted); margin-top: 4px; }
.plan.pro { box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 0 0 1px rgba(255,230,0,.35), 0 24px 60px -16px rgba(255,230,0,.12); }
.plan .options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.plan .options div { padding: 12px 14px; border-radius: var(--r-m); background: var(--raised); font-size: 15px; }
.plan .options b { display: block; }
.plan .options span { color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* Closing */
.closing { text-align: center; padding: 88px 0; }
.closing img.icon { width: 112px; margin: 0 auto 24px; border-radius: 26px; box-shadow: 0 30px 60px -20px rgba(255,230,0,.25); }
.closing .cta-row { justify-content: center; }

/* ---------- Plain pages (privacy, support) ---------- */
.doc { max-width: 720px; padding-top: 48px; padding-bottom: 72px; }
.doc h1 { font-size: clamp(36px, 7vw, 52px); }
.doc .updated { color: var(--muted); margin-top: 10px; }
.doc section { margin-top: 34px; }
.doc section p { color: #D9D9D9; }
.doc .card { padding: 22px; margin-top: 34px; }
.doc .card h2 { font-size: 22px; }
details.lacquer { padding: 0; margin-top: 12px; }
details summary { cursor: pointer; padding: 18px 20px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--headlight); font-weight: 700; }
details[open] summary::after { content: "–"; }
details .answer { padding: 0 20px 18px; color: #D9D9D9; }
details .answer p:first-child { margin-top: 0; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid rgba(255,255,255,.06); padding: 32px 0 44px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer nav a { color: var(--chalk); }
footer .legal { flex-basis: 100%; font-size: 13px; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

[id] { scroll-margin-top: 72px; }
