/* ============================================================
   ERDEM SCHULE — ДИЗАЙНЫ СИСТЕМ (бүх хуудасны цорын ганц эх сурвалж)
   Дэлгэрэнгүй: DESIGN.md
   ============================================================ */
:root {
  /* ── Брэнд өнгө: логоны хөх + алт + Монголын улаан ── */
  --navy-950: #061833;      /* hero, footer-ийн хамгийн бараан */
  --navy: #0a2342;          /* ҮНДСЭН: гарчиг, цэс, товч */
  --navy-2: #102f60;
  --blue: #1a64c0;          /* холбоос, мэдээлэл, идэвхтэй төлөв (цагаан текстэд 5.8:1) */
  --blue-glow: #2f6fe0;     /* зөвхөн гэрлийн эффект, текстэд хэрэглэхгүй */
  --gold: #c59d5f;          /* алтан акцент (хүрээ, тэмдэг) */
  --gold-2: #f0c879;        /* бараан дэвсгэр дээрх алтан текст */
  --gold-soft: #f5e4c7;
  --gold-ink: #8a6420;      /* цайвар дэвсгэр дээрх алтан текст (5.3:1) */
  --red: #c62f35;           /* ЧУХАЛ / алдаа / устгах (цагаан текстэд 5.4:1) */
  --ok: #0a7d5e;            /* амжилт (цагаан текстэд 5.1:1) */
  --sun: #ffc83d;           /* зөвхөн хүүхдийн порталын оноо, баяр */

  /* ── Бараан/алтан дэвсгэр дээрх текстийн өнгө ── */
  --on-gold: #3a2a08;       /* алтан товч, туг дээрх текст (5.5:1) */
  --on-dark: #e8eefc;
  --on-dark-muted: #cfd9ee; /* navy дээрх туслах текст (11:1) */

  /* ── Саарал өнгөнүүд ── */
  --ink: #1b2536;           /* үндсэн текст (15:1) */
  --muted: #5a6575;         /* туслах текст (5.9:1) */
  --line: #e4e8ef;
  --bg: #f6f7fb;
  --bg-alt: #eef1f8;
  --card: #fff;

  /* ── Хэлбэр, сүүдэр ── */
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 10px 30px rgba(10, 35, 66, .10);
  --shadow-lg: 0 24px 50px rgba(10, 35, 66, .18);

  /* ── Үсгийн систем: ХОЁР л фонт, бүгд Ө/Ү-тэй ──
     Manrope  = бүх интерфэйс, текст, товч, хүснэгт
     Playfair = зөвхөн гарчиг (h1/h2), том тоо, брэндийн нэр
     (Playfair Display НЬ Ө, Ү үсэггүй тул хэрэглэхгүй — шинэ "Playfair" ашиглана) */
  --font: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --font-d: 'Playfair', Georgia, 'Times New Roman', serif;
  --fs-xs: .75rem; --fs-sm: .875rem; --fs-md: 1rem; --fs-lg: 1.25rem;
  --fs-xl: 1.6rem; --fs-2xl: clamp(1.7rem, 3.5vw, 2.5rem);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-md); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; }
h1, h2 { font-family: var(--font-d); font-weight: 800; }
h3, h4 { font-family: var(--font); font-weight: 800; }
::selection { background: var(--gold-2); color: var(--navy); }
/* Гараар (Tab) удирдахад тод харагдах фокус */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.btn { display: inline-flex; align-items: center; gap: .5rem; border: 0; cursor: pointer; padding: .7rem 1.2rem; border-radius: 999px; font-weight: 700; font-size: .9rem; transition: transform .15s, box-shadow .2s, background .2s; background: var(--navy); color: #fff; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(10, 35, 66, .25); }
.btn:active { transform: translateY(0); }
.btn.gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #3a2a08; }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn.ghost:hover { background: #fff; box-shadow: var(--shadow); }
.btn.danger { background: var(--red); }
.btn.sm { padding: .4rem .85rem; font-size: .8rem; }
.btn[disabled] { opacity: .5; pointer-events: none; }

label.f { display: block; font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 1rem; }
label.f > input, label.f > select, label.f > textarea { display: block; width: 100%; margin-top: .3rem; padding: .65rem .8rem; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-weight: 500; }
label.f > textarea { min-height: 110px; resize: vertical; }
label.f > input:focus, label.f > select:focus, label.f > textarea:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(197, 157, 95, .2); }
.row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: 0 2px 10px rgba(10, 35, 66, .04); }
.chip { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: .2rem .6rem; border-radius: 999px; background: var(--gold-soft); color: #7a5a1d; }
.chip.blue { background: #e0e9ff; color: #1e40af; }
.chip.green { background: #d6f5e8; color: #0b6b48; }
.chip.red { background: #fde2e3; color: #9b1c22; }
.muted { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; border: 2px dashed var(--line); border-radius: var(--radius); }

.media { border-radius: 12px; overflow: hidden; background: #000; }
.media iframe, .media video { width: 100%; aspect-ratio: 16/9; border: 0; display: block; }

#toasts { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 999; display: grid; gap: .5rem; }
.toast { background: var(--navy); color: #fff; padding: .7rem 1.2rem; border-radius: 12px; box-shadow: var(--shadow); font-weight: 600; font-size: .9rem; animation: tin .25s ease; }
.toast.err { background: var(--red); }
.toast.out { opacity: 0; transition: opacity .3s; }
@keyframes tin { from { transform: translateY(10px); opacity: 0; } }

.modal-bg { position: fixed; inset: 0; background: rgba(8, 20, 40, .6); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 1rem; z-index: 200; animation: fade .2s; }
.modal { background: #fff; border-radius: 20px; width: min(640px, 100%); max-height: 92vh; overflow: auto; padding: 1.5rem; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.modal h3 { font-family: var(--font-d); font-size: 1.4rem; margin-bottom: 1rem; color: var(--navy); }
.modal .actions { display: flex; gap: .6rem; justify-content: flex-end; margin-top: .5rem; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }

.demo-bar { background: #fff3cd; color: #7a5a00; font-size: .78rem; font-weight: 700; text-align: center; padding: .35rem 1rem; position: relative; z-index: 300; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
