/* ============================================================
   MEA INSTITUTE — BRAND DESIGN SYSTEM
   assets/css/brand.css

   Design tokens, global reset, typography, containers, links,
   buttons, tags, utilities, dividers, section headers, pagination.
   ============================================================ */

:root {

  /* ─── COLOUR PALETTE ────────────────────────────────────── */

  /* Primary — Deep Navy */
  --color-navy: #152238;
  --color-navy-50: rgba(21, 34, 56, 0.5);
  --color-navy-20: rgba(21, 34, 56, 0.2);
  --color-navy-10: rgba(21, 34, 56, 0.08);
  --color-navy-8: rgba(21, 34, 56, 0.08);

  /* Secondary — Gold */
  --color-gold: #BD8906;
  --color-gold-50: rgba(189, 137, 6, 0.5);
  --color-gold-light: #d4a82a;

  /* Secondary — Forest Green */
  --color-green: #1E3429;

  /* Complementary */
  --color-warmgrey: #A1AAAD;
  --color-warmgrey-60: rgba(161, 170, 173, 0.6);
  --color-warmgrey-40: rgba(161, 170, 173, 0.4);
  --color-sky: #ACC2D5;
  --color-sand-bg: #f5f3ef;

  /* Neutrals */
  --color-white: #FFFFFF;
  --color-black: #000000;
  --color-bg: #FFFFFF;
  --color-text: #152238;
  --color-text-muted: rgba(21, 34, 56, 0.6);
  --color-border: rgba(161, 170, 173, 0.6);

  /* Navy dark — secondary dark surface for media placeholders / section depth */
  --color-navy-dark: #1B2A4A;

  /* Feedback / status */
  --color-feedback-success:     #1a7a47;
  --color-feedback-success-fg:  #155c36;
  --color-feedback-success-bg:  #d6f0e2;
  --color-feedback-error:       #c0392b;
  --color-feedback-error-fg:    #7c1d1d;
  --color-feedback-error-bg:    #fde8e8;

  /* ─── TYPOGRAPHY ────────────────────────────────────────── */

  --font-sans: 'Avenir Next LT Pro', 'Avenir Next', 'Nunito Sans', 'Gill Sans', sans-serif;
  --font-serif: 'EB Garamond', 'Garamond', 'Times New Roman', serif;
  --font-display: 'Vidaloka', 'Palatino Linotype', 'Book Antiqua', serif;

  /* ─── TYPE SCALE ─────────────────────────────────────────── */
  --text-xs: 0.6875rem;
  /*  11px */
  --text-sm: 0.875rem;
  /*  14px */
  --text-base: 1rem;
  /*  16px */
  --text-md: 1.125rem;
  /*  18px */
  --text-lg: 1.375rem;
  /*  22px */
  --text-xl: 1.75rem;
  /*  28px */
  --text-2xl: 2.25rem;
  /*  36px */
  --text-3xl: 3rem;
  /*  48px */
  --text-4xl: 4rem;
  /*  64px */
  --text-5xl: 5.25rem;
  /*  84px */

  /* ─── SPACING SYSTEM (8px base) ──────────────────────────── */
  --space-xs: 0.5rem;
  /*   8px */
  --space-sm: 1rem;
  /*  16px */
  --space-md: 1.5rem;
  /*  24px */
  --space-lg: 2rem;
  /*  32px */
  --space-xl: 3rem;
  /*  48px */
  --space-2xl: 4rem;
  /*  64px */
  --space-3xl: 6rem;
  /*  96px */
  --space-4xl: 8rem;
  /* 128px */

  /* ─── LAYOUT ──────────────────────────────────────────────── */
  --container-max: 1280px;
  --container-wide: 1440px;
  --container-sm: 768px;
  --container-pad: clamp(1.25rem, 5vw, 5rem);

  /* ─── BORDERS & RADIUS ────────────────────────────────────── */
  --radius-none: 0px;
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  --radius-circle: 50%;

  /* ─── SHADOWS ─────────────────────────────────────────────── */
  --shadow-xs: 0 2px 8px rgba(21, 34, 56, 0.06);
  --shadow-sm: 0 4px 16px rgba(21, 34, 56, 0.06);
  --shadow-md: 0 12px 32px rgba(21, 34, 56, 0.08);
  --shadow-lg: 0 24px 48px rgba(21, 34, 56, 0.12);
  --shadow-hover: 0 10px 28px rgba(21, 34, 56, 0.14);

  /* ─── FOCUS RING ──────────────────────────────────────────── */
  --focus-ring-width: 2px;
  --focus-ring-color: var(--color-sky);
  --focus-ring-offset: 3px;

  /* ─── LINES & DIVIDERS ────────────────────────────────────── */
  --hairline: 1px solid rgba(161, 170, 173, 0.6);
  --hairline-light: 1px solid rgba(161, 170, 173, 0.4);
  --border-gold: 2px solid var(--color-gold);
  --border-navy: 2px solid var(--color-navy);

  /* ─── TRANSITIONS ─────────────────────────────────────────── */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease-out;
  --transition-slow: 300ms ease-out;
  --transition-fluid: 400ms cubic-bezier(0.25, 1, 0.5, 1);

  /* ─── Z-INDEX STACK ───────────────────────────────────────── */
  --z-base: 1;
  --z-overlay: 100;
  --z-nav: 200;
  --z-modal: 300;

  /* ─── LAYOUT CONSTANTS ────────────────────────────────────── */
  --header-height: 88px;
  --header-height-scrolled: 64px;
}


/* ─── GLOBAL RESET ─────────────────────────────────────────── */

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

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

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input,
textarea,
select {
  font-family: inherit;
}


/* ─── TYPOGRAPHY BASE ──────────────────────────────────────── */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-sans);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-navy);
  letter-spacing: -0.02em;
}

/* Long-form content uses serif */
.content-body,
.publication-body {
  font-family: var(--font-serif);
  font-size: var(--text-md);
  line-height: 1.8;
}

.content-body h2,
.content-body h3,
.publication-body h2,
.publication-body h3 {
  font-family: var(--font-sans);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.content-body p,
.publication-body p {
  margin-bottom: var(--space-md);
}

.pull-quote {
  font-family: var(--font-display);
}


/* ─── CONTAINER ────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.container--wide {
  max-width: var(--container-wide);
}

.container--narrow {
  max-width: 860px;
  margin-inline: auto;
  padding-inline: var(--container-pad);
}


/* ─── LINKS ────────────────────────────────────────────────── */

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

a:hover {
  color: var(--color-gold);
}

.link-arrow {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-navy);
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--color-gold);
  padding-bottom: 2px;
  transition: color var(--transition-fast);
}

.link-arrow:hover {
  color: var(--color-gold);
}

.link-text {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-navy);
  transition: color var(--transition-fast);
}

.link-text:hover {
  color: var(--color-gold);
}


/* ─── BUTTONS ──────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  height: 48px;
  padding: 0 1.75rem;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fluid);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-md);
}

/* Primary: Navy fill */
.btn--primary {
  background: var(--color-navy);
  color: var(--color-white);
  border-color: var(--color-navy);
}

.btn--primary:hover {
  background: transparent;
  color: var(--color-navy);
}

/* Outline: Navy border */
.btn--outline {
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-navy);
}

.btn--outline:hover {
  background: var(--color-navy);
  color: var(--color-white);
}

/* Gold fill */
.btn--gold {
  background: var(--color-gold);
  color: var(--color-white);
  border-color: var(--color-gold);
}

.btn--gold:hover {
  background: transparent;
  color: var(--color-gold);
}

/* Ghost white: for dark backgrounds */
.btn--ghost-white {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn--ghost-white:hover {
  background: var(--color-white);
  color: var(--color-navy);
}

/* Ghost Gold: gold border on dark bg */
.btn--ghost-gold {
  background: transparent;
  color: var(--color-gold);
  border-color: var(--color-gold);
}

.btn--ghost-gold:hover {
  background: var(--color-gold);
  color: var(--color-white);
}

/* Green fill */
.btn--green {
  background: var(--color-green);
  color: var(--color-white);
  border-color: var(--color-green);
}

.btn--green:hover {
  background: transparent;
  color: var(--color-green);
}

/* Small variant */
.btn--sm {
  font-size: 0.75rem;
  height: 40px;
  padding: 0 1.25rem;
}

/* Large variant */
.btn--lg {
  height: 56px;
  padding: 0 2.25rem;
  font-size: var(--text-base);
}


/* ─── TAGS / CONTENT TYPE BADGES ───────────────────────────── */

.tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  color: var(--color-gold);
  border: 2px solid var(--color-gold);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fluid);
  text-decoration: none;
  line-height: 1.4;
}

.tag:hover {
  background: var(--color-gold);
  color: var(--color-white);
}

.tag--navy {
  color: var(--color-navy);
  border-color: var(--color-navy);
}

.tag--navy:hover {
  background: var(--color-navy);
  color: var(--color-white);
}

.tag--filled {
  background: var(--color-gold);
  color: var(--color-white);
  border-color: var(--color-gold);
}

.tag--filled:hover {
  background: transparent;
  color: var(--color-gold);
}


/* ─── UTILITY CLASSES ──────────────────────────────────────── */

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

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

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

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

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

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

.bg-navy {
  background-color: var(--color-navy);
}

.bg-gold {
  background-color: var(--color-gold);
}

.bg-white {
  background-color: var(--color-white);
}

.bg-sand {
  background-color: var(--color-sand-bg);
}

.bg-green {
  background-color: var(--color-green);
}

.bg-sky {
  background-color: var(--color-sky);
}

.uppercase {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.small-caps {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Gold accent rule before section headings */
.gold-rule::before {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--color-gold);
  margin-bottom: var(--space-md);
}

/* Screen-reader only */
.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;
}

/* Visually hidden but focusable for skip links */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 999;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-navy);
  color: var(--color-white);
}

.skip-link:focus {
  top: 0;
}

body.nav-open {
  overflow: hidden;
}

/* Max-width utility */
.max-w-60ch {
  max-width: 60ch;
}

.max-w-80ch {
  max-width: 80ch;
}

/* Text alignment */
.text-center {
  text-align: center;
}

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

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

/* Flex utilities */
.flex {
  display: flex;
}

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

.flex-wrap {
  flex-wrap: wrap;
}

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

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

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

.gap-xs {
  gap: var(--space-xs);
}

.gap-sm {
  gap: var(--space-sm);
}

.gap-md {
  gap: var(--space-md);
}

.gap-lg {
  gap: var(--space-lg);
}


/* ─── DIVIDERS ─────────────────────────────────────────────── */

.divider {
  border: none;
  border-top: var(--hairline);
  margin-block: var(--space-2xl);
}

.divider--light {
  border-top: var(--hairline-light);
}


/* ─── SECTION HEADERS (title + "View All" link) ─────────────── */

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  border-bottom: var(--hairline);
  padding-bottom: var(--space-md);
  gap: var(--space-md);
}

.section-title {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-navy);
}

.section-intro {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  max-width: 680px;
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}


/* ─── PAGINATION ───────────────────────────────────────────── */

.page-numbers-wrap {
  margin-top: var(--space-3xl);
  display: flex;
  justify-content: center;
}

.page-numbers-wrap ul {
  display: flex;
  gap: var(--space-xs);
  list-style: none;
  align-items: center;
}

.page-numbers-wrap ul li a,
.page-numbers-wrap ul li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.5rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-navy);
  border: 1px solid var(--color-warmgrey-40);
  border-radius: 0px;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.page-numbers-wrap ul li a:hover,
.page-numbers-wrap ul li .current {
  background: var(--color-navy);
  color: var(--color-white);
  border-color: var(--color-navy);
}
