/* ==========================================================================
   CS Consulting — styles
   Edit the tokens in :root to adjust the brand across the whole site.
   ========================================================================== */

@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter-Medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter-SemiBold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("/assets/fonts/InterDisplay-SemiBold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --navy: #142438;
  --navy-deep: #0E1A29;
  --navy-soft: #1D3049;
  --off: #F8F7F4;
  --sand: #EFEDE7;
  --white: #FFFFFF;
  --teal: #008C87;        /* accent, graphics */
  --teal-ink: #00756F;    /* teal for text/buttons on light (AA) */
  --teal-bright: #2BB8B1; /* teal on navy (AA) */
  --slate: #55657A;       /* secondary text on light (AA) */
  --slate-light: #A9B4C4; /* secondary text on navy (AA) */
  --line: #E2DFD8;
  --line-navy: rgba(248, 247, 244, .12);

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Inter Display", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(5rem, 11vw, 9rem);
  --radius: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--navy);
  background: var(--off);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.028em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--teal); color: var(--white); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--navy); color: var(--white); padding: .75rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: .85rem 1.5rem;
  font: 600 1rem/1 var(--font-body); letter-spacing: -0.005em;
  text-decoration: none; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-sm { min-height: 44px; padding: .65rem 1.2rem; font-size: .9375rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--teal-ink); }
.btn-ghost { color: var(--navy); border-color: rgba(20, 36, 56, .22); }
.btn-ghost:hover { border-color: var(--navy); background: var(--white); }
.btn-light { background: var(--off); color: var(--navy); }
.btn-light:hover { background: var(--white); }
.btn-teal { background: var(--teal-ink); color: var(--white); }
.btn-teal:hover { background: #00615C; }
.icon { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248, 247, 244, .82);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: rgba(248, 247, 244, .92); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name { font: 600 1.1875rem/1 var(--font-display); letter-spacing: -0.02em; }
.brand-name span { color: var(--slate); font-weight: 600; }
.brand-invert .brand-name { color: var(--off); }
.brand-invert .brand-name span { color: var(--slate-light); }

.site-nav ul { display: flex; gap: 2.25rem; }
.site-nav a:not(.btn) {
  position: relative; text-decoration: none; font-weight: 500; font-size: .9688rem; color: var(--navy);
}
.site-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1.5px;
  background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.site-nav a:not(.btn):hover::after, .site-nav a.is-active::after { transform: scaleX(1); }

.nav-toggle { display: none; }

@media (min-width: 900px) {
  .site-nav { display: flex; align-items: center; gap: 2.5rem; }
}

@media (max-width: 899px) {
  .nav-toggle {
    display: inline-block; position: relative;
    width: 46px; height: 46px; padding: 0; border: 1.5px solid rgba(20, 36, 56, .18); border-radius: 999px;
    background: transparent; cursor: pointer;
  }
  .nav-toggle-bar { position: absolute; left: 13px; right: 13px; top: 50%; height: 2px; margin-top: -1px; background: var(--navy); border-radius: 2px; transition: transform .3s var(--ease); }
  .nav-toggle-bar:nth-of-type(2) { transform: translateY(-4px); }
  .nav-toggle-bar:nth-of-type(3) { transform: translateY(4px); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-of-type(2) { transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-of-type(3) { transform: rotate(-45deg); }

  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: var(--off); border-bottom: 1px solid var(--line);
    padding: 1rem var(--gutter) 2rem;
    display: none;
  }
  .site-nav.is-open { display: block; animation: drop .3s var(--ease); }
  .site-nav ul { flex-direction: column; gap: 0; margin-bottom: 1.5rem; }
  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav a:not(.btn) { display: block; padding: 1.05rem 0; font: 600 1.375rem/1.2 var(--font-display); letter-spacing: -0.02em; }
  .site-nav a:not(.btn)::after { display: none; }
  .site-nav .btn { width: 100%; min-height: 54px; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(3rem, 8vw, 6.5rem); padding-bottom: clamp(3rem, 6vw, 4.5rem); overflow: hidden; }
.hero::before {
  /* faint grid, fading out */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(20,36,56,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(20,36,56,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 75% 35%, #000 10%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 70% at 75% 35%, #000 10%, transparent 75%);
}
.hero-grid { position: relative; display: grid; gap: 3rem; align-items: center; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: 1.45fr .75fr; gap: 1rem; } .hero-title .line { white-space: nowrap; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: .65rem;
  font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-ink);
  margin-bottom: 1.75rem;
}
.eyebrow::before { content: ""; width: 28px; height: 1.5px; background: currentColor; }

.hero-title { font-size: clamp(2.6rem, 9.6vw, 3.5rem); line-height: 1.0; letter-spacing: -0.04em; }
.hero-title .line { display: block; }
@media (min-width: 1000px) { .hero-title { font-size: clamp(3.5rem, 5.6vw, 5rem); } }
@media (min-width: 600px) and (max-width: 999px) { .hero-title { font-size: clamp(3.5rem, 8vw, 4.5rem); } }
.hero-title .accent { color: var(--teal-ink); }
.lede { margin-top: 2rem; max-width: 36rem; font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.6; color: var(--slate); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2.5rem; }

.hero-visual { margin: 0; }
.flow { width: 100%; max-width: 560px; margin-inline: auto; }
.flow .node-labels text { font-family: var(--font-body); }
@media (max-width: 999px) { .hero-visual { max-width: 520px; } }

.hero-strip {
  display: flex; flex-wrap: wrap; gap: .75rem 2.25rem;
  margin-top: clamp(3rem, 6vw, 5rem); padding-top: 1.75rem; border-top: 1px solid var(--line);
  font-size: .9375rem; font-weight: 500; color: var(--slate);
}
.hero-strip li { display: inline-flex; align-items: center; gap: .6rem; }
.hero-strip li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); }
.section-white { background: var(--white); }
.section-off { background: var(--off); }
.section-navy { background: var(--navy); color: var(--off); }

.section-label {
  display: flex; align-items: center; gap: .85rem;
  font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--slate);
  margin-bottom: 1.5rem;
}
.section-label span { color: var(--teal-ink); font-feature-settings: "tnum"; }
.section-label span::after { content: ""; display: inline-block; width: 28px; height: 1.5px; background: currentColor; margin-left: .85rem; vertical-align: middle; opacity: .6; }
.section-navy .section-label { color: var(--slate-light); }
.section-navy .section-label span { color: var(--teal-bright); }

.section-title { font-size: clamp(2.125rem, 4.6vw, 3.5rem); max-width: 18ch; }
.section-intro { margin-top: 1.5rem; max-width: 34rem; color: var(--slate); font-size: 1.125rem; }
.section-head { margin-bottom: clamp(3rem, 6vw, 4.5rem); }
.section-head .section-title { max-width: 22ch; }
@media (min-width: 1000px) { .section-head .section-title { max-width: none; } }

.split { display: grid; gap: 2.5rem; }
@media (min-width: 1000px) {
  .split { grid-template-columns: 5fr 6fr; gap: 5rem; }
  .split-head { position: sticky; top: calc(var(--header-h) + 3rem); align-self: start; }
}

.prose p + p { margin-top: 1.15rem; }
.prose .lead { font: 600 clamp(1.375rem, 2.2vw, 1.625rem)/1.35 var(--font-display); letter-spacing: -0.02em; }
.prose-invert p { color: #D5DCE6; }
.prose-invert .lead { color: var(--off); }
.manifesto { margin-top: 2.25rem !important; padding: 1.75rem 0 0; border-top: 1px solid var(--line); font-size: 1.1875rem; color: var(--slate); }
.manifesto strong { display: block; margin-top: .35rem; color: var(--navy); font-weight: 600; }

/* ---------- Founder ---------- */
.founder { position: relative; overflow: hidden; }
.founder::after {
  content: ""; position: absolute; width: 640px; height: 640px; right: -260px; top: -220px; pointer-events: none;
  border-radius: 50%; border: 1px solid var(--line-navy);
  box-shadow: 0 0 0 80px rgba(248,247,244,.015), 0 0 0 160px rgba(248,247,244,.012);
}
.founder-grid { position: relative; z-index: 1; display: grid; gap: 3rem; }
@media (min-width: 1000px) { .founder-grid { grid-template-columns: 5fr 7fr; gap: 6rem; align-items: start; } }
.founder .section-title { margin-bottom: 2rem; }
.founder .btn-light { margin-top: 2.5rem; }

.portrait { margin: 0; }
.portrait img, .portrait-placeholder { width: 100%; aspect-ratio: 4 / 5; border-radius: var(--radius); object-fit: cover; }
.portrait-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem;
  background:
    radial-gradient(circle at 30% 20%, rgba(43,184,177,.16), transparent 55%),
    linear-gradient(160deg, var(--navy-soft), var(--navy-deep));
  border: 1px solid var(--line-navy);
  color: var(--slate-light); text-align: center; font-size: .875rem; letter-spacing: .04em;
}
.portrait-placeholder svg { width: 96px; height: 96px; }
.portrait figcaption { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; font-size: .9375rem; color: var(--slate-light); }
.portrait figcaption strong { color: var(--off); font-weight: 600; }
@media (max-width: 999px) { .portrait { max-width: 420px; } }

/* ---------- Services ---------- */
.cards { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(2, 1fr); } }
.card {
  position: relative; display: flex; flex-direction: column;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.card::before {
  content: ""; position: absolute; left: clamp(1.75rem, 3vw, 2.5rem); right: clamp(1.75rem, 3vw, 2.5rem); top: 0; height: 3px;
  background: var(--teal); border-radius: 0 0 3px 3px; transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -28px rgba(20,36,56,.35); border-color: #D6D2C9; }
.card:hover::before { transform: scaleX(1); }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.25rem; }
.card-num { font: 600 .875rem/1 var(--font-body); color: var(--slate); font-feature-settings: "tnum"; letter-spacing: .06em; }
.card-icon { width: 40px; height: 40px; fill: none; stroke: var(--teal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: clamp(1.5rem, 2.4vw, 1.875rem); margin-bottom: .9rem; }
.card > p { color: var(--slate); }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: 1.75rem; }
.tags li {
  padding: .4rem .8rem; border-radius: 999px; background: var(--off); border: 1px solid var(--line);
  font-size: .8125rem; font-weight: 500; line-height: 1.3; color: var(--navy);
}

/* ---------- Steps ---------- */
.steps { display: grid; gap: 0; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; padding: 2rem 0 2.25rem 3.75rem; border-top: 1px solid var(--line); }
.step-num {
  position: absolute; left: 0; top: 2rem;
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--navy); font: 600 .8125rem/1 var(--font-body); font-feature-settings: "tnum";
  background: var(--white);
}
.step:last-child .step-num { background: var(--teal-ink); border-color: var(--teal-ink); color: var(--white); }
.step h3 { font-size: 1.625rem; margin-bottom: .75rem; }
.step p { color: var(--slate); max-width: 22rem; }
@media (min-width: 900px) {
  .step { padding: 0 2rem 0 0; border-top: 0; }
  .step::before { content: ""; position: absolute; top: 20px; left: 0; right: 0; height: 1.5px; background: var(--line); }
  .step-num { position: relative; top: 0; margin-bottom: 2rem; z-index: 1; }
  .step h3 { margin-bottom: .85rem; }
}

/* ---------- Who ---------- */
.fit-list li {
  display: grid; grid-template-columns: 28px 1fr; gap: 1.1rem; align-items: start;
  padding: 1.5rem 0; border-bottom: 1px solid var(--line);
  font: 500 clamp(1.125rem, 1.8vw, 1.3125rem)/1.45 var(--font-body); letter-spacing: -0.01em;
}
.fit-list li:first-child { border-top: 1px solid var(--line); }
.fit-mark { position: relative; width: 28px; height: 28px; margin-top: .05em; border-radius: 50%; background: rgba(0, 140, 135, .1); }
.fit-mark::after {
  content: ""; position: absolute; left: 9px; top: 7px; width: 9px; height: 13px;
  border: solid var(--teal-ink); border-width: 0 2px 2px 0; transform: rotate(45deg) scale(.8);
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 3.5rem; }
@media (min-width: 1000px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 6rem; align-items: start; } }
.contact .section-title { margin-bottom: 2rem; }
.contact-email {
  display: inline-block; margin-top: 2.5rem; text-decoration: none;
  font: 600 clamp(1.25rem, 2.6vw, 1.75rem)/1.2 var(--font-display); letter-spacing: -0.02em; color: var(--off);
  border-bottom: 1.5px solid var(--teal-bright); padding-bottom: .35rem; word-break: break-word;
}
.contact-email:hover { color: var(--teal-bright); }
.contact-email-label { display: block; margin-bottom: .6rem; font: 600 .8125rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--slate-light); }

.contact-form {
  background: var(--off); color: var(--navy); border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: 0 40px 80px -40px rgba(0,0,0,.5);
}
.field + .field { margin-top: 1.25rem; }
.field label { display: block; margin-bottom: .45rem; font-size: .9375rem; font-weight: 600; }
.optional { font-weight: 400; color: var(--slate); }
.field input, .field textarea {
  width: 100%; padding: .85rem 1rem; font: 400 1rem/1.5 var(--font-body); color: var(--navy);
  background: var(--white); border: 1.5px solid var(--line); border-radius: 10px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(0,140,135,.15); }
.field [aria-invalid="true"] { border-color: #B42318; }
.field-error { margin-top: .4rem; font-size: .875rem; color: #B42318; }
.contact-form .btn { margin-top: 1.75rem; }
.form-note { margin-top: 1rem; font-size: .8438rem; line-height: 1.55; color: var(--slate); }
.form-note a { color: var(--teal-ink); }
.form-status { margin-top: 1.25rem; padding: 1rem 1.1rem; border-radius: 10px; font-size: .9375rem; background: rgba(0,140,135,.1); border: 1px solid rgba(0,140,135,.3); }
.form-status.is-error { background: rgba(180,35,24,.07); border-color: rgba(180,35,24,.3); }
.form-status a { color: var(--teal-ink); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: var(--slate-light); padding-top: 4rem; font-size: .9375rem; }
.footer-grid { display: grid; gap: 2.5rem; padding-bottom: 3rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1fr auto; align-items: end; } }
.footer-brand p { margin-top: 1.1rem; }
.footer-links { display: grid; gap: 1rem; }
@media (min-width: 760px) { .footer-links { justify-items: end; } }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--off); }
.footer-links > p a { color: var(--off); font-weight: 500; }
.footer-links ul { display: flex; flex-wrap: wrap; gap: 1.75rem; }
.footer-base { padding-bottom: 2rem; font-size: .875rem; }
.footer-base p { padding-top: 1.5rem; border-top: 1px solid var(--line-navy); }

/* ---------- Legal page ---------- */
.legal { padding-block: clamp(3.5rem, 8vw, 6rem) var(--section-y); }
.legal .container { max-width: 780px; }
.legal h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); margin-bottom: 1rem; }
.legal .updated { color: var(--slate); margin-bottom: 3rem; }
.legal h2 { font-size: 1.5rem; margin: 2.75rem 0 .9rem; }
.legal p, .legal li { color: #2E3E52; }
.legal p + p { margin-top: 1rem; }
.legal ul { list-style: disc; padding-left: 1.25rem; margin-top: .75rem; }
.legal li + li { margin-top: .4rem; }
.legal a { color: var(--teal-ink); }
.back-link { display: inline-flex; gap: .5rem; margin-bottom: 2.5rem; font-weight: 600; text-decoration: none; color: var(--teal-ink); }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding-block: 6rem; }
.notfound h1 { font-size: clamp(2.5rem, 6vw, 4rem); margin: 1rem 0; }
.notfound p { color: var(--slate); margin-bottom: 2rem; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  .js .flow .thread { stroke-dasharray: 700; stroke-dashoffset: 700; animation: draw 2.4s var(--ease) forwards; }
  .js .flow .thread:nth-child(2) { animation-delay: .15s; }
  .js .flow .thread:nth-child(3) { animation-delay: .3s; }
  .js .flow .thread:nth-child(4) { animation-delay: .45s; }
  .js .flow .thread:nth-child(5) { animation-delay: .6s; }
  .js .flow .nodes circle, .js .flow .node-labels text { opacity: 0; animation: fadein .6s var(--ease) forwards; animation-delay: 1.9s; }
  .js .flow .nodes circle:nth-child(3) { animation: fadein .6s var(--ease) 1.9s forwards, pulse 3.2s ease-in-out 2.6s infinite; transform-origin: 420px 220px; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }

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