/* ===== Athar.AI Academy — main stylesheet ===== */
:root {
  --ink: #0b1020;
  --ink-2: #1c2440;
  --muted: #5b6480;
  --line: #e4e7f0;
  --bg: #ffffff;
  --bg-alt: #f5f7fc;
  --primary: #4f46e5;
  --primary-2: #06b6d4;
  --accent: #f59e0b;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 23, 60, 0.08);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: min(1160px, 92%); margin-inline: auto; }
.narrow { width: min(760px, 92%); }
.muted { color: var(--muted); }
.accent { color: var(--primary); }
.gradient-text { background: linear-gradient(90deg, var(--primary), var(--primary-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.eyebrow { display: inline-flex; align-items: center; gap: .5em; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--primary); margin-bottom: 1em; }
.eyebrow.light { color: #a5b4fc; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.2); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .85em 1.5em; border-radius: 999px; font-weight: 700; font-size: .95rem; border: 2px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; font-family: inherit; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(90deg, var(--primary), #6366f1); color: #fff; box-shadow: 0 8px 20px rgba(79,70,229,.3); }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { color: var(--primary); }
.btn-sm { padding: .55em 1.1em; background: var(--ink); color: #fff !important; }
.btn-block { width: 100%; }

/* ===== Header ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { display: flex; align-items: center; gap: .6em; font-weight: 800; font-size: 1.1rem; }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.nav-links { display: flex; align-items: center; gap: 1.8rem; list-style: none; margin: 0; padding: 0; font-weight: 600; font-size: .95rem; }
.nav-links a:not(.btn):hover { color: var(--primary); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: .2s; }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding: 90px 0 80px; }
.hero-grid-bg { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%); opacity: .7; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2rem 0 2.5rem; }
.hero-stats { display: flex; gap: 2.2rem; list-style: none; padding: 0; margin: 0; }
.hero-stats strong { display: block; font-size: 1.6rem; font-weight: 800; }
.hero-stats span { font-size: .85rem; color: var(--muted); }

.code-window { background: #0f172a; border-radius: var(--radius); box-shadow: 0 30px 60px rgba(15,23,42,.35); overflow: hidden; transform: rotate(1.5deg); }
.code-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; background: #1e293b; }
.code-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ef4444; }
.code-bar i:nth-child(2) { background: #f59e0b; }
.code-bar i:nth-child(3) { background: #22c55e; }
.code-bar span { margin-left: 10px; color: #94a3b8; font-family: var(--mono); font-size: .8rem; }
.code-window pre { margin: 0; padding: 22px; color: #e2e8f0; font-family: var(--mono); font-size: .85rem; line-height: 1.75; overflow-x: auto; }
.code-window .k { color: #c084fc; } .code-window .n { color: #fbbf24; } .code-window .s { color: #34d399; } .code-window .c { color: #64748b; } .code-window .ok { color: #22d3ee; }

/* ===== Trusted ===== */
.trusted { border-block: 1px solid var(--line); padding: 28px 0; background: var(--bg-alt); }
.trusted p { text-align: center; color: var(--muted); font-size: .85rem; margin-bottom: .8rem; }
.trusted-list { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 2.5rem; list-style: none; padding: 0; margin: 0; font-weight: 800; color: #8a92ab; font-size: 1.05rem; }

/* ===== Sections ===== */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark { background: radial-gradient(circle at 80% 0%, #312e81, var(--ink) 60%); color: #fff; }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }

/* ===== Courses ===== */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.filter { font-family: inherit; font-weight: 600; padding: .5em 1.1em; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--muted); transition: .15s; }
.filter:hover { border-color: var(--primary); color: var(--primary); }
.filter.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.course-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s, border-color .2s; }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #c7d2fe; }
.course-card.hidden { display: none; }
.course-card.featured { border: 2px solid var(--primary); }
.course-card p { color: var(--muted); font-size: .95rem; flex: 1; }
.course-icon { font-size: 2rem; margin-bottom: .8rem; }
.ribbon { position: absolute; top: 18px; right: 18px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 800; padding: .3em .8em; border-radius: 999px; }
.tag { align-self: flex-start; font-size: .72rem; font-weight: 700; padding: .25em .75em; border-radius: 999px; margin-bottom: .8rem; }
.tag-beginner { background: #dcfce7; color: #166534; }
.tag-intermediate { background: #e0f2fe; color: #075985; }
.tag-advanced { background: #ede9fe; color: #5b21b6; }
.meta { display: flex; gap: 1rem; list-style: none; padding: 0; margin: 0 0 1rem; font-size: .82rem; color: var(--muted); font-weight: 600; }
.meta li::before { content: "◆ "; color: var(--primary-2); }
.card-link { font-weight: 700; color: var(--primary); }

/* ===== Steps ===== */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; list-style: none; padding: 0; margin: 0; }
.steps li { background: #fff; border-radius: var(--radius); padding: 1.8rem; border: 1px solid var(--line); }
.steps p { color: var(--muted); font-size: .95rem; margin: 0; }
.step-num { font-family: var(--mono); font-size: 1.6rem; font-weight: 800; color: var(--primary); display: block; margin-bottom: .6rem; }

/* ===== Corporate ===== */
.corporate { display: grid; grid-template-columns: 1.2fr 1fr; gap: 4rem; align-items: center; }
.checklist { list-style: none; padding: 0; margin: 0 0 2rem; }
.checklist li { padding: .45em 0 .45em 2em; position: relative; font-weight: 500; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: .4em; width: 1.4em; height: 1.4em; border-radius: 50%; background: #e0e7ff; color: var(--primary); display: grid; place-items: center; font-size: .8rem; font-weight: 800; }
.corporate-panel { background: var(--ink); color: #fff; border-radius: 20px; padding: 2rem; box-shadow: var(--shadow); }
.panel-row { display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.panel-row:last-child { border: 0; }
.panel-row span { color: #94a3b8; }
.panel-row strong { text-align: right; }

/* ===== About ===== */
.about { display: grid; grid-template-columns: 320px 1fr; gap: 4rem; align-items: center; }
.about-photo { aspect-ratio: 4/5; border-radius: 24px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); display: grid; place-items: center; color: rgba(255,255,255,.9); font-size: 5rem; font-weight: 800; box-shadow: var(--shadow); overflow: hidden; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.role { color: var(--primary); font-weight: 700; }
.creds { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.creds li { background: #fff; border: 1px solid var(--line); padding: .4em 1em; border-radius: 999px; font-size: .85rem; font-weight: 600; }

/* ===== FAQ ===== */
details { border-bottom: 1px solid var(--line); padding: 1.2rem 0; }
summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; color: var(--primary); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); margin: .8rem 0 0; }

/* ===== Contact ===== */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.muted-light { color: #c7d2fe; }
.contact-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .8rem; }
.contact-list a { text-decoration: underline; text-underline-offset: 3px; }
.contact-form { background: #fff; color: var(--ink); padding: 2rem; border-radius: 20px; display: grid; gap: 1rem; box-shadow: 0 30px 60px rgba(0,0,0,.3); }
.contact-form label { display: grid; gap: .35rem; font-size: .85rem; font-weight: 700; min-width: 0; }
.contact-form input, .contact-form select, .contact-form textarea { width: 100%; min-width: 0; max-width: 100%; }
.contact-form input, .contact-form select, .contact-form textarea { font: inherit; font-weight: 400; padding: .75em 1em; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-alt); }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 2px solid var(--primary); border-color: transparent; background: #fff; }
.form-status { margin: 0; font-size: .9rem; font-weight: 600; min-height: 1.2em; }
.form-status.ok { color: #16a34a; } .form-status.err { color: #dc2626; }

/* ===== Footer ===== */
.site-footer { background: var(--ink); color: #94a3b8; padding: 28px 0; font-size: .9rem; border-top: 1px solid rgba(255,255,255,.08); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer-inner p { margin: 0; }
.footer-inner ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.footer-inner a:hover { color: #fff; }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
.hero-inner > *, .corporate > *, .about > *, .contact > * { min-width: 0; }
.code-window pre { max-width: 100%; }
@media (max-width: 960px) {
  .hero { padding: 56px 0 56px; }
  .hero-inner, .corporate, .about, .contact { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .about-photo { max-width: 260px; }
  .hero-card { max-width: 560px; }
  .code-window { transform: none; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .container { width: min(1160px, 90%); }
  .nav { height: 64px; }
  .logo { font-size: 1rem; }
  .nav-toggle { display: block; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-links { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 0 5%; max-height: 0; overflow: hidden; transition: max-height .3s, padding .3s; box-shadow: 0 12px 24px rgba(15,23,60,.08); }
  .nav-links.open { max-height: 420px; padding: .5rem 5% 1rem; }
  .nav-links li { padding: 0; border-bottom: 1px solid var(--line); }
  .nav-links li:last-child { border: 0; padding-top: .8rem; }
  .nav-links a:not(.btn) { display: block; padding: .9rem 0; font-size: 1.05rem; }
  .nav-links .btn { width: 100%; padding: .9em; }
  h1 { font-size: clamp(2rem, 9vw, 2.6rem); }
  h2 { font-size: clamp(1.6rem, 7vw, 2rem); }
  .lead { font-size: 1.05rem; }
  .eyebrow { font-size: .72rem; letter-spacing: .08em; display: block; line-height: 1.6; }
  .eyebrow .dot { display: inline-block; margin-right: .45em; vertical-align: middle; }
  .hero-cta { flex-direction: column; align-items: stretch; margin: 1.6rem 0 2rem; }
  .hero-cta .btn { width: 100%; padding: 1em; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
  .hero-stats strong { font-size: 1.3rem; }
  .hero-stats span { font-size: .78rem; display: block; line-height: 1.35; }
  .code-window pre { font-size: .72rem; padding: 16px; }
  .trusted-list { gap: .4rem 1.4rem; font-size: .92rem; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 1.8rem; }
  .filters { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; margin-inline: -5%; padding-inline: 5%; scrollbar-width: none; }
  .filter { flex: 0 0 auto; }
  .course-grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .course-card { padding: 1.4rem; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li { padding: 1.4rem; }
  .corporate { gap: 2rem; }
  .panel-row { flex-direction: column; gap: .2rem; padding: .9rem 0; }
  .panel-row strong { text-align: left; }
  .about-photo { max-width: 200px; font-size: 3.5rem; }
  .contact { gap: 2rem; }
  .contact-form { padding: 1.4rem; }
  .contact-form input, .contact-form select, .contact-form textarea { font-size: 16px; } /* stops iPhone zooming in */
  summary { font-size: 1rem; gap: 1rem; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-inner ul { flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 380px) {
  .logo-text { font-size: .92rem; }
  .hero-stats span { font-size: .72rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, .reveal { transition: none !important; animation: none !important; transform: none !important; opacity: 1 !important; }
}

/* ===== Chatbot ===== */
.cb { position: fixed; right: 22px; bottom: 22px; z-index: 100; font-family: var(--font); }
.cb-launcher { position: relative; width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 12px 28px rgba(79,70,229,.45); display: grid; place-items: center; transition: transform .2s; }
.cb-launcher:hover { transform: scale(1.06); }
.cb-badge { position: absolute; top: -2px; right: -2px; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 800; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; border: 2px solid #fff; }
.cb-badge[hidden] { display: none; }
.cb-panel { position: absolute; right: 0; bottom: 76px; width: 370px; max-width: calc(100vw - 32px); height: 540px; max-height: calc(100vh - 120px); background: #fff; border-radius: 20px; box-shadow: 0 24px 60px rgba(11,16,32,.25); display: flex; flex-direction: column; overflow: hidden; animation: cbIn .2s ease; }
.cb-panel[hidden] { display: none; }
@keyframes cbIn { from { opacity: 0; transform: translateY(12px); } }
.cb-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--ink); color: #fff; }
.cb-head strong { display: block; font-size: .98rem; }
.cb-head span { font-size: .78rem; color: #a5b4fc; }
.cb-avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.cb-close { margin-left: auto; background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; line-height: 1; opacity: .8; }
.cb-close:hover { opacity: 1; }
.cb-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-alt); }
.cb-msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: .92rem; line-height: 1.5; white-space: pre-line; word-wrap: break-word; }
.cb-bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.cb-user { align-self: flex-end; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.cb-typing { display: flex; gap: 4px; padding: 14px; }
.cb-typing i { width: 7px; height: 7px; border-radius: 50%; background: #a0a8c0; animation: cbDot 1s infinite; }
.cb-typing i:nth-child(2) { animation-delay: .15s; } .cb-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes cbDot { 50% { transform: translateY(-4px); opacity: .5; } }
.cb-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px; background: var(--bg-alt); max-height: 150px; overflow-y: auto; }
.cb-chips:not(:empty) { padding-bottom: 12px; }
.cb-chip { font: inherit; font-size: .82rem; font-weight: 600; padding: 7px 12px; border-radius: 999px; border: 1px solid #c7d2fe; background: #fff; color: var(--primary); cursor: pointer; }
.cb-chip:hover { background: var(--primary); color: #fff; }
.cb-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.cb-input input { flex: 1; font: inherit; font-size: .92rem; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; outline: none; }
.cb-input input:focus { border-color: var(--primary); }
.cb-input button { width: 42px; border: 0; border-radius: 50%; background: var(--primary); color: #fff; cursor: pointer; font-size: 1rem; }
@media (max-width: 520px) {
  .cb { right: 16px; bottom: 16px; }
  .cb-launcher { width: 56px; height: 56px; }
  .cb.open .cb-launcher { display: none; }
  .cb-panel { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; border-radius: 0; bottom: 0; }
  .cb-head { padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); }
  .cb-input { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .cb-input input { font-size: 16px; }
  .cb-msg { max-width: 88%; font-size: .95rem; }
  .cb-chip { font-size: .85rem; padding: 9px 13px; }
  body.cb-lock { overflow: hidden; }
}
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
