/* AcademaPro marketing site — one stylesheet, both directions. */
:root {
  --brand: #5e2dd8;
  --brand-600: #4c22b4;
  --brand-100: #ece6fb;
  --brand-50: #f6f3fd;
  --ink: #1b1340;
  --ink-2: #3f3a5c;
  --muted: #6f6b85;
  --line: #e6e2f3;
  --surface: #ffffff;
  --surface-2: #f7f5fc;
  --surface-3: #efeaf9;
  --accent: #eb6834;
  --good: #0ca30c;
  /* validated categorical palette (dataviz): purple, orange, blue, aqua */
  --s1: #5e2dd8; --s2: #eb6834; --s3: #2a78d6; --s4: #1baf7a;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(27, 19, 64, .10);
  --shadow-sm: 0 2px 10px rgba(27, 19, 64, .08);
  --max: 1160px;
  --font-latin: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-arabic: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--surface); color: var(--ink);
  font-family: var(--font-latin); font-size: 17px; line-height: 1.6;
}
html[dir="rtl"] body { font-family: var(--font-arabic); }
html[dir="rtl"] { font-size: 17.5px; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { letter-spacing: 0; }
h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 46rem; }
.muted { color: var(--muted); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
section { padding: 72px 0; }
section.alt { background: var(--surface-2); }
.section-head { max-width: 50rem; margin-bottom: 36px; }
.section-head .lead { margin-bottom: 0; }
.kicker { display: inline-block; color: var(--brand); font-weight: 600; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
html[dir="rtl"] .kicker { letter-spacing: 0; }
.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; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 600; border: 1px solid transparent; cursor: pointer; font: inherit; font-weight: 600; line-height: 1.2; transition: transform .12s ease, box-shadow .12s ease, background .12s ease; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(94, 45, 216, .30); }
.btn-primary:hover { background: var(--brand-600); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-light { background: #fff; color: var(--brand); }
.btn-sm { padding: 8px 14px; font-size: .9rem; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 18px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--ink); }
.logo img { height: 34px; width: auto; }
.logo:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; margin-inline-start: auto; align-items: center; }
.nav a { padding: 8px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 500; font-size: .95rem; }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.lang-btn { border: 1px solid var(--line); background: #fff; padding: 8px 12px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; color: var(--brand); }
.nav-toggle { display: none; border: 1px solid var(--line); background: #fff; width: 42px; height: 42px; border-radius: 10px; cursor: pointer; margin-inline-start: auto; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px auto; border-radius: 2px; }

/* hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 40px; background: radial-gradient(1200px 600px at 85% -10%, var(--brand-100), transparent 60%), radial-gradient(800px 500px at -10% 110%, #fde9df, transparent 55%), var(--surface); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { color: var(--ink); }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 22px; }
.badges { display: flex; gap: 10px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: .9rem; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.device { position: relative; border-radius: 18px; background: #fff; box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.device::before { content: ""; display: block; height: 30px; background: linear-gradient(#fbfaff, #f1eefa); border-bottom: 1px solid var(--line); }
.device::after { content: ""; position: absolute; top: 10px; inset-inline-start: 14px; width: 10px; height: 10px; border-radius: 50%; background: #eb6834; box-shadow: 18px 0 0 #f3b53f, 36px 0 0 #1baf7a; }
html[dir="rtl"] .device::after { box-shadow: -18px 0 0 #f3b53f, -36px 0 0 #1baf7a; }
.device img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.device figcaption { padding: 10px 14px; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); }

/* stat tiles */
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; box-shadow: var(--shadow-sm); }
.tile .value { font-size: 2rem; font-weight: 700; color: var(--ink); line-height: 1.1; }
.tile .value small { font-size: 1rem; color: var(--brand); font-weight: 700; }
.tile .label { color: var(--muted); font-size: .92rem; margin-top: 6px; }
.tile.brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.tile.brand .value, .tile.brand .value small, .tile.brand .label { color: #fff; }
.tile.brand .label { opacity: .9; }

/* registration story */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.story-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 24px 0 8px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.card h3 { margin-bottom: 4px; }
.chart-card { padding: 22px 22px 14px; }
.chart-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 8px; }
.chart-head h3 { margin: 0; font-size: 1.05rem; }
.chart-head .sub { color: var(--muted); font-size: .9rem; margin: 2px 0 0; }
.viz { position: relative; }
.viz svg { width: 100%; height: auto; overflow: visible; }
.viz text { font-family: inherit; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 8px 0 0; padding: 0; list-style: none; font-size: .9rem; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.tooltip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; padding: 8px 10px; border-radius: 8px; font-size: .85rem; line-height: 1.35; white-space: nowrap; box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, -110%); transition: opacity .1s; z-index: 5; }
.tooltip.show { opacity: 1; }
.tooltip b { display: block; }
.viz-table { width: 100%; border-collapse: collapse; font-size: .95rem; margin-top: 8px; }
.viz-table th, .viz-table td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.viz-table td.num, .viz-table th.num { text-align: end; font-variant-numeric: tabular-nums; }
.toggle-link { background: none; border: 0; color: var(--brand); font: inherit; font-size: .9rem; cursor: pointer; padding: 4px 0; }
.toggle-link:hover { text-decoration: underline; }

/* calculator */
.calc { display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; align-items: start; }
.calc-inputs { display: grid; gap: 14px; }
.field label { display: block; font-size: .9rem; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.field input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; color: var(--ink); background: #fff; }
.field input:focus { outline: 2px solid var(--brand-100); border-color: var(--brand); }
.calc-out { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.calc-out .tile.hero-num { grid-column: 1 / -1; }
.calc-out .hero-num .value { font-size: 3rem; }
.hours-viz { margin-top: 18px; }

/* grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 10px; }
.feature .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-size: 22px; }
.feature h3 { margin: 4px 0 0; font-size: 1.08rem; }
.feature p { margin: 0; color: var(--ink-2); font-size: .97rem; }
.feature .shot { margin-top: auto; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; cursor: zoom-in; background: var(--surface-2); }
.feature .shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; transition: transform .25s ease; }
.feature .shot:hover img { transform: scale(1.03); }

/* control section */
.control .two-col { align-items: center; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.checks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: start; color: var(--ink-2); }
.checks li::before { content: "✓"; color: var(--good); font-weight: 800; flex: none; }

/* journey */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-top: 10px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 14px; position: relative; }
.step::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 10px; font-size: .95rem; }
.step p { margin: 0; font-size: .93rem; color: var(--ink-2); }
.note { font-size: .92rem; color: var(--muted); margin-top: 14px; }

/* platform */
.platform-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.platform-list li { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: flex; gap: 12px; align-items: start; color: var(--ink-2); }
.platform-list li .ico { font-size: 20px; flex: none; }

/* screens gallery */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tab { border: 1px solid var(--line); background: #fff; padding: 8px 16px; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 600; color: var(--ink-2); }
.tab[aria-selected="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); cursor: zoom-in; }
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.gallery figcaption { padding: 10px 12px; font-size: .9rem; color: var(--ink-2); border-top: 1px solid var(--line); }
.gallery-foot { margin-top: 18px; display: flex; justify-content: center; }

/* videos */
.videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }   /* the 2-min film across, the 3- and 5-min films beside each other */
.video-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.video-card video { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video-card .cap { padding: 10px 12px; font-weight: 600; font-size: .95rem; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.video-card .vq { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: .85rem; opacity: .8; }
.video-card .vq select { font: inherit; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: inherit; }
.video-card.wide { grid-column: 1 / -1; }
.video-card.wide video { aspect-ratio: 16 / 9; }

/* companies */
.companies .grid-2 .card { display: flex; gap: 18px; align-items: start; }
.company-mark { width: 56px; height: 56px; border-radius: 14px; background: var(--brand-50); display: grid; place-items: center; font-weight: 800; color: var(--brand); flex: none; font-size: 1.1rem; }

/* contact */
.contact-box { background: linear-gradient(135deg, var(--brand), #3b1f9e); color: #fff; border-radius: 24px; padding: 48px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: center; }
.contact-box h2 { color: #fff; }
.contact-box .lead { color: rgba(255, 255, 255, .88); }
.contact-box .email { font-size: 1.3rem; font-weight: 700; color: #fff; word-break: break-all; }
.contact-actions { display: grid; gap: 12px; justify-items: start; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }

/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(15, 10, 40, .88); display: none; z-index: 100; padding: 24px; }
.lightbox.open { display: grid; grid-template-rows: 1fr auto; }
.lightbox img { max-width: min(96vw, 1400px); max-height: 82vh; margin: auto; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); background: #fff; }
.lightbox .cap { color: #fff; text-align: center; padding: 12px; font-size: 1rem; }
.lightbox button { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 24px; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .3); }
.lightbox .prev { inset-inline-start: 16px; }
.lightbox .next { inset-inline-end: 16px; }
.lightbox .close { top: 16px; inset-inline-end: 16px; transform: none; }

/* responsive */
@media (max-width: 1000px) {
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .grid-3, .platform-list, .gallery, .videos { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .hero .wrap, .two-col, .calc, .contact-box { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav { display: none; position: absolute; top: 68px; inset-inline: 0; background: #fff; flex-direction: column; padding: 12px 20px 18px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
  .site-header .lang-btn { margin-inline-start: auto; }
  section { padding: 52px 0; }
  .tiles, .grid-3, .grid-2, .platform-list, .gallery, .videos, .calc-out, .story-stats, .stat-row { grid-template-columns: 1fr 1fr; }
  .gallery, .videos, .grid-3, .grid-2, .platform-list { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .contact-box { padding: 28px; }
  .calc-out .hero-num .value { font-size: 2.4rem; }
}
@media (max-width: 420px) { .tiles, .story-stats, .stat-row, .calc-out, .steps { grid-template-columns: 1fr; } }
@media print { .site-header, .lightbox, .videos, .hero-actions { display: none !important; } section { padding: 24px 0; } }

/* contact form */
.contact-box { grid-template-columns: .9fr 1.1fr; }
.contact-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-form .field.span2 { grid-column: 1 / -1; }
.contact-form .field label { color: rgba(255, 255, 255, .9); }
.contact-form .field input, .contact-form .field textarea { width: 100%; padding: 10px 12px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 10px; font: inherit; color: var(--ink); background: #fff; resize: vertical; }
.contact-form .field input:focus, .contact-form .field textarea:focus { outline: 3px solid rgba(255, 255, 255, .45); }
.contact-form .hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
.contact-form .form-foot { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.contact-form .form-status { font-weight: 600; }
.contact-form .form-status.ok { color: #c8f7c5; }
.contact-form .form-status.err { color: #ffd0c2; }
.contact-form .form-privacy { font-size: .85rem; color: rgba(255, 255, 255, .7); margin: 10px 0 0; }
@media (max-width: 760px) { .contact-form .form-grid { grid-template-columns: 1fr; } }

/* capability groups */
.feature ul.mini { margin: 2px 0 6px; padding-inline-start: 20px; color: var(--ink-2); font-size: .93rem; display: grid; gap: 4px; }
.feature ul.mini li::marker { color: var(--brand); }

/* savings cards */
.sav .vol { font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.sav .vol small { font-size: .88rem; color: var(--muted); font-weight: 500; }
.sav .ba { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .9rem; color: var(--ink-2); margin: 2px 0 4px; }
.sav .ba b { color: var(--ink); }
.sav .ba .arrow { color: var(--brand); font-weight: 700; }
.sav .saved { font-size: 1.45rem; font-weight: 800; color: var(--brand); }
.sav .saved small { font-size: .85rem; color: var(--muted); font-weight: 500; }

/* ---- TASK_PLAN_107: study plan, reports & analytics showcase, what's new ---- */
section.plan { background: linear-gradient(180deg, var(--brand-50), #fff 70%); }
.plan .two-col { align-items: center; }
.kicker { display: inline-block; background: var(--accent); color: #fff; font-weight: 700; font-size: .8rem; padding: 3px 12px; border-radius: 999px; margin-bottom: 8px; }
.gain-line { margin-top: 20px; padding: 14px 18px; border-radius: 12px; background: #fff; border-inline-start: 4px solid var(--good); font-weight: 700; color: var(--ink); box-shadow: var(--shadow-sm); }
.device.showcase { cursor: zoom-in; margin: 0; }
.device.showcase img { transition: transform .25s ease; }
.device.showcase:hover img { transform: scale(1.02); }
.show-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.show-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.show-grid.three { grid-template-columns: repeat(3, 1fr); }
.ins-lead { margin: 0 0 16px; color: var(--ink-2); }
.ins-panel[hidden] { display: none; }
section.whatsnew { background: linear-gradient(135deg, #1b1340, #3a1d8f); color: #fff; }
.whatsnew .section-head h2, .whatsnew .section-head .lead { color: #fff; }
.new-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.new-card { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius); padding: 18px; }
.new-card .ico { font-size: 26px; }
.new-card h3 { margin: 8px 0 4px; font-size: 1.02rem; color: #fff; }
.new-card p { margin: 0; font-size: .92rem; color: #d9d2f5; }
@media (max-width: 1000px) { .new-grid { grid-template-columns: repeat(2, 1fr); } .show-grid.three, .show-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .new-grid, .show-grid, .show-grid.three, .show-row { grid-template-columns: 1fr; } }
.nav a { white-space: nowrap; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; }
