/**
 * NAANPLAN GLOBAL STYLES & RESET
 * Mobile-first modern CSS with Poppins typography
 */

/* Import Google Fonts Poppins */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

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

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

body {
  font-family: var(--font-family);
  font-size: var(--font-body);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-base);
  color: var(--text);
  background-color: var(--background);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

/* ==========================================================================
   Media & Content Resets
   ========================================================================== */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

/* Custom Text Selection */
::selection {
  background-color: var(--primary-light);
  color: var(--primary-dark);
}

/* ==========================================================================
   Typography Hierarchy
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  color: var(--text);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--tracking-tight);
}

h1 {
  font-size: var(--font-hero);
  font-weight: var(--font-weight-extrabold);
  letter-spacing: var(--tracking-tighter);
}

h2 {
  font-size: var(--font-section-heading);
  letter-spacing: var(--tracking-tight);
}

h3 {
  font-size: var(--font-subheading);
  line-height: var(--line-height-snug);
}

h4 {
  font-size: 1.25rem;
  font-weight: var(--font-weight-semibold);
}

p {
  color: var(--text-muted);
  line-height: var(--line-height-base);
}

.lead-text {
  font-size: clamp(1.0625rem, 1.2vw + 0.5rem, 1.25rem);
  line-height: 1.65;
  color: var(--text-muted);
}

/* Accent text helpers */
.text-primary {
  color: var(--primary);
}

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

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

.text-white {
  color: #FFFFFF;
}

.font-bold {
  font-weight: var(--font-weight-bold);
}

.font-semibold {
  font-weight: var(--font-weight-semibold);
}

/* ==========================================================================
   Container & Layout Utilities
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-gutter);
  padding-right: var(--container-gutter);
}

.container-sm {
  width: 100%;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-gutter);
  padding-right: var(--container-gutter);
}

.flex {
  display: flex;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.grid {
  display: grid;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.relative {
  position: relative;
}

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

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* ==========================================================================
   Motion Preference
   ========================================================================== */
@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;
  }
}
