/* ============================================================
   Base Styles — Reset + Typography + Utilities
   ============================================================ */

/* --- 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-family);
  font-size: var(--text-body-size);
  line-height: var(--text-body-lh);
  color: var(--text-primary);
  background-color: var(--surface-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* --- Typography scale --------------------------------------- */

.text-display {
  font-size: var(--text-display-size);
  line-height: var(--text-display-lh);
  font-weight: 700;
}

.text-h1 {
  font-size: var(--text-h1-size);
  line-height: var(--text-h1-lh);
  font-weight: 700;
}

.text-h2 {
  font-size: var(--text-h2-size);
  line-height: var(--text-h2-lh);
  font-weight: 700;
}

.text-h3 {
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-lh);
  font-weight: 700;
}

.text-subhead     { font-size: var(--text-subhead-size);  line-height: var(--text-subhead-lh); }
.text-subhead-bold { font-weight: 700; }

.text-body-lg         { font-size: var(--text-body-lg-size); line-height: var(--text-body-lg-lh); }
.text-body-lg-bold    { font-size: var(--text-body-lg-size); line-height: var(--text-body-lg-lh); font-weight: 700; }

.text-body        { font-size: var(--text-body-size); line-height: var(--text-body-lh); }
.text-body-bold   { font-size: var(--text-body-size); line-height: var(--text-body-lh); font-weight: 700; }

.text-cta         { font-size: var(--text-cta-size); line-height: var(--text-cta-lh); font-weight: 700; }

.text-small-1         { font-size: var(--text-small-1-size); line-height: var(--text-small-1-lh); }
.text-small-1-bold    { font-size: var(--text-small-1-size); line-height: var(--text-small-1-lh); font-weight: 700; }

.text-small-2         { font-size: var(--text-small-2-size); line-height: var(--text-small-2-lh); }
.text-small-2-bold    { font-size: var(--text-small-2-size); line-height: var(--text-small-2-lh); font-weight: 700; }

/* Weight helpers */
.font-regular { font-weight: 400; }
.font-bold    { font-weight: 700; }
.font-italic  { font-style: italic; }

/* Colour helpers */
.color-primary      { color: var(--text-primary); }
.color-secondary    { color: var(--text-secondary); }
.color-invert       { color: var(--text-invert); }
.color-brand-blue   { color: var(--text-brand-blue); }
.color-brand-dark   { color: var(--text-brand-dark-blue); }

/* Link / underline CTA — inline hyperlinks on white backgrounds */
.text-link {
  color: var(--text-brand-dark-blue);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}
.text-link:hover { color: var(--text-brand-blue); }

/* --- Layout helpers ---------------------------------------- */

/* Full-width section wrapper */
.section {
  width: 100%;
  padding: var(--layout-section-tb) var(--layout-content-margin);
}

/* Narrower 10-column content wrapper */
.section--narrow {
  width: 100%;
  padding: var(--layout-section-tb) var(--layout-content-margin);
}

/* Banner */
.section--banner {
  width: 100%;
  padding: var(--layout-banner-tb) var(--layout-content-margin);
}

/* Inner content max-width (prevents stretching on very wide screens) */
.container {
  width: 100%;
  max-width: 1512px;
  margin: 0 auto;
}

/* Flex helpers */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-8   { gap: var(--space-8); }
.gap-12  { gap: var(--space-12); }
.gap-16  { gap: var(--space-16); }
.gap-24  { gap: var(--space-24); }
.gap-32  { gap: var(--space-32); }
.gap-40  { gap: var(--space-40); }
.gap-56  { gap: var(--space-56); }
.gap-64  { gap: var(--space-64); }

/* Grid helpers */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-64);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-32);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-32);
}

/* Divider */
.divider {
  width: 100%;
  height: 1px;
  background-color: var(--border-divider);
  border: none;
}

/* Visually hidden (accessibility) */
.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;
}

/* --- Responsive breakpoints -------------------------------- */

/* Tablet */
@media (max-width: 1279px) {
  .section        { padding: var(--layout-section-tb) var(--layout-content-margin); }
  .section--narrow { padding: var(--layout-section-tb) var(--layout-content-margin); }
  .section--banner { padding: var(--layout-banner-tb) var(--layout-content-margin); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: var(--space-40); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 767px) {
  .section        { padding: var(--space-40) var(--layout-content-margin); }
  .section--narrow { padding: var(--space-40) var(--layout-content-margin); }
  .section--banner { padding: var(--space-40) var(--layout-content-margin); }
  .grid-4 { grid-template-columns: 1fr; gap: var(--space-24); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .text-display { font-size: 32px; line-height: 40px; }
  .text-h1      { font-size: 28px; line-height: 36px; }
  .text-h2      { font-size: 24px; line-height: 32px; }
  .text-h3      { font-size: 22px; line-height: 30px; }
}

@media (max-width: 479px) {
  .grid-4 { grid-template-columns: 1fr; }
}
