/* Site styles: Swiss grid, Inter throughout. Loaded after normalize.css. */

:root {
  --ink: #121212;
  --ink-soft: #3d3d3d;
  --mute: #767676;
  --line: #e4e4e4;
  --bg: #fff;
  --surface: #f5f5f5;
  --card: #ececea;
  --accent: #17606e;
  --accent-tint: #e6f0f2;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Type ramp */
  --fs-display: clamp(2.5rem, 5.5vw, 5rem);
  --fs-h2: clamp(1.5rem, 2.6vw, 2rem);
  --fs-h3: 1.25rem;
  --fs-body: 1.0625rem;
  --fs-small: .875rem;

  /* Layout */
  --margin: clamp(1.75rem, 8vw, 8rem);
  --gutter: 1.5rem;
  --maxw: 80rem;
  --section: clamp(4rem, 9vw, 7.5rem);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 500;
  color: var(--ink);
}

p {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

.wrap {
  max-width: calc(var(--maxw) + var(--margin) * 2);
  margin: 0 auto;
  padding: 0 var(--margin);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}

.small {
  font-size: var(--fs-small);
  line-height: 1.5;
}

.label {
  grid-column: 1 / span 2;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

/* Nav */

.site-nav__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .5rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  font-size: var(--fs-small);
  font-weight: 500;
}

.site-nav__name {
  font-size: 1rem;
  text-decoration: none;
}

.site-nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.5rem;
}

.site-nav__links a {
  font-weight: 400;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
}

/* Hero: full-width headline, supporting copy offset to the right half. */

.hero {
  padding-top: var(--section);
  padding-bottom: var(--section);
  row-gap: 1.75rem;
}

/* Availability: a key/value block in the lede column, above the intro. */

/* Columns 1–6, matching the left project card below. */
.status {
  grid-column: 1 / span 6;
  align-self: start;
  display: grid;
  grid-template-columns: 6rem 1fr;
  column-gap: 1rem;
  margin: 0;
  padding-top: .875rem;
  border-top: 1px solid var(--ink);
}

.status dt {
  justify-self: start;
  align-self: start;
  padding: 0 .625rem;
  border-radius: 999px;
  background: var(--accent-tint);
  font-weight: 500;
  color: var(--accent);
}

.status dd {
  margin: 0;
  color: var(--ink);
}

.hero h1 {
  grid-column: 1 / span 11;
  margin-bottom: 1.5rem;
  font-size: var(--fs-display);
  line-height: 1.02;
  letter-spacing: -.04em;
}

.hero__lede {
  grid-column: 7 / span 6;
  padding-top: .875rem;
  border-top: 1px solid var(--ink);
  color: var(--ink-soft);
  /* Cap the line length with padding so the rule still runs to the grid edge. */
  padding-right: max(0px, calc(100% - 52ch));
}

.hero__lede a {
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

.hero__lede a:hover {
  color: var(--accent);
}

/* Work: image-led two-column grid with captions. */

.work {
  padding-bottom: var(--section);
}

.work__head {
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
  border-top: 1px solid var(--line);
}

/* Column gap matches the page gutter, so each card spans exactly six columns. */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gutter);
}

/* Cards: a light gray panel with the image full-bleed on top and padded text below. */
.work-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  background: var(--card);
  text-decoration: none;
}

.work-card__img {
  overflow: hidden;
}

.work-card__img img {
  width: 100%;
  transition: transform .4s ease;
}

/* Project details sit above the title; the title is the outcome. */
.work-card__caption {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.75rem 2rem 0;
}

/* Pinned to the bottom so the links line up across a row. */
.work-card__more {
  margin-top: auto;
  padding: 1.5rem 2rem 1.75rem;
  font-weight: 500;
  color: var(--ink);
}

.work-card__more span {
  display: inline-block;
  transition: transform .2s ease;
}

.work-card:hover .work-card__more span {
  transform: translateX(4px);
}

.work-card h3 {
  max-width: 26ch;
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.03em;
  transition: color .2s ease;
}

.work-card__meta {
  color: var(--mute);
}

/* The project name leads the meta line; years and role stay quiet. */
.work-card__project {
  font-weight: 500;
  color: var(--ink);
}

.work-card__meta .sep {
  margin: 0 .375rem;
  color: var(--line);
}

.work-card:hover h3 {
  color: var(--accent);
}

.work-card:hover .work-card__img img {
  transform: scale(1.02);
}

/* Built with AI: same two-column grid as Work, with mock visuals drawn in CSS
   (made-up content, so nothing confidential is shown). */

.tools {
  padding-bottom: var(--section);
}

.tool-card h3 {
  margin-top: 1rem;
  font-size: var(--fs-h3);
  line-height: 1.25;
  letter-spacing: -.02em;
}

.tool-card__text {
  margin-top: .5rem;
  max-width: 52ch;
  color: var(--ink-soft);
}

/* The mock window fills to the bottom edge, like the cropped screens in the hero images. */
.tool-card__art {
  display: flex;
  align-items: stretch;
  justify-content: center;
  aspect-ratio: 16 / 10;
  padding: 8% 10% 0;
  overflow: hidden;
  background: #dfded9;
  font-size: clamp(.5625rem, .9vw, .75rem);
  line-height: 1.4;
}

.tool-card__art--dark {
  background: #2b2f36;
}

/* Three tools across on desktop, so this section reads lighter than Work. */
@media (min-width: 992px) {
  .tools-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tools-grid .tool-card__art {
    font-size: clamp(.5rem, .65vw, .625rem);
  }
}

/* Mock prototype: a browser view with the milestone bar that links the prototype's
   three files, over a placeholder app screen. */
.mock-proto {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.mock-proto__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .7em 1.1em;
  background: #1e1b4b;
  color: #fff;
  font-weight: 500;
}

.mock-proto__next {
  position: relative;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.mock-proto__cursor {
  position: absolute;
  top: 55%;
  right: 18%;
  width: 1.2em;
}

.mock-proto__app {
  display: flex;
  flex: 1;
}

.mock-proto__nav {
  display: flex;
  flex-direction: column;
  gap: .7em;
  width: 22%;
  padding: 1.1em .9em;
  background: #f3f2ef;
  border-right: 1px solid #ecebe7;
}

.mock-proto__nav i,
.mock-proto__row i {
  display: block;
  height: .55em;
  border-radius: 2px;
  background: #dcd9d3;
}

.mock-proto__nav i:first-child {
  background: var(--accent);
}

.mock-proto__main {
  flex: 1;
  padding: 1.1em 1.2em;
}

.mock-proto__title {
  display: block;
  width: 40%;
  height: .9em;
  margin-bottom: 1.1em;
  border-radius: 2px;
  background: var(--ink-soft);
}

.mock-proto__row {
  display: flex;
  align-items: center;
  gap: .8em;
  padding: .65em 0;
  border-top: 1px solid #ecebe7;
}

.mock-proto__row em {
  flex: none;
  width: .6em;
  height: .6em;
  border-radius: 50%;
  background: #d4d1cb;
}

.mock-proto__row em.ok { background: #1a7f4b; }
.mock-proto__row em.bad { background: #c0392b; }

.mock-proto__row i {
  background: #e3e0da;
}

.mock-proto__row i:nth-of-type(1) { width: 35%; }
.mock-proto__row i:nth-of-type(2) { width: 25%; margin-left: auto; }

/* Mock Slack message */
.mock-slack {
  width: 100%;
  padding: 1.25em 1.5em;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

.mock-slack__head {
  display: flex;
  align-items: center;
  gap: .6em;
}

.mock-slack__avatar {
  display: grid;
  place-items: center;
  width: 2.4em;
  height: 2.4em;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.mock-slack__name {
  font-weight: 600;
}

.mock-slack__badge {
  padding: .05em .4em;
  border-radius: 3px;
  background: #ecebe7;
  color: var(--mute);
  font-size: .8em;
  font-weight: 600;
}

.mock-slack__time {
  color: var(--mute);
}

.mock-slack__title {
  margin: 1em 0 .8em;
  font-weight: 600;
}

.mock-slack__item {
  margin-bottom: .9em;
  padding-left: .9em;
  border-left: 3px solid var(--accent);
}

.mock-slack__item--faded {
  opacity: .55;
}

.mock-slack__quote {
  font-style: italic;
}

.mock-slack__meta {
  margin-top: .2em;
  color: var(--mute);
}

.mock-slack__why {
  margin-top: .4em;
  color: var(--ink-soft);
}

.mock-slack__section {
  font-weight: 600;
}

.mock-slack__reactions {
  display: flex;
  gap: .5em;
  margin-top: .9em;
}

.mock-slack__reactions span {
  padding: .15em .55em;
  border: 1px solid #e3e0da;
  border-radius: 999px;
  color: var(--ink-soft);
}

/* Mock ticket with an agent-added history */
.mock-ticket {
  width: 100%;
  padding: 1.25em 1.5em;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.mock-ticket__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mock-ticket__id {
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}

.mock-ticket__status {
  padding: .1em .6em;
  border-radius: 999px;
  background: #ecebe7;
  color: var(--ink-soft);
}

.mock-ticket__title {
  margin: .6em 0 1.1em;
  font-size: 1.3em;
  font-weight: 600;
  letter-spacing: -.01em;
}

.mock-ticket__section {
  margin-bottom: .6em;
  padding-top: .8em;
  border-top: 1px solid #e3e0da;
  font-weight: 600;
}

.mock-ticket__section span {
  margin-left: .5em;
  padding: .05em .45em;
  border-radius: 3px;
  background: var(--accent-tint);
  color: var(--accent);
  font-size: .85em;
  font-weight: 500;
}

.mock-ticket__timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mock-ticket__timeline li {
  display: flex;
  gap: 1em;
  padding: .35em 0;
  border-bottom: 1px solid #f0eee9;
  color: var(--ink-soft);
}

.mock-ticket__timeline li span {
  width: 3em;
  color: var(--mute);
  font-variant-numeric: tabular-nums;
}

.mock-ticket__stat {
  margin-top: .9em;
  color: var(--ink-soft);
}

.mock-ticket__stat strong {
  color: var(--ink);
  font-size: 1.3em;
  font-weight: 600;
}

.mock-ticket__stat span {
  margin: 0 .3em;
  color: var(--mute);
}

/* About */

.about {
  padding-bottom: var(--section);
}

.about__inner {
  row-gap: 1.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.about__copy {
  grid-column: 3 / span 6;
}

.about h2 {
  margin-bottom: 1.25rem;
  font-size: var(--fs-h2);
  line-height: 1.15;
  letter-spacing: -.025em;
}

.about__copy p {
  color: var(--ink-soft);
  max-width: 60ch;
}

.about__copy p + p {
  margin-top: 1rem;
}

.about__photo {
  grid-column: 9 / span 4;
  align-self: start;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-top: 2rem;
  padding-bottom: 2.5rem;
  color: var(--mute);
}

.site-footer__name {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.5rem;
}

.site-footer__links a {
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--accent);
}

/* Responsive */

@media (max-width: 991px) {
  .hero h1 {
    grid-column: 1 / -1;
  }

  .status {
    grid-column: 1 / span 6;
  }

  .hero__lede {
    grid-column: 7 / span 6;
  }

  .about__copy {
    grid-column: 3 / span 10;
  }

  .about__photo {
    grid-column: 3 / span 6;
  }
}

@media (max-width: 760px) {
  :root {
    --gutter: 1rem;
  }

  .hero__lede {
    padding-top: 0;
    border-top: 0;
  }

  .hero h1 {
    margin-bottom: 0;
  }

  .label,
  .status,
  .hero__lede,
  .about__copy,
  .about__photo {
    grid-column: 1 / -1;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .work-card__caption {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .work-card__more {
    padding: 1.25rem 1.25rem 1.5rem;
  }

  .about__photo {
    max-width: 22rem;
  }
}

/* Case studies */

.cs {
  --text-width: 40rem;
}

.cs-hero {
  padding-top: var(--section);
  padding-bottom: 2.5rem;
  row-gap: 1.25rem;
}

.cs .cs-hero__meta {
  grid-column: 1 / -1;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--mute);
}

.cs-hero__meta .sep {
  margin: 0 .375rem;
  color: var(--line);
}

.cs-hero h1 {
  grid-column: 1 / span 10;
  font-size: clamp(2.25rem, 5.2vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -.035em;
}

.cs-hero__image img {
  width: 100%;
}

.cs-summary {
  row-gap: 2rem;
  padding-top: var(--section);
}

.cs-summary__item {
  grid-column: span 4;
  color: var(--ink-soft);
}

.cs .cs-summary__label {
  margin-bottom: .75rem;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--accent);
}

.cs .cs-summary__item p,
.cs .cs-summary__item li {
  font-size: var(--fs-body);
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--ink-soft);
}

.cs .cs-summary__item p {
  margin: 0 0 .75rem;
}

.cs .cs-summary__item ul {
  margin: 0;
  padding-left: 1.1em;
}

.cs .cs-summary__item li + li {
  margin-top: .375rem;
}

/* Body sections. These classes come from the original case-study markup. */

.cs .page-section {
  padding: var(--section) var(--margin) 0;
}

/* Everything in the body starts at column 1; text keeps a reading width. */
.cs .content-wrapper {
  max-width: var(--maxw);
  margin: 0 auto;
}

.cs .text-block,
.cs .inline-image {
  max-width: var(--text-width);
}

.cs p,
.cs li {
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
}

.cs .text-block p {
  margin-bottom: 1.25rem;
}

.cs .list-leadin {
  margin-bottom: 0;
}

.cs .text-block ul {
  margin: 0 0 1.25rem;
  padding-left: 1.1em;
}

.cs .text-block li + li {
  margin-top: .25rem;
}

.cs strong {
  font-weight: 500;
  color: var(--ink);
}

/* Give each paragraph room before the image that follows it. */
.cs .text-block + .full-image,
.cs .text-block + ._2-image-row,
.cs .text-block + ._3-image-row,
.cs .text-block + ._4-image-row,
.cs .text-block + .inline-image {
  margin-top: 2.5rem;
}

.cs .section-heading {
  max-width: var(--maxw);
  margin: 0 auto 2rem;
  padding-top: .875rem;
  border-top: 1px solid var(--ink);
  font-size: var(--fs-h2);
  line-height: 1.15;
  letter-spacing: -.025em;
}

.cs .cs-summary .section-heading {
  grid-column: 1 / -1;
  margin: 0;
}

.cs h4 {
  margin: 0 0 1rem;
  font-size: var(--fs-h3);
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--ink);
}

/* Images */

.cs .images {
  display: block;
  width: 100%;
}

.cs .images.image-border {
  border: 1px solid var(--line);
  background: #fff;
}

.cs ._2-image-row,
.cs ._3-image-row,
.cs ._4-image-row {
  display: grid;
  gap: .5rem;
  align-items: center;
}

.cs ._2-image-row {
  grid-template-columns: 1fr 1fr;
}

.cs ._2-image-row._30-70 {
  grid-template-columns: 1fr 1.5fr;
}

.cs ._2-image-row._70-30 {
  grid-template-columns: 2fr 1fr;
}

.cs ._2-image-row.top-align {
  align-items: start;
}

.cs ._3-image-row {
  grid-template-columns: repeat(3, 1fr);
}

.cs ._4-image-row {
  grid-template-columns: repeat(4, 1fr);
}

/* Gray panel bleeds out by its padding so its contents stay on the grid edges. */
.cs .content-wrapper.in-product {
  max-width: none;
  /* -2rem, or the centering margin minus 2rem once the screen is wider than the grid. */
  margin-left: max(-2rem, calc((100% - var(--maxw)) / 2 - 2rem));
  margin-right: max(-2rem, calc((100% - var(--maxw)) / 2 - 2rem));
  padding: 2rem;
  background: var(--surface);
}

/* Captions belong to the image: flush with its left edge, not the text column. */
.cs .image-caption {
  max-width: var(--text-width);
  padding-top: .625rem;
}

.cs .font-caption {
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--mute);
}

/* Pull quotes: larger type in the text column with an accent rule. */
.cs .block-quote {
  max-width: 46rem;
  margin: 2.5rem 0 0;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid var(--accent);
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -.02em;
  color: var(--ink);
}

.cs .block-quote__cite {
  display: block;
  margin-top: 1rem;
  font-size: var(--fs-small);
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--mute);
}

/* Spacing utilities used in the case-study markup. */
.cs .margin-top-1 { margin-top: 1rem; }
.cs .margin-top-2 { margin-top: 2rem; }
.cs .margin-top-4 { margin-top: 4rem; }
.cs .margin-bottom-1 { margin-bottom: 1rem; }
.cs .margin-bottom-2 { margin-bottom: 2rem; }
.cs .margin-bottom-4 { margin-bottom: 4rem; }

/* After the utilities so they win: back-to-back wrappers in one section stack
   without extra space, except the gray panels. */
.cs .content-wrapper.margin-top-4 {
  margin-top: 0;
}

.cs .content-wrapper.in-product.margin-top-4 {
  margin-top: 4rem;
}

/* "Next" section: the homepage work card, half width
   (order: RBAC → Design System → PaySimple → Zen Planner → RBAC). */
.cs .cs-next {
  padding-bottom: var(--section);
}

.cs .work-card__meta {
  margin: 0;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--mute);
}

.cs .work-card__outcome {
  margin-top: .375rem;
  color: var(--ink-soft);
}

.cs-next__all {
  display: inline-block;
  margin-top: 2rem;
  font-size: var(--fs-small);
  color: var(--mute);
  text-decoration: none;
}

.cs-next__all:hover {
  color: var(--accent);
}

@media (max-width: 991px) {
  .cs-hero h1 {
    grid-column: 1 / -1;
  }

  .cs-summary__item {
    grid-column: 1 / -1;
  }

  .cs-summary {
    row-gap: 1.5rem;
  }
}

@media (max-width: 760px) {
  .cs .content-wrapper.in-product {
    margin-left: 0;
    margin-right: 0;
    padding: 1rem;
  }

  .cs ._2-image-row,
  .cs ._3-image-row,
  .cs ._4-image-row {
    grid-template-columns: 1fr;
  }
}

/* Error pages (401, 404) */

.error-page {
  min-height: 60vh;
  padding-top: var(--section);
  padding-bottom: var(--section);
  row-gap: 1.25rem;
  align-content: start;
}

.error-page__body {
  grid-column: 3 / span 8;
}

.error-page h1 {
  margin-bottom: 1.25rem;
  font-size: var(--fs-display);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.error-page p {
  max-width: 40rem;
  color: var(--ink-soft);
}

.error-page__link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: var(--fs-small);
  color: var(--mute);
  text-decoration: none;
}

.error-page__link:hover {
  color: var(--accent);
}

@media (max-width: 760px) {
  .error-page__body {
    grid-column: 1 / -1;
  }
}

/* Display type: heavier Inter with tight tracking, so headings carry the page. */

.hero h1,
.cs-hero h1,
.error-page h1 {
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.045em;
}

.hero h1 {
  font-size: clamp(2.75rem, 6vw, 5.25rem);
}


/* Section heads: big titles instead of small labels, no rule above. */
.work__head {
  padding-top: 0;
  padding-bottom: 2rem;
  border-top: 0;
}

.work__head .label,
.about .label {
  grid-column: 1 / -1;
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.04em;
}

.about__inner {
  padding-top: 0;
  border-top: 0;
  row-gap: 2rem;
}

.about__copy {
  grid-column: 1 / span 7;
}

.about h2,
.cs .section-heading {
  font-weight: 600;
  letter-spacing: -.035em;
}

/* Tool cards: the same panel as the work cards. */
.tool-card {
  overflow: hidden;
  border-radius: 12px;
  background: var(--card);
}

.tool-card__text {
  margin-top: 0;
  padding: 0 1.75rem 1.75rem;
  font-size: .9375rem;
  line-height: 1.55;
}

.tool-card h3 {
  margin-top: 0;
  padding: 1.5rem 1.75rem .875rem;
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.03em;
}

@media (max-width: 991px) {
  .about__copy {
    grid-column: 1 / -1;
  }

  .about__photo {
    grid-column: 1 / span 6;
  }
}

@media (max-width: 760px) {
  .tool-card h3,
  .tool-card__text {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}
