/* ═══════════════════════════════════════════════
   MUCHYI AI — BASE STYLES
   base.css
═══════════════════════════════════════════════ */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background .3s ease, color .3s ease;
}
img, video, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-body); cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: var(--font-body); }
ul { list-style: none; }

/* ── GRAIN OVERLAY ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: .5;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold-dk); border-radius: 4px; }

/* ── SELECTION ── */
::selection { background: var(--gold); color: #000; }

/* ── SCROLL PROGRESS ── */
#scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 300;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--gold-dk), var(--gold), var(--gold-lt));
  transition: width .12s linear;
}

/* ── SCROLL TOP BTN ── */
#scroll-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--ink2); border: 1px solid var(--gold-ring);
  color: var(--gold); font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: all .3s ease;
  box-shadow: var(--shadow-sm);
}
#scroll-top.visible { opacity: 1; transform: none; pointer-events: all; }
#scroll-top:hover { background: var(--gold-pale); transform: translateY(-2px); }

/* ── TYPOGRAPHY SCALE ── */
h1 { font-family: var(--font-head); font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 900; line-height: 1.1; }
h2 { font-family: var(--font-head); font-size: clamp(1.7rem, 3.5vw, 2.5rem); font-weight: 900; line-height: 1.2; }
h3 { font-family: var(--font-head); font-size: clamp(1.2rem, 2.5vw, 1.7rem); font-weight: 800; line-height: 1.3; }
h4 { font-family: var(--font-head); font-size: 1.15rem; font-weight: 800; }
h5 { font-family: var(--font-head); font-size: .9rem; font-weight: 800; letter-spacing: .04em; }
p { line-height: 1.75; color: var(--text3); }
em { font-style: italic; }
strong { font-weight: 700; color: var(--text2); }

/* ── UTILITY CLASSES ── */
.text-gold   { color: var(--gold); }
.text-green  { color: var(--green); }
.text-muted  { color: var(--text4); }
.text-italic { font-style: italic; }
.font-head   { font-family: var(--font-head); }
.font-quote  { font-family: var(--font-quote); }

.mt-0  { margin-top: 0; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center{ align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8       { gap: 8px; }
.gap-12      { gap: 12px; }
.gap-16      { gap: 16px; }

.hidden      { display: none; }
.sr-only     { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── REVEAL ANIMATION ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }
