/* ==========================================================================
   Change Enablers Ltd — Design System & Main Stylesheet
   Tokens derived from Part 1 of the Specification
   ========================================================================== */

:root {
  /* Brand Tokens */
  --blue-900: #0F3A6B; /* Headlines, dark sections, footer */
  --blue-600: #1D5CA8; /* Primary buttons, links, main chart colour */
  --blue-400: #4F8FD6; /* Chart fills, highlights, soft gradients, focus rings */
  --blue-50:  #E8F0FA; /* Tinted panels and cards */

  --green-700: #1B7A38; /* Accent text, positive states, key chart series */
  --green-500: #2E9E4F; /* Rising-line motif, chart accents, badges */

  --ink:   #1F2933; /* Body text */
  --slate: #52606D; /* Secondary text */
  --mist:  #F3F6F9; /* Alternate section background */
  --white: #FFFFFF; /* Page background */

  /* Structural & Utility Tokens */
  --border-pale: #D6E2F0;
  --border-subtle: rgba(15, 58, 107, 0.12);
  --shadow-sm: 0 1px 3px rgba(15, 58, 107, 0.06), 0 1px 2px rgba(15, 58, 107, 0.04);
  --shadow-md: 0 4px 14px rgba(15, 58, 107, 0.08);
  --shadow-lg: 0 10px 25px -3px rgba(15, 58, 107, 0.12);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 18px;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1200px;
  --section-spacing-desktop: 96px;
  --section-spacing-mobile: 56px;
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--white);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 72px; /* clearance for sticky mobile bar */
}

@media (min-width: 992px) {
  body {
    padding-bottom: 0;
  }
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -999px;
  left: 16px;
  background: var(--blue-900);
  color: var(--white);
  padding: 12px 20px;
  z-index: 9999;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 16px;
  outline: 3px solid var(--blue-400);
  outline-offset: 2px;
}

/* Accessible focus ring */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--blue-400);
  outline-offset: 2px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--blue-900);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

p {
  font-size: 1.0625rem;
  color: var(--ink);
  line-height: 1.6;
  max-width: 70ch;
  margin-bottom: 1rem;
}

p.secondary, .text-secondary {
  color: var(--slate);
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green-700);
  margin-bottom: 0.75rem;
}

.subhead {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--slate);
  margin-bottom: 2rem;
  max-width: 65ch;
}

.trust-line {
  font-size: 0.9375rem;
  color: var(--slate);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 1.5rem;
}
.trust-line span {
  display: inline-flex;
  align-items: center;
}
.trust-line .sep {
  color: var(--border-pale);
  font-weight: 300;
}

/* Layout & Grid */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.section {
  padding-top: var(--section-spacing-mobile);
  padding-bottom: var(--section-spacing-mobile);
}

@media (min-width: 992px) {
  .section {
    padding-top: var(--section-spacing-desktop);
    padding-bottom: var(--section-spacing-desktop);
  }
}

.section-mist {
  background-color: var(--mist);
}

.section-tinted {
  background-color: var(--blue-50);
}

.section-dark {
  background-color: var(--blue-900);
  color: var(--white);
}
.section-dark h1, .section-dark h2, .section-dark h3 {
  color: var(--white);
}
.section-dark p {
  color: #D6E2F0;
}
.section-dark .text-secondary {
  color: #A3BDDC;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 576px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 992px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Rising Green Line Motif */
.rising-line-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 3rem auto;
  width: 100%;
  max-width: 240px;
  height: 6px;
  position: relative;
}
.rising-line-divider::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--green-500) 60%, var(--green-700));
  border-radius: 3px;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-pale);
  transition: all 0.2s ease;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-logo {
  height: 48px;
  width: auto;
  display: block;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--blue-900);
  letter-spacing: -0.01em;
}

.nav-menu {
  display: none;
  align-items: center;
  gap: 28px;
  list-style: none;
}

@media (min-width: 992px) {
  .nav-menu {
    display: flex;
  }
}

.nav-link {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 0;
  position: relative;
  transition: color 0.15s ease;
}
.nav-link:hover, .nav-link.active {
  color: var(--blue-600);
}
.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--blue-600);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Mobile Menu Toggle */
.mobile-nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
}
@media (min-width: 992px) {
  .mobile-nav-toggle {
    display: none;
  }
}
.mobile-nav-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--blue-900);
  border-radius: 2px;
  transition: all 0.2s ease;
}

.mobile-menu-drawer {
  display: none;
  flex-direction: column;
  background-color: var(--white);
  border-bottom: 1px solid var(--border-pale);
  padding: 20px 24px;
  gap: 16px;
}
.mobile-menu-drawer.is-open {
  display: flex;
}
.mobile-menu-drawer a {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 0;
}
.mobile-menu-drawer a:hover {
  color: var(--blue-600);
}

/* Sticky Mobile Bottom Bar */
.sticky-mobile-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 990;
  background-color: rgba(255, 255, 255, 0.98);
  border-top: 1px solid var(--border-pale);
  padding: 12px 20px;
  display: flex;
  justify-content: center;
  backdrop-filter: blur(8px);
  box-shadow: 0 -4px 12px rgba(15, 58, 107, 0.08);
}
@media (min-width: 992px) {
  .sticky-mobile-bar {
    display: none;
  }
}
.sticky-mobile-bar .btn-primary {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  padding: 14px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 48px;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--blue-600);
  color: var(--white) !important;
  border-color: var(--blue-600);
  box-shadow: 0 2px 4px rgba(29, 92, 168, 0.2);
}
.btn-primary:hover {
  background-color: #164985;
  border-color: #164985;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(29, 92, 168, 0.25);
}

.btn-secondary {
  background-color: transparent;
  color: var(--blue-600) !important;
  border-color: var(--border-pale);
  background-color: var(--white);
}
.btn-secondary:hover {
  background-color: var(--blue-50);
  border-color: var(--blue-600);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
  min-height: 40px;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 2rem;
}

/* Cards */
.card {
  background-color: var(--white);
  border: 1px solid var(--border-pale);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-tinted {
  background-color: var(--blue-50);
  border-color: rgba(29, 92, 168, 0.15);
}

.card-header {
  margin-bottom: 1rem;
}
.card-title {
  font-size: 1.25rem;
  color: var(--blue-900);
  margin-bottom: 0.5rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
}

.badge-synthetic {
  background-color: var(--blue-50);
  color: var(--blue-900);
  border: 1px solid var(--blue-400);
}

.badge-green {
  background-color: #E6F4EA;
  color: var(--green-700);
  border: 1px solid rgba(46, 158, 79, 0.3);
}

/* Price Band Component */
.price-band-wrapper {
  background-color: var(--white);
  border: 1px solid var(--border-pale);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
  margin: 2.5rem 0;
}

.price-band-track {
  position: relative;
  margin: 32px 0 24px;
}

.price-band-bar {
  height: 10px;
  background: linear-gradient(90deg, var(--blue-600), var(--green-700));
  border-radius: 6px;
  position: relative;
}

.price-band-markers {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
}

.price-marker {
  display: flex;
  flex-direction: column;
}
.price-marker.left {
  align-items: flex-start;
}
.price-marker.right {
  align-items: flex-end;
}

.price-marker-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue-900);
}

.price-marker-label {
  font-size: 0.875rem;
  color: var(--slate);
}

.price-band-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border-pale);
  margin-top: 20px;
}

.price-band-subtext {
  font-size: 0.9375rem;
  color: var(--slate);
  margin-bottom: 0;
}

/* Timeline */
.timeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 2.5rem 0;
}
@media (min-width: 992px) {
  .timeline {
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
  }
}

.timeline-step {
  background: var(--white);
  border: 1px solid var(--border-pale);
  border-radius: var(--radius);
  padding: 24px 20px;
  position: relative;
}
.timeline-step-num {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--green-700);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.timeline-step-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--blue-900);
  margin-bottom: 8px;
}
.timeline-step-desc {
  font-size: 0.875rem;
  color: var(--slate);
  line-height: 1.5;
  margin-bottom: 0;
}

/* Accordion (FAQ) */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 2rem 0;
}

.accordion-item {
  background: var(--white);
  border: 1px solid var(--border-pale);
  border-radius: var(--radius);
  overflow: hidden;
}

.accordion-summary {
  padding: 20px 24px;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--blue-900);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}
.accordion-summary::-webkit-details-marker {
  display: none;
}
.accordion-summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--blue-600);
  transition: transform 0.2s ease;
}
details[open] .accordion-summary::after {
  content: "−";
}

.accordion-body {
  padding: 0 24px 20px;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.6;
}

/* Testimonial Card */
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--border-pale);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.testimonial-quote {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 1.5rem;
  font-style: normal;
}
.testimonial-quote::before {
  content: "“";
  font-size: 2rem;
  color: var(--blue-400);
  line-height: 0;
  vertical-align: -0.3em;
  margin-right: 4px;
}

.testimonial-author {
  font-weight: 700;
  color: var(--blue-900);
  font-size: 1rem;
}
.testimonial-role {
  font-size: 0.875rem;
  color: var(--slate);
}

/* Chart Cards & View Data Toggle */
.chart-card {
  background: var(--white);
  border: 1px solid var(--border-pale);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.chart-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.chart-title-area {
  flex: 1;
  min-width: 250px;
}

.chart-title {
  font-size: 1.25rem;
  color: var(--blue-900);
  margin-bottom: 4px;
}

.chart-subtitle {
  font-size: 0.875rem;
  color: var(--slate);
  margin-bottom: 0;
}

.chart-container {
  width: 100%;
  overflow-x: auto;
  padding: 12px 0;
}

.view-data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 0.9375rem;
}
.view-data-table th, .view-data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-pale);
  text-align: left;
}
.view-data-table th {
  background-color: var(--mist);
  color: var(--blue-900);
  font-weight: 600;
}
.view-data-table td.num, .view-data-table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Callout Box */
.callout-box {
  background-color: var(--blue-50);
  border-left: 4px solid var(--blue-600);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 20px 24px;
  margin: 1.5rem 0;
}
.callout-box p:last-child {
  margin-bottom: 0;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--blue-900);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background-color: var(--white);
  border: 1px solid var(--border-pale);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--blue-600);
  outline: 3px solid var(--blue-400);
  outline-offset: 1px;
}

.form-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--ink);
  cursor: pointer;
  line-height: 1.5;
}
.form-checkbox {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--blue-600);
}

.form-help {
  font-size: 0.8125rem;
  color: var(--slate);
  margin-top: 4px;
}

.form-error {
  color: #C5221F;
  font-size: 0.8125rem;
  margin-top: 4px;
}

/* Honeypot field (hidden from visual visitors and screen readers) */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Footer */
.site-footer {
  background-color: var(--blue-900);
  color: #D6E2F0;
  padding: 64px 0 36px;
  border-top: 3px solid var(--green-500);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 2fr;
  }
}

.footer-title {
  color: var(--white);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-text {
  font-size: 0.9375rem;
  color: #D6E2F0;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 10px;
}
.footer-links a {
  color: #D6E2F0;
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.15s ease;
}
.footer-links a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.875rem;
}

/* Cookie Consent Banner & Modal */
.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: var(--white);
  border-top: 2px solid var(--blue-600);
  box-shadow: 0 -8px 24px rgba(15, 58, 107, 0.15);
  padding: 24px;
}
.consent-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 768px) {
  .consent-banner-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.consent-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Click-to-load Embed Placeholder */
.embed-placeholder {
  background-color: var(--mist);
  border: 1px dashed var(--blue-400);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Soft blue hero glow */
.hero-glow {
  position: relative;
  overflow: hidden;
}
.hero-glow::before {
  content: "";
  position: absolute;
  top: -150px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(79, 143, 214, 0.18) 0%, rgba(232, 240, 250, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.hero-glow > * {
  position: relative;
  z-index: 1;
}

/* KPI Tiles on Sample Findings */
.kpi-tile {
  background: var(--white);
  border: 1px solid var(--border-pale);
  border-radius: var(--radius);
  padding: 24px;
  text-align: left;
}
.kpi-tile-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--blue-900);
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}
.kpi-tile-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--slate);
}
.kpi-tile-target {
  font-size: 0.8125rem;
  color: var(--slate);
  margin-top: 4px;
}

/* Keep article text and images aligned to the same readable column. */
.article-body {
  width: 100%;
  max-width: 70ch;
  margin-left: auto;
  margin-right: auto;
}
.article-body p {
  max-width: 100%;
}
.article-body figure {
  width: 100%;
  margin: 1.75rem 0;
}
.article-body img {
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  .btn-group { flex-direction: column; width: 100%; }
  .btn-group .btn { width: 100%; text-align: center; }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
