/* learn.watniolt.net — styled after Gemini's mock-ups (design/DESIGN-NOTES.md, 30 Oct 2026). */

/* Self-hosted, OFL. unicode-range means Nastaliq is only fetched when Urdu text is on screen. */
@font-face {
  font-family: 'Sora';
  src: url('/assets/fonts/Sora.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Nastaliq Urdu';
  src: url('/assets/fonts/NotoNastaliqUrdu.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F;
}

:root {
  --navy-dark: #071d30;
  --navy: #0b2a43;
  --primary: #0066ff;
  --primary-hover: #0052cc;
  --cyan: #00d2ff;
  --teal: #12b3a3;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-sub: #475569;
  --muted: #64748b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --wa: #25d366;
  --wa-ink: #0b6b3a;
  --sky: #eef5ff;
  --radius: 14px;
  --shadow: 0 4px 15px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 30px rgba(15, 23, 42, 0.12);
  --font: 'Sora', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--font); color: var(--text); background: var(--bg); }
/* Latin stays Sora inside Urdu runs; Nastaliq glyphs come from the unicode-range face. */
html[lang='ur'] body, [lang='ur'], .ur { font-family: 'Noto Nastaliq Urdu', var(--font); line-height: 1.9; }
.ur { direction: rtl; }
html[lang='ur'] :is(h1, h2, h3), :is(h1, h2, h3).ur { line-height: 1.75; letter-spacing: 0; }
bdi, .ltr { direction: ltr; unicode-bidi: isolate; font-family: var(--font); line-height: inherit; }
a { color: var(--primary); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }

.wrap { max-width: 1344px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 768px) { .wrap { padding-inline: 48px; } }

/* ---------- top bar ---------- */
.top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; margin-inline-end: auto; white-space: nowrap; }
.brand img { width: 36px; height: 24px; }
.badge-learn { border: 1px solid var(--cyan); color: var(--cyan); border-radius: 6px; font-size: 11px; font-weight: 700; padding: 1px 7px; letter-spacing: 0.6px; }
.nav { display: none; gap: 28px; }
.nav a { color: #b8c6d6; text-decoration: none; font-weight: 600; font-size: 14px; }
.nav a:hover, .nav a[aria-current='page'] { color: #fff; }
@media (min-width: 1024px) { .nav { display: flex; margin-inline-end: auto; } .brand { margin-inline-end: 24px; } }
.langs { display: inline-flex; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 10px; padding: 3px; }
.langs button { background: none; border: 0; color: #b8c6d6; padding: 4px 12px; border-radius: 7px; cursor: pointer; min-height: 34px; font-size: 13px; font-weight: 600; }
.langs button[aria-pressed='true'] { background: var(--primary); color: #fff; }
.top .demo-btn { display: none; }
@media (min-width: 640px) { .top .demo-btn { display: inline-flex; } }

/* ---------- buttons, pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px;
  background: var(--primary); color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; border: 1px solid transparent;
  cursor: pointer; min-height: 44px; line-height: 1.3; text-align: center;
}
.btn:hover { background: var(--primary-hover); }
.btn.light { background: #fff; color: var(--navy); }
.btn.outline { background: #fff; color: var(--text); border-color: var(--border); }
.btn.outline:hover { border-color: var(--primary); color: var(--primary); }
.btn.dark { background: var(--navy); }
.btn.wa { background: var(--wa); color: #fff; }
.btn.wa:hover { background: #1eb956; }
.btn.block { width: 100%; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: var(--sky); color: var(--navy); font-size: 12px; font-weight: 700; line-height: 1.6; }
.pill.code { background: var(--navy); color: #fff; }
.pill.ok { background: #dcfce7; color: #166534; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(0, 210, 255, 0.5); color: var(--cyan); border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); }
.kicker { color: var(--primary); font-size: 12px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; }

/* ---------- hero (home + course) ---------- */
.hero {
  color: #fff; padding: 28px 0 24px;
  background: radial-gradient(120% 140% at 100% 100%, #0050c8 0%, rgba(0, 80, 200, 0) 55%), linear-gradient(160deg, var(--navy-dark), var(--navy) 60%, #0a3a78);
}
.hero h1 { margin: 14px 0 10px; font-size: clamp(28px, 6.5vw, 52px); line-height: 1.12; font-weight: 800; letter-spacing: -0.5px; }
.hero h1 em { font-style: normal; color: var(--cyan); }
.hero p.lead { margin: 0 0 18px; color: #cfdbe8; font-weight: 600; max-width: 640px; }
.hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 1024px) { .hero { padding: 64px 0 56px; } .hero-grid { grid-template-columns: 1.15fr 0.85fr; } }
.hero-card { display: none; }
@media (min-width: 1024px) {
  .hero-card { display: block; border-radius: 18px; padding: 12px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.15); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35); }
  .hero-card img { border-radius: 12px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
}
.search { display: flex; gap: 6px; background: #fff; border-radius: 12px; padding: 6px; max-width: 640px; box-shadow: var(--shadow-lg); }
.search input { flex: 1; min-width: 0; border: 0; padding: 8px 10px; color: var(--text); background: transparent; min-height: 40px; }
.search input:focus { outline: none; }
.search button { min-height: 40px; padding: 8px 16px; }
.stats { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.12); color: #9fb2c7; font-size: 13px; }
.stats b { color: #fff; }
.topics { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; color: #9fb2c7; font-size: 12px; font-weight: 600; }
.topics a { background: rgba(255, 255, 255, 0.1); color: #fff; text-decoration: none; padding: 3px 10px; border-radius: 6px; font-size: 12px; }

/* ---------- sections, grids ---------- */
.section { padding-block: 28px; }
@media (min-width: 1024px) { .section { padding-block: 48px; } }
.section-head { margin-bottom: 16px; }
.section-head h2 { margin: 0; font-size: clamp(22px, 4vw, 28px); font-weight: 800; color: var(--text); }
.section-head p { margin: 2px 0 0; color: var(--text-sub); font-weight: 600; font-size: 14px; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.empty { color: var(--muted); padding: 12px 0; }
#course-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

/* course track cards */
.track { display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit; transition: transform 0.15s, box-shadow 0.15s; }
.track:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.track .band { color: #fff; padding: 14px 16px; min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(135deg, #0b2a6b, var(--primary)); }
.track[data-course='app'] .band { background: linear-gradient(135deg, #0b3b4a, var(--teal)); }
.track[data-course='tips'] .band { background: linear-gradient(135deg, #2b1f6b, #5b4ee6); }
.track[data-course='faq'] .band { background: linear-gradient(135deg, #7a3d06, #e08a0b); }
.track[data-course='overview'] .band { background: linear-gradient(135deg, var(--navy-dark), #1d4f91); }
.track .tag { align-self: flex-start; background: rgba(255, 255, 255, 0.18); border-radius: 5px; padding: 2px 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.track .band .meta { color: #fff; font-weight: 700; justify-content: space-between; }
.track .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.track h3 { margin: 0; font-size: 18px; font-weight: 700; }
.track .ur-title { color: var(--text-sub); font-size: 15px; text-align: end; }
.track p { margin: 0; color: var(--text-sub); font-size: 14px; font-weight: 600; flex: 1; }
.track .foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 6px; font-size: 13px; }
.track .foot .go { color: var(--primary); font-weight: 700; }
.audio-dot { color: var(--success); font-weight: 700; font-size: 12px; }

/* lesson cards (grid) */
.lesson-card { overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.lesson-card:hover { border-color: var(--primary); }
.thumb-wrap { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #dbe8ff, #eef5ff); }
.thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.dur { position: absolute; inset-inline-end: 8px; bottom: 8px; background: rgba(7, 29, 48, 0.85); color: #fff; font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 6px; }
.lesson-card .body { padding: 12px 14px 14px; display: grid; gap: 4px; }
.lesson-card h3 { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 700; }

/* lesson rows (course page) */
.rows { display: grid; gap: 14px; }
.row-card { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 14px; text-decoration: none; color: inherit; }
.row-card:hover { border-color: var(--primary); }
.row-card .thumb-wrap { border-radius: 10px; overflow: hidden; }
.row-card h3 { margin: 2px 0 4px; font-size: 17px; font-weight: 700; line-height: 1.35; }
.row-card .ur-title { color: var(--text-sub); text-align: end; }
.row-card p { margin: 4px 0 0; color: var(--text-sub); font-size: 14px; font-weight: 600; }
@media (min-width: 640px) { .row-card { grid-template-columns: 200px 1fr; } }

/* ---------- two-column layouts ---------- */
.cols { display: grid; gap: 22px; align-items: start; }
.cols > * { min-width: 0; }
@media (min-width: 1024px) {
  .cols.course { grid-template-columns: 1fr 340px; }
  .cols.lesson { grid-template-columns: 1fr 380px; }
  .sticky { position: sticky; top: 84px; }
}
.side { display: grid; gap: 18px; }
.panel { padding: 20px; }
.panel h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.panel p { margin: 0 0 12px; color: var(--text-sub); font-size: 14px; font-weight: 600; }
.demo-creds { border: 1px dashed #cbd5e1; border-radius: 10px; padding: 10px 12px; font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.panel.price { background: linear-gradient(160deg, #f1f7ff, #e6f0ff); border-color: #cfe0ff; }
.panel.price .amount { font-size: 22px; font-weight: 800; color: var(--navy); line-height: 1.3; }
.panel.price .brands { border-top: 1px solid #cfe0ff; margin-top: 10px; padding-top: 10px; font-size: 13px; font-weight: 700; color: var(--text-sub); }

/* ---------- breadcrumbs ---------- */
.crumbs { background: #fff; border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 600; color: var(--muted); }
.crumbs .wrap { padding-block: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--primary); }
.crumbs .here { color: var(--text); }

/* ---------- course hero extras ---------- */
.hero .ur-sub { color: #dbe7f5; font-size: clamp(18px, 3vw, 24px); margin: 0 0 10px; }
.facts { display: flex; gap: 10px; flex-wrap: wrap; }
.facts span { background: rgba(255, 255, 255, 0.1); border-radius: 999px; padding: 5px 14px; font-size: 13px; font-weight: 700; }

/* ---------- lesson page ---------- */
.stage { padding-top: 0; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 1023px) {
  /* phone: player pinned under the top bar, edge to edge */
  .player-shell { position: sticky; top: 60px; z-index: 10; margin-inline: -16px; }
}
@media (min-width: 768px) and (max-width: 1023px) { .player-shell { margin-inline: -48px; } }
@media (min-width: 1024px) { .player { border-radius: var(--radius); box-shadow: var(--shadow-lg); } .stage { padding-top: 28px; } }
.details { padding: 18px; margin-top: 16px; }
@media (min-width: 1024px) { .details { padding: 24px; } }
.details h1 { margin: 0 0 6px; font-size: clamp(20px, 3.4vw, 28px); line-height: 1.3; font-weight: 800; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 0; margin: 12px 0; border-block: 1px solid var(--border); }
.tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.tabs button { border: 0; background: none; padding: 6px 14px; border-radius: 8px; cursor: pointer; font-weight: 700; color: var(--muted); min-height: 40px; }
.tabs button[aria-selected='true'] { background: var(--sky); color: var(--primary); }
.desc { white-space: pre-line; overflow-wrap: anywhere; color: var(--text-sub); font-weight: 600; margin: 0; }
.desc.ur { color: var(--text); font-weight: 400; }
.alt { font-size: 14px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }

.chapters-panel { padding: 18px 14px; }
.chapters-panel header { display: flex; justify-content: space-between; align-items: baseline; padding: 0 6px 8px; }
.chapters-panel h2 { margin: 0; font-size: 17px; font-weight: 700; }
.chapters-panel header span { color: var(--muted); font-size: 12px; font-weight: 600; }
.chapters { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.chapters button {
  width: 100%; text-align: start; background: none; border: 0; border-inline-start: 3px solid transparent; border-radius: 8px;
  padding: 9px 10px; cursor: pointer; display: flex; gap: 12px; align-items: center; min-height: 44px; font-weight: 600; color: var(--text);
}
.chapters button:hover { background: var(--bg); }
.chapters button.active { background: var(--sky); color: var(--primary); border-inline-start-color: var(--primary); }
.chapters .ts { font: 600 12px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; color: var(--text-sub); flex: none; }
.chapters button.active .ts { color: var(--primary); border-color: #bcd4ff; background: #fff; }

.next-list { display: grid; gap: 10px; }
.next-item { display: grid; grid-template-columns: 88px 1fr; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: #f8fbff; text-decoration: none; color: inherit; }
.next-item:hover { border-color: var(--primary); }
.next-item img, .next-item .noimg { width: 88px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: #dbe8ff; }
.next-item b { display: block; font-size: 13px; line-height: 1.35; }

.demo-box { background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: var(--radius); padding: 16px; }
.demo-box h3 { margin: 0 0 4px; color: var(--wa-ink); font-size: 16px; }
.demo-box p { margin: 0 0 10px; color: #166534; font-weight: 700; font-size: 13px; }

/* ---------- footer ---------- */
.site-foot { background: var(--navy-dark); color: #9fb2c7; margin-top: 40px; }
.site-foot .wrap { padding-block: 28px; display: grid; gap: 16px; }
@media (min-width: 768px) { .site-foot .wrap { grid-template-columns: 1.2fr 1fr auto; align-items: center; } }
.site-foot .price-line { color: #fff; font-weight: 800; font-size: 18px; }
.site-foot .brands { color: #fff; font-weight: 700; letter-spacing: 0.4px; }
.site-foot a { color: var(--cyan); }
.site-foot .cta-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* phone: sticky bottom action bar */
.bottom-bar { position: sticky; bottom: 0; z-index: 15; display: flex; gap: 8px; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, 0.96); border-top: 1px solid var(--border); backdrop-filter: blur(6px); }
.bottom-bar .btn { flex: 1; min-height: 44px; padding: 8px 10px; }
@media (min-width: 1024px) { .bottom-bar { display: none; } }

/* course progress (localStorage) */
.progress { border-radius: var(--radius); padding: 20px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16); display: grid; gap: 12px; }
.progress .row { display: flex; justify-content: space-between; color: #b8c6d6; font-weight: 700; font-size: 14px; }
.bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.15); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--cyan); }
.progress small { color: #8aa0b8; }

/* ---------- home intro ("Start here" player) ---------- */
.intro { padding-bottom: 0; }
.intro-grid { display: grid; gap: 16px; align-items: center; }
@media (min-width: 1024px) { .intro-grid { grid-template-columns: 1.3fr 1fr; gap: 36px; } .intro-player { border-radius: var(--radius); box-shadow: var(--shadow-lg); } }
@media (max-width: 1023px) { .intro-player { margin-inline: -16px; } }
@media (min-width: 768px) and (max-width: 1023px) { .intro-player { margin-inline: -48px; } }
.intro-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: linear-gradient(135deg, var(--navy), #0a3a78); }
.intro-play img { width: 100%; height: 100%; object-fit: cover; }
.play-icon { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 8px rgba(0, 102, 255, 0.25), 0 10px 30px rgba(0, 0, 0, 0.35); }
.play-icon::after { content: ''; position: absolute; inset: 0; margin: auto; width: 0; height: 0; border-style: solid; border-width: 13px 0 13px 21px; border-color: transparent transparent transparent #fff; transform: translateX(3px); }
.intro-play:hover .play-icon { background: var(--primary-hover); }
.intro-text h2 { margin: 4px 0 8px; font-size: clamp(20px, 3.4vw, 28px); font-weight: 800; line-height: 1.3; }
.intro-text p { margin: 0 0 14px; color: var(--text-sub); font-weight: 600; }
.intro-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.intro-actions .btn { flex: 1 1 150px; }
.intro-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; font-weight: 700; text-decoration: none; }

/* ---------- mobile audit (30 Oct): ≥44 px targets, ≥16 px body copy ---------- */
.top .wrap { min-height: 64px; }
.brand { min-height: 44px; }
.langs button { min-height: 44px; min-width: 52px; padding-inline: 14px; font-size: 15px; }
.player-shell { top: 64px; }
.btn { font-size: 16px; min-height: 48px; }
.search input, .search button { min-height: 46px; font-size: 16px; }
.topics a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-size: 14px; border-radius: 8px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.crumbs .wrap { padding-block: 0; align-items: center; }
.tabs button { min-height: 44px; min-width: 64px; font-size: 16px; }
.site-foot a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; }
.hero p.lead, .track p, .row-card p, .panel p, .desc, .details .desc, .track .ur-title, .row-card .ur-title, .section-head p, .site-foot, .site-foot .brands { font-size: 16px; }
.lesson-card h3, .track h3, .row-card h3, .next-item b { font-size: 16px; }
.chapters button { font-size: 16px; min-height: 48px; }
.demo-box p, .panel.price .brands, .meta { font-size: 14px; }
.demo-box p.ltr, .demo-box h3 { font-size: 16px; }
@media (max-width: 420px) {
  .brand { font-size: 16px; gap: 6px; min-width: 0; }
  .brand img { display: none; }
  .langs button { padding-inline: 10px; min-width: 44px; }
  .top .wrap { gap: 8px; }
}
.track .foot .go { font-size: 15px; }
.crumbs a { min-width: 44px; justify-content: center; }
.chapters .ts { font-size: 14px; }
