/**
 * PM SHRI SUNPURA HIGH SCHOOL — Base Styles & Accessibility Foundation
 * Document ID: 03_DESIGN_SYSTEM / 02_GIGW_3.0_REQUIREMENTS
 */

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

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--color-accent-provisional);
  color: var(--color-primary-dark);
  padding: var(--space-3) var(--space-4);
  font-weight: 700;
  border-radius: var(--radius-sm);
  z-index: 9999;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
  outline: var(--focus-outline-width) solid var(--color-focus);
  outline-offset: var(--focus-outline-offset);
}

/* Base Document Styling */
html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

/* Strict Keyboard Focus Indicators (WCAG 2.1 AA / GIGW 3.0) */
:focus-visible {
  outline: var(--focus-outline-width) solid var(--color-focus);
  outline-offset: var(--focus-outline-offset);
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-primary-provisional);
  line-height: var(--line-height-heading);
  font-weight: 700;
}

h1 { font-size: var(--font-size-h1); margin-bottom: var(--space-4); }
h2 { font-size: var(--font-size-h2); margin-bottom: var(--space-3); }
h3 { font-size: var(--font-size-h3); margin-bottom: var(--space-2); }
h4 { font-size: var(--font-size-h4); margin-bottom: var(--space-2); }

p {
  margin-bottom: var(--space-4);
}

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

/* Links Baseline */
a {
  color: var(--color-primary-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

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

/* Lists Baseline */
ul, ol {
  margin-left: var(--space-6);
  margin-bottom: var(--space-4);
}

/* Reduced Motion (WCAG 2.1 AA) */
@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;
  }
}

/* A4 Print Stylesheet (GIGW Quality Requirement) */
@media print {
  body {
    background: #FFFFFF;
    color: #000000;
    font-size: 12pt;
    line-height: 1.4;
  }

  .skip-link,
  .site-nav,
  .nav-toggle,
  .btn,
  .footer-links {
    display: none !important;
  }

  a {
    text-decoration: none;
    color: #000000;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }
}
