/* ============================================================
   HUNNU Institute — Institutional Website
   Brand: Deep Navy · Gold · Red-Orange · White
   ============================================================ */

:root {
  --navy: #14263F;
  --navy-2: #1B3358;
  --navy-deep: #0E1B2E;
  --gold: #C9A227;
  --gold-light: #E3C566;
  --flame: #E2572B;
  --paper: #FAF9F6;
  --white: #FFFFFF;
  --ink: #1E2A3A;
  --muted: #5A6B80;
  --line: #E4E0D6;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", Arial, sans-serif;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(14, 27, 46, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Language switching */
body[data-lang="mn"] .en { display: none; }
body[data-lang="en"] .mn { display: none; }

img, svg { display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark { width: 40px; height: 40px; object-fit: contain; }

.brand-text {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--navy);
  white-space: nowrap;
}

.brand-text strong { font-weight: 700; }
.brand-sub { color: var(--gold); font-weight: 600; font-size: 0.95em; }

.site-nav {
  display: flex;
  gap: 26px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--navy);
}

.site-nav a {
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.site-nav a:hover { color: var(--flame); border-color: var(--gold); }

/* Номын дэлгүүр — өөр домэйн руу очих тул онцлон харуулна */
.nav-store {
  background: var(--navy);
  color: var(--white) !important;
  padding: 7px 16px !important;
  border-radius: 999px;
  border-bottom: none !important;
  font-weight: 600;
}
.nav-store:hover { background: var(--flame); border-color: transparent !important; }

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-toggle {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s;
}

.lang-toggle:hover { border-color: var(--gold); }
.lang-sep { margin: 0 6px; opacity: 0.4; }
.lang-opt.active { color: var(--navy); }
.lang-opt[data-l]:not(.active) { opacity: 0.55; }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-burger span {
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-2) 100%);
  color: var(--white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 82% 20%, rgba(201, 162, 39, 0.14), transparent 42%),
    radial-gradient(circle at 12% 85%, rgba(226, 87, 43, 0.10), transparent 40%),
    radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: auto, auto, 26px 26px;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  align-items: center;
  gap: 48px;
  padding: 110px 0 120px;
}

.hero-kicker {
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.08;
  margin-bottom: 20px;
}

.hero-title .accent { color: var(--gold); }

.hero-tagline {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 18px;
}

.hero-desc {
  max-width: 58ch;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.98rem;
  margin-bottom: 34px;
}

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn:hover { transform: translateY(-2px); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy-deep);
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.35);
}

.btn-ghost {
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  color: var(--white);
}

.btn-ghost:hover { border-color: var(--gold); color: var(--gold-light); }

.hero-art { display: flex; justify-content: center; }

.hero-plaque {
  background: var(--white);
  border-radius: 28px;
  padding: 34px 38px;
  width: min(340px, 72vw);
  box-shadow:
    0 0 60px rgba(201, 162, 39, 0.28),
    0 24px 60px rgba(0, 0, 0, 0.35);
  animation: heroFloat 7s ease-in-out infinite;
}

.hero-plaque img { width: 100%; height: auto; }

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ============ Sections ============ */
.section { padding: 96px 0; }

.section-tint { background: var(--paper); }

.section-dark {
  background: linear-gradient(165deg, var(--navy-deep), var(--navy) 70%);
  color: var(--white);
}

.section-kicker {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--flame);
  margin-bottom: 12px;
}

.section-dark .section-kicker { color: var(--gold-light); }

.section-title {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 18px;
  line-height: 1.2;
}

.section-dark .section-title { color: var(--white); }

.section-lead {
  max-width: 72ch;
  color: var(--muted);
  margin-bottom: 48px;
}

.section-dark .section-lead { color: rgba(255, 255, 255, 0.72); }

.subsection-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--navy);
  margin: 56px 0 28px;
}

/* ============ Grid & Cards ============ */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow);
}

.card h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 10px;
}

.card p { color: var(--muted); font-size: 0.94rem; }

.card-feature { border-top: 3px solid var(--gold); }

.card-dark {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: none;
}

.card-dark h3 { color: var(--white); }
.card-dark p { color: rgba(255, 255, 255, 0.68); }
.card-dark a { color: var(--gold-light); }
.card-dark a:hover { text-decoration: underline; }

.card-icon { font-size: 1.6rem; margin-bottom: 14px; }

/* Values */
.value {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.value-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--flame);
  box-shadow: 0 0 0 4px rgba(226, 87, 43, 0.15);
}

.value h4 { font-size: 1rem; color: var(--navy); margin-bottom: 4px; }
.value p { font-size: 0.9rem; color: var(--muted); }

/* Publications */
.pub-featured {
  border-left: 4px solid var(--flame);
  margin-bottom: 36px;
}

.pub-badge {
  display: inline-block;
  background: rgba(226, 87, 43, 0.1);
  color: var(--flame);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.pub-title {
  font-family: var(--serif);
  font-size: 1.4rem !important;
  line-height: 1.35;
}

.pub-meta {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
}

.scholar-links p { font-weight: 600; color: var(--navy); margin-bottom: 14px; }

.chip-row { display: flex; gap: 12px; flex-wrap: wrap; }

.chip {
  border: 1.5px solid var(--navy);
  color: var(--navy);
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.chip:hover { background: var(--navy); color: var(--white); }

/* Frameworks */
.framework-card { border-top: 3px solid var(--navy); }
.framework-card:nth-child(2) { border-top-color: var(--gold); }
.framework-card:nth-child(3) { border-top-color: var(--flame); }
.framework-card:nth-child(4) { border-top-color: var(--navy-2); }

/* Contact */
.contact-card { text-align: center; }

/* ============ Footer ============ */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.72);
  padding: 56px 0 40px;
  font-size: 0.9rem;
}

.footer-inner { display: grid; gap: 28px; }

.footer-brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.footer-mark {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--white);
  padding: 7px;
}

.footer-mark img { width: 100%; height: 100%; object-fit: contain; }
.footer-brand strong { color: var(--white); font-family: var(--serif); letter-spacing: 0.03em; }

.footer-links { display: flex; gap: 22px; flex-wrap: wrap; font-weight: 500; }
.footer-links a:hover { color: var(--gold-light); }

.footer-note { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 22px; color: rgba(255, 255, 255, 0.45); }

/* ============ Reveal animation ============ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-plaque { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; padding: 80px 0 90px; }
  .hero-art { order: -1; }
  .hero-plaque { width: min(230px, 58vw); padding: 22px 24px; border-radius: 20px; }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
    display: none;
  }

  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .site-nav a:last-child { border-bottom: none; }
  .nav-burger { display: flex; }
}

@media (max-width: 600px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .section { padding: 68px 0; }
  .brand-text { font-size: 1rem; }
}

@media (max-width: 480px) {
  .container { width: calc(100% - 32px); }
  .header-inner { gap: 10px; }
  .brand { gap: 8px; }
  .brand-sub { display: none; }
  .lang-toggle { padding: 5px 10px; }
}
