/* =========================================================
   CODA INTELLIGENCE — Design System
   Solid colors only. No gradients, no glass, no blur.
========================================================= */

:root {
  /* Palette */
  --onyx: #121212;
  --oxford: #14213D;
  --alabaster: #F8F9FA;
  --cognac: #8B512F;
  --cognac-hover: #9E5D37;
  --cognac-active: #7A4628;

  /* Derived solid tones */
  --text-muted: #B8BDC6;
  --text-dim: #8A909B;
  --line-on-onyx: #2A2A2A;
  --line-on-oxford: #2A3858;
  --oxford-deep: #101A31;

  /* Typography */
  --font-head: 'Bitter', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --fs-h1: clamp(2.25rem, 1.4rem + 3.6vw, 4.25rem);
  --fs-h2: clamp(1.6rem, 1.2rem + 1.7vw, 2.6rem);
  --fs-h3: clamp(1.1rem, 1rem + 0.4vw, 1.3rem);
  --fs-lead: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-eyebrow: 0.78rem;

  /* Layout */
  --container: 1200px;
  --container-narrow: 820px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4.5rem, 9vw, 8rem);
  --header-h: 76px;
  --radius: 2px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 600ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  background: var(--onyx);
  color: var(--alabaster);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }

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

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--cognac); color: var(--alabaster);
  padding: .6rem 1rem; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--alabaster);
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); line-height: 1.22; }
h3 { font-size: var(--fs-h3); line-height: 1.35; font-weight: 600; }

p { color: var(--text-muted); }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cognac);
  margin-bottom: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: .75rem;
}
.eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--cognac);
}
.center .eyebrow, .eyebrow.center { justify-content: center; }

.lead { font-size: var(--fs-lead); line-height: 1.7; color: var(--text-muted); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container.narrow { max-width: var(--container-narrow); }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

.section { padding-block: var(--section-y); }
.section-onyx { background: var(--onyx); }
.section-oxford { background: var(--oxford); }

.section-head { max-width: 820px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 + .lead { margin-top: 1.5rem; }

.section-cta { margin-top: clamp(2.5rem, 5vw, 4rem); }
.section-cta.center { display: flex; justify-content: center; }

.grid { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
  padding: .95rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--cognac); color: var(--alabaster); border-color: var(--cognac); }
.btn-primary:hover { background: var(--cognac-hover); border-color: var(--cognac-hover); }
.btn-primary:active { background: var(--cognac-active); }
.btn-outline { border-color: var(--alabaster); color: var(--alabaster); }
.btn-outline:hover { background: var(--alabaster); color: var(--onyx); }
.btn-sm { padding: .65rem 1.2rem; font-size: .875rem; }
.btn-lg { padding: 1.15rem 2.25rem; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--onyx);
  border-bottom: 1px solid var(--line-on-onyx);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand { display: inline-flex; align-items: center; gap: .8rem; }
.brand-mark { width: auto; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.01em;
  color: var(--alabaster);
}
.brand-tag {
  font-size: .68rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .02em;
  margin-top: .3rem;
}

.site-nav ul { display: flex; align-items: center; gap: 2.25rem; }
.site-nav a:not(.btn) {
  font-size: .92rem;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  padding-block: .4rem;
  transition: color 200ms var(--ease);
}
.site-nav a:not(.btn)::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--cognac);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms var(--ease);
}
.site-nav a:not(.btn):hover,
.site-nav a:not(.btn).is-active { color: var(--alabaster); }
.site-nav a:not(.btn):hover::after,
.site-nav a:not(.btn).is-active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 10px; right: 10px;
  height: 2px; background: var(--alabaster);
  transition: transform 300ms var(--ease), opacity 200ms var(--ease);
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.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); }

/* ---------- Page transitions ---------- */
.page {
  opacity: 1;
  transition: opacity 350ms var(--ease);
}
.page.is-leaving { opacity: 0; }
.page.is-entering { opacity: 0; }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  padding-block: clamp(4rem, 10vw, 7rem);
}
.hero-inner { max-width: 980px; text-align: center; }
.hero .eyebrow { justify-content: center; }
.hero h1 { margin-bottom: 2rem; }
.accent-line { display: block; color: var(--alabaster); }
.accent-line::after {
  content: '';
  display: block;
  width: 72px; height: 3px;
  background: var(--cognac);
  margin: 1.75rem auto 0;
}
.hero-sub {
  font-size: var(--fs-lead);
  max-width: 760px;
  margin: 0 auto 2.75rem;
}
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.micro-copy { font-size: var(--fs-small); color: var(--text-dim); max-width: 440px; }

/* ---------- Pain (Oxford) ---------- */
.pain-item {
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-on-oxford);
}
.pain-item h3 { margin: 1.25rem 0 .9rem; }
.pain-item p { font-size: .95rem; }

.icon {
  width: 32px; height: 32px;
  fill: none;
  stroke: var(--alabaster);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-lg { width: 48px; height: 48px; }

/* ---------- Cards ---------- */
.card {
  background: var(--oxford);
  border: 1px solid var(--line-on-oxford);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  transition: border-color 250ms var(--ease);
}
.card:hover { border-color: var(--cognac); }
.card-index {
  display: block;
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 600;
  color: var(--cognac);
  margin-bottom: 1.25rem;
}
.card h3 { margin-bottom: .85rem; }
.card p { font-size: .97rem; }

/* ---------- Page intro ---------- */
.page-intro { padding-top: clamp(5rem, 10vw, 8rem); }
.page-intro h1 { margin-bottom: 1.75rem; }

/* ---------- Manifesto ---------- */
.manifesto-list {
  margin: 3.5rem 0;
  border-top: 1px solid var(--line-on-onyx);
}
.manifesto-list li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line-on-onyx);
}
.manifesto-list .num {
  font-family: var(--font-head);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  color: var(--cognac);
}
.manifesto-list h3 { margin-bottom: .4rem; }
.closing {
  font-size: var(--fs-lead);
  color: var(--alabaster);
  padding-left: 1.5rem;
  border-left: 3px solid var(--cognac);
}

/* ---------- Contrast table ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-on-oxford);
  background: var(--oxford-deep);
}
.contrast-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: .95rem;
}
.contrast-table th,
.contrast-table td {
  text-align: left;
  vertical-align: top;
  padding: 1.35rem 1.5rem;
  border-bottom: 1px solid var(--line-on-oxford);
}
.contrast-table tr:last-child th,
.contrast-table tr:last-child td { border-bottom: 0; }
.contrast-table th + th,
.contrast-table td,
.contrast-table th + td { border-left: 1px solid var(--line-on-oxford); }
.contrast-table thead th {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--onyx);
}
.contrast-table thead th.col-coda { color: var(--alabaster); background: var(--cognac); }
.contrast-table tbody th {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--alabaster);
  width: 22%;
}
.contrast-table td { color: var(--text-dim); width: 39%; }
.contrast-table td.col-coda { color: var(--alabaster); font-weight: 500; }

/* ---------- Workflow ---------- */
.workflow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
  counter-reset: step;
}
.step { position: relative; padding-top: 2.75rem; }
.step::before {
  /* node */
  content: '';
  position: absolute; top: 0; left: 0;
  width: 13px; height: 13px;
  background: var(--cognac);
  border-radius: 50%;
  z-index: 1;
}
.step::after {
  /* connector */
  content: '';
  position: absolute; top: 6px; left: 0; right: -2rem;
  height: 1px;
  background: var(--line-on-onyx);
}
.step:last-child::after { right: 0; }
.step-marker {
  display: block;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cognac);
  margin-bottom: .75rem;
}
.step h3 { margin-bottom: .85rem; }
.step p { font-size: .95rem; }

/* ---------- Deliverables ---------- */
.deliverables { border-top: 1px solid var(--line-on-oxford); }
.deliverable {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 2rem;
  padding: clamp(2rem, 4vw, 3rem) 0;
  border-bottom: 1px solid var(--line-on-oxford);
}
.deliverable-num {
  font-family: var(--font-head);
  font-size: clamp(2rem, 1.6rem + 1.5vw, 3rem);
  font-weight: 700;
  line-height: 1;
  color: var(--cognac);
}
.deliverable h3 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem); margin-bottom: 1rem; }
.deliverable > div > p { max-width: 760px; }

.detail-list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-muted);
  margin-bottom: .6rem;
  max-width: 760px;
}
.detail-list li::before {
  content: '';
  position: absolute; left: 0; top: .8em;
  width: 8px; height: 1px;
  background: var(--cognac);
}

.vault-stages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
.stage {
  background: var(--onyx);
  border: 1px solid var(--line-on-oxford);
  border-top: 2px solid var(--cognac);
  padding: 1.25rem 1.25rem 1.4rem;
  display: flex; flex-direction: column; gap: .35rem;
}
.stage strong { font-family: var(--font-head); font-weight: 600; color: var(--alabaster); }
.stage span { font-size: var(--fs-small); color: var(--text-dim); }

/* Scope of work items (Solutions page) */
.scope-list { display: grid; gap: 1.25rem; max-width: 820px; }
.scope-item {
  padding-left: 1.25rem;
  border-left: 1px solid var(--line-on-oxford);
}
.scope-item dt {
  font-weight: 700;
  color: var(--alabaster);
  margin-bottom: .3rem;
}
.scope-item dd { color: var(--text-muted); font-size: .97rem; }

.scope-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: none;
}
.scope-grid .scope-item {
  background: var(--onyx);
  border: 1px solid var(--line-on-oxford);
  border-top: 2px solid var(--cognac);
  padding: 1.25rem 1.35rem 1.4rem;
}
.scope-grid .scope-item dt { font-family: var(--font-head); font-weight: 600; }
.qty {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--cognac);
  margin-right: .2rem;
}

.manifesto-lead { margin-top: 1.25rem; }

/* ---------- Outcomes ---------- */
.panel {
  background: var(--oxford);
  border: 1px solid var(--line-on-oxford);
  padding: clamp(1.75rem, 3vw, 2.5rem);
}
.panel h3 {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line-on-oxford);
}
.check-list li {
  display: flex;
  gap: .9rem;
  padding: .55rem 0;
  color: var(--alabaster);
  font-weight: 500;
}
.check-list li::before {
  content: '';
  flex: 0 0 auto;
  width: 14px; height: 8px;
  margin-top: .55em;
  border-left: 1.5px solid var(--cognac);
  border-bottom: 1.5px solid var(--cognac);
  transform: rotate(-45deg);
}
.check-list strong { font-weight: 700; }
.check-list span { color: var(--text-muted); font-weight: 400; }
.check-list span strong { color: var(--alabaster); }

/* ---------- Booking ---------- */
.booking-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.booking-info h2 { margin-bottom: 2rem; }
.meeting {
  padding: 1.75rem 0;
  border-top: 1px solid var(--line-on-oxford);
}
.meeting:last-child { border-bottom: 1px solid var(--line-on-oxford); }
.meeting-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: .75rem;
}
.meeting-label {
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cognac);
}
.meeting-time {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--alabaster);
  border: 1px solid var(--line-on-oxford);
  padding: .2rem .7rem;
}
.meeting h3 { margin-bottom: .6rem; }
.meeting p { font-size: .95rem; }

.booking-widget {
  background: var(--onyx);
  border: 1px solid var(--line-on-oxford);
  min-height: 640px;
  display: flex;
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}
.booking-widget iframe { width: 100%; min-height: 640px; border: 0; }
.widget-placeholder {
  flex: 1;
  margin: 1.25rem;
  border: 1px dashed var(--line-on-oxford);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: .75rem;
  text-align: center;
  padding: 2rem;
}
.widget-title { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; color: var(--alabaster); margin-top: .5rem; }
.widget-note { font-size: var(--fs-small); color: var(--text-dim); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--onyx);
  border-top: 1px solid var(--line-on-onyx);
  padding-block: 3rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem 3rem;
  align-items: start;
}
.footer-brand { display: flex; flex-direction: column; gap: .75rem; max-width: 460px; }
.footer-tag { font-size: var(--fs-small); color: var(--text-dim); }
.footer-nav { display: flex; gap: 1.75rem; flex-wrap: wrap; }
.footer-nav a { font-size: var(--fs-small); font-weight: 600; color: var(--text-muted); transition: color 200ms var(--ease); }
.footer-nav a:hover { color: var(--alabaster); }
.copyright {
  grid-column: 1 / -1;
  font-size: .8rem;
  color: var(--text-dim);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-on-onyx);
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); row-gap: 3rem; }
  .workflow { grid-template-columns: repeat(2, 1fr); row-gap: 3rem; }
  .step:nth-child(2)::after { right: 0; }
}

@media (max-width: 900px) {
  :root { --header-h: 68px; }

  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0; bottom: 0;
    background: var(--onyx);
    border-top: 1px solid var(--line-on-onyx);
    padding: 2rem var(--gutter);
    visibility: hidden;
    opacity: 0;
    transition: opacity 250ms var(--ease), visibility 0s linear 250ms;
  }
  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transition: opacity 250ms var(--ease);
  }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li { border-bottom: 1px solid var(--line-on-onyx); }
  .site-nav li:last-child { border-bottom: 0; padding-top: 2rem; }
  .site-nav a:not(.btn) {
    display: block;
    font-family: var(--font-head);
    font-size: 1.5rem;
    padding: 1.1rem 0;
    color: var(--alabaster);
  }
  .site-nav a:not(.btn)::after { display: none; }
  .site-nav a:not(.btn).is-active { color: var(--cognac); }
  .site-nav .btn { width: 100%; padding: 1.1rem; font-size: 1rem; }
  body.nav-open { overflow: hidden; }

  .booking-layout { grid-template-columns: 1fr; }
  .booking-widget { position: static; }

  .vault-stages { grid-template-columns: 1fr; }
  .scope-grid { grid-template-columns: 1fr; }

  /* Table → clean cards */
  .table-wrap { overflow: visible; border: 0; background: none; }
  .contrast-table { min-width: 0; }
  .contrast-table thead {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .contrast-table, .contrast-table tbody, .contrast-table tr,
  .contrast-table th, .contrast-table td { display: block; width: 100%; }
  .contrast-table tr {
    background: var(--oxford-deep);
    border: 1px solid var(--line-on-oxford);
    margin-bottom: 1rem;
  }
  .contrast-table tbody th {
    width: 100%;
    font-size: 1.1rem;
    background: var(--onyx);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line-on-oxford) !important;
  }
  .contrast-table td {
    border-left: 0 !important;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line-on-oxford);
  }
  .contrast-table tr td:last-child { border-bottom: 0; }
  .contrast-table td::before {
    content: attr(data-label);
    display: block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: .35rem;
  }
  .contrast-table td.col-coda {
    border-left: 3px solid var(--cognac) !important;
  }
  .contrast-table td.col-coda::before { color: var(--cognac); }
}

@media (max-width: 680px) {
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .grid-4 { row-gap: 2.5rem; }

  .workflow { grid-template-columns: 1fr; gap: 0; }
  .step { padding: 0 0 2.5rem 2.25rem; }
  .step::before { top: .3rem; }
  .step::after { top: .3rem; left: 6px; right: auto; bottom: 0; width: 1px; height: auto; }
  .step:last-child { padding-bottom: 0; }
  .step:last-child::after { display: none; }

  .deliverable { grid-template-columns: 1fr; gap: 1rem; }
  .manifesto-list li { grid-template-columns: 44px 1fr; gap: 1rem; }

  .footer-inner { grid-template-columns: 1fr; }

  .brand-tag { display: none; }
  .btn-lg { width: 100%; white-space: normal; }
  .hero-cta { width: 100%; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
