/**
 * Base Styles - CSS Reset, Typography, and Global Styles
 * C Color Homepage
 */

/* ========================================
   CSS RESET
   ======================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "adobe-caslon-pro", serif;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: #141414;
  overflow-x: hidden;
  padding-top: 62px !important;
}

@media (min-width: 768px) {
  body {
    padding-top: 65px !important;
  }
}

/* Remove default list styles */
ul, ol {
  list-style: none;
}

/* Remove default link styles */
a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

/* Remove default button styles */
button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

/* Image defaults */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Form elements */
input, button, textarea, select {
  font: inherit;
}

/* Prevent text overflow */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-md);
}

h1 {
  font-size: 35.2px;
  line-height: 1.225;
  font-weight: 600;
  padding-top: 15px;
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-base);
}

p {
  font-size: 20px;
  line-height: 1.4;
  margin-bottom: 20px;
}

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

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

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

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

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

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

.text-primary {
  color: var(--color-blue-bright);
}

/* Font weight utilities */
.font-normal {
  font-weight: var(--font-weight-normal);
}

.font-medium {
  font-weight: var(--font-weight-medium);
}

.font-semibold {
  font-weight: var(--font-weight-semibold);
}

.font-bold {
  font-weight: var(--font-weight-bold);
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

/* Skip to main content link */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-blue-bright);
  color: var(--color-white);
  padding: var(--space-sm) var(--space-md);
  text-decoration: none;
  z-index: var(--z-tooltip);
}

.skip-to-content:focus {
  top: 0;
}

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

/* Focus visible styles */
*:focus-visible {
  outline: 2px solid var(--color-blue-bright);
  outline-offset: 2px;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Spacing utilities */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.pt-sm { padding-top: var(--space-sm); }
.pt-md { padding-top: var(--space-md); }
.pt-lg { padding-top: var(--space-lg); }
.pt-xl { padding-top: var(--space-xl); }
.pt-2xl { padding-top: var(--space-2xl); }

.pb-sm { padding-bottom: var(--space-sm); }
.pb-md { padding-bottom: var(--space-md); }
.pb-lg { padding-bottom: var(--space-lg); }
.pb-xl { padding-bottom: var(--space-xl); }
.pb-2xl { padding-bottom: var(--space-2xl); }

/* Display utilities */
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }

/* Responsive utilities */
@media (max-width: 767px) { /* mobile breakpoint */
  .hide-mobile { display: none; }
}

@media (min-width: 768px) and (max-width: 1199px) { /* tablet breakpoint */
  .hide-tablet { display: none; }
}

@media (min-width: 1200px) { /* large breakpoint */
  .hide-desktop { display: none; }
}

@media (max-width: 767px) { /* mobile breakpoint */
  .show-mobile { display: block; }
  .show-tablet { display: none; }
  .show-desktop { display: none; }
}

@media (min-width: 768px) and (max-width: 1199px) { /* tablet breakpoint */
  .show-mobile { display: none; }
  .show-tablet { display: block; }
  .show-desktop { display: none; }
}

@media (min-width: 1200px) { /* large breakpoint */
  .show-mobile { display: none; }
  .show-tablet { display: none; }
  .show-desktop { display: block; }
}

/* ========================================
   TABLET RESPONSIVE TYPOGRAPHY
   ======================================== */

@media (min-width: 768px) { /* tablet breakpoint - min */
  h2 {
    font-size: var(--font-size-4xl);
  }

  h3 {
    font-size: var(--font-size-3xl);
  }
}

/* ========================================
   DESKTOP RESPONSIVE TYPOGRAPHY
   ======================================== */

@media (min-width: 1200px) { /* large breakpoint */
  h2 {
    font-size: var(--font-size-5xl);
  }

  h3 {
    font-size: var(--font-size-4xl);
  }
}

/* ========================================
   VIDEO PAUSE BUTTON (ADO 6819)
   ======================================== */

/* The pause button on the looping videos (WCAG 2.2.2; Ken, Inbox -174). The markup ships it with hidden and
   assets/js/site-nav.js shows it. Any display here beats the browser's own [hidden] rule, so [hidden] is restated.
   Two bars while the video plays, a triangle once paused (is-paused); the focus ring is two-tone (a white line inside
   a dark one), so it shows over light and dark frames. z-index 3 sits above each video box's own layers
   (home-sections.css:414, page-methodology.css:41 and :49, page-using-ccolor.css:131). */
.video-pause {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}

.video-pause[hidden] {
  display: none;
}

.video-pause::before {
  content: "";
  box-sizing: content-box;
  width: 4px;
  height: 16px;
  border-left: 5px solid #fff;
  border-right: 5px solid #fff;
}

.video-pause.is-paused::before {
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 15px solid #fff;
  border-right: 0;
  margin-left: 4px;
}

.video-pause:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 0;
  box-shadow: 0 0 0 4px #000;
}

