/* ============================================================
   DYNAMIC MEDIATION — main.css
   Global reset, design tokens, typography, layout utilities
   ============================================================ */

/* === RESET ================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); color: var(--text); background: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, picture, video, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
a { color: inherit; text-decoration: none; cursor: pointer !important; }
ul, ol { list-style: none; }
button { cursor: pointer; background: none; border: none; }

/* === DESIGN TOKENS ========================================= */
:root {
  /* Brand colours */
  --navy:         #00004C;
  --navy-dark:    #00003A;
  --amber:        #FFB703;
  --amber-dark:   #D4980A;
  --amber-light:  #FFF8E1;
  --navy-tint:    #EEEEF8;

  /* Neutral palette */
  --text:         #1A1A2E;
  --text-muted:   #6B6B7B;
  --bg:           #F8F7F4;
  --bg-alt:       #EEECEA;
  --border:       #E8E6DF;
  --white:        #FFFFFF;

  /* Typography */
  --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Type scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  2rem;
  --text-4xl:  2.75rem;
  --text-5xl:  4rem;

  /* Spacing scale */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container:   1200px;
  --content:     780px;
  --radius-sm:   8px;
  --radius-md:   16px;
  --radius-lg:   24px;

  /* Shadows */
  --shadow-sm:   0 1px 3px rgba(0,0,4,0.06), 0 1px 2px rgba(0,0,4,0.04);
  --shadow-md:   0 4px 12px rgba(0,0,4,0.08), 0 2px 4px rgba(0,0,4,0.04);

  /* Transitions */
  --transition: 200ms ease;
  --transition-slow: 350ms ease;
}

/* === ACCESSIBILITY ========================================= */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--amber);
  color: var(--navy);
  font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  z-index: 9999;
  transition: top var(--transition);
}
.skip-link:focus { top: var(--space-4); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* === TYPOGRAPHY ============================================ */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.15;
  color: var(--text);
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--text-muted);
}

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

.lead {
  font-size: var(--text-xl);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 60ch;
}

.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: var(--space-4);
}

strong { font-weight: 600; color: var(--text); }

/* === LAYOUT ================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

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

.section {
  padding-block: var(--space-24);
}

.section--white   { background: var(--white); }
.section--warm    { background: var(--bg); }
.section--alt     { background: var(--bg-alt); }
.section--navy    { background: var(--navy); }
.section--navy-dark { background: var(--navy-dark); }

/* Dark section text overrides */
.section--navy h1,
.section--navy h2,
.section--navy h3,
.section--navy h4,
.section--navy .section-title,
.section--navy-dark h1,
.section--navy-dark h2,
.section--navy-dark h3 {
  color: var(--white);
}
.section--navy p,
.section--navy-dark p {
  color: rgba(255, 255, 255, 0.78);
}
.section--navy .eyebrow { color: var(--amber); }
.section--navy-dark .eyebrow { color: var(--amber); }

/* Section header pattern */
.section-header {
  margin-bottom: var(--space-12);
}
.section-header .section-title {
  margin-top: var(--space-2);
  margin-bottom: var(--space-4);
}
.section-header .lead {
  max-width: 62ch;
}
.section-header--center {
  text-align: center;
}
.section-header--center .lead {
  margin-inline: auto;
}

/* === GRID UTILITIES ======================================== */
.grid {
  display: grid;
  gap: var(--space-8);
}
.grid-2  { grid-template-columns: repeat(2, 1fr); }
.grid-3  { grid-template-columns: repeat(3, 1fr); }
.grid-4  { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* Two-column: wide content + narrow aside */
.grid-60-40 { grid-template-columns: 3fr 2fr; align-items: start; }
.grid-40-60 { grid-template-columns: 2fr 3fr; align-items: start; }

@media (max-width: 1023px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-60-40,
  .grid-40-60 { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
  .section { padding-block: var(--space-16); }
  .container { padding-inline: var(--space-4); }
}

/* === FLEX UTILITIES ======================================== */
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-col    { display: flex; flex-direction: column; }
.gap-4       { gap: var(--space-4); }
.gap-6       { gap: var(--space-6); }
.gap-8       { gap: var(--space-8); }

/* === DIVIDER =============================================== */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin-block: var(--space-8);
}
.section--navy .divider { border-color: rgba(255,255,255,0.15); }

/* === TEXT UTILITIES ======================================== */
.text-center { text-align: center; }
.text-white  { color: var(--white) !important; }
.text-muted  { color: var(--text-muted); }
.text-navy   { color: var(--navy); }
.text-amber  { color: var(--amber); }
.mt-3  { margin-top: var(--space-3); }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.my-8  { margin-top: var(--space-8); margin-bottom: var(--space-8); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-10 { margin-bottom: var(--space-10); }
.mb-8  { margin-bottom: var(--space-8); }

/* === FOCUS STYLES ========================================== */
:focus-visible {
  outline: 2.5px solid var(--amber);
  outline-offset: 3px;
  border-radius: 3px;
}

/* === RESPONSIVE IMAGE ====================================== */
.img-responsive {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.img-constrained {
  max-width: 600px;
  margin-inline: auto;
}
