/* ==================================================
   CND Base
   Typography + Global HTML Elements
   ================================================== */

/* ==================================================
   1. Document base
   ================================================== */

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--cnd-text-primary);
  background: var(--cnd-white);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--cnd-primary);
  color: var(--cnd-white);
}
/* ==================================================
   2. Reset helpers
   ================================================== */

.cnd-reset,
.cnd_reset {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.cnd-img-cover,
.cnd_img_cover {
  width: 100%;
  height: 100%;
  max-width: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}
/* ==================================================
  3. Global text elements
   ================================================== */

p {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--cnd-text-secondary);
}

strong,
b {
  font-weight: 800;
  color: inherit;
}

small {
  font-size: 0.875rem;
  line-height: 1.5;
}

a {
  color: var(--cnd-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition:
    color 180ms ease,
    text-decoration-color 180ms ease;
}

a:hover,
a:focus {
  color: var(--cnd-primary-dark);
}

a:focus-visible {
  outline: 2px solid var(--cnd-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==================================================
   4. Headings
   ================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  color: var(--cnd-text-primary);
  font-family: var(--font-main);
  font-weight: 800;
  text-wrap: balance;
}

h1 {
  margin-bottom: 1.5rem;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h3 {
  margin-bottom: 1rem;
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h4 {
  margin-bottom: 0.75rem;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  font-weight: 800;
  line-height: 1.3;
}

h5,
h6 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}

/* ==================================================
   5. Lists
   ================================================== */

ul,
ol {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-left: 1.35rem;
  color: var(--cnd-text-secondary);
}

li {
  margin-bottom: 0.35rem;
}

li::marker {
  color: var(--cnd-primary);
}

/* ==================================================
   6. Typography utility classes
     ================================================== */

/* Eyebrow */

.cnd-eyebrow,
.cnd_eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--cnd-space-1);
  margin-bottom: var(--cnd-space-2);
  color: var(--cnd-primary);
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.cnd-eyebrow::before,
.cnd_eyebrow::before {
  content: "";
  width: 24px;
  height: 3px;
  display: inline-block;
  flex-shrink: 0;
  border-radius: var(--cnd-radius-full);
  background: var(--cnd-accent);
}

.cnd-eyebrow-light,
.cnd_eyebrow_light {
  color: var(--cnd-accent);
}

.cnd-eyebrow-light::before,
.cnd_eyebrow_light::before {
  background: var(--cnd-accent);
}

/* Display headings */

.cnd-h1,
.cnd_h1 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--cnd-text-primary);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.cnd-h2,
.cnd_h2 {
  margin-top: 0;
  margin-bottom: 1.25rem;
  color: var(--cnd-text-primary);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.cnd-h3,
.cnd_h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--cnd-text-primary);
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.cnd-h4,
.cnd_h4 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--cnd-text-primary);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  font-weight: 800;
  line-height: 1.3;
}

/* Body text */

.cnd-lead,
.cnd_lead {
  margin-top: 0;
  margin-bottom: 1.25rem;
  color: var(--cnd-text-secondary);
  font-size: clamp(1.0625rem, 1.6vw, 1.125rem);
  font-weight: 400;
  line-height: 1.75;
}

.cnd-body,
.cnd_body {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--cnd-text-secondary);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.8;
}

.cnd-caption,
.cnd_caption {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--cnd-text-muted);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.5;
}

/* Text colors */

.cnd-text-white,
.cnd_text_white {
  color: var(--cnd-white) !important;
}

.cnd-text-primary,
.cnd_text_primary {
  color: var(--cnd-primary) !important;
}

.cnd-text-accent,
.cnd_text_accent {
  color: var(--cnd-accent) !important;
}

.cnd-text-muted,
.cnd_text_muted {
  color: var(--cnd-text-muted) !important;
}

.cnd-text-secondary {
  color: var(--cnd-text-secondary) !important;
}

.cnd-text-dark {
  color: var(--cnd-text-primary) !important;
}

/* ==================================================
   7. Responsive typography refinements
   ================================================== */

@media (max-width: 767px) {
  body {
    font-size: 16px;
    line-height: 1.65;
  }

  h1,
  .cnd-h1,
  .cnd_h1 {
    margin-bottom: 1.25rem;
  }

  h2,
  .cnd-h2,
  .cnd_h2 {
    margin-bottom: 1rem;
  }

  .cnd-lead,
  .cnd_lead {
    line-height: 1.65;
  }

  .cnd-eyebrow,
  .cnd_eyebrow {
    gap: 6px;
    margin-bottom: 12px;
    font-size: 0.6875rem;
    letter-spacing: 0.16em;
  }

  .cnd-eyebrow::before,
  .cnd_eyebrow::before {
    width: 20px;
  }
}