/* ==========================================================================
   CHALK Logic — chalklogic.com
   Landing page design system.

   Recreated from the Claude Design handoff ("Chalklogic website redesign"),
   which is high-fidelity: colours, type, spacing and hover states below are
   the handoff's authored values, not re-derived ones.

   Two things from the reference file are deliberately NOT carried over:
   its all-inline styling (netlify.toml ships a CSP with no 'unsafe-inline')
   and its prototype runtime. Everything lives here instead.

   site/legacy.css is the previous design system. about.html still uses it.
   ========================================================================== */

/* --------------------------------------------------------------------------
   TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Ground */
  --ink:        #0B0A0C;   /* page background, testimonial cards             */
  --surface:    #100E12;   /* alternating bands, form card, diagram          */
  --surface-hi: #17131C;   /* solution card hover                            */
  --media-bg:   #17141A;   /* behind the headshot while it loads             */

  /* Purple. One accent, five jobs. */
  --purple:        #6B2D8F;   /* primary fill: buttons, logo block, wedges   */
  --purple-hover:  #8B3FB5;   /* button hover                                */
  --purple-deep:   #4E1F69;   /* wedge gradient end                          */
  --purple-bright: #9B51C9;   /* headings, stats, eyebrows on dark           */
  --purple-light:  #C89BE8;   /* links, highlighted diagram title            */
  --purple-pale:   #E0CBEF;   /* labels on purple                            */
  --purple-paler:  #EFE3F7;   /* body copy on purple                         */

  /* Type colours */
  --on-ink:     #F5F3F6;   /* primary text                                   */
  --text-2:     #CFC8D3;   /* lede paragraphs                                */
  --text-mut:   #A79FAC;   /* body copy                                      */
  --text-dim:   #8E8794;   /* tertiary detail                                */
  --text-faint: #948C9A;   /* attributions, footer. 4.7:1 on --surface —
                              do not darken this value.                      */

  /* Hairlines */
  --line:      rgba(245, 243, 246, .1);
  --line-soft: rgba(245, 243, 246, .12);
  --line-form: rgba(245, 243, 246, .14);
  --line-chip: rgba(245, 243, 246, .18);
  --line-mark: rgba(245, 243, 246, .25);
  --line-btn:  rgba(245, 243, 246, .28);
  --line-onp:  rgba(255, 255, 255, .35);   /* over the purple wedge          */

  /* Type families */
  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body:    "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Rhythm */
  --gut:  clamp(20px, 4vw, 56px);   /* page gutter                           */
  --band: clamp(64px, 10vh, 128px); /* section padding                       */
  --pad:  clamp(26px, 3vw, 40px);   /* card padding                          */
  --colgap: clamp(32px, 5vw, 72px);
  --gridgap: clamp(20px, 2.5vw, 36px);
  --max: 1440px;

  /* Chalk texture stand-in. The real brush edge lives in the 2026 business
     card art; until it is exported as a transparent PNG/SVG this procedural
     noise carries the wedges. */
  --noise-hero: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  --noise-contact: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");

  --t: 150ms ease;
}

/* --------------------------------------------------------------------------
   RESET
   Border radius is 0 everywhere. Square corners are a brand decision that
   matches the cards — do not soften them.
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* clip, not hidden: hidden on the root would break the sticky header. */
  overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--on-ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--display); }
a { color: var(--purple-light); text-decoration: none; }
a:hover { color: var(--on-ink); }
::selection { background: var(--purple); color: #fff; }

/* The reference authored a focus style on form inputs only. Everything
   interactive needs one. */
:focus-visible { outline: 2px solid var(--purple-bright); outline-offset: 2px; }

/* --------------------------------------------------------------------------
   LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */
.shell { max-width: var(--max); margin-inline: auto; padding: var(--band) var(--gut); }
.band { border-top: 1px solid var(--line); }
.band--surface { background: var(--surface); }

.eyebrow {
  font-family: var(--display);
  font-size: 13px; font-weight: 700;
  letter-spacing: .28em; text-transform: uppercase;
  color: var(--purple-bright);
}

.h2 {
  font-weight: 900;
  font-size: clamp(36px, 4.4vw, 62px);
  line-height: 1;
  letter-spacing: -.025em;
  text-transform: uppercase;
}

.lede {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.6;
  color: var(--text-2);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  white-space: nowrap;
  border: 0;
  font-family: var(--display);
  font-size: 14px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--t), color var(--t), border-color var(--t);
}
.btn--primary { padding: 16px 30px; background: var(--purple); color: #fff; }
.btn--primary:hover { background: var(--purple-hover); color: #fff; }

.btn--ghost { padding: 16px 30px; border: 1px solid var(--line-btn); color: var(--on-ink); }
.btn--ghost:hover { border-color: var(--purple-bright); color: var(--purple-light); }

/* On the purple CTA card: black button, black-purple hover. */
.btn--ink { padding: 14px 26px; background: var(--ink); color: #fff; font-size: 13px; }
.btn--ink:hover { background: #241033; color: #fff; }

.btn--block { width: 100%; padding: 16px 22px; }

/* --------------------------------------------------------------------------
   HEADER
   -------------------------------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 14px var(--gut);
  background: rgba(11, 10, 12, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(245, 243, 246, .08);
}
/* The handoff faked the lockup with a rotated rectangle and a clip-path and
   asked for the real brush-stroke mark. assets/logo.png is that mark. */
.brand { display: block; flex: none; }
.brand img { width: clamp(118px, 12vw, 150px); }

.site-nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 32px); flex-wrap: wrap; justify-content: flex-end; }
.site-nav a {
  display: inline-block; white-space: nowrap;
  font-size: 14px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-mut);
  transition: color var(--t);
}
.site-nav a:hover { color: var(--on-ink); }
.site-nav .btn { padding: 10px 20px; font-size: 13px; font-weight: 700; letter-spacing: .08em; }
/* .site-nav a out-specifies .btn--primary and was greying out the CTA label,
   so the button colour has to be restated at matching specificity. */
.site-nav a.btn--primary,
.site-nav a.btn--primary:hover { color: #fff; }

/* No mobile nav was designed; the reference just wraps. This follows the
   pattern the rest of the site already used — drop the in-page anchors on
   small screens and keep the one that converts. */
@media (max-width: 640px) {
  .site-head { padding: 10px var(--gut); }
  .brand img { width: 108px; }
  .site-nav { gap: 12px; }
  /* .site-nav a sets display, so this has to out-specify it. */
  .site-nav .nav-hide-sm { display: none; }
  /* 44px touch-target minimum — the CTA is the only nav item left here. */
  .site-nav .btn { padding: 14px 22px; }
}

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
/* The handoff sizes this with repeat(auto-fit, minmax(min(100%, 460px), 1fr)),
   which collapses to one column at ~1057px wide. An explicit breakpoint at the
   same place gives an identical two-column result and — unlike auto-fit — lets
   the wedge rule below know which layout it is in. */
.hero {
  position: relative;
  /* Clips the wedge to the hero. Without this the -40% vertical inset spills
     the purple down over the right third of the stat bar — an artefact of the
     prototype's wrapper, not something the handoff describes. */
  overflow: clip;
  display: grid;
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(56px, 9vh, 120px) var(--gut) clamp(48px, 8vh, 96px);
}
.hero__copy { position: relative; z-index: 2; max-width: 700px; }
.hero__eyebrow { margin-bottom: 22px; }

.hero h1 {
  font-weight: 900;
  font-size: clamp(38px, 5vw, 82px);
  line-height: .94;
  letter-spacing: -.025em;
  text-transform: uppercase;
  text-wrap: balance;
}
.hero h1 .fit { color: var(--purple-bright); }

/* The chalk rule under the headline. */
.chalk-rule {
  width: 132px; height: 7px;
  margin: 30px 0 26px;
  background: var(--on-ink);
  clip-path: polygon(0% 32%, 96% 0%, 100% 70%, 3% 100%);
}

.hero__lede {
  margin-bottom: 36px;
  max-width: 54ch;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.hero__note { margin-top: 34px; font-size: 15px; line-height: 1.6; color: var(--text-dim); }

/* Stacked, the wedge is a dead slab under the copy. It only exists in the
   two-column layout. */
.hero__wedge { display: none; position: relative; align-self: stretch; min-height: 300px; }
@media (min-width: 1060px) {
  .hero { grid-template-columns: 1fr 1fr; min-height: 78vh; }
  .hero__wedge { display: block; }
}
.hero__wedge::before,
.hero__wedge::after {
  content: "";
  position: absolute;
  inset: -40% -60% -40% 0;
  clip-path: polygon(26% 0%, 100% 0%, 100% 100%, 6% 100%);
}
.hero__wedge::before {
  background: linear-gradient(118deg, transparent 0 30%, var(--purple) 30%, var(--purple-deep) 100%);
}
.hero__wedge::after {
  background-image: var(--noise-hero);
  opacity: .5;
  mix-blend-mode: overlay;
}
/* --------------------------------------------------------------------------
   STAT BAR
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { padding: clamp(26px, 4vw, 44px) clamp(20px, 3vw, 40px); border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat__n {
  margin-bottom: 8px;
  font-family: var(--display); font-weight: 900;
  font-size: clamp(34px, 3.6vw, 50px); line-height: 1;
  color: var(--purple-bright);
}
.stat__cap { font-size: 15px; line-height: 1.45; color: var(--text-mut); }

/* --------------------------------------------------------------------------
   WHO I AM
   -------------------------------------------------------------------------- */
.who {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--colgap);
  align-items: start;
}
.who__media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--media-bg);
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
.who__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip {
  display: inline-block; white-space: nowrap;
  padding: 8px 14px;
  border: 1px solid var(--line-chip);
  font-size: 13px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-mut);
  transition: border-color var(--t), color var(--t);
}
.chip:hover { border-color: var(--purple-bright); color: var(--on-ink); }
/* Unpadded these measure ~37px, under the 44px touch-target minimum. */
@media (max-width: 640px) { .chip { padding: 12px 16px; } }

.who__body { max-width: 640px; }
.who__body .h2 { margin-bottom: 24px; }
.who__body .lede { margin-bottom: 34px; }

.principles { display: grid; gap: 26px; }
.principle { display: grid; grid-template-columns: 34px 1fr; gap: 18px; align-items: start; }
.principle::before {
  content: "";
  height: 100%; min-height: 54px; width: 4px;
  background: var(--purple);
  justify-self: start;
}
.principle h3 { margin-bottom: 8px; font-weight: 800; font-size: 20px; letter-spacing: .01em; }
.principle p { font-size: 16px; line-height: 1.6; color: var(--text-mut); }
.principle strong { color: var(--on-ink); font-weight: 700; }

/* --------------------------------------------------------------------------
   WHAT I DO
   -------------------------------------------------------------------------- */
.help__head {
  display: flex; flex-wrap: wrap;
  align-items: flex-end; justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.help__head .h2 { max-width: 22ch; }
.help__note { max-width: 40ch; font-size: 17px; line-height: 1.6; color: var(--text-mut); }

/* gap:1px over a hairline background is what draws the dividers.

   The handoff specifies minmax(290px, 1fr), which lands on FOUR columns at
   1440 — six cards then leave two empty tracks, and an empty track shows the
   grid's own hairline background as a pale block. 340px is the smallest track
   minimum that forces 3 x 2 at every width the shell can reach: four columns
   would need 4x340 + 3px of gap = 1363, and the content box caps at 1328. */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.card { padding: var(--pad); background: var(--surface); transition: background-color var(--t); }
.card:hover { background: var(--surface-hi); }
.card p { font-size: 16px; line-height: 1.6; color: var(--text-mut); }
/* The title is a <p>, so .card p out-specifies a bare .card__t and was
   flattening it to 16px grey. Matching that specificity is the fix. */
.card .card__t {
  margin-bottom: 14px;
  font-family: var(--display); font-weight: 900;
  font-size: 26px; line-height: normal; letter-spacing: -.01em;
  color: var(--purple-bright);
}

.card--cta { grid-column: 1 / -1; background: var(--purple); }
.card--cta:hover { background: var(--purple); }
.card--cta .card__t { color: #fff; }
.card--cta p { margin-bottom: 22px; max-width: 60ch; font-size: 17px; color: var(--purple-paler); }

/* --------------------------------------------------------------------------
   CASE STUDY
   -------------------------------------------------------------------------- */
.case {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--colgap);
  align-items: center;
}
.case__eyebrow { margin-bottom: 20px; }
.case h2 {
  margin-bottom: 24px;
  font-weight: 900;
  font-size: clamp(32px, 3.8vw, 54px);
  line-height: 1.02;
  letter-spacing: -.025em;
  text-transform: uppercase;
}
.case__body { margin-bottom: 20px; font-size: 17px; line-height: 1.65; color: var(--text-2); }
.case__quote { margin: 0; font-size: 16px; line-height: 1.65; color: var(--text-mut); }
.case__by {
  margin-top: 16px;
  font-size: 14px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint);
}

/* The flow diagram. Built in markup because the client's own UI is not
   cleared for publication — there is no screenshot to show. */
.diagram { padding: clamp(24px, 3vw, 38px); background: var(--surface); border: 1px solid var(--line-soft); }
.diagram__head {
  margin-bottom: 26px;
  font-family: var(--display);
  font-size: 12px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-faint);
}
.flow { display: grid; }
.flow__step { display: grid; grid-template-columns: 28px 1fr; gap: 16px; align-items: start; }
.flow__marker {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  border: 1px solid var(--line-mark);
  font-family: var(--display); font-size: 12px; font-weight: 800;
  color: var(--text-mut);
}
.flow__marker--on { background: var(--purple); border-color: var(--purple); color: #fff; }
.flow__t { margin-bottom: 5px; font-family: var(--display); font-size: 18px; font-weight: 800; color: var(--on-ink); }
.flow__d { font-size: 15px; line-height: 1.5; color: var(--text-dim); }

.flow__box { padding: 16px 18px; border: 1px solid rgba(155, 81, 201, .55); background: rgba(107, 45, 143, .14); }
.flow__box .flow__t { color: var(--purple-light); }
.flow__box .flow__d { color: var(--text-mut); }

.flow__link { display: grid; grid-template-columns: 28px 1fr; gap: 16px; }
.flow__link::before {
  content: "";
  justify-self: center;
  width: 1px; height: 30px;
  background: rgba(155, 81, 201, .6);
}
.flow__link span {
  align-self: center;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-faint);
}

.diagram__foot {
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  margin-top: 28px; padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  font-size: 14px; color: var(--text-faint);
}
.diagram__foot .lab { color: var(--on-ink); font-weight: 600; }
.diagram__foot .lab--after { color: var(--purple-light); }

/* --------------------------------------------------------------------------
   PROOF
   -------------------------------------------------------------------------- */
.proof .h2 { margin-bottom: clamp(36px, 5vw, 64px); }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--gridgap); }
.quote {
  margin: 0;
  padding: clamp(26px, 3vw, 38px);
  background: var(--ink);
  border: 1px solid var(--line-soft);
}
.quote blockquote { margin: 0 0 22px; font-size: 17px; line-height: 1.6; color: var(--text-2); }
.quote figcaption {
  font-family: var(--display);
  font-size: 14px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--purple-bright);
}
.quote .org { color: var(--text-faint); }

/* --------------------------------------------------------------------------
   CONTACT
   -------------------------------------------------------------------------- */
/* The 102deg wedge only lines up while the section is two columns, so the
   split is an explicit breakpoint rather than auto-fit — otherwise the purple
   slices diagonally through a stacked form. */
.contact { position: relative; overflow: hidden; }
.contact__in {
  position: relative; z-index: 2;
  display: grid;
  gap: clamp(36px, 6vw, 88px);
  align-items: start;
}

@media (min-width: 860px) {
  .contact::before,
  .contact::after { content: ""; position: absolute; inset: 0; }
  .contact::before {
    background: linear-gradient(102deg, var(--purple) 0%, var(--purple-deep) 46%, transparent 46.5%);
  }
  .contact::after {
    background-image: var(--noise-contact);
    opacity: .4;
    mix-blend-mode: overlay;
  }
  .contact__in { grid-template-columns: 1fr 1fr; }
}
.contact__intro .h2 { margin-bottom: 24px; }
.contact__intro .lede { margin-bottom: 32px; max-width: 46ch; color: var(--purple-paler); }

.lines { display: grid; gap: 18px; max-width: 420px; }
.line {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-onp);
  color: #fff;
  transition: border-color var(--t);
}
a.line:hover { border-color: #fff; color: #fff; }
.line__label {
  font-size: 13px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--purple-pale);
}
.line__value { font-family: var(--display); font-size: clamp(18px, 1.8vw, 24px); font-weight: 700; }
.line__value--sm { font-size: clamp(15px, 1.4vw, 19px); overflow-wrap: anywhere; }
.line__value--wrap { font-size: clamp(15px, 1.4vw, 19px); text-align: right; }

/* Stacked, the intro block carries the purple itself. */
@media (max-width: 859px) {
  .contact__intro {
    padding: var(--pad);
    background: linear-gradient(150deg, var(--purple) 0%, var(--purple-deep) 100%);
  }
  .lines { max-width: none; }
}

/* Contact form. Posts to Netlify Forms, which is what the rest of the site
   already used; the reference's front-end mock had no send target. */
.form {
  display: grid; gap: 16px;
  padding: var(--pad);
  background: var(--surface);
  border: 1px solid var(--line-form);
}
.form__eyebrow { margin-bottom: 4px; letter-spacing: .24em; }
.form label {
  display: grid; gap: 7px;
  font-size: 13px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-mut);
}
.form input,
.form textarea {
  padding: 13px 14px;
  background: var(--ink);
  border: 1px solid var(--line-chip);
  color: var(--on-ink);
  font: 400 16px/1.5 var(--body);
  letter-spacing: 0; text-transform: none;
  transition: border-color var(--t);
}
.form input:focus,
.form textarea:focus { border-color: var(--purple-bright); }
.form textarea { resize: vertical; }
.form .btn { margin-top: 6px; }
/* Netlify honeypot — must stay hidden from humans and assistive tech alike. */
.hp { display: none; }

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.site-foot { border-top: 1px solid var(--line); }
.site-foot__in {
  max-width: var(--max); margin-inline: auto;
  padding: 36px var(--gut);
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 20px;
}
.site-foot img { width: 104px; opacity: .9; }
.site-foot p { font-size: 14px; color: var(--text-faint); }

/* --------------------------------------------------------------------------
   THANKS PAGE
   -------------------------------------------------------------------------- */
.thanks { max-width: var(--max); margin-inline: auto; padding: clamp(80px, 14vh, 160px) var(--gut); }
.thanks__eyebrow { margin-bottom: 22px; }
.thanks .h2 { margin-bottom: 24px; }
.thanks .lede { margin-bottom: 36px; max-width: 52ch; }
.thanks .lines { margin-bottom: 40px; }
.thanks .line { border-bottom-color: var(--line-chip); }
.thanks .line__label { color: var(--text-mut); }
.thanks a.line:hover { border-bottom-color: var(--purple-bright); }
