/* css/style.css — Nataraja Gurukula Research Archive */

/* ── RESET ─────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.75;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

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

/* ── TYPOGRAPHY UTILITIES ───────────────────────── */
.label {
  font-family: var(--font-mono); font-size: 10px; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted);
}
.label--accent { color: var(--accent); }

/* ── NAV TOP BAR ────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 600;
  height: 72px;
  display: flex; align-items: center;
  background: rgba(249,247,242,0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
nav.scrolled { border-color: var(--line); }

.nav-inner {
  width: 100%; max-width: var(--max-width);
  margin: 0 auto; padding: 0 60px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-serif); font-weight: 700; font-size: 15px;
  font-style: italic; letter-spacing: 0.005em; color: var(--ink);
  flex-shrink: 0; transition: color 0.2s ease;
}
.nav-logo:hover { color: var(--accent); }
.nav-logo span { color: var(--accent); font-style: normal; }

/* ── DIVIDER ────────────────────────────────────── */
.divider {
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* ── REVEAL ─────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.page-header-animated {
  animation: headingSlideUp 1.6s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── ANIMATIONS ─────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes headingSlideUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes pulse  { 0%,100% { opacity:0.35; } 50% { opacity:1; } }

/* ── PAGE BASE ──────────────────────────────────── */
.page-section { padding-top: 80px; min-height: 100vh; }

.page-header {
  max-width: var(--max-width); margin: 0 auto;
  padding: 24px 60px 28px;
}
.page-content {
  max-width: var(--max-width); margin: 0 auto;
  padding: 24px 60px 60px;
}

.section-title {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(28px,3.5vw,46px);
  letter-spacing: -0.02em; line-height: 1.08; color: var(--ink);
}
.section-title em { font-style: italic; font-weight: 300; color: var(--accent); }

/* ── BUTTONS ─────────────────────────────────────── */
.btn {
  font-family: var(--font-mono); font-size: 11px; font-weight: 400;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 10px 22px; border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  color: var(--ink-soft); background: var(--bg-card);
  cursor: pointer; transition: all 0.2s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--primary:hover { background: var(--bg-dark); border-color: var(--bg-dark); color: #fff; }

/* ── HERO ────────────────────────────────────────── */
#hero {
  min-height: 100vh; display: flex; flex-direction: column;
  justify-content: center; padding: 80px 60px 56px;
  position: relative; overflow: hidden;
}
#hero::after {
  content: '';
  position: absolute; top: 0; right: 0; width: 50%; height: 100%;
  background: linear-gradient(135deg, transparent 40%, rgba(124,92,191,0.03) 100%);
  pointer-events: none;
}

.hero-eyebrow {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 20px;
  opacity: 0; animation: fadeUp 0.7s 0.15s forwards;
}
.hero-title {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(40px,5vw,72px);
  line-height: 1.0; letter-spacing: -0.025em; color: var(--ink); max-width: 720px;
  opacity: 0; animation: fadeUp 0.8s 0.3s forwards;
}
.hero-title em { font-style: italic; font-weight: 300; color: var(--accent); }
.hero-sub {
  font-family: var(--font-serif); font-size: 18px;
  font-weight: 300; font-style: italic; color: var(--ink-soft);
  margin-top: 12px; max-width: 480px; line-height: 1.65;
  opacity: 0; animation: fadeUp 0.8s 0.45s forwards;
}
.hero-meta {
  display: flex; gap: 36px; margin-top: 28px; flex-wrap: wrap;
  opacity: 0; animation: fadeUp 0.8s 0.6s forwards;
}
.hero-stat { display: flex; flex-direction: column; gap: 3px; }
.hero-stat-num {
  font-family: var(--font-serif); font-weight: 700;
  font-size: 28px; color: var(--ink); letter-spacing: -0.02em;
}
.hero-stat-label {
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted);
}
.hero-cta {
  display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap;
  opacity: 0; animation: fadeUp 0.8s 0.75s forwards;
}
.hero-scroll-cue {
  position: absolute; bottom: 40px; left: 60px;
  display: flex; align-items: center; gap: 12px;
  opacity: 0; animation: fadeUp 0.8s 1.0s forwards;
}
.hero-scroll-cue span {
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-muted);
}
.scroll-line {
  width: 40px; height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  animation: pulse 2.2s infinite;
}
.hero-layer-rules {
  position: absolute; right: 80px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 16px;
  opacity: 0; animation: fadeIn 1s 0.8s forwards;
}
.layer-rule { display: flex; align-items: center; gap: 12px; }
.layer-rule-bar { width: 3px; height: 40px; border-radius: 2px; }
.layer-rule-bar--mb { background: var(--layer-mb); }
.layer-rule-bar--pr { background: var(--layer-pr); }
.layer-rule-bar--ud { background: var(--layer-ud); }
.layer-rule-bar--ch { background: var(--layer-ch); }
.layer-rule-label {
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-muted);
}

/* ── INTRO SECTION ───────────────────────────────── */
#intro {
  padding: 52px 60px;
  max-width: var(--max-width); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start;
}
.intro-heading {
  font-family: var(--font-serif); font-weight: 700;
  font-size: clamp(24px,2.6vw,36px);
  letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); margin-bottom: 20px;
}
.intro-heading em { font-style: italic; font-weight: 300; color: var(--accent); }
.intro-body {
  font-family: var(--font-serif); font-size: 17px;
  font-weight: 300; line-height: 1.85; color: var(--ink-soft);
}
.intro-body p + p { margin-top: 14px; }

.corpus-list { display: flex; flex-direction: column; }
.corpus-item {
  background: transparent; border-bottom: 1px solid var(--line);
  padding: 14px 0; display: flex; align-items: center; gap: 12px;
  transition: all 0.2s;
}
.corpus-item:first-child { border-top: 1px solid var(--line); }
.corpus-item:hover { padding-left: 10px; background: var(--accent-soft); }
.corpus-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; transition: transform 0.2s ease; }
.corpus-item:hover .corpus-dot { transform: scale(1.4); }
.corpus-name { font-family: var(--font-serif); font-size: 15px; font-weight: 400; font-style: italic; color: var(--ink); }
.corpus-role { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin-left: auto; }

/* ── FOOTER ─────────────────────────────────────── */
footer {
  background: var(--bg-dark); color: rgba(255,255,255,0.4);
  padding: 22px 60px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.06);
}
footer span, footer a {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.35);
}
footer a:hover { color: var(--accent-soft); }

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 900px) {
  .nav-inner { padding: 0 20px; }
  #hero { padding: 72px 20px 44px; }
  .hero-layer-rules { display: none; }
  #intro { grid-template-columns: 1fr; gap: 40px; padding: 52px 20px; }
  .page-header { padding: 28px 20px 28px; }
  .page-content { padding: 28px 20px 60px; }
  footer { padding: 18px 20px; flex-direction: column; gap: 6px; text-align: center; }
  .hero-scroll-cue { left: 20px; }
}
@media (max-width: 600px) {
  .hero-cta { flex-direction: column; }
  .btn { justify-content: center; }
  .hero-meta { gap: 20px; }
  .page-section { padding-top: 80px; }
  .hero-scroll-cue { display: none; }
  #hero { padding-bottom: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .page-header-animated { opacity: 1; transform: none; animation: none; transition: none; }
}
