/**
 * ADIITYAA ENTERPRISES — BASE & RESET STYLES
 * Modern CSS Reset, Typography, Accessibility & Fluid Scale
 */

/* Import Google Fonts: Manrope (Headings) & Inter (Body) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap');

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  color: var(--color-dark-700);
  background-color: var(--color-bg-base);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip; /* Prevent horizontal scrolling without breaking position: sticky */
}

/* Ensure mobile sticky bottom bar does not obscure page footer on mobile */
@media (max-width: 767px) {
  body {
    padding-bottom: 72px;
  }
}

/* Prevent body scrolling when mobile drawer is open */
body.nav-drawer-open {
  overflow: hidden;
  touch-action: none;
}

/* Prevent sticky header from covering anchor jump targets */
section[id],
div[id],
article[id] {
  scroll-margin-top: 80px;
}

@media (max-width: 768px) {
  section[id],
  div[id],
  article[id] {
    scroll-margin-top: 68px;
  }
}

/* ==========================================================================
   Typography Hierarchy
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-dark-900);
  font-weight: var(--fw-bold);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

h1 {
  font-size: var(--text-h1);
  font-weight: var(--fw-extrabold);
}

h2 {
  font-size: var(--text-h2);
}

h3 {
  font-size: var(--text-h3);
  letter-spacing: -0.01em;
}

h4 {
  font-size: var(--text-h4);
}

p {
  margin-bottom: var(--space-4);
  overflow-wrap: break-word;
}

p:last-child {
  margin-bottom: 0;
}

.text-lead {
  font-size: var(--text-lead);
  line-height: var(--leading-snug);
  color: var(--color-dark-600);
}

.text-muted {
  color: var(--color-dark-500);
}

.text-sm {
  font-size: var(--text-body-sm);
}

.text-caption {
  font-size: var(--text-caption);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ==========================================================================
   Links, Media & Lists
   ========================================================================== */
a {
  color: var(--color-primary-800);
  text-decoration: none;
  transition: color var(--transition-fast);
  overflow-wrap: break-word;
}

a:hover {
  color: var(--color-primary-700);
}

img,
svg,
picture,
video,
canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Maintain crisp aspect ratio for brand logos */
.brand-logo-img {
  max-height: 52px;
  width: auto;
  object-fit: contain;
  display: inline-block;
}

ul, ol {
  list-style: none;
}

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: inherit;
  border: none;
  background: none;
}

button {
  cursor: pointer;
}

/* ==========================================================================
   Accessibility & Focus States
   ========================================================================== */
/* Visible focus indicator for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--color-accent-500);
  outline-offset: 3px;
}

/* Skip link for screen readers & keyboard users */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--color-primary-800);
  color: var(--color-white);
  padding: var(--space-3) var(--space-5);
  font-weight: var(--fw-semibold);
  z-index: 9999;
  border-radius: var(--radius-md);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
}

/* Text Selection */
::selection {
  background-color: var(--color-primary-800);
  color: var(--color-white);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
