/* Colours are the app's language-selection screen (hajjmate/lib/language/language_selection_screen.dart).
   Logical properties throughout (inline-start/end) so the Urdu copy can set dir="rtl" and nothing else. */
:root {
  --canvas: #faf8f1;
  --surface: #ffffff;
  --sunk: #f1f5f3;
  --sunk-2: #e5ede9;
  --ink: #143d32;
  --muted: #63756c;
  --green: #005440;
  --green-deep: #003a2c;
  --green-soft: #f3faf6;
  --gold: #c59b27;
  --gold-ink: #7a5c0c;
  --gold-soft: rgba(197, 155, 39, .14);
  --line: #dce4dc;
  --line-strong: #b0beb7;
  --bad: #b3261e;
  --bad-soft: #fdecea;
  --on-green: #ffffff;
  --on-green-mute: rgba(255, 255, 255, .78);
  --shadow: 0 2px 8px rgba(0, 0, 0, .04);
  --shadow-lg: 0 10px 28px rgba(0, 84, 64, .14);
  --radius: 20px;
  --font: 'Hind Siliguri', 'Noto Sans Bengali', system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #142d27;
    --surface: #1b382f;
    --sunk: #28483f;
    --sunk-2: #203b33;
    --ink: #fff1d6;
    --muted: #b5c8bd;
    --green: #198767;
    --green-deep: #0e2620;
    --green-soft: #1e3f35;
    --gold-ink: #e3bd4f;
    --line: #2f5246;
    --line-strong: #4b6d61;
    --bad: #ffb4ab;
    --bad-soft: #3b1e1b;
    --shadow: 0 2px 8px rgba(0, 0, 0, .2);
    --shadow-lg: 0 10px 28px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
a { color: var(--green); }
button, input, select { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 18px; }

.skip { position: absolute; inset-inline-start: -999px; }
.skip:focus { inset-inline-start: 12px; top: 12px; z-index: 50; background: var(--surface); padding: 8px 12px; border-radius: 10px; }

/* ---- header ---- */
.top {
  position: absolute; inset-inline: 0; top: 0; z-index: 5;
  padding-block: 14px;
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--on-green); text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.brand b { font-size: 20px; letter-spacing: .3px; }
.brand small { display: block; font-size: 12px; color: var(--on-green-mute); font-weight: 500; line-height: 1.1; }
.top-cta {
  color: var(--on-green); text-decoration: none; font-weight: 600; font-size: 15px;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; padding: 0 18px;
  min-height: 44px; display: inline-flex; align-items: center;
}
.top-cta:hover { background: rgba(255, 255, 255, .1); }

/* ---- hero ---- */
.hero {
  position: relative;
  color: var(--on-green);
  background: radial-gradient(120% 80% at 85% 0%, #0b6b52 0%, rgba(11, 107, 82, 0) 60%),
              linear-gradient(165deg, #005440 0%, var(--green-deep) 100%);
  padding-block: 92px 56px;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: url('/driver/img/star-pattern.webp') repeat;
  background-size: 480px auto;
  opacity: .07;
  filter: invert(1);
}
.hero::after {
  content: ''; position: absolute; inset-inline: 0; bottom: -1px; height: 40px; z-index: -1;
  background: var(--canvas);
  clip-path: ellipse(75% 100% at 50% 100%);
}
.hero-grid { display: grid; gap: 34px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: #f4d77f;
  background: rgba(197, 155, 39, .16); border: 1px solid rgba(197, 155, 39, .45);
  padding: 4px 12px; border-radius: 999px;
}
.eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(197, 155, 39, .25); }

.hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(32px, 8.6vw, 54px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -.2px;
}
.hero h1 .gold { color: #f4d77f; }
.hero .lede { margin: 0 0 24px; font-size: clamp(17px, 4.4vw, 19px); color: var(--on-green-mute); max-width: 34em; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 26px; border-radius: 18px; border: 0;
  font-size: 18px; font-weight: 700; letter-spacing: .3px; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg { width: 20px; height: 20px; flex: none; }
[dir="rtl"] .btn .arrow { transform: scaleX(-1); }
.btn-gold { background: linear-gradient(135deg, #d8b043, var(--gold)); color: #1d1606; box-shadow: 0 10px 24px rgba(197, 155, 39, .35); }
.btn-gold:hover { box-shadow: 0 12px 30px rgba(197, 155, 39, .5); }
.btn-green { background: linear-gradient(135deg, var(--green), color-mix(in srgb, var(--green) 88%, #000)); color: var(--on-green); box-shadow: 0 8px 18px rgba(0, 84, 64, .32); width: 100%; }
.btn-green:hover { box-shadow: 0 10px 24px rgba(0, 84, 64, .42); }
.btn-ghost { background: transparent; color: var(--on-green); border: 1.5px solid rgba(255, 255, 255, .4); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-line { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); box-shadow: var(--shadow); width: 100%; }
.btn-line:hover { border-color: var(--green); }
.btn[disabled] { opacity: .65; cursor: progress; }

.ticks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 22px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--on-green-mute); }
.ticks li { display: flex; align-items: center; gap: 6px; }
.ticks li::before { content: '✓'; color: #f4d77f; font-weight: 700; }

/* the two "phone" cards in the hero */
.mock { display: grid; gap: 14px; max-width: 400px; width: 100%; justify-self: center; }
.mock-card {
  background: rgba(255, 255, 255, .97); color: #143d32;
  border-radius: 22px; padding: 16px 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
  border: 1px solid rgba(255, 255, 255, .6);
}
.mock-card.tilt { transform: rotate(-1.5deg); }
.mock-card.tilt2 { transform: rotate(1.2deg); margin-inline-start: 22px; }
.mock-head { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: #63756c; }
.mock-head .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #005440, #0b6b52); color: #fff; border: 1.5px solid #c59b27; flex: none; }
.mock-head .dot svg { width: 18px; height: 18px; }
.mock-head .pill { margin-inline-start: auto; font-size: 13px; font-weight: 700; color: #6e520a; background: rgba(197, 155, 39, .15); border: 1px solid rgba(197, 155, 39, .4); padding: 1px 9px; border-radius: 8px; }
.route { margin: 12px 0 4px; font-weight: 700; font-size: 17px; line-height: 1.4; }
.route span { color: #63756c; font-weight: 500; }
.meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; color: #63756c; }
.meta b { font-size: 20px; color: #005440; }
.bubble { margin-top: 10px; padding: 9px 13px; border-radius: 16px; font-size: 15px; line-height: 1.45; max-width: 92%; }
.bubble.me { background: #f3faf6; border: 1px solid #cfe3d8; }
.bubble.them { background: #fff7e2; border: 1px solid #efd99a; margin-inline-start: auto; }
.bubble small { display: block; font-size: 11.5px; font-weight: 700; color: #63756c; letter-spacing: .2px; }

/* ---- sections ---- */
section.block { padding-block: 56px; }
.kicker { display: inline-block; font-size: 14px; font-weight: 700; color: var(--gold-ink); letter-spacing: .4px; margin-bottom: 6px; }
h2 { margin: 0 0 10px; font-size: clamp(26px, 6.6vw, 36px); line-height: 1.25; font-weight: 700; }
.sub { margin: 0 0 28px; color: var(--muted); max-width: 36em; }

.grid { display: grid; gap: 14px; }

.card {
  background: var(--surface);
  border: 1.2px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.pain { display: flex; gap: 14px; align-items: flex-start; }
.pain .emb { background: var(--bad-soft); color: var(--bad); }
.pain h3, .feat h3 { margin: 0 0 2px; font-size: 18px; line-height: 1.35; }
.pain p, .feat p { margin: 0; color: var(--muted); font-size: 15.5px; }

.emb {
  width: 48px; height: 48px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--sunk), var(--sunk-2));
  color: var(--ink);
}
.emb svg { width: 24px; height: 24px; }

.solve { background: var(--surface); border-block: 1px solid var(--line); }
.feat { display: flex; gap: 14px; align-items: flex-start; }
.feat .emb { background: linear-gradient(135deg, var(--green), color-mix(in srgb, var(--green) 80%, #fff)); color: #fff; border: 1.5px solid var(--gold); }
.feat.card { background: var(--canvas); }
.feat .tag { display: inline-block; margin-inline-start: 6px; font-size: 13px; font-weight: 700; color: var(--gold-ink); background: var(--gold-soft); border: .8px solid rgba(197, 155, 39, .4); padding: 0 7px; border-radius: 8px; vertical-align: 2px; }

.trust { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.trust span { font-size: 14px; font-weight: 600; color: var(--ink); background: var(--green-soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }

/* ---- videos ---- */
.videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.video { margin: 0; }
.video-frame {
  position: relative; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden;
  background: linear-gradient(160deg, #0b6b52, #003a2c);
  border: 1.2px solid var(--line); box-shadow: var(--shadow-lg);
}
.video-frame video, .video-frame iframe, .video-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video-frame .soon {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px;
  color: #fff; text-align: center; padding: 14px;
  background: url('/driver/img/star-pattern.webp') center / 360px auto;
  background-blend-mode: soft-light;
}
.video-frame .soon .play { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); border: 1.5px solid rgba(244, 215, 127, .7); }
.video-frame .soon .play svg { width: 24px; height: 24px; margin-inline-start: 3px; }
.video-frame .soon b { font-size: 15px; color: #f4d77f; }
.video-frame button.yt { position: absolute; inset: 0; border: 0; padding: 0; background: none; cursor: pointer; }
.video-frame button.yt .play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; }
.video-frame button.yt .play svg { width: 26px; height: 26px; margin-inline-start: 3px; }
.video figcaption { margin-top: 10px; font-weight: 700; font-size: 16px; line-height: 1.35; }
.video figcaption span { display: block; font-weight: 500; font-size: 14px; color: var(--muted); }

/* ---- form ---- */
.join { padding-bottom: 72px; }
.form-card { padding: 22px 18px; border-radius: 24px; box-shadow: var(--shadow-lg); }
.field { margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-weight: 700; font-size: 16px; margin-bottom: 8px; padding: 0; }
.field .hint { font-weight: 500; color: var(--muted); font-size: 13.5px; }
.input {
  width: 100%; min-height: 54px; padding: 0 16px;
  background: var(--surface); border: 1.2px solid var(--line); border-radius: 16px;
  font-size: 17px; transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 18%, transparent); }
.phone { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; }
.phone select { padding-inline: 12px; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
[dir="rtl"] .phone select { background-position: 18px 50%, 13px 50%; }
.phone input { direction: ltr; text-align: start; letter-spacing: .5px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 6px 15px 6px 10px;
  background: var(--surface); border: 1.2px solid var(--line); border-radius: 14px;
  font-weight: 600; font-size: 15.5px; line-height: 1.3; transition: all .18s ease; user-select: none;
}
.chip span::before {
  content: ''; width: 20px; height: 20px; flex: none; border-radius: 50%;
  border: 2px solid var(--line-strong); background: transparent center / 12px no-repeat;
}
.chip input[type="checkbox"] + span::before { border-radius: 6px; }
.chip input:checked + span { border: 2px solid var(--green); background: var(--green-soft); padding: 5px 14px 5px 9px; box-shadow: 0 6px 16px rgba(0, 84, 64, .12); }
.chip input:checked + span::before {
  border-color: var(--green); background-color: var(--green);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.chip input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--green) 35%, transparent); outline-offset: 2px; }
.chip em { font-style: normal; font-weight: 500; font-size: 13px; color: var(--muted); }

.field.invalid .input, .field.invalid .chip span { border-color: var(--bad); }
.err { display: none; margin-top: 6px; color: var(--bad); font-size: 14px; font-weight: 600; }
.field.invalid .err { display: block; }

.hp { position: absolute !important; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }

.consent { margin: 4px 0 16px; font-size: 13.5px; color: var(--muted); }
.form-msg { display: none; margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; background: var(--bad-soft); color: var(--bad); font-weight: 600; font-size: 15px; }
.form-msg.on { display: block; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .8s linear infinite; display: none; }
.busy .spinner { display: block; }
.busy .arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- sticky CTA (phones) ---- */
.sticky {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 20;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform .25s ease;
}
.sticky.on { transform: none; }
.sticky .btn { width: 100%; min-height: 52px; }

/* ---- footer ---- */
.foot { padding-block: 26px 96px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; text-align: center; }
.foot a { color: var(--muted); display: inline-block; padding: 10px 4px; }
.foot img { width: 32px; height: 32px; border-radius: 9px; margin: 0 auto 8px; }

/* ---- thank-you page ---- */
.thanks-hero { padding-block: 88px 70px; text-align: center; }
.thanks-hero .wrap { max-width: 620px; }
.done {
  width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; color: #1d1606;
  background: linear-gradient(135deg, #e3bd4f, var(--gold));
  box-shadow: 0 0 0 8px rgba(197, 155, 39, .18), 0 14px 34px rgba(0, 0, 0, .3);
}
.done svg { width: 42px; height: 42px; }
.thanks-hero h1 { font-size: clamp(28px, 7.4vw, 44px); margin: 0 0 10px; }
.thanks-hero .lede { margin-inline: auto; }
.install { margin-top: -34px; position: relative; z-index: 2; }
.install .wrap, .wrap.narrow { max-width: 620px; }
.install .card { padding: 20px 18px; border-radius: 24px; box-shadow: var(--shadow-lg); display: grid; gap: 12px; }
.btn small { font-weight: 500; font-size: 13px; opacity: .8; }
.note { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps li::before {
  counter-increment: s; content: counter(s, bengali);
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 19px; color: #fff;
  background: linear-gradient(135deg, var(--green), color-mix(in srgb, var(--green) 80%, #fff));
  border: 1.5px solid var(--gold);
}
:lang(ur) .steps li::before { content: counter(s, arabic-indic); }
.steps h3 { margin: 2px 0 2px; font-size: 17.5px; }
.steps p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---- reveal ---- */
/* Hidden only once JS has marked it as below the fold, so a page without JS shows everything. */
.reveal.pre { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.pre.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal.pre { opacity: 1; transform: none; transition: none; } }

/* ---- wider screens ---- */
@media (min-width: 720px) {
  body { font-size: 18px; }
  .wrap { padding-inline: 28px; }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
  .grid.two { grid-template-columns: repeat(2, 1fr); }
  .pain { flex-direction: column; }
  .card { padding: 22px; }
  .videos { gap: 22px; max-width: 520px; }
  .form-card { padding: 32px; }
  .sticky { display: none; }
  .foot { padding-bottom: 32px; }
}
@media (min-width: 960px) {
  .hero { padding-block: 120px 96px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 48px; }
  .join .wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
  .join .intro { position: sticky; top: 28px; }
  .watch .wrap { display: grid; grid-template-columns: 1fr minmax(0, 560px); gap: 56px; align-items: center; }
  .watch .sub { margin-bottom: 0; }
}
