/*
  Confident C.A.R.E. website refinement
  Purpose: clearer navigation, calmer hierarchy and a premium editorial feel
  without removing existing routes, pages, course content or resources.
*/

:root {
  --ccm-ink: #1b2a23;
  --ccm-sage: #2f473d;
  --ccm-sage-soft: #476658;
  --ccm-gold: #b89652;
  --ccm-gold-pale: #e9ddbd;
  --ccm-paper: #fbfaf6;
  --ccm-cream: #f2ede3;
  --ccm-white: #ffffff;
  --ccm-muted: #657068;
  --ccm-line: rgba(47, 71, 61, 0.16);
  --ccm-shadow: 0 18px 48px rgba(27, 42, 35, 0.09);
  --font-display: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --font-sans: "DM Sans", Inter, Arial, sans-serif;
}

html {
  scroll-padding-top: 92px;
}

body {
  background: var(--ccm-paper) !important;
  color: var(--ccm-ink);
  font-family: var(--font-sans);
}

h1,
h2,
h3,
h4,
h5,
h6,
.nw-brand strong,
.nw-footer strong {
  font-family: var(--font-display) !important;
  letter-spacing: -0.035em;
}

p {
  text-wrap: pretty;
}

/* ── Header and navigation ─────────────────────────────────────────────── */
.nw-header {
  grid-template-columns: minmax(250px, 1fr) auto auto !important;
  gap: 20px !important;
  min-height: 82px;
  padding: 13px clamp(20px, 4vw, 58px) !important;
  background: rgba(251, 250, 246, 0.97) !important;
  border-bottom: 1px solid var(--ccm-line) !important;
  box-shadow: 0 8px 28px rgba(27, 42, 35, 0.035);
}

.nw-mark {
  width: 44px !important;
  height: 44px !important;
  border-radius: 3px 12px 12px 3px !important;
  background: var(--ccm-sage) !important;
  color: var(--ccm-gold-pale) !important;
  box-shadow: 5px 5px 0 rgba(184, 150, 82, 0.13);
}

.nw-brand strong {
  color: var(--ccm-ink) !important;
  font-size: 0.98rem !important;
}

.nw-brand small {
  color: var(--ccm-muted) !important;
  font-size: 0.72rem !important;
}

.nw-nav {
  gap: clamp(10px, 1.45vw, 22px) !important;
  font-size: 0.78rem !important;
  font-weight: 700;
}

.nw-nav a {
  position: relative;
  padding: 10px 0 !important;
  border: 0 !important;
  white-space: nowrap;
}

.nw-nav a::after {
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 1px;
  background: var(--ccm-gold);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nw-nav a:hover::after,
.nw-nav a.active::after {
  transform: scaleX(1);
}

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

.nw-talk {
  padding: 10px 17px !important;
  border-radius: 5px !important;
  border-color: var(--ccm-sage) !important;
  background: var(--ccm-sage) !important;
  color: #fff !important;
}

.nw-talk:hover {
  background: var(--ccm-ink) !important;
}

.nw-mobile-menu {
  padding-top: 8px !important;
  background: rgba(251, 250, 246, 0.99) !important;
}

.nw-mobile-menu a {
  padding: 14px 0 !important;
}

.nw-mobile-contact {
  color: var(--ccm-sage) !important;
  font-weight: 800 !important;
}

/* ── Homepage hero ────────────────────────────────────────────────────── */
.nw-hero,
.ccm-home-hero {
  width: min(100%, 1500px);
  min-height: 570px !important;
  margin: 0 auto;
  padding: clamp(72px, 8vw, 118px) clamp(24px, 7vw, 110px) !important;
  grid-template-columns: minmax(0, 1.28fr) minmax(310px, 0.72fr) !important;
  gap: clamp(48px, 7vw, 100px) !important;
  background:
    linear-gradient(90deg, rgba(184, 150, 82, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, #fbfaf6 0%, #f4f0e7 100%) !important;
  background-size: 72px 100%, auto !important;
  border-bottom: 1px solid var(--ccm-line);
}

.nw-hero h1 {
  max-width: 900px;
  color: var(--ccm-ink) !important;
  font-size: clamp(3rem, 5.6vw, 5.25rem) !important;
  line-height: 1.02 !important;
}

.nw-intro {
  max-width: 760px !important;
  margin-top: 26px !important;
  color: #526159 !important;
  font-size: clamp(1.05rem, 1.5vw, 1.28rem) !important;
}

.nw-eyebrow {
  color: var(--ccm-gold) !important;
  letter-spacing: 0.18em !important;
}

.nw-actions {
  margin-top: 32px !important;
}

.nw-btn {
  min-height: 50px !important;
  padding: 0 22px !important;
  border-radius: 5px !important;
  font-size: 0.92rem;
}

.nw-btn.primary {
  background: var(--ccm-sage) !important;
  box-shadow: 0 12px 28px rgba(47, 71, 61, 0.18);
}

.nw-btn.secondary {
  border-color: var(--ccm-sage) !important;
  background: rgba(255, 255, 255, 0.55);
}

.nw-hero aside,
.ccm-hero-note {
  position: relative;
  padding: clamp(32px, 4vw, 52px) !important;
  border-radius: 4px 22px 22px 4px !important;
  background: var(--ccm-sage) !important;
  box-shadow: 14px 14px 0 rgba(184, 150, 82, 0.12), var(--ccm-shadow) !important;
}

.nw-hero aside::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--ccm-gold);
  content: "";
}

.nw-hero aside h2 {
  font-size: clamp(1.75rem, 2.8vw, 2.55rem) !important;
}

.ccm-price-line {
  margin-top: 24px;
  color: var(--ccm-sage-soft);
  font-size: 0.95rem;
  font-weight: 700;
}

.ccm-price-line a,
.ccm-text-link {
  color: var(--ccm-sage);
  font-weight: 800;
  text-decoration-color: var(--ccm-gold);
  text-underline-offset: 4px;
}

/* ── Clear starting routes ────────────────────────────────────────────── */
.nw-routes,
.nw-products,
.ccm-starting-points {
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: clamp(72px, 8vw, 110px) clamp(24px, 7vw, 100px) !important;
}

.nw-section-head {
  max-width: 820px !important;
  margin-bottom: 38px !important;
}

.nw-section-head h2,
.nw-ecosystem h2,
.nw-cta h2,
.nw-switch h2 {
  color: var(--ccm-ink);
  font-size: clamp(2.1rem, 3.7vw, 3.6rem) !important;
  line-height: 1.12 !important;
}

.nw-route-grid,
.ccm-four-lanes {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 18px !important;
}

.nw-route-card,
.ccm-four-lanes .nw-route-card {
  min-height: 285px !important;
  padding: clamp(26px, 3vw, 38px) !important;
  border-radius: 8px !important;
  border-color: var(--ccm-line) !important;
  box-shadow: 0 10px 30px rgba(27, 42, 35, 0.045);
}

.nw-route-card:nth-child(5) {
  grid-column: auto !important;
  min-height: 285px !important;
}

.nw-route-card::after {
  right: -130px !important;
  bottom: -155px !important;
  opacity: 0.42 !important;
}

.nw-route-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--ccm-gold);
  content: "";
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 180ms ease;
}

.nw-route-card:hover,
.nw-route-card:focus-visible {
  border-color: rgba(184, 150, 82, 0.55) !important;
  box-shadow: var(--ccm-shadow) !important;
  transform: translateY(-4px) !important;
}

.nw-route-card:hover::before,
.nw-route-card:focus-visible::before {
  transform: scaleY(1);
}

.nw-route-card h3 {
  max-width: 620px;
  font-size: clamp(1.65rem, 2.4vw, 2.35rem) !important;
  line-height: 1.15;
}

.nw-route-card b {
  color: var(--ccm-sage) !important;
  font-size: 0.9rem;
}

/* ── Editorial workshop showcase ─────────────────────────────────────── */
.ccm-editorial-section {
  display: grid;
  width: min(100% - 48px, 1300px);
  margin: 0 auto;
  padding: clamp(70px, 8vw, 110px) 0;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(38px, 6vw, 78px);
  border-top: 1px solid var(--ccm-line);
}

.ccm-editorial-intro {
  align-self: start;
  position: sticky;
  top: 118px;
}

.ccm-editorial-intro h2 {
  margin: 0 0 22px;
  color: var(--ccm-ink);
  font-size: clamp(2.1rem, 3.6vw, 3.55rem);
  line-height: 1.1;
}

.ccm-editorial-intro > p:not(.nw-eyebrow) {
  color: var(--ccm-muted);
  line-height: 1.75;
}

.ccm-book-shelf {
  display: grid;
  gap: 20px;
}

.ccm-book-card {
  display: grid;
  min-height: 260px;
  padding: 22px;
  grid-template-columns: minmax(150px, 205px) 1fr;
  gap: 28px;
  align-items: center;
  border: 1px solid var(--ccm-line);
  border-radius: 8px;
  color: inherit;
  background: var(--ccm-white);
  box-shadow: 0 12px 30px rgba(27, 42, 35, 0.05);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.ccm-book-card:hover {
  border-color: rgba(184, 150, 82, 0.62);
  box-shadow: var(--ccm-shadow);
  transform: translateY(-4px);
}

.ccm-book-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 3px 9px 9px 3px;
  box-shadow: 10px 12px 0 rgba(184, 150, 82, 0.11), 0 16px 30px rgba(27, 42, 35, 0.14);
}

.ccm-book-card h3 {
  margin: 8px 0 12px;
  color: var(--ccm-ink);
  font-size: clamp(1.55rem, 2.6vw, 2.25rem);
}

.ccm-book-card p:not(.nw-mini) {
  color: var(--ccm-muted);
  line-height: 1.65;
}

.ccm-book-card b {
  color: var(--ccm-sage);
  font-size: 0.9rem;
}

/* ── Method panel ─────────────────────────────────────────────────────── */
.nw-ecosystem,
.ccm-ecosystem {
  width: min(100% - 48px, 1380px);
  margin: 0 auto !important;
  padding: clamp(48px, 7vw, 82px) !important;
  border-radius: 6px 28px 28px 6px !important;
  background: var(--ccm-sage) !important;
  box-shadow: 14px 14px 0 rgba(184, 150, 82, 0.11);
}

.nw-models span {
  border-radius: 5px !important;
  background: rgba(255, 255, 255, 0.035);
}

/* ── Contact section ──────────────────────────────────────────────────── */
.ccm-contact-section {
  display: grid;
  width: min(100% - 48px, 1240px);
  margin: 0 auto;
  padding: clamp(76px, 9vw, 120px) 0;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(34px, 6vw, 76px);
  align-items: start;
}

.ccm-contact-copy h2 {
  margin: 0 0 22px;
  color: var(--ccm-ink);
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: 1.08;
}

.ccm-contact-copy > p:not(.nw-eyebrow) {
  color: var(--ccm-muted);
  line-height: 1.75;
}

.ccm-contact-details {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.ccm-contact-details a {
  color: var(--ccm-sage);
  font-weight: 800;
  text-decoration-color: var(--ccm-gold);
  text-underline-offset: 4px;
}

.ccm-enquiry-card,
#contact .cc-wrap > div:last-child > div {
  padding: clamp(26px, 4vw, 42px) !important;
  border: 1px solid var(--ccm-line) !important;
  border-radius: 8px !important;
  background: var(--ccm-white) !important;
  box-shadow: var(--ccm-shadow) !important;
}

.ccm-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.ccm-form-grid label {
  display: grid;
  gap: 7px;
}

.ccm-form-grid label > span {
  color: var(--ccm-ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.ccm-form-wide {
  grid-column: 1 / -1;
}

.ccm-form-grid input,
.ccm-form-grid textarea,
#contact input,
#contact textarea,
#contact select {
  width: 100%;
  padding: 13px 14px !important;
  border: 1px solid rgba(47, 71, 61, 0.2) !important;
  border-radius: 5px !important;
  color: var(--ccm-ink) !important;
  background: #fdfcf9 !important;
  font: inherit;
}

.ccm-form-grid textarea {
  min-height: 145px;
  resize: vertical;
}

.ccm-form-grid input:focus,
.ccm-form-grid textarea:focus,
#contact input:focus,
#contact textarea:focus,
#contact select:focus {
  outline: 3px solid rgba(184, 150, 82, 0.22) !important;
  border-color: var(--ccm-gold) !important;
}

.ccm-submit {
  width: 100%;
  margin-top: 20px;
  border: 0;
}

.ccm-form-success {
  padding: 30px 10px;
  text-align: center;
}

.ccm-form-success > span {
  color: var(--ccm-gold);
  font-size: 2rem;
}

/* ── Existing route and product pages ────────────────────────────────── */
.nw-route-hero {
  min-height: 440px !important;
  background: linear-gradient(135deg, #fbfaf6, #eee8dc) !important;
  border-bottom: 1px solid var(--ccm-line);
}

.nw-route-hero h1 {
  max-width: 960px;
  font-size: clamp(2.8rem, 6vw, 5.5rem) !important;
}

.nw-circle {
  border-radius: 4px 22px 22px 4px !important;
  background: var(--ccm-sage) !important;
  box-shadow: 10px 10px 0 rgba(184, 150, 82, 0.12);
}

.nw-product-grid article,
.nw-switch a {
  border-radius: 7px !important;
  box-shadow: 0 10px 26px rgba(27, 42, 35, 0.045);
}

.nw-switch {
  border-radius: 7px !important;
}

/* Keep SEO support present but visually secondary. */
.ccm-seo-supporting-copy,
.seo-training-section {
  border-top: 1px solid var(--ccm-line);
}

.ccm-seo-supporting-copy > section,
.seo-training-section {
  background: #f5f1e8 !important;
}

.ccm-seo-supporting-copy article,
.ccm-seo-supporting-copy [class*="rounded-"] {
  border-radius: 7px !important;
  box-shadow: none !important;
}

.cc-floating {
  display: none !important;
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.nw-footer {
  padding-top: 56px !important;
  background: var(--ccm-ink) !important;
}

.nw-footer-intro,
.nw-footer > div:first-child {
  max-width: 340px;
}

.nw-footer-col h4 {
  color: var(--ccm-gold-pale) !important;
}

/* ── Accessibility ───────────────────────────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--ccm-gold) !important;
  outline-offset: 4px !important;
}

@media (max-width: 1220px) {
  .nw-header {
    grid-template-columns: 1fr auto !important;
  }

  .nw-nav {
    display: none !important;
  }

  .nw-mobile-toggle {
    display: block !important;
  }
}

@media (min-width: 1221px) {
  .nw-mobile-toggle {
    display: none !important;
  }
}

@media (max-width: 860px) {
  .nw-hero,
  .ccm-home-hero,
  .ccm-editorial-section,
  .ccm-contact-section {
    grid-template-columns: 1fr !important;
  }

  .ccm-editorial-intro {
    position: static;
  }

  .ccm-book-card {
    grid-template-columns: minmax(115px, 165px) 1fr;
  }

  .nw-route-grid,
  .ccm-four-lanes {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 620px) {
  .nw-header {
    min-height: 72px;
  }

  .nw-hero,
  .ccm-home-hero {
    padding: 58px 20px !important;
  }

  .nw-hero h1 {
    font-size: clamp(2.45rem, 13vw, 3.7rem) !important;
  }

  .nw-actions,
  .nw-actions .nw-btn {
    width: 100%;
  }

  .ccm-book-card {
    grid-template-columns: 1fr;
  }

  .ccm-book-card img {
    width: min(72%, 230px);
    margin: 0 auto;
  }

  .ccm-form-grid {
    grid-template-columns: 1fr;
  }

  .ccm-form-wide {
    grid-column: auto;
  }

  .ccm-editorial-section,
  .ccm-contact-section,
  .nw-ecosystem,
  .ccm-ecosystem {
    width: min(100% - 28px, 1380px);
  }
}

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