/* ==========================================================
   Morin Naadam — World Horse Day Mongolia
   Design system
   ========================================================== */
:root {
  --bg: #0e0c0a;
  --bg-soft: #16130f;
  --surface: #1c1813;
  --line: rgba(212, 175, 100, 0.18);
  --text: #f4ece0;
  --muted: #b8ad99;
  --gold: #d4af64;
  --gold-2: #e9c87a;
  --gold-soft: rgba(212, 175, 100, 0.12);
  --primary: #c9a35a;
  --primary-2: #e3c277;
  --radius: 14px;
  --maxw: 1200px;
  --shadow-lg: 0 20px 50px -20px rgba(0,0,0,.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1,h2,h3,h4 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; line-height: 1.15; }

.kicker {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  font-weight: 600;
}

.section { padding: 120px 0; position: relative; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 64px; }
.section-title { font-size: clamp(32px, 4.5vw, 52px); margin-bottom: 12px; }

/* ==================== Header ==================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 18px 0;
  transition: all .3s ease;
  background: rgba(14, 12, 10, 0.6);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(14, 12, 10, 0.92);
  border-bottom-color: var(--line);
  padding: 12px 0;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 38px; height: 38px; object-fit: contain; }
.brand-name { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 700; letter-spacing: 0.03em; }

.main-nav { display: flex; gap: 32px; }
.main-nav a {
  font-size: 14px; font-weight: 500; color: var(--text);
  position: relative; padding: 4px 0; transition: color .2s;
}
.main-nav a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.main-nav a:hover { color: var(--gold); }
.main-nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 18px; }
.lang-switch { display: flex; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.lang-switch a { transition: color .2s; }
.lang-switch a.active, .lang-switch a:hover { color: var(--gold); }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 4px 0; transition: .3s; }

/* ==================== Buttons ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: 999px; font-weight: 600; font-size: 14px;
  letter-spacing: 0.05em; text-transform: uppercase; border: 1px solid transparent;
  cursor: pointer; transition: all .25s ease; line-height: 1;
}
.btn-sm { padding: 10px 20px; font-size: 12px; }
.btn-block { width: 100%; padding: 16px; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #1a1408;
  box-shadow: 0 8px 24px -8px rgba(212,175,100,0.5);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(212,175,100,0.7); }
.btn-ghost {
  background: transparent; color: var(--text); border-color: rgba(255,255,255,0.25);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ==================== Hero ==================== */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background: url('../images/hero.jpg') center/cover no-repeat;
  transform: scale(1.05);
  animation: slowZoom 18s ease-in-out infinite alternate;
}
@keyframes slowZoom { to { transform: scale(1.15); } }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(14,12,10,.55) 0%, rgba(14,12,10,.35) 40%, rgba(14,12,10,.95) 100%),
    radial-gradient(ellipse at center, transparent 30%, rgba(14,12,10,.6) 100%);
}
.hero-content { position: relative; z-index: 2; text-align: center; padding: 120px 24px 80px; }
.hero-title {
  font-size: clamp(34px, 7vw, 92px);
  margin: 12px 0 18px;
  word-break: keep-all;
  overflow-wrap: break-word;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, #fff 0%, var(--gold-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 4px 30px rgba(0,0,0,0.4);
}
.hero-sub { font-size: clamp(16px, 1.6vw, 20px); color: var(--muted); max-width: 680px; margin: 0 auto 16px; }
.hero-loc { color: var(--gold); font-size: 14px; letter-spacing: 0.1em; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.scroll-hint {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  color: var(--gold); font-size: 24px; animation: bounce 2s infinite;
}
@keyframes bounce { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 10px); } }

/* ==================== About ==================== */
.about { background: var(--bg-soft); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.about-img { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.about-img::before {
  content: ''; position: absolute; inset: -2px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--gold), transparent 60%);
  z-index: 0; opacity: .5;
}
.about-img img { position: relative; z-index: 1; }
.about-text p { color: var(--muted); font-size: 16px; margin-bottom: 32px; }
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; padding-top: 24px; border-top: 1px solid var(--line); }
.stats > div { display: flex; flex-direction: column; }
.stats strong { font-family: 'Cormorant Garamond', serif; font-size: 36px; color: var(--gold); }
.stats span { font-size: 12px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 4px; }

/* ==================== Schedule ==================== */
.schedule { background: var(--bg); }
.timeline { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.time-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 28px;
  position: relative; overflow: hidden;
  transition: transform .3s ease, border-color .3s;
}
.time-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.time-card:hover { transform: translateY(-6px); border-color: var(--gold); }
.day {
  display: inline-block; font-size: 11px; letter-spacing: 0.2em; color: var(--gold);
  background: var(--gold-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px;
  text-transform: uppercase; font-weight: 600;
}
.time-card h3 { font-size: 26px; margin-bottom: 12px; }
.time-card p { color: var(--muted); font-size: 15px; }

/* ==================== Events ==================== */
.events { background: var(--bg-soft); }
.event-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 32px; }
.event-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: transform .35s;
}
.event-card:hover { transform: translateY(-6px); }
.event-card:hover .event-img { transform: scale(1.06); }
.event-img {
  height: 280px; background-size: cover; background-position: center;
  transition: transform .6s ease;
}
.event-body { padding: 28px; }
.event-body h3 { font-size: 28px; margin-bottom: 8px; color: var(--gold-2); }
.event-body p { color: var(--muted); }

/* ==================== Gallery ==================== */
.gallery { background: var(--bg); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 16px;
}
.g-item {
  background-size: cover; background-position: center;
  border-radius: var(--radius); position: relative; overflow: hidden;
  transition: transform .4s ease;
  cursor: pointer;
}
.g-item::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.5));
  opacity: 0; transition: opacity .3s;
}
.g-item:hover { transform: scale(1.02); }
.g-item:hover::after { opacity: 1; }
.g-tall { grid-row: span 2; }
.g-wide { grid-column: span 2; }

/* ==================== Register ==================== */
.register { background: linear-gradient(180deg, var(--bg-soft), var(--bg)); }
.register-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
.register-info p { color: var(--muted); margin-bottom: 24px; }
.info-list { list-style: none; }
.info-list li { padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--muted); }

.register-form {
  background: var(--surface); border: 1px solid var(--line);
  padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.field { margin-bottom: 20px; }
.field label {
  display: block; font-size: 12px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px; font-weight: 600;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line); color: var(--text);
  font-family: inherit; font-size: 15px; transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.alert {
  padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-size: 14px;
}
.alert-success { background: rgba(80, 200, 120, 0.12); color: #8be0a4; border: 1px solid rgba(80,200,120,.3); }
.alert-error { background: rgba(220, 80, 80, 0.12); color: #f0a0a0; border: 1px solid rgba(220,80,80,.3); }

/* ==================== Footer ==================== */
.site-footer { background: #0a0907; padding: 80px 0 0; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 60px; }
.footer-text { color: var(--muted); margin-top: 16px; font-size: 14px; max-width: 320px; }
.site-footer h4 { font-size: 16px; color: var(--gold); margin-bottom: 18px; letter-spacing: 0.1em; text-transform: uppercase; }
.footer-list { list-style: none; }
.footer-list li { padding: 6px 0; color: var(--muted); font-size: 14px; }
.footer-list a:hover { color: var(--gold); }
.social { display: flex; gap: 12px; }
.social a {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 12px; font-weight: 600; transition: all .25s;
}
.social a:hover { background: var(--gold); color: #1a1408; border-color: var(--gold); }
.footer-bottom {
  padding: 24px 24px; border-top: 1px solid var(--line); text-align: center;
  color: var(--muted); font-size: 13px;
}

/* ==================== Reveal animation ==================== */
.js-on .reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.js-on .reveal.visible { opacity: 1; transform: translateY(0); }

/* ==================== Responsive ==================== */
@media (max-width: 960px) {
  .section { padding: 80px 0; }
  .about-grid, .register-grid { grid-template-columns: 1fr; gap: 48px; }
  .timeline { grid-template-columns: 1fr; }
  .event-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2,1fr); grid-auto-rows: 180px; }
  .g-wide { grid-column: span 2; }
  .g-tall { grid-row: span 1; }

  .menu-toggle { display: block; }
  .main-nav {
    position: fixed; top: 70px; left: 0; right: 0;
    background: rgba(14,12,10,.98); backdrop-filter: blur(12px);
    flex-direction: column; padding: 24px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%); transition: transform .3s ease;
  }
  .main-nav.open { transform: translateY(0); }
}

@media (max-width: 560px) {
  .row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .stats { grid-template-columns: repeat(3,1fr); gap: 12px; }
  .stats strong { font-size: 26px; }
  .register-form { padding: 28px 20px; }
  .brand-name { font-size: 17px; white-space: nowrap; }
  .brand-logo { width: 32px; height: 32px; }
  .header-actions { gap: 12px; }
  .header-actions .btn { display: none; }
  .lang-switch { font-size: 13px; }
  .container { padding: 0 18px; }
  .hero-content { padding: 100px 18px 60px; }
  .hero-title { font-size: 26px; line-height: 1.2; }
  .hero-sub { font-size: 14px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .section { padding: 60px 0; }
  .section-title { font-size: 28px; }
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 200px; }
  .g-wide, .g-tall { grid-column: span 1; grid-row: span 1; }
}
  .hero-sub { font-size: 15px; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  .section { padding: 60px 0; }
  .section-title { font-size: 28px; }
}
