/* =================================================================
   CCX Partners — Design system v2.1
   Turquoise + dark navy · Georgia (headers) · Poppins (body)
   ================================================================= */

:root {
  /* Brand — turquoise family */
  --teal:        #00AAB0;
  --teal-bright: #08D0E4;
  --teal-mid:    #08BEC4;
  --teal-dim:    #00858A;
  --teal-light:  #D5F0F1;

  /* Dark — navy */
  --navy:        #062835;
  --navy-deep:   #021823;
  --navy-soft:   #0F3D4D;

  /* Neutrals */
  --cream:       #F7F4ED;
  --cream-warm:  #EFE9DC;
  --ink:         #0E1F2A;
  --ink-soft:    #44535F;
  --ink-muted:   #7E8A92;
  --rule:        rgba(14, 31, 42, 0.10);
  --rule-dark:   rgba(247, 244, 237, 0.16);

  /* Type scale */
  --fs-hero:   clamp(2.5rem, 6vw, 5rem);
  --fs-h1:     clamp(2rem, 4vw, 3rem);
  --fs-h2:     clamp(1.5rem, 2.6vw, 2.125rem);
  --fs-h3:     1.25rem;
  --fs-body:   1.0625rem;
  --fs-small:  0.875rem;
  --fs-xs:     0.75rem;

  --font-head: 'Georgia Pro', Georgia, 'Times New Roman', serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ─── Typography ────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-family: var(--font-body); font-weight: 500; letter-spacing: 0; }
h4 { font-size: 1rem; font-family: var(--font-body); font-weight: 500; }

p { margin: 0 0 1rem; color: var(--ink-soft); font-weight: 400; }
p.lead { font-size: 1.1875rem; line-height: 1.55; color: var(--ink); font-weight: 400; }
strong { font-weight: 500; color: var(--ink); }

a { color: var(--teal-dim); text-decoration: none; }
a:hover { color: var(--ink); }
.link-arrow { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 500; color: var(--teal-dim); }
.link-arrow::after { content: '→'; transition: transform 200ms ease; }
.link-arrow:hover::after { transform: translateX(4px); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal-dim);
  margin: 0 0 1rem;
}

/* ─── Layout primitives ─────────────────────────────────────────── */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 1.5rem; }

section { padding: 5rem 0; }
section.tight { padding: 3rem 0; }

.section-light { background: var(--cream); }
.section-warm  { background: var(--cream-warm); }
.section-dark  { background: var(--navy); color: var(--cream); }
.section-dark  h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: var(--cream); }
.section-dark  p { color: rgba(247, 244, 237, 0.80); }

/* ─── Header / nav ───────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 237, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
}
.logo {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.logo span { color: var(--teal); }
.nav-links {
  display: flex;
  gap: 1.75rem;
  align-items: center;
  font-size: 0.9375rem;
  font-weight: 400;
}
.nav-links a {
  color: var(--ink-soft);
  font-weight: 400;
  position: relative;
  padding: 0.25rem 0;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); font-weight: 500; }
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--teal);
}
.nav-cta {
  background: var(--ink);
  color: var(--cream);
  padding: 0.625rem 1.25rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9375rem;
}
.nav-cta:hover { background: var(--teal); color: white; }

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  width: 40px;
  height: 40px;
  font-size: 1.125rem;
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav-cta { display: none; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem 1.5rem 1rem;
    align-items: stretch;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 0; border-bottom: 1px solid var(--rule); }
  .nav-links a:last-child { border-bottom: none; }
}

/* ─── Hero ─────────────────────────────────────────────────────── */
.hero {
  padding: 6rem 0 5rem;
  background: var(--cream);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 170, 176, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 170, 176, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
  pointer-events: none;
  z-index: 0;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,1) 50%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,1) 50%, transparent 100%);
}
.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
}
.hero-text { min-width: 0; }
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 380px;
  width: 100%;
  margin-left: auto;
}
.hero-visual svg { width: 100%; height: 100%; display: block; }
@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-visual { display: none; }
}
.hero h1 {
  font-size: var(--fs-hero);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 14ch;
  margin-bottom: 1.5rem;
}
.hero h1 em { color: var(--teal); font-style: normal; }
.hero p.lead { max-width: 52ch; margin-bottom: 2.5rem; }
.hero-decoration {
  position: absolute;
  right: -180px;
  top: -120px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--teal-light) 0%, transparent 70%);
  opacity: 0.5;
  z-index: 1;
}

/* ─── Logo image ─────────────────────────────────────────────────── */
.logo img {
  height: 88px;
  width: auto;
  display: block;
  max-width: 360px;
}
.footer .logo img {
  height: 76px;
  max-width: 320px;
}
.footer-tagline {
  font-family: var(--font-head);
  font-size: 1.0625rem;
  font-style: italic;
  color: var(--teal-bright);
  margin: 0.875rem 0 0.25rem;
  letter-spacing: -0.005em;
}
.footer-blurb {
  font-size: 0.875rem;
  color: rgba(247, 244, 237, 0.65);
  max-width: 32ch;
  margin: 0;
  line-height: 1.55;
}
@media (max-width: 720px) {
  .logo img { height: 64px; max-width: 280px; }
}

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9375rem;
  font-family: var(--font-body);
  transition: all 180ms ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { background: var(--teal); color: white; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* ─── Cards ─────────────────────────────────────────────────────── */
.cards { display: grid; gap: 1.5rem; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) { .cards-3 { grid-template-columns: 1fr; } .cards-2 { grid-template-columns: 1fr; } }

.card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid var(--rule);
  transition: transform 220ms ease, box-shadow 220ms ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 36px -16px rgba(6, 40, 53, 0.18); }
.card .number {
  display: inline-flex;
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  background: var(--teal-light);
  color: var(--teal-dim);
  font-weight: 500;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-family: var(--font-head);
  font-size: 1.0625rem;
}
.card h3 { margin-bottom: 0.75rem; }
.card p { font-size: 0.9875rem; margin-bottom: 1rem; }
.card .link-arrow { margin-top: auto; padding-top: 0.5rem; }

/* Insight cards (blog) */
.insight-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.insight-card:hover { transform: translateY(-2px); box-shadow: 0 12px 36px -16px rgba(6, 40, 53, 0.18); }
.insight-card .thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}
.insight-card .thumb .topic {
  color: var(--cream);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
}
.insight-card .body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.insight-card h3 { font-family: var(--font-head); font-weight: 500; font-size: 1.25rem; margin-bottom: 0.75rem; letter-spacing: -0.01em; }
.insight-card p { font-size: 0.9375rem; flex: 1; }
.insight-card .meta { font-size: 0.8125rem; color: var(--ink-muted); margin-bottom: 0.5rem; }

/* ─── Stats strip ───────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat .number {
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--teal-bright);
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 0.25rem;
}
.section-light .stat .number { color: var(--teal-dim); }
.stat .label { font-size: 0.875rem; color: var(--ink-muted); }
.section-dark .stat .label { color: rgba(247, 244, 237, 0.72); }

/* ─── Case cards ────────────────────────────────────────────────── */
.case-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  border-left: 4px solid var(--teal);
  border-top: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.case-card.featured { border-left-color: var(--teal-bright); background: linear-gradient(180deg, var(--teal-light) 0%, white 28%); }
.case-card .tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dim);
  margin-bottom: 0.75rem;
}
.case-card h3 { font-family: var(--font-head); font-weight: 500; font-size: 1.25rem; margin-bottom: 1rem; }
.case-card .meta { color: var(--ink-muted); font-size: 0.875rem; margin-top: 1rem; }
.case-card .meta a { color: var(--teal-dim); }

/* ─── Office grid (contact page) ────────────────────────────────── */
.office-region { margin-bottom: 2rem; }
.office-region h3 {
  font-family: var(--font-head);
  font-size: 1.0625rem;
  color: var(--teal-dim);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.office-card { margin-bottom: 1rem; }
.office-card h4 {
  margin: 0 0 0.25rem;
  font-size: 0.9875rem;
  color: var(--ink);
}
.office-card p { font-size: 0.9375rem; margin: 0; color: var(--ink-soft); }

/* ─── Footer ────────────────────────────────────────────────────── */
.footer {
  background: var(--navy-deep);
  color: rgba(247, 244, 237, 0.85);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--rule-dark);
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer .logo { color: var(--cream); }
.footer .logo span { color: var(--teal-bright); }
.footer h4 { color: var(--cream); margin-bottom: 1rem; font-size: 0.875rem; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 500; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 0.5rem; }
.footer a { color: rgba(247, 244, 237, 0.7); font-size: 0.9375rem; }
.footer a:hover { color: var(--teal-bright); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  font-size: 0.8125rem;
  color: rgba(247, 244, 237, 0.5);
  flex-wrap: wrap;
  gap: 1rem;
}

/* ─── Blog post specific ────────────────────────────────────────── */
.post-header {
  padding: 6rem 0 3rem;
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
}
.post-header .eyebrow { font-size: 0.75rem; }
.post-header h1 {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  max-width: 22ch;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}
.post-header .post-meta { display: flex; gap: 1.5rem; font-size: 0.875rem; color: var(--ink-muted); }
.post-body { padding: 4rem 0; }
.post-body .wrap-narrow > h2 {
  margin-top: 2.5rem;
  font-size: 1.5rem;
  font-family: var(--font-head);
}
.post-body .wrap-narrow > h3 { margin-top: 2rem; }
.post-body .wrap-narrow > p {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
}
.post-body .wrap-narrow > p > strong { color: var(--ink); font-weight: 500; }
.post-body blockquote {
  border-left: 3px solid var(--teal);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--font-head);
  font-size: 1.375rem;
  line-height: 1.45;
  font-style: italic;
  color: var(--ink);
}
.post-body ul, .post-body ol { padding-left: 1.5rem; margin-bottom: 1.5rem; font-size: 1.0625rem; line-height: 1.75; }
.post-body li { margin-bottom: 0.5rem; color: var(--ink); }
.post-body .callout {
  background: var(--teal-light);
  border-radius: 0.75rem;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
  font-size: 1rem;
  line-height: 1.6;
}
.post-body .callout strong { color: var(--navy); }
.post-source { padding: 1rem 0 2rem; font-size: 0.875rem; color: var(--ink-muted); }
.post-source a { color: var(--teal-dim); }

/* ─── Forms ─────────────────────────────────────────────────────── */
.form-grid { display: grid; gap: 1rem; max-width: 560px; }
.form-grid label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.375rem; }
.form-grid input, .form-grid textarea, .form-grid select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  background: white;
}
.form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
}
.form-grid textarea { min-height: 140px; resize: vertical; }
.form-success {
  background: var(--teal-light);
  color: var(--navy);
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

/* ─── Utilities ─────────────────────────────────────────────────── */
.center { text-align: center; }
.mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; } .mb-3 { margin-bottom: 3rem; }
.mt-1 { margin-top: 1rem; }   .mt-2 { margin-top: 2rem; }   .mt-3 { margin-top: 3rem; }
.divider { height: 1px; background: var(--rule); margin: 2.5rem 0; }
.flex-between { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 1rem; }

/* ─── 404 page ───────────────────────────────────────────────────── */
.notfound {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.notfound h1 {
  font-size: clamp(4rem, 12vw, 7rem);
  color: var(--teal-dim);
  margin: 0 0 1rem;
  letter-spacing: -0.04em;
}
