/* Study Bud AI — marketing site. Brand colours match mobile/lib/theme/app_colors.dart */
:root {
  --blue: #3563e9;
  --blue-dark: #1f44b8;
  --blue-light: #eaf0ff;
  --accent: #ffa53e;
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #14161f;
  --muted: #5b6072;
  --border: #e1e4ec;
  --shadow: 0 24px 60px -28px rgba(31, 68, 184, 0.35);
  --radius: 20px;
  --max: 1180px;
  --nav-h: 68px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1117;
    --surface: #171a23;
    --text: #f3f4f8;
    --muted: #a7acbd;
    --border: #2b2f3b;
    --blue-light: #1b2440;
    --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-blue { background: var(--blue); color: #fff; box-shadow: 0 12px 26px -12px rgba(53, 99, 233, .7); }
.btn-blue:hover { background: var(--blue-dark); }
.btn-light { background: #fff; color: var(--blue); box-shadow: 0 12px 26px -12px rgba(0,0,0,.5); }
.btn-outline { background: rgba(255,255,255,.75); color: var(--blue); border: 1.5px solid rgba(53,99,233,.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; }
.btn-pill { border-radius: 999px; }
.soon { font-size: 12px; font-weight: 700; background: rgba(53,99,233,.1); color: var(--blue); 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(--blue); }
.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(--blue); background: var(--blue-light); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, var(--blue-light) 0%, var(--bg) 62%);
}
.hero .wrap {
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px;
  padding-top: 64px; padding-bottom: 64px; min-height: min(620px, 78vh);
}
.hero-copy { max-width: 560px; }
.eyebrow { display: block; font-size: 13px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--blue); margin-bottom: 16px; }
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 15px; }
.hero h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 18px; color: var(--text); font-weight: 800; }
html[lang="ar"] .hero h1 { line-height: 1.3; letter-spacing: 0; }
.hero h1 .accent-text {
  background: linear-gradient(100deg, var(--blue) 10%, var(--blue-dark) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { font-size: clamp(17px, 1.8vw, 20px); color: var(--muted); 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: var(--muted); display: flex; align-items: center; gap: 8px; font-weight: 600; }
.hero-note svg { width: 18px; height: 18px; color: var(--blue); flex: none; }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 24px 0 0; padding: 0; list-style: none; }
.pill-row li { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; color: var(--muted); }
.pill-row svg { width: 17px; height: 17px; color: var(--blue); flex: none; }

.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 460px; }
.hero-visual .phone-main { width: 250px; z-index: 2; }
.hero-visual .phone-behind {
  position: absolute; inset-inline-end: 2%; top: 6%; width: 210px; z-index: 1;
  transform: rotate(7deg); opacity: .96;
}
.hero-visual .mascot { position: absolute; inset-inline-start: -6%; bottom: -4%; width: 190px; z-index: 3; filter: drop-shadow(0 18px 30px rgba(31,68,184,.28)); }
.hero-visual::before {
  content: ""; position: absolute; width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(53,99,233,.16), rgba(53,99,233,0) 70%); z-index: 0;
}

/* ---------- Floating feature cards (overlap the hero's bottom edge) ---------- */
.feature-cards { position: relative; z-index: 4; margin-top: -54px; padding: 0 0 56px; }
.feature-cards ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature-cards li {
  background: var(--surface); border-radius: 18px; padding: 22px 20px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.feature-cards .ico { margin: 0 0 12px; }
.feature-cards h3 { margin: 0 0 4px; font-size: 16px; }
.feature-cards p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
/* Same four accent colours as the app's own Quick Actions cards (AppColors.accents). */
.feature-cards li:nth-child(1) .ico { background: color-mix(in srgb, #3563e9 14%, transparent); color: #3563e9; }
.feature-cards li:nth-child(2) .ico { background: color-mix(in srgb, #1fa971 14%, transparent); color: #1fa971; }
.feature-cards li:nth-child(3) .ico { background: color-mix(in srgb, #ec5c8d 14%, transparent); color: #ec5c8d; }
.feature-cards li:nth-child(4) .ico { background: color-mix(in srgb, #8b5cf6 14%, transparent); color: #8b5cf6; }

/* ---------- 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(--blue); 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; }

.ico {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--blue-light); color: var(--blue);
}
.ico svg { width: 24px; height: 24px; }

/* ---------- 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; display: flex; justify-content: center; }
.phone {
  width: 250px; border-radius: 38px; padding: 9px; background: #10131c;
  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%; display: block; background: #fff; }

/* ---------- Trust ---------- */
.trust { padding: 64px 0; background: var(--blue-light); }
.trust ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.trust li { background: var(--surface); border-radius: 18px; padding: 22px 20px; box-shadow: var(--shadow); }
.trust .ico { margin: 0 0 12px; }
.trust h3 { margin: 0 0 6px; font-size: 16px; }
.trust p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ---------- 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(--blue); 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(--blue); 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(--blue); font-weight: 600; }

/* ---------- Closing CTA ---------- */
.cta { position: relative; isolation: isolate; overflow: hidden; color: #fff; padding: 110px 0; text-align: center; background: linear-gradient(160deg, var(--blue-dark) 0%, var(--blue) 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: #dbe5ff; font-size: 19px; max-width: 34em; }
.cta .cta-row { justify-content: center; }

/* ---------- 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(--blue); }
.disclaimer { font-size: 14px; max-width: 64em; margin: 0; }

:focus-visible { outline: 3px solid var(--accent); 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: 460px; }
  .feature-cards ul { grid-template-columns: repeat(2, 1fr); }
  .trust ul { grid-template-columns: repeat(2, 1fr); }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { max-width: none; margin-inline: auto; }
  .cta-row { justify-content: center; }
  .pill-row { justify-content: center; }
  .hero-visual { order: -1; }
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  section { padding: 64px 0; }
  .hero .wrap { padding-top: 32px; padding-bottom: 40px; min-height: 0; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .nav .btn { width: auto; }
  .nav-end .btn { display: none; }
  .feature-cards ul, .trust ul { grid-template-columns: 1fr 1fr; }
  .ai-list { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .cta { padding: 72px 0; }
  .hero-visual { min-height: 340px; }
  .hero-visual .phone-main { width: 180px; }
  .hero-visual .phone-behind { width: 150px; }
  .hero-visual .mascot { width: 120px; }
  .feature-cards { margin-top: 24px; }
}

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