/* ==========================================================================
   ClearMetric — styles.css

   1. Design tokens      2. Base            3. Layout helpers
   4. Buttons            5. Header & nav    6. Hero + dashboard illustration
   7. Services           8. Timeline        9. Pricing
   10. About            11. Contact form   12. Footer
   13. Responsive       14. Reduced motion
   ========================================================================== */


/* ---------- 1. Design tokens ---------- */
:root {
  --colour-navy:        #0F2A43;
  --colour-navy-deep:   #0A1E31;
  --colour-blue:        #1264A3;
  --colour-blue-dark:   #0E4F80;
  --colour-blue-light:  #E8F1F9;
  --colour-yellow:      #F2C811;

  --colour-text:        #16222E;
  --colour-heading:     #0F2A43;
  --colour-muted:       #566472;
  --colour-background:  #FFFFFF;
  --colour-surface:     #F7F8FA;
  --colour-border:      #E3E7EC;
  --colour-border-soft: #EEF1F4;
  --colour-error:       #B4232A;

  --radius-card: 12px;
  --radius-sm:   7px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(15, 42, 67, .04), 0 4px 14px rgba(15, 42, 67, .05);
  --shadow-lift: 0 2px 6px rgba(15, 42, 67, .06), 0 14px 32px rgba(15, 42, 67, .10);

  --container-width: 1160px;
  --gutter: 24px;
  --header-height: 68px;
  --space-section: 96px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
               "Helvetica Neue", Arial, sans-serif;

  --transition: 160ms ease;
}


/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--colour-text);
  background: var(--colour-background);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  color: var(--colour-heading);
  line-height: 1.18;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 4.2vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 650; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--colour-blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--colour-blue-dark); }

svg { display: block; }

.plain-list { list-style: none; margin: 0; padding: 0; }

/* Icon sprite host — present in the DOM, never rendered. */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: var(--colour-navy);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible {
  outline: 3px solid var(--colour-blue);
  outline-offset: 2px;
  border-radius: 3px;
}


/* ---------- 3. Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: var(--space-section) 0; }
.section-muted { background: var(--colour-surface); }
.section-dark  { background: var(--colour-navy); color: rgba(255, 255, 255, .82); }
.section-dark h2, .section-dark h3 { color: #fff; }

.section-head {
  max-width: 720px;
  margin: 0 0 56px;
}
.section-head h2 { position: relative; padding-top: 18px; }
.section-head h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background: var(--colour-yellow);
}

.eyebrow {
  font-size: .8rem;
  font-weight: 650;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--colour-blue);
  margin-bottom: 14px;
}

.lead {
  font-size: 1.08rem;
  color: var(--colour-muted);
}
.section-dark .lead { color: rgba(255, 255, 255, .8); }

.fine-print {
  font-size: .875rem;
  color: var(--colour-muted);
}


/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), transform var(--transition),
              box-shadow var(--transition);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--colour-blue);
  border-color: var(--colour-blue);
  color: #fff;
}
.btn-primary:hover {
  background: var(--colour-blue-dark);
  border-color: var(--colour-blue-dark);
  color: #fff;
  box-shadow: var(--shadow-card);
}

.btn-secondary {
  background: #fff;
  border-color: var(--colour-border);
  color: var(--colour-heading);
}
.btn-secondary:hover {
  border-color: var(--colour-blue);
  color: var(--colour-blue-dark);
}

.btn-sm  { padding: 9px 17px; font-size: .925rem; }
.btn-block { display: flex; width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 12px;
}

.link-arrow {
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.link-arrow:hover { text-decoration: underline; }
.link-arrow span { transition: margin var(--transition); margin-left: 4px; }
.link-arrow:hover span { margin-left: 9px; }


/* ---------- 5. Header & nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--colour-border-soft);
}

.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--colour-heading);
}
.brand-mark { display: block; width: 28px; height: 28px; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-name {
  font-size: 1.22rem;
  font-weight: 400;
  letter-spacing: -.02em;
}
.brand-name strong { font-weight: 750; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
/* Excludes the CTA, which is a .btn and keeps its own colours. Without the
   :not() this rule outranks .btn-primary and repaints the label dark. */
.nav-list a:not(.btn) {
  display: block;
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-weight: 550;
  color: var(--colour-text);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.nav-list a:not(.btn):hover { background: var(--colour-surface); color: var(--colour-heading); }
.nav-cta-item { margin-left: 8px; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle-bars { display: block; width: 18px; }
.nav-toggle-bars span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: var(--colour-heading);
}
.nav-toggle-bars span + span { margin-top: 4px; }


/* ---------- 6. Hero ---------- */
.hero {
  padding-top: 76px;
  background:
    radial-gradient(900px 420px at 88% -8%, var(--colour-blue-light), transparent 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 60px;
  align-items: center;
}

.hero-copy h1 { margin-bottom: 20px; }
.hero-copy .lead + .lead { margin-top: -.25rem; }

.tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid var(--colour-border);
}
.tool-row li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  background: #fff;
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-pill);
  font-size: .875rem;
  font-weight: 550;
  color: var(--colour-heading);
}
.tool-ico { width: 18px; height: 18px; flex: none; }
.tool-ico-sql {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--colour-navy);
  color: #fff;
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: -.02em;
}

/* --- Dashboard illustration --- */
.hero-visual { position: relative; }

.dash {
  background: #fff;
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}

.dash-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 16px;
  background: var(--colour-navy);
}
.dash-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--colour-yellow);
  flex: none;
}
.dash-title {
  font-size: .875rem;
  font-weight: 600;
  color: #fff;
}
.dash-live {
  margin-left: auto;
  font-size: .7rem;
  font-weight: 550;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--colour-border-soft);
}
.kpi {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 14px;
}
.kpi + .kpi { border-left: 1px solid var(--colour-border-soft); }
.kpi-label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--colour-muted);
}
.kpi-value {
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--colour-heading);
}
.kpi-delta { font-size: .75rem; font-weight: 600; }
.kpi-delta.up   { color: #1B7A4B; }
.kpi-delta.down { color: #B4232A; }

.chart-row {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 18px;
  padding: 18px 16px 20px;
}

.chart-label {
  margin: 0 0 10px;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--colour-muted);
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 108px;
}
.bars span {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: var(--colour-blue);
  opacity: .8;
}
.bars .bar-hi { background: var(--colour-yellow); opacity: 1; }

.axis {
  display: flex;
  gap: 8px;
  margin-top: 7px;
}
.axis span {
  flex: 1;
  text-align: center;
  font-size: .625rem;
  color: var(--colour-muted);
}

.trend { display: flex; flex-direction: column; }
.trend svg { width: 100%; height: 108px; }
.trend-line {
  fill: none;
  stroke: var(--colour-blue);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.trend-fill { fill: var(--colour-blue); opacity: .1; }
.trend-foot {
  margin: 7px 0 0;
  font-size: .7rem;
  font-weight: 600;
  color: #1B7A4B;
}


/* ---------- 7. Services ---------- */
.card {
  background: #fff;
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.service-card {
  padding: 26px 24px 28px;
  transition: transform var(--transition), box-shadow var(--transition),
              border-color var(--transition);
}
.service-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  border-color: #D6DDE5;
}

.card-ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: var(--colour-blue-light);
}
.card-ico svg { width: 24px; height: 24px; }
.card-ico-brand { background: var(--colour-surface); border: 1px solid var(--colour-border); }

/* Neutral line icons share one stroke treatment. */
.line-ico {
  fill: none;
  stroke: var(--colour-blue);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-card p { color: var(--colour-muted); font-size: .96rem; margin: 0; }


/* ---------- 8. How it works ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
}

.step { position: relative; padding-top: 30px; }

/* Hairline connector, drawn from the top of each step to the next. */
.step::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 0;
  right: -26px;
  height: 1px;
  background: var(--colour-border);
}
.step:last-child::before { right: 0; }
.step::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--colour-blue);
}
.step:first-child::after { background: var(--colour-yellow); }

.step-num {
  display: block;
  margin-bottom: 6px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--colour-blue);
}
.step p { color: var(--colour-muted); font-size: .96rem; margin: 0; }


/* ---------- 9. Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 26px 30px;
  height: 100%;
}

.price-card-featured {
  border-color: #CBD8E4;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.price-card-featured::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--colour-yellow);
}

.badge {
  position: absolute;
  top: 22px;
  right: 22px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: var(--colour-navy);
  color: #fff;
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .03em;
}

.plan-name { margin-bottom: 6px; font-size: 1.2rem; }

.plan-price {
  margin: 0 0 14px;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--colour-heading);
  line-height: 1.1;
}
.plan-price .from {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--colour-muted);
}

.plan-desc {
  color: var(--colour-muted);
  font-size: .96rem;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--colour-border-soft);
}

.feature-list {
  display: grid;
  gap: 9px;
  margin-bottom: 26px;
}
.feature-list li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  font-size: .94rem;
}
.feat-tick {
  width: 16px;
  height: 16px;
  margin-top: 5px;
  fill: none;
  stroke: var(--colour-blue);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Pin the CTA to the bottom so buttons line up across cards. */
.price-card .btn { margin-top: auto; }

.retainer-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: 24px 28px;
  background: #fff;
  border: 1px solid var(--colour-border);
  border-left: 4px solid var(--colour-yellow);
  border-radius: var(--radius-card);
}
.retainer-copy { max-width: 720px; }
.retainer-copy h3 { margin-bottom: 4px; }
.retainer-price { font-weight: 700; color: var(--colour-blue); }
.retainer-copy p { margin: 0; color: var(--colour-muted); font-size: .94rem; }


/* ---------- 10. About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.about-byline {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.about-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .22);
  flex-shrink: 0;
}
.about-name {
  margin: 0;
  font-weight: 700;
  color: #fff;
  font-size: 1rem;
}
.about-role {
  margin: 0;
  font-size: .85rem;
  color: rgba(255, 255, 255, .65);
}

.about-panel {
  padding: 30px 30px 28px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius-card);
}

.stat-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding-bottom: 24px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.stat-num {
  display: block;
  font-size: 2.3rem;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: var(--colour-yellow);
}
.stat-label {
  display: block;
  font-size: .875rem;
  color: rgba(255, 255, 255, .75);
}

.mini-head {
  font-size: .75rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .6);
  margin-bottom: 12px;
}
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list li {
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--radius-pill);
  font-size: .85rem;
}


/* ---------- 11. Contact & form ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: start;
}

.contact-copy h2 { position: relative; padding-top: 18px; }
.contact-copy h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background: var(--colour-yellow);
}

.reassurance { display: grid; gap: 12px; margin-top: 26px; }
.reassurance li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  font-weight: 550;
}
.tick-blue {
  width: 20px;
  height: 20px;
  margin-top: 4px;
  fill: none;
  stroke: var(--colour-blue);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-card { padding: 30px 28px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field { margin-bottom: 16px; }

label {
  display: block;
  margin-bottom: 6px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--colour-heading);
}
.req { color: var(--colour-blue); }
.optional { font-weight: 400; color: var(--colour-muted); }

input, select, textarea {
  width: 100%;
  padding: 11px 13px;
  font: inherit;
  font-size: .96rem;
  color: var(--colour-text);
  background: #fff;
  border: 1px solid var(--colour-border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
textarea { resize: vertical; min-height: 96px; }

select {
  appearance: none;
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23566472' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 12px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--colour-blue);
  box-shadow: 0 0 0 3px rgba(18, 100, 163, .16);
}

input.is-invalid, select.is-invalid, textarea.is-invalid {
  border-color: var(--colour-error);
}
input.is-invalid:focus, textarea.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(180, 35, 42, .14);
}

.field-error {
  margin: 6px 0 0;
  font-size: .82rem;
  font-weight: 550;
  color: var(--colour-error);
}

.gdpr {
  margin: 16px 0 0;
  font-size: .78rem;
  line-height: 1.55;
  color: var(--colour-muted);
}

.form-status:not(:empty) {
  margin: 14px 0 0;
  font-size: .875rem;
  font-weight: 550;
  color: var(--colour-error);
}

.form-success { text-align: center; padding: 22px 6px 12px; }
.form-success:focus { outline: none; }
.success-ico {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--colour-blue-light);
}
.success-ico svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--colour-blue);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.form-success p { color: var(--colour-muted); margin-bottom: 22px; }


/* ---------- 12. Footer ---------- */
.site-footer {
  background: var(--colour-navy-deep);
  color: rgba(255, 255, 255, .68);
  padding: 52px 0 26px;
  font-size: .92rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.footer-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  margin-bottom: 10px;
}
.footer-brand p { margin: 0; font-size: .875rem; }

.footer-nav { display: flex; gap: 56px; }
.footer-nav ul { display: grid; gap: 9px; }
.footer-nav a {
  color: rgba(255, 255, 255, .78);
  text-decoration: none;
}
.footer-nav a:hover { color: #fff; text-decoration: underline; }

.footer-legal {
  padding-top: 22px;
  font-size: .8rem;
  color: rgba(255, 255, 255, .5);
}
.footer-legal p { margin: 0 0 6px; }
.trademark-note { max-width: 620px; font-size: .75rem; color: rgba(255, 255, 255, .52); }


/* ---------- 12b. Legal pages ---------- */
.legal-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 0 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--colour-muted);
  text-decoration: none;
  margin-bottom: 28px;
}
.back-link:hover { color: var(--colour-blue); }
.back-link span { transition: margin var(--transition); }
.back-link:hover span { margin-right: 3px; }

.legal-content h1 { margin-bottom: .2em; }
.legal-content > .fine-print { margin-bottom: 40px; }

.legal-body h2 {
  font-size: 1.3rem;
  margin-top: 2.4em;
  padding-top: 0;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-size: 1rem; margin-top: 1.6em; }
.legal-body p, .legal-body ul { color: var(--colour-text); }
.legal-body ul { margin: 0 0 1rem; padding-left: 1.25em; }
.legal-body li { margin-bottom: .4em; }
.legal-body li:last-child { margin-bottom: 0; }


/* ---------- 13. Responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-visual { max-width: 560px; }

  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 34px; }

  .pricing-grid { grid-template-columns: 1fr; max-width: 560px; }
  .price-card-featured { order: -1; }

  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 860px) {
  :root { --space-section: 64px; }

  .nav-toggle { display: inline-flex; }

  /* Only collapse the menu once the toggle can actually reopen it. */
  .js .primary-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    padding: 10px var(--gutter) 18px;
    background: #fff;
    border-bottom: 1px solid var(--colour-border);
    box-shadow: var(--shadow-card);
  }
  .js .primary-nav.is-open { display: block; }
  .js .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .js .nav-list a:not(.btn) { padding: 12px 10px; }
  .js .nav-cta-item { margin: 8px 0 0; }
  .js .nav-cta-item a { justify-content: center; padding: 12px 18px; }

  .site-header { position: relative; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }

  .card-grid { grid-template-columns: 1fr; }
  .timeline  { grid-template-columns: 1fr; row-gap: 28px; }

  /* Vertical connector once the steps stack. */
  .step { padding-top: 0; padding-left: 30px; }
  .step::before {
    top: 6px;
    bottom: -28px;
    left: 4px;
    right: auto;
    width: 1px;
    height: auto;
  }
  .step:last-child::before { bottom: 0; }
  .step::after { top: 6px; left: 0; }

  .chart-row { grid-template-columns: 1fr; }
  .kpi-value { font-size: 1.15rem; }

  .form-card { padding: 24px 20px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }

  .retainer-strip { padding: 22px 20px; }
  .stat-list { grid-template-columns: 1fr; }
  .footer-nav { gap: 40px; }
  .btn-row .btn { width: 100%; }
}


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