/* ==========================================================================
   COLE CONSULTING — Design System
   Monochromatic base (white / off-white / charcoal / black) with a single
   electric-green accent used sparingly for emphasis + interaction.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --white:        #ffffff;
  --off-white:    #f4f3ef;
  --charcoal:     #17181a;
  --black:        #0a0a0a;
  --green:        #00ff6a;
  --green-dim:    #00b84f;
  --green-deep:   #052e1a;

  --ink:          var(--black);
  --paper:        var(--white);
  --line:         rgba(10, 10, 10, 0.14);
  --line-soft:    rgba(10, 10, 10, 0.08);
  --line-dark:    rgba(255, 255, 255, 0.16);
  --line-dark-soft: rgba(255, 255, 255, 0.09);

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Inter", "Helvetica Neue", Arial, sans-serif;

  --container: 1560px;
  --gutter: clamp(20px, 3vw, 40px);
  --edge: clamp(20px, 5vw, 64px);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 220ms;
  --dur-med: 520ms;
  --dur-slow: 900ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
img, picture, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }

html, body { height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection { background: var(--green); color: var(--black); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.98;
  text-wrap: balance;
}

.display-1 { font-size: clamp(2.8rem, 7.5vw, 8.5rem); font-weight: 800; letter-spacing: -0.035em; }
.display-2 { font-size: clamp(2.2rem, 5.5vw, 5.6rem); font-weight: 800; letter-spacing: -0.03em; }
.display-3 { font-size: clamp(1.8rem, 3.6vw, 3.4rem); font-weight: 700; }
.heading-lg { font-size: clamp(1.5rem, 2.4vw, 2.2rem); font-weight: 700; }
.heading-md { font-size: clamp(1.2rem, 1.6vw, 1.6rem); font-weight: 700; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--green);
  display: inline-block;
  flex-shrink: 0;
}
.eyebrow.on-dark { color: var(--white); }
.eyebrow.muted { color: rgba(10,10,10,0.5); }

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  line-height: 1.5;
  color: rgba(10, 10, 10, 0.72);
  font-weight: 400;
  max-width: 46ch;
}
.on-dark .lede, .lede.on-dark { color: rgba(255,255,255,0.68); }

.body-text { font-size: 1rem; line-height: 1.65; color: rgba(10,10,10,0.7); max-width: 60ch; }
.mono-num {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
}

.text-accent { color: var(--green); }
.text-dim { color: rgba(10,10,10,0.5); }

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}

.section { padding: clamp(64px, 9vw, 140px) 0; position: relative; }
.section-tight { padding: clamp(40px, 5vw, 80px) 0; }
.section.on-dark { background: var(--black); color: var(--white); }
.section.charcoal { background: var(--charcoal); color: var(--white); }
.section.off-white { background: var(--off-white); }

.border-top { border-top: 1px solid var(--line); }
.border-bottom { border-bottom: 1px solid var(--line); }
.on-dark .border-top, .on-dark.border-top { border-top-color: var(--line-dark); }
.on-dark .border-bottom, .on-dark.border-bottom { border-bottom-color: var(--line-dark); }

.vline { border-left: 1px solid var(--line); }
.on-dark .vline { border-left-color: var(--line-dark); }

/* ---------- Buttons / Links (understated, arrow-based) ---------- */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
  transition: border-color var(--dur-fast) var(--ease), gap var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.arrow-link .arrow { transition: transform var(--dur-fast) var(--ease); display: inline-block; }
.arrow-link:hover { border-color: var(--green); gap: 14px; }
.arrow-link:hover .arrow { transform: translateX(2px); color: var(--green); }
.on-dark .arrow-link { border-color: var(--line-dark); }
.on-dark .arrow-link:hover { border-color: var(--green); }

.arrow-link.lg { font-size: 1.05rem; }

.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 26px;
  border: 1px solid var(--ink);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.btn-line:hover { background: var(--ink); color: var(--white); }
.on-dark .btn-line { border-color: var(--white); }
.on-dark .btn-line:hover { background: var(--white); color: var(--black); }

.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 26px;
  border: 1px solid var(--green);
  background: var(--green);
  color: var(--black);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn-accent:hover { background: transparent; color: var(--green); }
.on-dark .btn-accent:hover { color: var(--green); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px var(--edge);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: padding var(--dur-med) var(--ease), background var(--dur-med) var(--ease), border-color var(--dur-med) var(--ease);
  border-bottom: 1px solid transparent;
  background: rgba(244, 243, 239, 0);
  backdrop-filter: blur(0px);
}
.site-header.is-scrolled {
  padding: 14px var(--edge);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
body.theme-dark .site-header.is-scrolled {
  background: rgba(10, 10, 10, 0.82);
  border-bottom-color: var(--line-dark);
}
/* backdrop-filter establishes a containing block for fixed-position descendants
   (even at blur(0)); drop it while the fixed-position mobile nav panel is open
   so the panel positions against the viewport rather than the header. */
body.nav-open .site-header { backdrop-filter: none; }
@media (max-width: 980px) {
  /* The open nav panel is dark full-screen — keep the logo/toggle visible above it */
  body.nav-open .site-header .logo,
  body.nav-open .site-header .logo * { color: var(--white); }
  body.nav-open .site-header .nav-toggle span { background: var(--white); }
}

/* Header rendered on a dark page (e.g. contact.html) */
.site-header.on-dark { color: var(--white); }
.site-header.on-dark .logo { color: var(--white); }
.site-header.on-dark .nav-toggle span { background: var(--white); }
.site-header.on-dark .nav-contact { border-color: var(--white); }
.site-header.on-dark .nav-contact:hover { background: var(--white); color: var(--black); }
.site-header.on-dark .mega-menu { background: var(--black); color: var(--white); border-bottom-color: var(--line-dark); }
.site-header.on-dark .mega-link-item { border-top-color: var(--line-dark); }
.site-header.on-dark .mega-link-item p { color: rgba(255,255,255,0.5); }
.site-header.on-dark .eyebrow { color: var(--white); }
@media (max-width: 980px) {
  .site-header.on-dark .main-nav { background: var(--black); }
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 9px;
  z-index: 110;
}
.logo .dot { width: 9px; height: 9px; background: var(--green); display: inline-block; flex-shrink: 0; }

.main-nav { display: flex; align-items: center; gap: 40px; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-item { position: relative; }
.nav-link {
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0%; height: 1px;
  background: var(--green);
  transition: width var(--dur-fast) var(--ease);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-caret { width: 8px; height: 8px; transition: transform var(--dur-fast) var(--ease); }
.nav-item.has-mega:hover .nav-caret { transform: rotate(180deg); }

.nav-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  border: 1px solid var(--ink);
  padding: 11px 20px;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.nav-contact:hover { background: var(--ink); color: var(--white); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  z-index: 110;
  width: 30px;
}
.nav-toggle span { width: 100%; height: 1.5px; background: var(--ink); transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease); }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mega menu */
.mega-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 130px var(--edge) 60px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity var(--dur-med) var(--ease), transform var(--dur-med) var(--ease), visibility var(--dur-med);
  z-index: 90;
}
.nav-item.has-mega:hover .mega-menu,
.mega-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mega-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}
.mega-col-label { grid-column: span 3; }
.mega-links { grid-column: span 6; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
.mega-link-item { border-top: 1px solid var(--line); padding-top: 16px; }
.mega-link-item .num { font-family: var(--font-display); font-size: 0.8rem; color: var(--green); font-weight: 700; }
.mega-link-item a { display: block; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; margin-top: 6px; }
.mega-link-item p { font-size: 0.85rem; color: rgba(10,10,10,0.55); margin-top: 6px; }
.mega-cta { grid-column: span 3; }

/* Mobile nav panel */
@media (max-width: 980px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    inset: 0;
    background: var(--black);
    color: var(--white);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    padding: var(--edge);
    transform: translateY(-100%);
    transition: transform var(--dur-med) var(--ease);
    z-index: 105;
  }
  body.nav-open .main-nav { transform: translateY(0); }
  .nav-links { flex-direction: column; align-items: flex-start; gap: 0; width: 100%; }
  .nav-item { width: 100%; border-top: 1px solid var(--line-dark); }
  .nav-item:last-child { border-bottom: 1px solid var(--line-dark); }
  .nav-link { padding: 22px 0; font-size: 1.6rem; font-family: var(--font-display); font-weight: 700; justify-content: space-between; }
  .mega-menu { position: static; opacity: 1; visibility: visible; transform: none; background: transparent; border: none; padding: 0 0 20px; display: none; }
  .nav-item.mega-open .mega-menu { display: block; }
  .mega-grid { grid-template-columns: 1fr; }
  .mega-col-label, .mega-links, .mega-cta { grid-column: 1 / -1; }
  .mega-links { grid-template-columns: 1fr; gap: 20px; }
  .nav-contact { margin-top: 30px; border-color: var(--white); }
  .nav-contact:hover { background: var(--white); color: var(--black); }
}

/* ---------- Media / Images ---------- */
.media {
  position: relative;
  overflow: hidden;
  background: var(--charcoal);
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08) brightness(0.92);
  transition: transform 1.4s var(--ease), filter var(--dur-slow) var(--ease);
}
.media:hover img { transform: scale(1.045); }
.media.duotone::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(0,255,106,0.14), rgba(5,10,8,0.55) 60%, rgba(0,0,0,0.65));
  mix-blend-mode: multiply;
  pointer-events: none;
}
.media.line-frame { border: 1px solid var(--line-dark-soft); }
.media-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  z-index: 2;
}
.media-caption .tag { color: var(--green); font-weight: 700; }

.ratio-portrait { aspect-ratio: 4 / 5; }
.ratio-square { aspect-ratio: 1 / 1; }
.ratio-wide { aspect-ratio: 16 / 9; }
.ratio-ultra { aspect-ratio: 21 / 9; }
.ratio-tall { aspect-ratio: 3 / 4; }
.ratio-banner { aspect-ratio: 930 / 232; }

/* ---------- Marquee ---------- */
.marquee-band {
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  background: var(--black);
  color: var(--white);
  overflow: hidden;
  padding: 16px 0;
}
.marquee-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee-track span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0 28px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 28px;
}
.marquee-track span::after { content: "—"; color: var(--green); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Cards / Lists ---------- */
.index-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: var(--gutter);
  padding: 32px 0;
  border-top: 1px solid var(--line);
  transition: background var(--dur-fast) var(--ease);
}
.index-row:last-child { border-bottom: 1px solid var(--line); }
.index-row .num { font-family: var(--font-display); font-size: 0.9rem; color: var(--green); font-weight: 700; }
.index-row h3 { font-size: clamp(1.4rem, 2.6vw, 2.1rem); }
.index-row .row-arrow { width: 34px; height: 34px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease); }
.index-row:hover .row-arrow { background: var(--green); border-color: var(--green); }
.index-row:hover .row-arrow svg { stroke: var(--black); }
.on-dark .index-row { border-color: var(--line-dark); }
.on-dark .index-row:last-child { border-color: var(--line-dark); }
.on-dark .row-arrow { border-color: var(--line-dark); }

.stat-block { padding: 28px 0; }
.stat-block .stat-num { font-family: var(--font-display); font-size: clamp(2.6rem, 5vw, 4.6rem); font-weight: 800; letter-spacing: -0.03em; }
.stat-block .stat-num .accent { color: var(--green); }
.stat-block .stat-label { margin-top: 10px; font-size: 0.8rem; letter-spacing: 0.05em; color: rgba(255,255,255,0.55); text-transform: uppercase; max-width: 22ch; }

.card-plain {
  border: 1px solid var(--line);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: border-color var(--dur-fast) var(--ease);
}
.card-plain:hover { border-color: var(--ink); }

/* Pull quote */
.pull-quote {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.pull-quote .mark { color: var(--green); }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: var(--white); padding-top: clamp(60px, 8vw, 110px); }
.footer-cta { padding-bottom: clamp(60px, 8vw, 110px); }
.footer-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); padding: 50px 0; border-top: 1px solid var(--line-dark); }
.footer-col-brand { grid-column: span 4; }
.footer-col { grid-column: span 2; display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 6px; font-family: var(--font-body); font-weight: 600; }
.footer-col a { font-size: 0.92rem; color: rgba(255,255,255,0.82); transition: color var(--dur-fast) var(--ease); }
.footer-col a:hover { color: var(--green); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 26px 0; border-top: 1px solid var(--line-dark); font-size: 0.78rem; color: rgba(255,255,255,0.45); flex-wrap: wrap; gap: 14px; }
.footer-wordmark { font-family: var(--font-display); font-weight: 800; font-size: clamp(3rem, 11vw, 9rem); letter-spacing: -0.04em; line-height: 0.85; color: var(--white); opacity: 0.98; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-40 { margin-top: 40px; }
.mt-56 { margin-top: 56px; } .mt-64 { margin-top: 64px; } .mt-80 { margin-top: 80px; }
.flex { display: flex; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-40 { gap: 40px; }
.uppercase { text-transform: uppercase; }
.hide-mobile { display: initial; }
.show-mobile { display: none; }

[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 900ms var(--ease), transform 900ms var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal="scale"] { transform: scale(1.04); }
[data-reveal="scale"].is-visible { transform: scale(1); }
[data-reveal-delay="1"] { transition-delay: 90ms; }
[data-reveal-delay="2"] { transition-delay: 180ms; }
[data-reveal-delay="3"] { transition-delay: 270ms; }
[data-reveal-delay="4"] { transition-delay: 360ms; }

/* ---------- Page hero spacing (accounts for fixed header) ---------- */
.page-top-space { padding-top: clamp(120px, 14vw, 190px); }

/* ---------- Responsive grid collapse ---------- */
@media (max-width: 980px) {
  .grid-12 > [class*="span-"] { grid-column: span 12 !important; }
  .footer-col-brand, .footer-col { grid-column: span 6; }
  .mega-links { grid-template-columns: 1fr; }
  .hide-mobile { display: none; }
  .show-mobile { display: initial; }
  .index-row { grid-template-columns: 50px 1fr auto; }
}

@media (max-width: 640px) {
  .footer-col { grid-column: span 12; }
  .index-row { grid-template-columns: 40px 1fr auto; padding: 22px 0; }
}

/* Column span helpers for the 12-col grid.
   Set only grid-column-end (not the grid-column shorthand) so these compose
   safely with .col-start-N below — the shorthand would otherwise assign the
   span to grid-column-start, which a later grid-column-start rule silently
   wipes out, collapsing the item to a single track. */
.span-3 { grid-column-end: span 3; }
.span-4 { grid-column-end: span 4; }
.span-5 { grid-column-end: span 5; }
.span-6 { grid-column-end: span 6; }
.span-7 { grid-column-end: span 7; }
.span-8 { grid-column-end: span 8; }
.span-9 { grid-column-end: span 9; }
.span-12 { grid-column-end: span 12; }
.col-start-2 { grid-column-start: 2; }
.col-start-3 { grid-column-start: 3; }
.col-start-5 { grid-column-start: 5; }
.col-start-6 { grid-column-start: 6; }
.col-start-7 { grid-column-start: 7; }
.col-start-8 { grid-column-start: 8; }
.col-start-9 { grid-column-start: 9; }

/* ---------- Contact form ---------- */
.form-field { border-bottom: 1px solid var(--line-dark); padding: 18px 0; }
.form-field label { display: block; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 10px; }
.form-field input, .form-field textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.05rem;
  font-family: var(--font-body);
  outline: none;
  resize: none;
}
.form-field input::placeholder, .form-field textarea::placeholder { color: rgba(255,255,255,0.28); }
.form-field.focused { border-bottom-color: var(--green); }

/* ---------- Scroll progress ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; background: var(--green); z-index: 200; width: 0%; }
