/* mattkatawicz.com — visual pass, direction 2a "Ledger x Field"
   Drop-in replacement for assets/style.css.
   Every class name, id and structural hook from index.html is preserved. */

:root {
  /* anchor: slate with a blue lean */
  --anchor:      #1A2739;
  --anchor-mid:  #2C3A4D;
  --anchor-soft: #1F5C8F;
  --anchor-line: #465468;
  --anchor-100:  #C2CEDE;
  --anchor-200:  #8FA3BF;
  --anchor-50:   #EDF1F6;

  --mint:       #5DCAA5;
  --mint-hover: #77D6B7;
  --teal-900:   #0C2C24;

  /* cause colours: one shared lightness and chroma, hue is the only variable.
     Hex first for old engines, oklch second for everything current. */
  --teal-600:   #0A6E6A;
  --teal-600:   oklch(0.50 0.085 190);
  --teal-700:   #0A5C58;
  --teal-700:   oklch(0.42 0.085 190);
  --teal-800:   #0A4E4B;
  --teal-800:   oklch(0.36 0.075 190);
  --teal-line:  #98CCC9;
  --teal-line:  oklch(0.82 0.05 190);
  --teal-rule:  #A9DCD8;
  --teal-rule:  oklch(0.88 0.05 190);
  --teal-50:    #E3F4F2;
  --teal-50:    oklch(0.955 0.028 190);
  --teal-ink:   #33413F;

  --purple-600: #6A5397;
  --purple-600: oklch(0.50 0.085 300);
  --purple-700: #543F7F;
  --purple-700: oklch(0.42 0.085 300);
  --purple-800: #4A3870;
  --purple-800: oklch(0.36 0.075 300);
  --purple-900: #3B2B5D;
  --purple-900: oklch(0.30 0.075 300);
  --purple-body:#55437A;
  --purple-body:oklch(0.40 0.07 300);
  --purple-line:#CFC3E6;
  --purple-line:oklch(0.82 0.05 300);
  --purple-rule:#CFC3E6;
  --purple-rule:oklch(0.88 0.05 300);
  --purple-50:  #EEEAF7;
  --purple-50:  oklch(0.955 0.028 300);
  --purple-25:  #F1EEF9;
  --purple-25:  oklch(0.965 0.024 300);
  --purple-ink: #3B3648;

  --green-600:  #3E7040;
  --green-600:  oklch(0.50 0.085 145);
  --green-700:  #2F5A2E;
  --green-700:  oklch(0.42 0.085 145);
  --green-800:  #274F27;
  --green-800:  oklch(0.35 0.075 145);
  --green-line: #A5CEA1;
  --green-line: oklch(0.82 0.05 145);
  --green-rule: #B3DCAF;
  --green-rule: oklch(0.88 0.05 145);
  --green-50:   #E4F3E2;
  --green-50:   oklch(0.955 0.028 145);
  --green-ink:  #364234;

  --ink:        #2B2F38;
  --ink-2:      #5C616A;
  --ink-3:      #8E939C;
  --rule:       #E0E0DB;
  --paper:      #FCFCFB;
  --paper-2:    #F3F3F0;

  --sans: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;

  --pad: 22px;
  --measure: 720px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 { margin: 0; font-weight: 500; line-height: 1.25; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }

a { color: var(--teal-700); text-decoration-color: var(--teal-line); text-underline-offset: 3px; }
a:hover { color: var(--teal-800); text-decoration-color: currentColor; }

::selection { background: rgba(93, 202, 165, .34); color: var(--anchor); }

:focus-visible {
  outline: 3px solid var(--mint);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  background: var(--anchor);
  color: #fff;
  padding: 10px 16px;
  z-index: 30;
}
.skip:focus { left: 8px; top: 10px; }

.ico {
  width: 17px; height: 17px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  flex: 0 0 auto;
}

/* ---------- scroll progress ----------
   CSS-only, no JS, no layout cost. Fills teal to purple to green, so the bar
   walks through the three causes as you read. Hidden where scroll-driven
   animation is unsupported, and under reduced motion. */

.progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 4px;
  z-index: 25;
  background: rgba(26, 39, 57, .10);
  pointer-events: none;
}

.progress span {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--teal-600), var(--purple-600) 55%, var(--green-600));
  animation: progress-grow linear both;
  animation-timeline: scroll(root block);
}

@keyframes progress-grow { to { transform: scaleX(1); } }

@supports not (animation-timeline: scroll(root block)) {
  .progress { display: none; }
}

/* ---------- hero ---------- */

.hero { background: var(--anchor); }

.hero__photo { position: relative; }

.hero__photo img { width: 100%; height: auto; }

/* three-colour spine: plants the palette before you know what it means */
.hero__photo::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 6px;
  background: linear-gradient(90deg,
    var(--teal-600) 0 33.333%,
    var(--purple-600) 33.333% 66.666%,
    var(--green-600) 66.666% 100%);
}

.hero__text { padding: 30px var(--pad) 34px; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--anchor-200);
}
.eyebrow::before {
  content: "";
  width: 20px; height: 2px;
  background: var(--mint);
  flex: 0 0 auto;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 38px;
  line-height: 1.02;
  letter-spacing: -0.9px;
  color: #F6F8FB;
}

.hero__line {
  font-size: 19px;
  line-height: 1.5;
  color: var(--anchor-100);
  margin: 16px 0 0;
  text-wrap: pretty;
}

/* the five-item role line, as tags instead of a three-line wrap */
.hero__role {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 20px 0 0;
}
.hero__role .tag {
  font-size: 12.5px;
  line-height: 1;
  color: #A5B5C9;
  border: 1px solid #3A4759;
  border-radius: 999px;
  padding: 7px 13px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background-color .15s ease, border-color .15s ease;
}

.btn--solid { background: var(--mint); color: var(--teal-900); font-weight: 600; }
.btn--solid:hover { background: var(--mint-hover); }

.btn--ghost { background: transparent; color: var(--anchor-100); border-color: var(--anchor-line); }
.btn--ghost:hover { background: rgba(255,255,255,.09); }

.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: default; }

/* ---------- intro ---------- */

.intro {
  position: relative;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 36px var(--pad) 0;
}

/* hairline running out from the portrait */
.intro::before {
  content: "";
  position: absolute;
  top: 72px;
  left: calc(var(--pad) + 88px);
  right: var(--pad);
  height: 1px;
  background: var(--rule);
}

.intro__portrait {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 22px;
}

.intro__body p { font-size: 16.5px; line-height: 1.68; }
.intro__body p:first-child { font-size: 17.5px; }

/* number emphasis: same words, marked with a mint highlight */
.intro__body strong {
  color: var(--anchor);
  box-shadow: inset 0 -0.4em 0 rgba(93, 202, 165, .34);
}

/* ---------- causes ---------- */

.causes { margin-top: 48px; }

.causes h2 {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--pad) 22px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.4px;
  color: var(--anchor);
}

/* full-bleed bands, one per cause */
.cause {
  padding: 32px var(--pad);
  border-top: 1px solid var(--rule);
}
.cause:last-child { border-bottom: 1px solid var(--rule); }

.cause > * { max-width: calc(var(--measure) - var(--pad) * 2); margin-left: auto; margin-right: auto; }

.cause h3 {
  font-size: 23px;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.cause h3 .cause__tag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 12px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1px solid;
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}

.cause p { font-size: 16.5px; line-height: 1.68; }

.cause--teal   { background: var(--teal-50);   border-top-color: var(--teal-rule); }
.cause--teal h3 { color: var(--teal-800); }
.cause--teal .cause__tag { color: var(--teal-700); border-color: var(--teal-line); }
.cause--teal p { color: var(--teal-ink); }
.cause--teal strong { color: var(--teal-700); }

.cause--purple { background: var(--purple-50); border-top-color: var(--purple-rule); }
.cause--purple h3 { color: var(--purple-800); }
.cause--purple .cause__tag { color: var(--purple-700); border-color: var(--purple-line); }
.cause--purple p { color: var(--purple-ink); }
.cause--purple strong { color: var(--purple-700); }

.cause--green  { background: var(--green-50);  border-top-color: var(--green-rule); }
.cause--green:last-child { border-bottom-color: var(--green-rule); }
.cause--green h3 { color: var(--green-800); }
.cause--green .cause__tag { color: var(--green-700); border-color: var(--green-line); }
.cause--green p { color: var(--green-ink); }
.cause--green strong { color: var(--green-700); }

/* ---------- panel ---------- */

.panel {
  width: calc(100% - (var(--pad) * 2));
  max-width: calc(var(--measure) - (var(--pad) * 2));
  margin: 44px auto 0;
  padding: 26px 24px;
  /* Anchor tint, not a cause colour. Teal, purple and green each mean a
     specific cause; this section is the site's own voice, so it uses the
     site's own colour. */
  background: var(--anchor-50);
  border-radius: 12px;
}

.panel h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  color: var(--anchor);
  margin-bottom: 10px;
}
.panel p { color: var(--ink); font-size: 16.5px; line-height: 1.68; }

/* ---------- outside ---------- */
/* full-bleed band; on desktop the photo runs off the right edge */

.outside {
  margin-top: 48px;
  background: var(--paper-2);
  padding: 32px var(--pad);
}

.outside__photo {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 18px;
}

.outside__body { max-width: var(--measure); margin: 0 auto; }

.outside h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  color: var(--anchor);
  margin-bottom: 10px;
}
.outside p { font-size: 16.5px; line-height: 1.68; }

/* ---------- history ---------- */

.history {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 48px var(--pad) 0;
}

.history h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  color: var(--anchor);
  margin-bottom: 16px;
}

.history__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.history__list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 20px;
  row-gap: 2px;
  padding: 15px 0;
  border-bottom: 1px solid var(--rule);
  transition: background-color .15s ease;
}
.history__list li:hover { background: var(--anchor-50); }

.history__org {
  grid-column: 1; grid-row: 1;
  font-weight: 600;
  color: var(--anchor);
}

.history__when {
  grid-column: 2; grid-row: 1;
  font-size: 13px;
  color: var(--ink-3);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.history__role {
  grid-column: 1 / -1; grid-row: 2;
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.55;
}

.link-dl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid var(--teal-line);
  padding-bottom: 2px;
}
.link-dl:hover { border-bottom-color: currentColor; }

/* ---------- contact ---------- */

.contact {
  background: var(--anchor);
  margin-top: 52px;
  padding: 40px var(--pad) 30px;
}

.contact__lead {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.3;
  color: #F6F8FB;
  max-width: calc(var(--measure) - var(--pad) * 2);
  margin: 0 auto 24px;
  text-wrap: pretty;
}

.form { max-width: calc(var(--measure) - var(--pad) * 2); margin: 0 auto; }

.field { margin-bottom: 12px; }

.field label {
  display: block;
  font-size: 12.5px;
  letter-spacing: .03em;
  color: var(--anchor-200);
  margin-bottom: 6px;
}

.field input, .field textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--anchor-line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.field input:hover, .field textarea:hover { border-color: #5C6C82; }

.field textarea { resize: vertical; min-height: 96px; }

.field input:invalid:not(:placeholder-shown) { border-color: #F09595; }

.hp {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.cf-turnstile { margin: 14px 0; }

.form__status {
  margin: 12px 0 0;
  font-size: 14.5px;
  color: var(--anchor-100);
  min-height: 1.2em;
}
.form__status a { color: var(--mint); text-decoration-color: rgba(93,202,165,.5); }
.form__status[data-state="error"] { color: #F7C1C1; }

.social {
  display: flex;
  gap: 10px;
  max-width: calc(var(--measure) - var(--pad) * 2);
  margin: 28px auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--anchor-mid);
}

.social a {
  width: 38px; height: 38px;
  border: 1px solid var(--anchor-line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--anchor-100);
  transition: background-color .15s ease, border-color .15s ease;
}
.social a:hover { background: rgba(255,255,255,.09); border-color: var(--mint); color: #fff; }
.social svg { width: 17px; height: 17px; }
.social svg[viewBox="0 0 568 501"] { width: 19px; height: 17px; }

.colophon {
  max-width: calc(var(--measure) - var(--pad) * 2);
  margin: 18px auto 0;
  font-size: 12.5px;
  color: var(--anchor-200);
}

/* ---------- desktop ---------- */

@media (min-width: 768px) {
  :root { --pad: 40px; }

  .hero {
    display: flex;
    align-items: stretch;
    min-height: 470px;
  }

  .hero__text {
    flex: 1.08;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 56px 48px 56px 40px;
    order: 1;
  }

  .hero__inner { width: 100%; max-width: 520px; }

  .hero__photo {
    flex: 1;
    order: 2;
    overflow: hidden;
  }

  .hero__photo img,
  .hero__photo picture { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; }

  .hero h1 { font-size: 54px; letter-spacing: -1.4px; }
  .hero__line { font-size: 21px; margin-top: 20px; }

  .intro { padding-top: 56px; }

  .intro__portrait { width: 80px; height: 80px; margin-bottom: 24px; }

  .intro::before { top: 96px; left: calc(var(--pad) + 96px); }

  .causes { margin-top: 60px; }
  .causes h2 { font-size: 36px; letter-spacing: -0.5px; }
  .cause { padding: 38px var(--pad); }
  .cause h3 { font-size: 26px; }

  .panel { padding: 28px 30px; }
  .panel h2, .outside h2, .history h2 { font-size: 28px; }
  .contact__lead { font-size: 32px; }

  /* Full-bleed tint, but the contents sit in the same column as every other
     section: content box resolves to (--measure minus two --pad). */
  .outside {
    display: flex;
    align-items: center;
    gap: 34px;
    margin-top: 56px;
    padding-block: 44px;
    padding-inline: max(var(--pad), calc((100% - var(--measure)) / 2 + var(--pad)));
  }

  .outside picture {
    order: 2;
    width: 220px;
    flex: 0 0 auto;
  }

  .outside__photo {
    width: 220px;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 0;
  }

  .outside__body {
    order: 1;
    flex: 1;
    min-width: 0;
    max-width: none;
    padding: 0;
  }

  .outside h2 { font-size: 30px; }

  .history { padding-top: 56px; }
  .history__list li { padding: 16px 0; }

  .contact { padding: 52px var(--pad) 34px; }
}

@media (min-width: 1400px) {
  .hero__text { padding-right: 72px; }
  .hero__inner { max-width: 560px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
  .progress { display: none; }
}
