/* ============================================================
   MLG Website Suite — Shared Design System
   Modern Lao Group · PlatformX · 2026
   ============================================================ */

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body { min-height: 100vh; line-height: 1; -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; border: none; background: none; outline: none; }

/* ── GROUP SITE TOKENS (.site-group on <body>) ─────────────── */
.site-group {
  --bg:          #F7F5F0;
  --ink:         #0E0E0E;
  --gold:        #8B6914;
  --muted:       #6B6B6B;
  --rule:        #D4CFC4;
  --font-head:   'Playfair Display', Georgia, serif;
  --font-body:   'Inter', system-ui, sans-serif;
  --font-mono:   'IBM Plex Mono', 'Courier New', monospace;

  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
}

/* ── HOMES SITE TOKENS (.site-homes on <body>) ─────────────── */
.site-homes {
  --bg:          #0C0C0C;
  --bg-section:  #1A1A1A;
  --ink:         #F0EDE6;
  --gold:        #C4A35A;
  --muted:       #6B6B6B;
  --rule:        #2A2A2A;
  --font-head:   'Cormorant Garamond', Georgia, serif;
  --font-body:   'DM Sans', system-ui, sans-serif;
  --font-mono:   'Space Mono', 'Courier New', monospace;

  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
}

/* ── INVESTOR PORTAL TOKENS ─────────────────────────────────── */
.site-investor {
  --bg:          #080808;
  --ink:         #F0EDE6;
  --gold:        #8B6914;
  --muted:       #555555;
  --rule:        #1F1F1F;
  --font-head:   'Playfair Display', Georgia, serif;
  --font-body:   'Inter', system-ui, sans-serif;
  --font-mono:   'IBM Plex Mono', 'Courier New', monospace;

  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
}

/* ── FADE-UP ANIMATION ──────────────────────────────────────── */
/* Applied by scroll.js — group site only */
.fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for child elements */
.fade-up-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.fade-up-stagger.is-visible > *:nth-child(1) { transition-delay: 0s; }
.fade-up-stagger.is-visible > *:nth-child(2) { transition-delay: 0.1s; }
.fade-up-stagger.is-visible > *:nth-child(3) { transition-delay: 0.2s; }
.fade-up-stagger.is-visible > *:nth-child(4) { transition-delay: 0.3s; }
.fade-up-stagger.is-visible > *:nth-child(5) { transition-delay: 0.4s; }
.fade-up-stagger.is-visible > * { opacity: 1; transform: translateY(0); }

/* ── NAVIGATION — GROUP SITE ────────────────────────────────── */
.site-group .nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  background: var(--bg);
}

.site-group .nav__logo {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.site-group .nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.site-group .nav__link {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.site-group .nav__link:hover {
  color: var(--gold);
}

.site-group .nav__link--investor {
  color: var(--gold);
  font-weight: 400;
}

.site-group .nav__link--investor:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Mobile nav */
.site-group .nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.site-group .nav__hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--ink);
  transition: transform 0.3s, opacity 0.3s;
}

.site-group .nav__mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
}

.site-group .nav__mobile.is-open {
  display: flex;
}

.site-group .nav__mobile .nav__link {
  font-family: var(--font-head);
  font-size: 5rem;
  font-weight: 400;
}

.site-group .nav__mobile-close {
  position: absolute;
  top: 2rem;
  right: 5vw;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
}

@media (max-width: 768px) {
  .site-group .nav__links { display: none; }
  .site-group .nav__hamburger { display: flex; }
  .site-group .nav__mobile .nav__link { font-size: 3rem; }
}

/* ── NAVIGATION — HOMES SITE ────────────────────────────────── */
.site-homes .nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  background: transparent;
  transition: background 0.3s;
}

.site-homes .nav.scrolled {
  background: rgba(12, 12, 12, 0.95);
  backdrop-filter: blur(8px);
}

.site-homes .nav__logo {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.05em;
}

.site-homes .nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.site-homes .nav__link {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.site-homes .nav__link:hover {
  color: var(--ink);
}

@media (max-width: 768px) {
  .site-homes .nav__links { display: none; }
}

/* ── SECTION LAYOUT UTILITIES ───────────────────────────────── */
.section {
  padding: 7rem 5vw;
}

.section--tight {
  padding: 4rem 5vw;
}

.section__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  display: block;
}

.section__heading {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.15;
  color: var(--ink);
}

.section__subtext {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 1.25rem;
}

/* ── HAIRLINE RULES ─────────────────────────────────────────── */
.rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 0;
}

/* ── FOOTER — GROUP SITE ────────────────────────────────────── */
.site-group .footer {
  padding: 4rem 5vw;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.site-group .footer__block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-group .footer__name {
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--ink);
}

.site-group .footer__meta {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
}

.site-group .footer__divisions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
}

.site-group .footer__division-name {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.site-group .footer__copyright {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--muted);
  text-align: right;
  align-self: end;
}

@media (max-width: 768px) {
  .site-group .footer {
    grid-template-columns: 1fr;
  }
  .site-group .footer__divisions { align-items: flex-start; }
  .site-group .footer__copyright { text-align: left; }
}

/* ── FOOTER — HOMES SITE ────────────────────────────────────── */
.site-homes .footer {
  padding: 3rem 5vw;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-homes .footer__logo {
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--ink);
  opacity: 0.6;
}

.site-homes .footer__copy {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--muted);
}

@media (max-width: 768px) {
  .site-homes .footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
