/* === Concept 5: Bridge Hybrid (Tighter Structure) === */
/* Heritage elegance meets forward clarity, with less whitespace. */

/* --- Custom Properties: Dual Palette --- */
:root {
  /* Heritage palette */
  --heritage-bg: #FAFAF7;
  --heritage-text: #1B2A4A;
  --heritage-accent: #3D5A80;
  --heritage-muted: #A89F91;

  /* Forward palette */
  --forward-bg: #FFFFFF;
  --forward-text: #1E293B;
  --forward-accent: #3B82F6;
  --forward-muted: #94A3B8;

  /* Shared tokens */
  --navy: #1B2A4A;
  --border: #E2E8F0;
  --brass: #B7935C;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Source Sans 3', 'Source Sans Pro', system-ui, sans-serif;
}

/* === Base === */
body {
  font-family: var(--font-sans);
  color: var(--forward-text);
  background: var(--forward-bg);
  font-size: 1rem;
}

/* ================================================================
   1. HEADER (combined with masthead)
   ================================================================ */
.c5-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--heritage-bg);
}

.c5-header.is-stuck {
  box-shadow: 0 1px 0 var(--border);
}

.c5-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}

/* Text brand: CRG | Technology Consultants */
.c5-header__brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}

.c5-header__brand-name {
  font-family: var(--font-sans);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--heritage-text);
  letter-spacing: 0.04em;
  line-height: 1;
}

.c5-header__brand-divider {
  width: 1px;
  height: 1.75rem;
  background: var(--heritage-muted);
  flex-shrink: 0;
}

.c5-header__brand-title {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--heritage-muted);
  line-height: 1.4;
}

/* Nav */
.c5-header__nav-list {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.c5-header__nav-link {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--heritage-text);
  transition: color 0.2s ease;
  position: relative;
}

.c5-header__nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--heritage-accent);
  transition: width 0.2s ease;
}

.c5-header__nav-link:hover {
  color: var(--heritage-accent);
}

.c5-header__nav-link:hover::after {
  width: 100%;
}

/* Mobile toggle color */
.c5-header .mobile-toggle {
  color: var(--heritage-text);
}

/* Meta row: services + location, below border */
.c5-header__meta {
  border-top: 1px solid var(--heritage-muted);
  padding: 0.5rem 0;
}

.c5-header__meta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.c5-header__services {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--heritage-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.c5-header__location {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--heritage-text);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ================================================================
   3. INTRO
   ================================================================ */
.c5-intro {
  background: var(--heritage-bg);
  padding: 3.5rem 0;
}

.c5-intro__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

/* Brass accent: single use, centered above headline */
.c5-intro__brass-rule {
  display: block;
  width: 48px;
  height: 2px;
  background: var(--brass);
  border: none;
  margin-bottom: 1.25rem;
}

.c5-intro__headline {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--heritage-text);
  margin-bottom: 1rem;
}

.c5-intro__body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--heritage-accent);
  max-width: 520px;
}

/* Bridge phrases (serif italic, sans bold, sans regular) */
.c5-intro__phrases {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--heritage-muted);
}

.c5-intro__phrase--serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.625rem;
  color: var(--heritage-text);
  line-height: 1.3;
}

.c5-intro__phrase--bold {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.375rem;
  color: var(--heritage-accent);
  line-height: 1.3;
}

.c5-intro__phrase--regular {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--forward-accent);
  line-height: 1.3;
}

/* ================================================================
   4. SERVICES
   ================================================================ */
.c5-services {
  background: var(--forward-bg);
  padding: 3.5rem 0;
}

/* Section label with thin underline rule */
.c5-section-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--forward-text);
  margin-bottom: 1.75rem;
}

.c5-section-label::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--border);
  margin-top: 0.5rem;
}

/* Heritage-colored section label variant */
.c5-section-label--heritage {
  color: var(--heritage-text);
}

.c5-section-label--heritage::after {
  background: var(--heritage-muted);
}

/* 2x2 service grid */
.c5-services__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Base card */
.c5-card {
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: border-color 0.25s ease;
}

.c5-card:hover {
  border-color: var(--heritage-accent);
}

/* Tag label */
.c5-card__tag {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.1875rem 0.5rem;
  margin-bottom: 0.875rem;
}

.c5-card__title {
  margin-bottom: 0.5rem;
}

.c5-card__text {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* Heritage card variant (top row) */
.c5-card--heritage {
  background: var(--heritage-bg);
}

.c5-card--heritage .c5-card__tag {
  color: var(--heritage-text);
  background: rgba(168, 159, 145, 0.15);
}

.c5-card--heritage .c5-card__title {
  font-family: var(--font-serif);
  font-size: 1.3125rem;
  font-weight: 600;
  color: var(--heritage-text);
}

.c5-card--heritage .c5-card__text {
  color: var(--heritage-accent);
}

.c5-card--heritage:hover {
  border-color: var(--heritage-accent);
}

/* Forward card variant (bottom row) */
.c5-card--forward {
  background: var(--forward-bg);
}

.c5-card--forward .c5-card__tag {
  color: var(--forward-text);
  background: rgba(59, 130, 246, 0.08);
}

.c5-card--forward .c5-card__title {
  font-family: var(--font-sans);
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--forward-text);
}

.c5-card--forward .c5-card__text {
  color: var(--forward-muted);
}

.c5-card--forward:hover {
  border-color: var(--forward-accent);
}

/* ================================================================
   5. ABOUT
   ================================================================ */
.c5-about {
  background: var(--heritage-bg);
  padding: 3.5rem 0;
}

.c5-about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.c5-about__headline {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--heritage-text);
  margin-bottom: 1rem;
}

.c5-about__body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--heritage-accent);
}

.c5-about__body p + p {
  margin-top: 0.875rem;
}

/* Trust indicators (forward palette) */
.c5-trust-list {
  display: flex;
  flex-direction: column;
}

.c5-trust-item {
  padding: 0.875rem 0;
}

.c5-trust-item:first-child {
  padding-top: 0;
}

.c5-trust-item + .c5-trust-item {
  border-top: 1px solid var(--border);
}

.c5-trust-item__phrase {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--forward-text);
  margin-bottom: 0.25rem;
}

.c5-trust-item__text {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--forward-muted);
}

/* ================================================================
   6. PROCESS
   ================================================================ */
.c5-process {
  background: var(--forward-bg);
  padding: 3.5rem 0;
}

.c5-process__heading {
  font-family: var(--font-sans);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--forward-text);
  margin-bottom: 2rem;
  text-align: center;
}

.c5-process__steps {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
}

/* Gradient timeline line */
.c5-process__steps::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: linear-gradient(
    to bottom,
    var(--heritage-muted) 0%,
    var(--forward-accent) 100%
  );
}

.c5-process__step {
  padding-left: 3rem;
  position: relative;
}

/* Dot marker */
.c5-process__step::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0.4em;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid currentColor;
  background: var(--forward-bg);
}

.c5-process__step-name {
  display: block;
  margin-bottom: 0.25rem;
}

.c5-process__step-desc {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.65;
}

/* Step 1: Heritage */
.c5-process__step--heritage {
  color: var(--heritage-text);
}

.c5-process__step--heritage::before {
  border-color: var(--heritage-muted);
}

.c5-process__step--heritage .c5-process__step-name {
  font-family: var(--font-serif);
  font-size: 1.3125rem;
  font-weight: 600;
}

.c5-process__step--heritage .c5-process__step-desc {
  color: var(--heritage-accent);
}

/* Step 2: Transitional */
.c5-process__step--mid {
  color: var(--heritage-accent);
}

.c5-process__step--mid::before {
  border-color: var(--heritage-accent);
}

.c5-process__step--mid .c5-process__step-name {
  font-family: var(--font-sans);
  font-size: 1.1875rem;
  font-weight: 600;
}

.c5-process__step--mid .c5-process__step-desc {
  color: var(--heritage-accent);
}

/* Step 3: Forward */
.c5-process__step--forward {
  color: var(--forward-text);
}

.c5-process__step--forward::before {
  border-color: var(--forward-accent);
}

.c5-process__step--forward .c5-process__step-name {
  font-family: var(--font-sans);
  font-size: 1.1875rem;
  font-weight: 700;
}

.c5-process__step--forward .c5-process__step-desc {
  color: var(--forward-muted);
}

/* ================================================================
   7. CTA
   ================================================================ */
.c5-cta {
  background: var(--forward-bg);
  padding: 3rem 0;
  text-align: center;
}

.c5-cta__heading {
  font-family: var(--font-sans);
  font-size: 1.875rem;
  font-weight: 600;
  color: var(--forward-text);
  margin-bottom: 1.5rem;
}

/* Shared button */
.c5-btn {
  display: inline-block;
  padding: 0.8125rem 1.875rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
  text-align: center;
  letter-spacing: 0.01em;
}

.c5-btn:hover {
  opacity: 0.88;
}

.c5-btn--signal {
  background: var(--forward-accent);
  color: #FFFFFF;
}

/* ================================================================
   8. CONTACT
   ================================================================ */
.c5-contact {
  background: var(--heritage-bg);
  padding: 2.5rem 0;
}

.c5-contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.c5-contact__heading {
  font-family: var(--font-serif);
  font-size: 1.875rem;
  font-weight: 600;
  color: var(--heritage-text);
  margin-bottom: 0.75rem;
}

.c5-contact__details {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--heritage-accent);
}

.c5-contact__details strong {
  color: var(--heritage-text);
  font-weight: 600;
}

.c5-contact__details p + p {
  margin-top: 0.25rem;
}

/* Contact form */
.c5-contact__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.c5-contact__form .form-field label {
  font-family: var(--font-sans);
  color: var(--heritage-text);
}

.c5-contact__form .form-field input,
.c5-contact__form .form-field textarea,
.c5-contact__form .form-field select {
  background: var(--forward-bg);
  border-color: var(--border);
}

.c5-contact__form .form-field input:focus,
.c5-contact__form .form-field textarea:focus,
.c5-contact__form .form-field select:focus {
  border-color: var(--forward-accent);
  box-shadow: 0 0 0 1px var(--forward-accent);
}

.c5-contact__submit {
  align-self: flex-start;
}

/* ================================================================
   9. FOOTER
   ================================================================ */
.c5-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  padding: 2.5rem 0;
  position: relative;
  overflow: hidden;
}

/* Ghost bracket mark */
.c5-footer__ghost {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-sans);
  font-size: 4rem;
  font-weight: 300;
  color: #FFFFFF;
  opacity: 0.06;
  pointer-events: none;
  user-select: none;
  letter-spacing: 0.1em;
  white-space: nowrap;
  line-height: 1;
}

.c5-footer__inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.c5-footer__name {
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.875rem;
}

.c5-footer__nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.c5-footer__nav a {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s ease;
}

.c5-footer__nav a:hover {
  color: rgba(255, 255, 255, 0.9);
}

.c5-footer__service-area {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.c5-footer__copy {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.3);
}

/* ================================================================
   SCROLL REVEAL
   ================================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================================
   RESPONSIVE: 1200px
   ================================================================ */
@media (max-width: 1200px) {
  .c5-intro__headline {
    font-size: 2.125rem;
  }

  .c5-about__headline {
    font-size: 1.75rem;
  }

  .c5-process__heading {
    font-size: 1.75rem;
  }

  .c5-about__grid {
    gap: 2rem;
  }

  .c5-contact__grid {
    gap: 2rem;
  }
}

/* ================================================================
   RESPONSIVE: 768px
   ================================================================ */
@media (max-width: 768px) {
  /* Mobile nav: fixed slide-in from right */
  .c5-header__nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 260px;
    height: 100vh;
    background: var(--heritage-bg);
    border-left: 1px solid var(--heritage-muted);
    flex-direction: column;
    align-items: flex-start;
    padding: 4.5rem 2rem 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
  }

  .c5-header__nav.is-open {
    transform: translateX(0);
  }

  .c5-header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .c5-header__nav-link {
    font-size: 1.0625rem;
  }

  /* Header meta row */
  .c5-header__meta-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  /* Intro */
  .c5-intro {
    padding: 2.5rem 0;
  }

  .c5-intro__grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .c5-intro__headline {
    font-size: 1.875rem;
  }

  .c5-intro__phrase--serif {
    font-size: 1.375rem;
  }

  .c5-intro__phrase--bold {
    font-size: 1.125rem;
  }

  .c5-intro__phrase--regular {
    font-size: 1.0625rem;
  }

  /* Services */
  .c5-services {
    padding: 2.5rem 0;
  }

  .c5-services__grid {
    grid-template-columns: 1fr;
  }

  /* About */
  .c5-about {
    padding: 2.5rem 0;
  }

  .c5-about__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .c5-about__headline {
    font-size: 1.625rem;
  }

  /* Process */
  .c5-process {
    padding: 2.5rem 0;
  }

  .c5-process__heading {
    font-size: 1.625rem;
  }

  /* CTA */
  .c5-cta {
    padding: 2.5rem 0;
  }

  .c5-cta__heading {
    font-size: 1.5rem;
  }

  /* Contact */
  .c5-contact {
    padding: 2rem 0;
  }

  .c5-contact__grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .c5-contact__heading {
    font-size: 1.5rem;
  }

  /* Footer */
  .c5-footer {
    padding: 2rem 0;
  }
}

/* ================================================================
   RESPONSIVE: 480px
   ================================================================ */
@media (max-width: 480px) {
  .c5-header__inner {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .c5-header__brand-name {
    font-size: 1.125rem;
  }

  .c5-header__brand-divider {
    height: 1.375rem;
  }

  .c5-header__brand-title {
    font-size: 0.5625rem;
  }

  .c5-header__services {
    font-size: 0.5625rem;
  }

  .c5-header__location {
    font-size: 0.5625rem;
  }

  .c5-intro__headline {
    font-size: 1.625rem;
  }

  .c5-intro__brass-rule {
    width: 36px;
  }

  .c5-card {
    padding: 1.25rem;
  }

  .c5-about__headline {
    font-size: 1.375rem;
  }

  .c5-process__heading {
    font-size: 1.375rem;
  }

  .c5-cta__heading {
    font-size: 1.25rem;
  }

  .c5-contact__heading {
    font-size: 1.25rem;
  }

  .c5-btn {
    width: 100%;
  }

  .c5-contact__submit {
    align-self: stretch;
  }

  .c5-footer__nav {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .c5-footer__ghost {
    font-size: 3rem;
  }
}
