/* ExamLingo — marketing site. Brand colours match mobile_app/lib/shared/theme/app_colors.dart */
:root {
  --red: #7a0e17;
  --red-dark: #4a080e;
  --red-light: #fbe9ea;
  --gold: #b8860b;
  --bg: #faf7f7;
  --surface: #ffffff;
  --text: #1f1416;
  --muted: #6b5a5c;
  --border: #eadcdd;
  --shadow: 0 24px 60px -28px rgba(74, 8, 14, 0.35);
  --radius: 20px;
  --max: 1180px;
  --nav-h: 68px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #150d0e;
    --surface: #211617;
    --text: #f5ecec;
    --muted: #bba8aa;
    --border: #3a2a2c;
    --red-light: #3a1a1d;
    --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.75);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.65;
  font-size: 17px;
}
html[lang="ar"] body { font-family: "IBM Plex Sans Arabic", "Plus Jakarta Sans", system-ui, sans-serif; line-height: 1.75; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 14px;
  font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer;
  border: 0; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 12px 26px -12px rgba(122, 14, 23, .7); }
.btn-red:hover { background: #8e1420; }
.btn-light { background: #fff; color: var(--red); box-shadow: 0 12px 26px -12px rgba(0,0,0,.5); }
.btn-outline { background: rgba(255,255,255,.75); color: var(--red); border: 1.5px solid rgba(122,14,23,.25); backdrop-filter: blur(6px); }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.5); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 15px; border-radius: 12px; }
.soon { font-size: 12px; font-weight: 700; background: rgba(122,14,23,.1); color: var(--red); padding: 2px 8px; border-radius: 999px; }
.btn-ghost .soon { background: rgba(255,255,255,.2); color: #fff; }
.btn[aria-disabled="true"] { cursor: default; opacity: .85; }
.btn[aria-disabled="true"]:hover { transform: none; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 20; height: var(--nav-h);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.nav-links { display: flex; gap: 26px; list-style: none; margin: 0 auto; padding: 0; }
.nav-links a { text-decoration: none; font-size: 15px; font-weight: 600; color: var(--muted); }
.nav-links a:hover { color: var(--red); }
.nav-end { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }
.nav-links + .nav-end { margin-inline-start: 0; }
.lang { text-decoration: none; font-weight: 700; font-size: 14px; color: var(--muted); padding: 6px 10px; border-radius: 8px; }
.lang:hover { color: var(--red); background: var(--red-light); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(640px, 82vh); display: flex; align-items: center; overflow: hidden; isolation: isolate; padding: 0; }
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% center; z-index: -2; }
html[dir="rtl"] .hero picture img { object-position: 30% center; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(255,250,246,.96) 0%, rgba(255,250,246,.86) 34%, rgba(255,250,246,.35) 56%, rgba(255,250,246,0) 72%);
}
html[dir="rtl"] .hero::before {
  background: linear-gradient(270deg, rgba(255,250,246,.96) 0%, rgba(255,250,246,.86) 34%, rgba(255,250,246,.35) 56%, rgba(255,250,246,0) 72%);
}
.hero .wrap { width: 100%; padding-top: 48px; padding-bottom: 56px; }
.hero-copy { max-width: 560px; color: #1f1416; }
.eyebrow { display: block; font-size: 13px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--red); margin-bottom: 16px; }
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 15px; }
.hero h1 { font-size: clamp(38px, 5.6vw, 64px); line-height: 1.05; letter-spacing: -.025em; margin: 0 0 18px; color: var(--red-dark); font-weight: 800; }
html[lang="ar"] .hero h1 { line-height: 1.25; letter-spacing: 0; }
.hero .lead { font-size: clamp(17px, 1.9vw, 20px); color: #3d2a2d; margin: 0 0 28px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { margin: 16px 0 0; font-size: 15px; color: #4d3a3c; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.hero-note svg { width: 18px; height: 18px; color: var(--red); flex: none; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.section-head { max-width: 680px; margin: 0 0 40px; }
.section-head.center { text-align: center; margin-inline: auto; }
.kicker { display: block; font-size: 13px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
html[lang="ar"] .kicker { letter-spacing: 0; font-size: 15px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 12px; }
html[lang="ar"] .section-head h2 { line-height: 1.35; letter-spacing: 0; }
.section-head p { color: var(--muted); margin: 0; font-size: 18px; }

/* ---------- Feature strip ---------- */
.strip { padding: 44px 0; border-bottom: 1px solid var(--border); background: var(--surface); }
.strip ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.strip li { text-align: center; }
.strip .ico { margin: 0 auto 12px; }
.strip h3 { font-size: 17px; margin: 0 0 4px; }
.strip p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.ico {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--red-light); color: var(--red);
}
.ico svg { width: 24px; height: 24px; }

/* ---------- Exam cards ---------- */
.exams { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.exam {
  position: relative; isolation: isolate; overflow: hidden; border-radius: 24px;
  min-height: 400px; padding: 36px; display: flex; flex-direction: column; justify-content: flex-start;
  background: #fff; color: #1f1416; box-shadow: var(--shadow);
}
.exam img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; z-index: -2; }
/* The photos fade to white on their left — keep the copy there in both languages. */
.exam::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(255,255,255,.95) 0%, rgba(255,255,255,.82) 38%, rgba(255,255,255,0) 66%);
}
.exam-body { max-width: 58%; margin-inline-end: auto; }
html[dir="rtl"] .exam-body { margin-inline-end: 0; margin-inline-start: auto; }
html[dir="rtl"] .exam { align-items: flex-start; }
html[dir="rtl"] .exam-body { align-self: flex-end; }
.exam h3 { margin: 0; font-size: clamp(38px, 4.4vw, 52px); line-height: 1; letter-spacing: -.02em; font-weight: 800; }
.exam.step h3 { color: #173a63; }
.exam.ielts h3 { color: var(--red); }
.exam .sub { margin: 6px 0 18px; font-weight: 600; color: #3d2a2d; font-size: 16px; line-height: 1.4; }
.checks { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 6px; }
.checks li { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.checks svg { width: 20px; height: 20px; flex: none; color: var(--red); }
.exam.step .checks svg { color: #173a63; }
.pill { display: inline-block; font-size: 14px; font-weight: 800; padding: 6px 14px; border-radius: 999px; background: var(--red); color: #fff; }
.exam.step .pill { background: #173a63; }

/* ---------- AI showcase ---------- */
.ai { background: var(--surface); border-block: 1px solid var(--border); }
.ai .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.ai-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 28px; }
.ai-list h3 { margin: 12px 0 4px; font-size: 17px; }
.ai-list p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.ai-visual { position: relative; min-height: 520px; }
.phone {
  width: 250px; border-radius: 38px; padding: 9px; background: #120608;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06) inset;
}
.phone img { border-radius: 30px; width: 100%; aspect-ratio: 1320 / 2698; object-fit: cover; background: #fff; }
.ai-visual .phone { position: absolute; inset-inline-start: 4%; top: 0; transform: rotate(-4deg); }
.eval-card {
  position: absolute; inset-inline-end: 0; bottom: 8px; width: 300px; border-radius: 22px;
  background: #fff; box-shadow: 0 36px 70px -28px rgba(74,8,14,.55), 0 0 0 1px var(--border);
  transform: rotate(3deg);
}
/* Round the screenshot itself (not the card) so the tag can sit over the edge. */
.eval-card img { width: 100%; border-radius: 22px; }
.eval-tag {
  position: absolute; inset-inline-end: 16px; top: -15px; z-index: 2;
  box-shadow: 0 8px 18px -8px rgba(0,0,0,.45);
  background: var(--gold); color: #fff; font-weight: 800; font-size: 13px; padding: 6px 12px; border-radius: 999px;
}
.ai-note { margin: 28px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- Numbers ---------- */
.numbers { padding: 64px 0; background: var(--red-light); }
.numbers ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.numbers strong { display: block; font-size: clamp(34px, 4vw, 46px); line-height: 1.1; color: var(--red); font-weight: 800; letter-spacing: -.02em; }
.numbers span { color: var(--text); font-weight: 600; font-size: 15px; }

/* ---------- Gallery ---------- */
.gallery {
  display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px 20px 28px; margin: 0 -20px; scrollbar-width: thin;
}
.shot { flex: 0 0 auto; width: 220px; margin: 0; scroll-snap-align: center; text-align: center; }
.shot .phone { width: 220px; border-radius: 32px; padding: 8px; }
.shot .phone img { border-radius: 25px; }
.shot figcaption { margin-top: 14px; font-weight: 700; font-size: 15px; }
@media (min-width: 1240px) { .gallery { justify-content: center; } }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; counter-increment: step; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--red); color: #fff; font-weight: 800; margin-bottom: 14px;
}
.steps h3 { margin: 0 0 6px; font-size: 19px; }
.steps p { margin: 0; color: var(--muted); font-size: 16px; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; margin-bottom: 12px; overflow: hidden; }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 700; font-size: 17px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; color: var(--red); line-height: 1; flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 22px 20px; color: var(--muted); }
.faq a { color: var(--red); font-weight: 600; }

/* ---------- Closing CTA ---------- */
.cta { position: relative; isolation: isolate; overflow: hidden; color: #fff; padding: 110px 0; text-align: center; }
.cta picture, .cta picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(40,6,10,.72) 0%, rgba(74,8,14,.78) 100%); }
.cta h2 { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.15; margin: 0 0 12px; letter-spacing: -.02em; }
html[lang="ar"] .cta h2 { line-height: 1.35; letter-spacing: 0; }
.cta p { margin: 0 auto 30px; color: #f6d9db; font-size: 19px; max-width: 34em; }
.cta .cta-row { justify-content: center; }
.cta-qr {
  margin: 36px auto 0; display: inline-flex; align-items: center; gap: 16px; text-align: start;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); border-radius: 18px; padding: 12px 18px 12px 12px;
  backdrop-filter: blur(8px);
}
html[dir="rtl"] .cta-qr { padding: 12px 12px 12px 18px; }
.cta-qr img { width: 96px; height: 96px; border-radius: 10px; background: #fff; padding: 6px; }
.cta-qr span { font-weight: 700; font-size: 15px; max-width: 12em; }

/* ---------- Footer ---------- */
footer { padding: 44px 0 60px; color: var(--muted); font-size: 15px; }
footer .wrap { display: grid; gap: 16px; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { text-decoration: none; font-weight: 600; color: var(--text); }
.foot-links a:hover { color: var(--red); }
.disclaimer { font-size: 14px; max-width: 64em; margin: 0; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- Tablet ---------- */
@media (max-width: 1000px) {
  .nav-links { display: none; }
  .ai .wrap { grid-template-columns: 1fr; }
  .ai-visual { min-height: 500px; max-width: 560px; width: 100%; margin: 0 auto; }
  .strip ul, .numbers ul { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  section { padding: 64px 0; }
  /* On narrow screens the photo sits above the copy instead of behind it —
     overlaying text on a portrait crop always lands on the student's face. */
  .hero { display: block; min-height: 0; padding: 0; background: #fffaf6; }
  .hero picture { position: relative; display: block; height: min(64vw, 380px); z-index: 0; }
  .hero picture img { position: absolute; object-position: 74% 35%; z-index: 0; }
  html[dir="rtl"] .hero picture img { object-position: 26% 35%; }
  .hero picture::after {
    content: ""; position: absolute; inset: auto 0 0 0; height: 30%;
    background: linear-gradient(180deg, rgba(255,250,246,0), #fffaf6);
  }
  .hero::before, html[dir="rtl"] .hero::before { display: none; }
  .hero .wrap { padding-top: 8px; padding-bottom: 44px; }
  .hero-copy { max-width: none; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .nav .btn { width: auto; }
  .nav-end .btn { display: none; }
  .exams { grid-template-columns: 1fr; }
  .exam { min-height: 0; padding: 200px 24px 28px; justify-content: flex-end; }
  .exam img { object-position: 78% top; height: 260px; }
  .exam::before { background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 110px, rgba(255,255,255,.95) 210px, #fff 100%); }
  .exam-body, html[dir="rtl"] .exam-body { max-width: none; align-self: stretch; }
  .ai-list { grid-template-columns: 1fr; }
  .ai-visual { min-height: 460px; }
  .ai-visual .phone { width: 200px; inset-inline-start: 0; }
  .eval-card { width: 240px; }
  .steps { grid-template-columns: 1fr; }
  .cta { padding: 80px 0; }
  .cta-qr { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
