/* ============================================================
   संस्कृत सेतु — Base Styles (Large Platform)
   Reset, typography, scrollbar, selection
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--saffron-light);
}

/* ── Selection ── */
::selection {
  background: var(--saffron);
  color: var(--text-inverse);
}

/* ── Links ── */
a {
  color: var(--blue);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}
a:hover {
  color: var(--blue-light);
}

/* ── Buttons Base ── */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  color: inherit;
  font-size: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* ── Inputs ── */
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
}
input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

/* ── Images ── */
img {
  max-width: 100%;
  display: block;
}

/* ── Lists ── */
ul, ol {
  list-style: none;
}

/* ── Typography Utility ── */
.font-hindi {
  font-family: var(--font-hindi);
}
.font-mono {
  font-family: var(--font-mono);
}

.text-gold { color: var(--gold); }
.text-saffron { color: var(--saffron); }
.text-maroon { color: var(--maroon); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* ── Heading Styles ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-hindi);
  font-weight: var(--fw-bold);
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

/* ── App Shell ── */
#app {
  display: flex;
  min-height: 100vh;
  position: relative;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0; /* Important for flex-child truncation */
}

.app-content {
  flex: 1;
  padding: var(--space-lg);
  padding-bottom: calc(var(--space-2xl) + 20px);
}

.page-container {
  max-width: var(--max-content-width);
  margin: 0 auto;
  width: 100%;
}

/* ── Screen Reader Only ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Focus Visible ── */
:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 2px;
}

/* ── Responsive Container ── */
@media (max-width: 768px) {
  .app-content {
    padding: var(--space-md);
  }
}
