/* ============================================================
   PURUSHOTTAM CLASSES — Base Styles
   Reset, typography, global rules
   ============================================================ */

/* ── Google Font — DM Sans (Cosmica substitute) ─── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  color: var(--color-text-body);
  background-color: var(--surface-canvas);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Typography ───────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  color: var(--color-text-primary);
  letter-spacing: normal; /* Per guidelines: no tracking overrides */
}

h1 {
  font-size: var(--text-display-sm);
  font-weight: var(--weight-bold);
  line-height: var(--leading-display-sm);
}

h2 {
  font-size: var(--text-heading-lg);
  font-weight: var(--weight-bold);
  line-height: var(--leading-heading-lg);
}

h3 {
  font-size: var(--text-heading);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-heading);
}

h4 {
  font-size: var(--text-heading-sm);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-heading-sm);
}

h5 {
  font-size: var(--text-subheading);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-subheading);
}

h6 {
  font-size: var(--text-body-lg);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-body-lg);
}

p {
  font-size: var(--text-body-lg);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body-lg);
  color: var(--color-text-body);
}

/* ── Links ────────────────────────────────────────── */
a {
  color: var(--color-text-primary);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

a:hover {
  opacity: 0.7;
}

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

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

/* Inline SVG icon overrides */
svg.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  max-width: none;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

svg.btn-icon {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  max-width: none;
  vertical-align: middle;
  margin-right: var(--spacing-8);
  position: relative;
  top: -1px;
}


/* ── Selection ────────────────────────────────────── */
::selection {
  background-color: var(--color-obsidian);
  color: var(--color-snow);
}

/* ── Focus ────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--color-graphite);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Utility — Container ─────────────────────────── */
.container {
  width: 100%;
  max-width: var(--page-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-24);
}

/* ── Utility — Section spacing ────────────────────── */
.section {
  padding: var(--section-gap) 0;
}

.section + .section {
  padding-top: 0;
}

/* ── Utility — Text styles ────────────────────────── */
.text-muted {
  color: var(--color-text-muted);
}

.text-subtle {
  color: var(--color-text-subtle);
}

.text-inverse {
  color: var(--color-text-inverse);
}

/* Inline weight contrast — per design system */
.text-lead {
  font-weight: var(--weight-light);
  color: var(--color-text-subtle);
}

.text-emphasis {
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}

.text-emphasis-inverse {
  font-weight: var(--weight-semibold);
  color: var(--color-text-inverse);
}

/* ── Utility — Visually hidden ────────────────────── */
.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;
}

/* ── Scroll bar styling ──────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-mist);
}

::-webkit-scrollbar-thumb {
  background: var(--color-pebble);
  border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-ash);
}

/* ── App mount point ──────────────────────────────── */
#app {
  min-height: calc(100vh - var(--nav-height));
}
