/* Kinetic Ledgers
   Palette: cobalt, ink, chalk, citron, lilac.
   Type: Bricolage Grotesque (headlines, numbers), Instrument Sans (body).
   Signature: a scoreboard-style ledger in the hero, and slanted section edges. */

:root {
  --cobalt: #2b3af0;
  --cobalt-deep: #1d27b9;
  --ink: #0c1033;
  --chalk: #f7f8ff;
  --lilac: #e3e1ff;
  --lilac-soft: #efeeff;
  --citron: #e2f94b;
  --muted: #474c78;
  --muted-on-dark: #c4c9ff;
  --rule: #cfd2f2;
  --focus: #2b3af0;

  --font-display: "Bricolage Grotesque", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --container: 68rem;
  --gutter: 1.5rem;
  --slant: 2.5rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

/* Headings */
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  color: inherit;
}

h1 {
  font-size: clamp(2.75rem, 6.4vw, 5.25rem);
  font-weight: 800;
  font-stretch: 80%;
  line-height: 0.95;
  letter-spacing: -0.015em;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 800;
  font-stretch: 85%;
  line-height: 1;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.15;
}

p {
  margin: 0;
}

a {
  color: var(--cobalt);
}

a:hover {
  color: var(--cobalt-deep);
}

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

.on-dark {
  --focus: var(--citron);
}

/* Header (sits on the cobalt hero) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--cobalt);
  color: var(--chalk);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 3.75rem;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  font-stretch: 80%;
  letter-spacing: -0.005em;
  color: var(--chalk);
  text-decoration: none;
  white-space: nowrap;
}

.wordmark:hover {
  color: var(--citron);
}

.nav {
  display: none;
  gap: 1.75rem;
  margin-left: auto;
}

.nav a {
  font-weight: 500;
  font-size: 0.975rem;
  color: var(--muted-on-dark);
  text-decoration: none;
}

.nav a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

@media (min-width: 52rem) {
  .nav {
    display: flex;
  }
}

/* Buttons and links */
.button {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  background: var(--citron);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 999px;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.button:hover {
  background: #eeff7a;
  color: var(--ink);
  transform: translateY(-2px);
}

.button-small {
  padding: 0.55rem 1.1rem;
  font-size: 0.95rem;
  white-space: nowrap;
}

.button-ink {
  background: var(--ink);
  color: var(--chalk);
}

.button-ink:hover {
  background: var(--cobalt-deep);
  color: #fff;
}

.text-link {
  font-weight: 600;
  color: inherit;
  text-underline-offset: 0.25em;
}

.on-dark .text-link:hover {
  color: var(--citron);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.5rem;
  margin-top: 1.5rem;
}

/* Hero */
.hero {
  position: relative;
  padding-block: clamp(1.75rem, 4vw, 3rem) calc(clamp(2.25rem, 5vw, 3.5rem) + var(--slant));
  background: var(--cobalt);
  color: var(--chalk);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--slant)), 0 100%);
}

.hero-grid {
  display: grid;
  gap: 2.25rem;
  align-items: center;
}

@media (min-width: 60rem) {
  .hero-grid {
    grid-template-columns: 1.05fr 1fr;
    gap: 3rem;
  }
}

.hero h1 {
  max-width: 11ch;
}

.lead {
  max-width: 32rem;
  margin-top: 1.1rem;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--muted-on-dark);
}

.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.5rem;
  padding: 0.4rem 1rem 0.4rem 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
}

.badge-chip img {
  display: block;
  width: 2.25rem;
  height: auto;
}

/* Scoreboard ledger: the memorable element */
.board {
  margin: 0;
  padding: 1.25rem 1.25rem 1rem;
  background: var(--ink);
  color: var(--chalk);
  border-radius: 1.25rem;
  box-shadow: 0.6rem 0.6rem 0 var(--citron);
  transform: rotate(-1.5deg);
}

.board-scroll {
  overflow-x: auto;
}

.board table {
  width: 100%;
  min-width: 26rem;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums lining-nums;
}

.board caption {
  padding-bottom: 0.75rem;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--citron);
}

.board th,
.board td {
  padding: 0.55rem 0.5rem;
  text-align: left;
  font-weight: 400;
  border-bottom: 1px solid rgba(196, 201, 255, 0.22);
}

.board thead th {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted-on-dark);
}

.board tbody th,
.board tfoot th {
  font-weight: 600;
}

.board .num {
  text-align: right;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.board .dim {
  color: #8a90c9;
}

.board tbody td:nth-child(3) {
  color: var(--citron);
}

.board tfoot th,
.board tfoot td {
  border-bottom: 0;
  border-top: 2px solid var(--citron);
  font-weight: 700;
}

.board tfoot td:nth-child(3) {
  color: var(--citron);
}

.board figcaption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted-on-dark);
}

/* One orchestrated moment: rows post one at a time on load */
@keyframes post-row {
  from {
    opacity: 0;
    transform: translateX(-0.75rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.post {
  animation: post-row 0.5s ease-out both;
}

.board tbody .post:nth-child(1) { animation-delay: 0.3s; }
.board tbody .post:nth-child(2) { animation-delay: 0.8s; }
.board tbody .post:nth-child(3) { animation-delay: 1.3s; }
.board tbody .post:nth-child(4) { animation-delay: 1.8s; }
.board tfoot .post { animation-delay: 2.4s; }

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .post {
    animation: none;
  }

  .button {
    transition: none;
  }

  .button:hover {
    transform: none;
  }
}

/* Sections */
.section {
  padding-block: clamp(2.25rem, 5vw, 3.75rem);
}

.section h2 {
  margin-bottom: 1.5rem;
}

.section-ink {
  background: var(--ink);
  color: var(--chalk);
}

.section-lilac {
  background: var(--lilac);
}

.section-tint {
  background: var(--lilac-soft);
}

/* Heading on the left, content on the right, on wide screens */
.split {
  display: grid;
  gap: 1.5rem 3rem;
}

.split h2 {
  margin-bottom: 0;
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: 1fr 2fr;
    align-items: start;
  }

  .split h2 {
    position: sticky;
    top: 5.5rem;
  }
}

/* Who I work with: color blocks, each its own color */
.audiences {
  display: grid;
  gap: 1rem;
}

.audience {
  padding: 1.5rem 1.5rem 1.75rem;
  border-radius: 1.25rem;
}

.audience h3 {
  margin-bottom: 0.6rem;
  font-size: 1.55rem;
  font-stretch: 85%;
  font-weight: 800;
}

.audience-lilac {
  background: var(--lilac);
}

.audience-citron {
  background: var(--citron);
}

.audience-white {
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--ink);
}

@media (min-width: 56rem) {
  .audiences {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .audience:nth-child(2) {
    margin-top: 1.5rem;
  }

  .audience:nth-child(3) {
    margin-top: 3rem;
  }
}

/* Problems, large statements on ink */
.problems {
  margin: 0;
  padding: 0;
  list-style: none;
}

.problems li {
  position: relative;
  padding: 0.9rem 0 0.9rem 1.75rem;
  border-bottom: 1px solid rgba(196, 201, 255, 0.25);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.25;
}

.problems li:first-child {
  border-top: 1px solid rgba(196, 201, 255, 0.25);
}

.problems li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.35rem;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--citron);
  transform: rotate(45deg);
}

/* Services */
.services-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 60rem) {
  .services-grid {
    grid-template-columns: 1.5fr 1fr;
    gap: 2.5rem;
    align-items: start;
  }
}

.services {
  border-top: 3px solid var(--ink);
}

.service {
  padding-block: 1rem;
  border-bottom: 1px solid var(--rule);
}

.service h3 {
  margin-bottom: 0.3rem;
}

.service p {
  color: var(--muted);
}

.included {
  padding: 1.5rem;
  background: var(--cobalt);
  color: var(--chalk);
  border-radius: 1.25rem;
}

.included h3 {
  font-size: 1.5rem;
  font-weight: 800;
  font-stretch: 85%;
  color: var(--citron);
}

.included ul {
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.included li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.975rem;
  line-height: 1.45;
}

.included li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.75rem;
  width: 0.7rem;
  height: 0.38rem;
  border-left: 2px solid var(--citron);
  border-bottom: 2px solid var(--citron);
  transform: rotate(-45deg);
}

.included .note {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--muted-on-dark);
}

.note {
  font-size: 0.925rem;
  line-height: 1.45;
  color: var(--muted);
}

/* Steps: a real sequence, so numbered */
.steps {
  display: grid;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0 0.75rem;
  align-content: start;
}

.steps li::before {
  content: counter(step);
  grid-row: span 2;
  font-family: var(--font-display);
  font-size: 3.25rem;
  font-weight: 800;
  font-stretch: 80%;
  line-height: 0.85;
  color: var(--cobalt);
}

.steps p {
  margin-top: 0.3rem;
  color: var(--muted);
}

.section-lilac .note {
  margin-top: 1.5rem;
  color: var(--muted);
}

@media (min-width: 56rem) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .steps li {
    grid-template-columns: 1fr;
    gap: 0.5rem 0;
  }

  .steps li::before {
    grid-row: auto;
    font-size: 4.5rem;
  }
}

/* About, with the badge */
.about {
  display: grid;
  gap: 1.5rem 3rem;
  align-items: center;
}

.about-badge {
  display: block;
  width: min(14rem, 60%);
  height: auto;
}

.about h2 {
  margin-bottom: 1rem;
}

@media (min-width: 48rem) {
  .about {
    grid-template-columns: 14rem 1fr;
  }

  .about-badge {
    width: 100%;
  }
}

.prose {
  max-width: 40rem;
}

.prose p + p {
  margin-top: 0.9rem;
}

/* FAQ */
.faq {
  border-top: 3px solid var(--ink);
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 56rem) {
  .faq {
    column-count: 2;
    column-gap: 3rem;
  }

  .faq details {
    break-inside: avoid;
  }
}

.faq summary {
  position: relative;
  padding: 0.95rem 2.25rem 0.95rem 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 650;
  line-height: 1.25;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0.55rem;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--cobalt);
  color: #fff;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "\2212";
  background: var(--ink);
}

.faq details p {
  max-width: 40rem;
  padding-bottom: 1rem;
  color: var(--muted);
}

/* Closing call to action */
.closing {
  padding-block: calc(var(--slant) + 2rem) clamp(2.25rem, 5vw, 3.25rem);
  background: var(--citron);
  color: var(--ink);
  clip-path: polygon(0 var(--slant), 100% 0, 100% 100%, 0 100%);
  margin-top: calc(var(--slant) * -1);
}

.closing-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.closing h2 {
  max-width: 16ch;
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  line-height: 0.95;
}

.closing .actions {
  margin-top: 0;
}

/* Footer */
.site-footer {
  padding-block: 1.5rem;
  background: var(--ink);
  color: var(--muted-on-dark);
  font-size: 0.975rem;
}

.site-footer a {
  color: var(--chalk);
}

.site-footer a:hover {
  color: var(--citron);
}

.footer-inner {
  display: grid;
  gap: 0.2rem;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  font-stretch: 80%;
  color: var(--chalk);
}

.legal {
  max-width: 46rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

@media (min-width: 48rem) {
  .footer-inner {
    grid-template-columns: 1fr auto auto;
    gap: 0.2rem 2.5rem;
    align-items: baseline;
  }

  .legal {
    grid-column: 1 / -1;
    margin-top: 1rem;
  }
}

/* Small phones */
@media (max-width: 30rem) {
  .header-inner {
    gap: 0.75rem;
  }

  .wordmark {
    font-size: 1.15rem;
  }

  .button-small {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }

  .board {
    transform: none;
    box-shadow: 0.4rem 0.4rem 0 var(--citron);
  }
}

/* Let grid children shrink so wide tables scroll inside their panel */
.hero-grid > *,
.split > *,
.services-grid > *,
.about > * {
  min-width: 0;
}

/* Small phones: fit the scoreboard without sideways scrolling */
@media (max-width: 30rem) {
  .board {
    padding: 1rem 0.9rem 0.9rem;
  }

  .board table {
    min-width: 0;
  }

  .board th,
  .board td {
    padding: 0.5rem 0.3rem;
  }

  .board thead th {
    font-size: 0.75rem;
  }

  .board .num {
    font-size: 0.95rem;
  }

  .board tbody th,
  .board tfoot th {
    font-size: 0.9rem;
  }
}
