/* ============================================
   LessonEye — Global Design System
   Obsidian · Gold · Electric Blue
   ============================================ */

:root {
  /* Obsidian scale (backgrounds) */
  --void: #05050a;
  --obsidian: #0a0a12;
  --onyx: #10111c;
  --coal: #161722;
  --smoke: #1e1f2d;
  --ash: #2a2c3d;

  /* Gold scale (accents) */
  --gold: #d4af37;
  --gold-hi: #f1cf6b;
  --gold-lo: #a37a2a;
  --gold-soft: rgba(212, 175, 55, .15);
  --gold-fade: rgba(212, 175, 55, .08);

  /* Electric (secondary AI accent) */
  --elec: #00d4ff;
  --elec-soft: rgba(0, 212, 255, .15);

  /* Platinum / text */
  --plat: #f4f4f8;
  --plat2: #c9cbd8;
  --plat3: #8b8ea3;
  --plat4: #5a5d73;

  /* Semantic */
  --ok: #38d6a1;
  --warn: #f7a600;
  --err: #ef4060;

  /* Shape */
  --r: 14px;
  --r-sm: 8px;
  --r-lg: 22px;

  /* Motion */
  --ease: cubic-bezier(.22,.68,.28,1);

  /* Shadow */
  --sh-gold: 0 0 0 1px rgba(212,175,55,.18), 0 10px 36px rgba(212,175,55,.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Sora', system-ui, -apple-system, Segoe UI, sans-serif;
  background: var(--obsidian);
  color: var(--plat);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(1100px 500px at 85% -10%, rgba(212,175,55,.06), transparent 60%),
    radial-gradient(800px 400px at 5% 100%, rgba(0,212,255,.04), transparent 60%);
}
body.ar {
  font-family: 'Tajawal', 'Cairo', system-ui, sans-serif;
  direction: rtl;
  text-align: right;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(10,10,18,.85);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid rgba(212,175,55,.12);
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
}
.nav-inner {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-mark {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(212,175,55,.25));
  transition: transform .4s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-4deg) scale(1.04); }
.brand-text { line-height: 1.1; }
.brand-name {
  font-family: 'Fraunces', 'Tajawal', serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--plat);
}
.brand-name em {
  font-style: normal;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold-lo));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-sub {
  font-size: .7rem;
  color: var(--plat3);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  padding: 9px 16px;
  font-size: .86rem;
  font-weight: 500;
  color: var(--plat2);
  border-radius: var(--r-sm);
  transition: .2s var(--ease);
}
.nav-link:hover { color: var(--gold-hi); background: var(--gold-fade); }
.nav-link.active { color: var(--gold); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-btn {
  padding: 8px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(212,175,55,.2);
  border-radius: var(--r-sm);
  color: var(--plat2);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .05em;
  transition: .2s var(--ease);
}
.lang-btn:hover { border-color: var(--gold); color: var(--gold-hi); }

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--gold), var(--gold-lo));
  color: var(--obsidian);
  font-size: .85rem;
  font-weight: 700;
  border-radius: var(--r-sm);
  transition: .25s var(--ease);
  box-shadow: 0 4px 14px rgba(212,175,55,.25);
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212,175,55,.35);
  filter: brightness(1.08);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(212,175,55,.2);
  border-radius: var(--r-sm);
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.02);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  position: relative;
}
.nav-toggle span::before { content: ''; position: absolute; top: -6px; left: 0; }
.nav-toggle span::after { content: ''; position: absolute; top: 6px; left: 0; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--onyx);
    border-bottom: 1px solid rgba(212,175,55,.15);
    padding: 14px 24px 22px;
    gap: 2px;
    box-shadow: 0 20px 40px rgba(0,0,0,.5);
  }
  .nav-links.open .nav-link { width: 100%; padding: 12px 14px; }
}
@media (max-width: 520px) {
  .navbar { padding: 0 16px; height: 64px; }
  .nav-links.open { top: 64px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-sub { display: none; }
  .brand-name { font-size: 1.1rem; }
  .cta-btn { display: none; }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--r);
  font-size: .95rem;
  font-weight: 700;
  font-family: inherit;
  border: 1px solid transparent;
  transition: .25s var(--ease);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-hi), var(--gold), var(--gold-lo));
  color: var(--obsidian);
  box-shadow: 0 4px 18px rgba(212,175,55,.3);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(212,175,55,.45);
  filter: brightness(1.08);
}
.btn-ghost {
  background: rgba(255,255,255,.03);
  border-color: rgba(212,175,55,.3);
  color: var(--plat);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-hi);
  background: var(--gold-fade);
}
.btn-elec {
  background: linear-gradient(135deg, var(--elec), #0097c7);
  color: var(--obsidian);
  box-shadow: 0 4px 18px rgba(0,212,255,.3);
}
.btn-elec:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,212,255,.45); }

/* ============================================
   UTILITIES
   ============================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 90px 24px; position: relative; }
@media (max-width: 640px) { .section { padding: 60px 20px; } }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.kicker {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 5px 14px;
  background: var(--gold-soft);
  border: 1px solid rgba(212,175,55,.25);
  border-radius: 999px;
  margin-bottom: 18px;
}
.section-title {
  font-family: 'Fraunces', 'Tajawal', serif;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--plat);
  margin-bottom: 16px;
}
body.ar .section-title { font-family: 'Tajawal', serif; font-weight: 700; line-height: 1.3; }
.section-desc {
  font-size: 1.05rem;
  color: var(--plat3);
  line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--void);
  border-top: 1px solid rgba(212,175,55,.12);
  padding: 56px 24px 28px;
  margin-top: 80px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand-block { max-width: 340px; }
.footer-desc {
  color: var(--plat3);
  font-size: .88rem;
  margin-top: 14px;
  line-height: 1.7;
}
.footer-col h4 {
  color: var(--gold);
  font-size: .78rem;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.footer-col a {
  display: block;
  color: var(--plat3);
  font-size: .88rem;
  padding: 6px 0;
  transition: color .15s;
}
.footer-col a:hover { color: var(--gold-hi); }
.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(212,175,55,.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .78rem;
  color: var(--plat4);
}
.footer-bottom strong {
  background: linear-gradient(135deg, var(--gold-hi), var(--gold-lo));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (max-width: 820px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand-block { grid-column: 1 / -1; max-width: 100%; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ============================================
   STATUS INDICATOR (bottom right)
   ============================================ */
.sys-status {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: rgba(10,10,18,.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(212,175,55,.2);
  border-radius: 999px;
  font-size: .72rem;
  color: var(--plat3);
  font-weight: 600;
}
body.ar .sys-status { left: auto; right: 16px; }
.sys-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(56,214,161,.2);
  animation: sysPulse 2s infinite;
}
.sys-status.off .sys-dot { background: var(--err); box-shadow: 0 0 0 3px rgba(239,64,96,.2); }
@keyframes sysPulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(56,214,161,.2); }
  50% { box-shadow: 0 0 0 7px rgba(56,214,161,0); }
}
@media (max-width: 520px) { .sys-status { display: none; } }

/* ============================================
   FEEDBACK BUTTON (bottom right)
   ============================================ */
.fb-btn {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 60;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-lo));
  color: var(--obsidian);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 6px 20px rgba(212,175,55,.3);
  transition: .25s var(--ease);
  cursor: pointer;
}
.fb-btn:hover { transform: translateY(-3px) scale(1.06); box-shadow: 0 10px 28px rgba(212,175,55,.45); }
body.ar .fb-btn { right: auto; left: 16px; }

/* ============================================
   SKIP LINK (accessibility)
   ============================================ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--obsidian);
  padding: 10px 16px;
  font-weight: 700;
  z-index: 999;
}
.skip-link:focus { left: 10px; top: 10px; }

/* Print — Eco mode handled in print-styles.css but a baseline: */
@media print {
  .navbar, .site-footer, .sys-status, .fb-btn, .btn, .nav-actions { display: none !important; }
  body { background: white !important; color: black !important; }
  body::before, body::after { display: none !important; }
  * { color: black !important; background: transparent !important; box-shadow: none !important; }
}
