/* ==========================================================================
   COLÉGIO PRÍNCIPE DA PAZ — DESIGN SYSTEM & TOKENS (V3 EDITORIAL)
   Identidade Oficial: Azul Real Profundo (#030539), Azul Celeste (#03ACFD)
   e Dourado Soberano da Coroa do Uniforme (#FBBF24 / #D97706)
   ========================================================================== */

:root {
  /* Core Brand Palette (WCAG AAA/AA Verified) */
  --navy-950: #030539;
  --navy-900: #071A3E;
  --navy-800: #0E295C;
  --navy-700: #173B7A;
  --navy-600: #224F9E;

  --sky-800: #00436B;
  --sky-700: #005587;
  --sky-500: #03ACFD;
  --sky-400: #38BDF8;
  --sky-100: #DFF2FE;
  --sky-50: #F0F8FF;

  --gold-800: #78350F;
  --gold-700: #92400E;
  --gold-500: #F59E0B;
  --gold-400: #FBBF24;
  --gold-300: #FDE68A;
  --gold-100: #FEF3C7;
  --gold-50: #FFFBEB;

  /* Surfaces & Tinted Neutrals */
  --bg-page: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-subtle: #EDF2F8;
  --bg-elevated: #FFFFFF;
  --bg-studio: #E4EAF3;

  /* Text Hierarchy (Tinted from Royal Navy; never flat gray) */
  --text-primary: #060E24;
  --text-secondary: #253652;
  --text-muted: #455878;
  --text-on-dark: #F8FAFC;
  --text-on-dark-muted: #C7D7F4;

  /* Architectural Hairline Borders (1px only) */
  --border-subtle: #D5DFEC;
  --border-strong: #B0C2DA;
  --border-on-dark: rgba(199, 215, 244, 0.2);

  /* Status Colors (WCAG AA Compliant) */
  --emerald-700: #046C4E;
  --emerald-50: #ECFDF5;
  --rose-700: #BE123C;

  /* Neutral Physical Elevation Shadows (Zero chromatic glow) */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 4px 12px -2px rgba(0, 0, 0, 0.07), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 12px 24px -6px rgba(0, 0, 0, 0.1), 0 4px 10px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, 0.16), 0 8px 16px -4px rgba(0, 0, 0, 0.06);

  /* Typography */
  --font-display: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;

  /* Accessibility Font Scale Multiplier */
  --font-scale: 1;

  /* Restrained Architectural Radii (No excessive pill bloat) */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Exponential Easing */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --duration-fast: 180ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;

  /* Layout */
  --container-max: 1240px;
  --header-height: 80px;
}

/* High Contrast Accessibility Mode */
html[data-high-contrast="true"] {
  --bg-page: #FFFFFF;
  --bg-surface: #FFFFFF;
  --bg-subtle: #E8EFF7;
  --text-primary: #000000;
  --text-secondary: #0F172A;
  --text-muted: #1E293B;
  --border-subtle: #0F172A;
  --border-strong: #000000;
  --sky-700: #003A5E;
}

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

html {
  font-size: calc(16px * var(--font-scale));
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-color: var(--navy-700) var(--bg-subtle);
  scrollbar-width: thin;
  caret-color: var(--sky-700);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

::selection {
  background-color: var(--navy-950);
  color: var(--gold-300);
}

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

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.22em;
}

.skip-link {
  position: fixed;
  top: -120px;
  left: 1.25rem;
  z-index: 9999;
  background-color: var(--gold-400);
  color: var(--navy-950);
  font-weight: 700;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  transition: top var(--duration-fast) var(--ease-out-quart);
}

.skip-link:focus {
  top: 1rem;
}

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

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

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

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

ul,
ol {
  list-style: none;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Screen Reader Only Utility for Accessible Form Labels */
.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;
}

/* Container & Section Rhythm */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 0 2rem;
}

.section-padding {
  padding: 5.25rem 2rem;
  position: relative;
}

.section-padding > .container {
  padding: 0;
}

/* Clear Type Scale (>= 1.35x steps) */
h1 {
  font-family: var(--font-display);
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.028em;
}

h2 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.024em;
}

h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.28;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.025em;
  color: var(--navy-950);
  text-wrap: balance;
}

.section-title--light {
  color: #FFFFFF;
}

.section-title__gold {
  color: var(--gold-400);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 64ch;
  line-height: 1.65;
  text-wrap: pretty;
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 3rem;
}

/* Inline Metadata Pill (Used sparingly in modals/schedules) */
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-xs);
  background-color: var(--sky-100);
  color: var(--navy-950);
}

/* Restrained Architectural Buttons (8px radius, used only for true primary actions) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.94rem;
  padding: 0.8rem 1.45rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: transform var(--duration-fast) var(--ease-out-quart),
              box-shadow var(--duration-fast) var(--ease-out-quart),
              background-color var(--duration-fast) ease,
              color var(--duration-fast) ease;
}

.btn svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  transition: transform var(--duration-fast) var(--ease-out-quart);
}

.btn:hover svg.icon-arrow {
  transform: translateX(3px);
}

.btn:active {
  transform: translateY(1px);
}

/* Gold Button: #030539 text on #FBBF24 = 12.6:1 contrast */
.btn--gold {
  background-color: var(--gold-400);
  color: var(--navy-950);
  box-shadow: var(--shadow-xs);
}

.btn--gold:hover {
  background-color: var(--gold-300);
  color: var(--navy-950);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Primary Royal Navy Button: #FFFFFF text on #030539 = 18.8:1 contrast */
.btn--primary {
  background-color: var(--navy-950);
  color: #FFFFFF;
  box-shadow: var(--shadow-xs);
}

.btn--primary:hover {
  background-color: var(--navy-800);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Outline Navy (Secondary modal close, etc.) */
.btn--outline-navy {
  background-color: #FFFFFF;
  color: var(--navy-950);
  border: 1px solid var(--border-strong);
}

.btn--outline-navy:hover {
  background-color: var(--bg-subtle);
  border-color: var(--navy-950);
}

/* Outline Light (On dark backgrounds) */
.btn--outline-light {
  background-color: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn--outline-light:hover {
  background-color: rgba(255, 255, 255, 0.18);
  border-color: #FFFFFF;
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn--sm {
  padding: 0.6rem 1.15rem;
  font-size: 0.875rem;
}

.btn--lg {
  padding: 0.95rem 1.75rem;
  font-size: 1rem;
}
