@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,500&family=Work+Sans:wght@400;500;600&display=swap');

:root {
  --bg: #f8f5ef;
  --ink: #1b1812;
  --ink-soft: #5c5646;
  --ink-faint: #6b6350;
  --accent: #a9895d;
  --accent-deep: #7c6242;
  --line: #ddd3bd;
  --panel-dark: #15120d;
  --panel-dark-text: #f2ede2;
  --max: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Work Sans', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
}

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

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 640px) {
  .wrap { padding: 0 24px; }
}

/* ---------- Nav ---------- */
.site-nav {
  padding: 34px 0 0;
}

.site-nav .wrap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.site-nav .wordmark {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--ink);
}

.site-nav .links {
  display: flex;
  gap: 28px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.site-nav .links a {
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.site-nav .links a:hover,
.site-nav .links a.current {
  color: var(--ink);
  border-color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 96px;
  padding-bottom: 88px;
}

.hero h1 {
  font-size: clamp(2.2rem, 3.7vw, 3.4rem);
  max-width: none;
  letter-spacing: -0.01em;
}



.hero h1 .glare {
  background: linear-gradient(100deg, var(--ink) 42%, #e3cfa6 50%, var(--ink) 58%);
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  color: transparent;
  animation: glare 10s ease-in-out 1.5s infinite;
}

@keyframes glare {
  0% { background-position: 100% 0; }
  15% { background-position: 0% 0; }
  100% { background-position: 0% 0; }
}

.hero h1 .nobr {
  white-space: nowrap;
}

/* "purpose" gets a confident marker stroke that draws in once when the page loads */
.hero h1 .uline {
  position: relative;
  display: inline-block;
}

.hero h1 .uline svg {
  position: absolute;
  left: -0.02em;
  bottom: -0.14em;
  width: calc(100% + 0.04em);
  height: 0.3em;
  overflow: visible;
  pointer-events: none;
  clip-path: inset(0 100% 0 0);
  animation: marker 0.6s cubic-bezier(0.3, 0.7, 0.2, 1) 0.5s forwards;
}

.hero h1 .uline path {
  fill: var(--accent);
}

@keyframes marker {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1 .glare {
    animation: none;
    background: none;
    color: var(--ink);
  }
  .hero h1 .uline svg {
    animation: none;
    clip-path: none;
  }
}

.hero .lede {
  margin-top: 28px;
  max-width: 54ch;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

.hero .lede + .lede {
  margin-top: 16px;
}

/* ---------- Work index ---------- */
.work-index h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.work-row {
  display: grid;
  grid-template-columns: 100px 1fr 120px 28px;
  align-items: center;
  gap: 24px;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.25s ease;
}

.work-row:hover {
  background: linear-gradient(90deg, rgba(169,137,93,0.08), transparent 70%);
}

.work-row .years {
  font-size: 0.9rem;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.work-row .name-role {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.work-row .name-role .name {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 500;
}

.work-row .name-role .role {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.work-row .blurb {
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: 32ch;
  display: none;
}

@media (min-width: 860px) {
  .work-row .blurb { display: block; }
  .work-row { grid-template-columns: 100px 1fr 32ch 120px 28px; }
}

.work-row .logo {
  width: 120px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}

.work-row .logo img {
  height: calc(var(--h) * 1px);
  width: auto;
  max-width: 100%;
}

.work-row .arrow {
  font-size: 1.3rem;
  color: var(--accent);
  transform: translateX(-6px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.work-row:hover .arrow {
  transform: translateX(0);
  opacity: 1;
}

@media (max-width: 640px) {
  .work-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "years arrow"
      "name-role logo";
    row-gap: 6px;
  }
  .work-row .logo {
    grid-area: logo;
    align-self: end;
    justify-self: end;
    width: 96px;
    height: 28px;
    justify-content: flex-end;
  }
  .work-row .logo img {
    height: calc(var(--h) * 0.8px);
  }
  .work-row .years { grid-area: years; }
  .work-row .arrow { grid-area: arrow; justify-self: end; opacity: 1; transform: none; }
  .work-row .name-role { grid-area: name-role; }
  .work-row .blurb { display: none; }
}

/* ---------- About / closing ---------- */
.about {
  padding-top: 100px;
  padding-bottom: 100px;
  border-top: 1px solid var(--line);
}

.about h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  max-width: 20ch;
}

.about .lede {
  margin-top: 24px;
  max-width: 56ch;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.contact-line {
  margin-top: 36px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 1rem;
}

.contact-line a {
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

.contact-line a:hover { color: var(--accent-deep); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 40px 0 60px;
  color: var(--ink-faint);
  font-size: 0.85rem;
}

/* ---------- Case study template ---------- */
.cs-header {
  padding-top: 64px;
  padding-bottom: 40px;
}

.cs-header .eyebrow-role {
  color: var(--ink-soft);
  font-size: 1rem;
}

.cs-header h1 {
  margin-top: 10px;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
}

.cs-hero-image {
  width: 100%;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.cs-hero-image img { width: 100%; height: auto; }

.cs-body {
  padding-top: 20px;
  padding-bottom: 40px;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 64px;
}

@media (max-width: 860px) {
  .cs-body { grid-template-columns: 1fr; gap: 32px; }
}

.cs-scope-label {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--ink-soft);
  position: sticky;
  top: 28px;
  align-self: start;
}

@media (max-width: 720px) {
  .cs-scope-label {
    position: static;
  }
}

.scope-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.scope-item {
  border-left: 2px solid var(--line);
  padding-left: 18px;
}

.scope-item .term {
  font-weight: 600;
  font-size: 1rem;
}

.scope-item .desc {
  color: var(--ink-soft);
  font-size: 0.96rem;
  margin-top: 4px;
}

.cs-section {
  padding: 46px 0;
  border-top: 1px solid var(--line);
}

.cs-section:first-of-type { border-top: none; padding-top: 0; }

.cs-section h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  max-width: 26ch;
}

.cs-section .body-text {
  margin-top: 18px;
  max-width: 68ch;
  color: var(--ink);
}

.cs-section .body-text p + p { margin-top: 16px; }

.feature-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 68ch;
}

.feature-list li {
  padding-left: 20px;
  border-left: 2px solid var(--line);
}

.feature-list strong {
  color: var(--ink);
}

.outcome {
  margin-top: 26px;
  padding-left: 20px;
  border-left: 2px solid var(--accent);
  max-width: 60ch;
}

.outcome .label {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--accent-deep);
  display: block;
  margin-bottom: 6px;
}

.cs-figure {
  margin-top: 30px;
}

.cs-figure img {
  width: 100%;
  border-radius: 2px;
}

.cs-figure.inset img {
  max-width: 420px;
}

.cs-figure.inset-lg img {
  max-width: 640px;
}

.cs-figure.capped img {
  max-width: 100%;
  max-height: 480px;
  width: auto;
  height: auto;
}

.cs-figure-row.capped {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;
}

.cs-figure-row.capped figure {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cs-figure-row.capped img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
}

@media (max-width: 720px) {
  .cs-figure-row.capped {
    grid-template-columns: 1fr;
  }
}

.cs-figure-row {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.cs-figure-row img {
  width: 100%;
  border-radius: 2px;
}

.cs-figure-row figcaption {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

@media (max-width: 720px) {
  .cs-figure-row {
    grid-template-columns: 1fr;
  }
}

.cs-figure figcaption {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

.cs-nav-next {
  border-top: 1px solid var(--line);
  padding-top: 48px;
  padding-bottom: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.cs-nav-next .to-work {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.cs-nav-next .to-work .page-name {
  color: var(--accent-deep);
}

.cs-nav-next .next-project {
  text-align: right;
}

.cs-nav-next .label {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-bottom: 4px;
}

.cs-nav-next .name {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
}
