/* ==========================================================================
   Cost Catalyst Group — design tokens
   Palette shifted from the CCG mark's dark navy-violet toward a true navy
   (all hues sit ~215-220°, safely clear of indigo/purple) with a single
   warm gold accent pulled from the logo.
   ========================================================================== */

:root {
  --navy-deep:  #0E1B33;
  --navy-mid:   #16294B;
  --navy-line:  rgba(247, 243, 234, 0.14);
  --gold:       #D9A441;
  --gold-bright:#EEC069;
  --paper:      #F7F3EA;
  --line-on-paper: #DCD5C2;
  --ink:        #15181F;
  --slate:      #5A6270;
  --slate-on-dark: #A6ADBD;

  --font-display: "Libre Caslon Text", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1180px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy-deep);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  z-index: 1000;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.75rem;
}

#about, #services, #approach, #contact {
  scroll-margin-top: 88px;
}

.section-eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
  position: relative;
  padding-left: 1.6rem;
}
.section-eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 1.1rem;
  height: 2px;
  background: var(--gold);
}
.section-eyebrow--on-dark { color: var(--gold-bright); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 500;
  background: transparent;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color .35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(14, 27, 51, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom-color: var(--navy-line);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.15rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-mark {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  color: var(--paper);
  white-space: nowrap;
}
.brand-mono {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}
.brand-word {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate-on-dark);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 2.1rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.primary-nav a {
  color: var(--paper);
  opacity: 0.85;
  position: relative;
  padding: 0.3rem 0;
  transition: opacity 0.2s;
}
.primary-nav a:hover { opacity: 1; }
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transition: right 0.25s var(--ease);
}
.primary-nav a:hover::after { right: 0; }

.nav-cta {
  border: 1px solid var(--gold);
  padding: 0.55rem 1.1rem !important;
  border-radius: 2px;
  opacity: 1 !important;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--gold); color: var(--navy-deep); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--paper);
  margin: 0 auto;
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 7rem 1.5rem 4rem;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(14,27,51,0.72) 0%, rgba(14,27,51,0.55) 30%, rgba(14,27,51,0.72) 68%, rgba(14,27,51,0.94) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 760px;
  color: var(--paper);
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin: 0 0 1.5rem;
  opacity: 0;
  animation: rise 0.8s var(--ease) 0.1s forwards;
}

.hero-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4.5rem, 15vw, 10.5rem);
  line-height: 0.9;
  letter-spacing: -0.01em;
  color: var(--paper);
  margin: 0;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.25s forwards;
}

.hero-wordmark {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0.9rem 0 0;
  padding-left: 0.42em; /* optically balance the tracking */
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.4s forwards;
}

.hero-lede {
  margin: 2.6rem auto 0;
  max-width: 620px;
  font-size: 1.08rem;
  line-height: 1.7;
  color: rgba(247, 243, 234, 0.88);
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.55s forwards;
}

.hero-scroll {
  margin-top: 3.25rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.75s forwards;
}
.hero-scroll span {
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, var(--gold) 0%, transparent 100%);
  position: relative;
  overflow: hidden;
}
.hero-scroll span::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gold-bright);
  animation: scrollpulse 2.2s ease-in-out infinite;
}
.hero-scroll em {
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--slate-on-dark);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scrollpulse {
  0%   { top: -100%; }
  60%  { top: 100%; }
  100% { top: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .eyebrow, .hero-mark, .hero-wordmark, .hero-lede, .hero-scroll {
    opacity: 1;
    animation: none;
  }
}

/* ==========================================================================
   About
   ========================================================================== */

.about { padding: 7.5rem 0; background: var(--paper); }

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 4.5rem;
  align-items: start;
}

.about-lead h2 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  margin-bottom: 1.75rem;
}

.about-body {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #33394A;
  max-width: 46ch;
}

.principle-list {
  border-top: 1px solid var(--line-on-paper);
}
.principle-list li {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line-on-paper);
}
.principle-list h3 {
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-body);
  margin-bottom: 0.5rem;
  color: var(--navy-deep);
}
.principle-list p {
  font-size: 0.94rem;
  color: var(--slate);
  line-height: 1.6;
}

/* ==========================================================================
   Services
   ========================================================================== */

.services {
  background: var(--navy-deep);
  padding: 7.5rem 0;
  position: relative;
}

.services-head {
  max-width: 620px;
  margin-bottom: 4rem;
}
.services-head h2 {
  color: var(--paper);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--navy-line);
  border: 1px solid var(--navy-line);
}

.service-card {
  background: var(--navy-deep);
  padding: 2.75rem 2.25rem;
  transition: background 0.3s var(--ease);
}
.service-card:hover { background: var(--navy-mid); }

.service-icon {
  width: 34px;
  height: 34px;
  color: var(--gold);
  margin-bottom: 1.75rem;
}

.service-card h3 {
  color: var(--paper);
  font-size: 1.2rem;
  margin-bottom: 0.85rem;
}

.service-card p {
  color: var(--slate-on-dark);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ==========================================================================
   Approach
   ========================================================================== */

.approach { padding: 7.5rem 0; background: var(--paper); }

.approach h2 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  max-width: 620px;
  margin: 0 0 4rem;
}

.process-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  position: relative;
}
.process-list::before {
  content: "";
  position: absolute;
  top: 1.05rem;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line-on-paper);
}
.process-list li {
  position: relative;
  padding-top: 3.4rem;
}
.process-index {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy-deep);
  background: var(--gold);
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.process-list h3 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  color: var(--navy-deep);
}
.process-list p {
  font-size: 0.92rem;
  color: var(--slate);
  line-height: 1.65;
}

/* ==========================================================================
   Contact
   ========================================================================== */

.contact {
  background: var(--navy-deep);
  padding: 7.5rem 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4.5rem;
  align-items: start;
}

.contact-copy h2 {
  color: var(--paper);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  margin: 0 0 1.25rem;
}
.contact-copy p {
  color: var(--slate-on-dark);
  font-size: 1rem;
  line-height: 1.75;
  max-width: 42ch;
}
.contact-email {
  margin-top: 1.75rem;
}
.contact-email a {
  color: var(--gold-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(238, 192, 105, 0.4);
  transition: text-decoration-color 0.2s;
}
.contact-email a:hover {
  text-decoration-color: var(--gold-bright);
}

.contact-form {
  background: var(--navy-mid);
  border: 1px solid var(--navy-line);
  padding: 2.5rem;
  display: grid;
  gap: 1.35rem;
}
.form-row { display: grid; gap: 0.5rem; }
.form-row label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--slate-on-dark);
}
.form-row input,
.form-row textarea {
  background: rgba(247, 243, 234, 0.05);
  border: 1px solid var(--navy-line);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 0.8rem 0.9rem;
  border-radius: 2px;
  resize: vertical;
  transition: border-color 0.2s;
}
.form-row input::placeholder,
.form-row textarea::placeholder { color: #6E7793; }
.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--gold);
  outline: none;
}

.btn-submit {
  justify-self: start;
  background: var(--gold);
  color: var(--navy-deep);
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.9rem 1.9rem;
  border-radius: 2px;
  transition: background 0.2s;
}
.btn-submit:hover { background: var(--gold-bright); }
.btn-submit:disabled { opacity: 0.6; cursor: default; }

.form-status {
  font-size: 0.9rem;
  color: var(--gold-bright);
  min-height: 1.2em;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--navy-deep);
  border-top: 1px solid var(--navy-line);
}
.footer-inner {
  padding: 2.5rem 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand-mark--footer { color: var(--paper); }
.footer-nav {
  display: flex;
  gap: 1.75rem;
  font-size: 0.88rem;
}
.footer-nav a { color: var(--slate-on-dark); transition: color 0.2s; }
.footer-nav a:hover { color: var(--paper); }
.footer-copy {
  font-size: 0.82rem;
  color: var(--slate-on-dark);
  width: 100%;
  order: 3;
  padding-top: 1.25rem;
  border-top: 1px solid var(--navy-line);
}
.footer-email {
  color: var(--slate-on-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: transparent;
  margin-left: 1rem;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.footer-email:hover {
  color: var(--paper);
  text-decoration-color: var(--gold-bright);
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 980px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .process-list { grid-template-columns: repeat(2, 1fr); row-gap: 3.5rem; }
  .process-list::before { display: none; }
}

@media (max-width: 720px) {
  .primary-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(78vw, 320px);
    height: 100vh;
    background: var(--navy-deep);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.75rem;
    padding: 2rem 2.25rem;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    font-size: 1.1rem;
    box-shadow: -8px 0 30px rgba(0,0,0,0.35);
  }
  .primary-nav.is-open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  .nav-cta { margin-top: 0.5rem; }

  .brand-word { display: none; }

  .hero { padding-top: 6rem; min-height: 92vh; }
  .hero-lede { font-size: 1rem; }

  .about, .services, .approach, .contact { padding: 5rem 0; }

  .services-grid { grid-template-columns: 1fr; }
  .process-list { grid-template-columns: 1fr; row-gap: 2.25rem; }

  .contact-form { padding: 1.75rem; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
  .hero-mark { font-size: 3.6rem; }
  .hero-wordmark { letter-spacing: 0.28em; }
}
