:root {
  --paper: #FFFFFF;
  --paper-2: #F1F4F3;
  --ink: #15212B;
  --slate: #56636E;
  --rule: #D9E0E0;
  --pine: #0E4F4A;
  --pine-2: #0A3B37;
  --marigold: #F2B233;
  --on-pine: #FFFFFF;
  --focus: #1F6FEB;

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Public Sans", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 4vw, 2.625rem);
  --step-4: clamp(2.5rem, 6.4vw, 4.5rem);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F181F;
    --paper-2: #16222A;
    --ink: #E8EEEC;
    --slate: #A3B1B6;
    --rule: #2A3940;
    --pine: #5FC2B5;
    --pine-2: #0E4F4A;
    --on-pine: #06201D;
    --focus: #7FB2FF;
    color-scheme: dark;
  }
}

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

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

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

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

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.08;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p { margin: 0; }

a { color: inherit; }

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

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  z-index: 10;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Buttons and links */
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 8px;
  background: var(--pine);
  color: var(--on-pine);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--pine);
  transition: background-color 0.15s ease;
}
.btn:hover { background: var(--pine-2); border-color: var(--pine-2); color: #fff; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: var(--step--1); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-quiet:hover { background: var(--paper-2); border-color: var(--rule); color: var(--ink); }

.text-link {
  font-weight: 600;
  color: var(--pine);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  text-decoration-color: var(--marigold);
}
.text-link:hover { text-decoration-thickness: 4px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.wordmark-soft { font-weight: 500; color: var(--slate); }
.nav-list {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list a:not(.btn) { text-decoration: none; font-weight: 500; color: var(--slate); }
.nav-list a:not(.btn):hover { color: var(--ink); }
@media (max-width: 640px) {
  .nav-list li:not(:last-child) { display: none; }
  .wordmark-soft { display: none; }
}

/* Hero */
.hero { padding: 64px 0 80px; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) {
  .hero { padding: 96px 0 112px; }
  .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 64px; }
}
.hero h1 {
  font-size: var(--step-4);
  font-weight: 800;
  letter-spacing: -0.035em;
  max-width: 13ch;
}
.lede {
  margin: 24px 0 32px;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--slate);
  max-width: 34em;
}

/* The chore list: the page's one memorable moment */
.chores {
  margin: 0;
  background: var(--paper-2);
  border-radius: 20px;
  padding: 28px 24px 22px;
}
@media (min-width: 720px) { .chores { padding: 36px 36px 26px; } }
.chore-list { list-style: none; margin: 0; padding: 0; }
.chore {
  position: relative;
  padding: 16px 0 16px 40px;
  border-bottom: 1px solid var(--rule);
}
.chore:last-child { border-bottom: 0; }
.chore::before {
  content: "";
  position: absolute;
  left: 0;
  top: 19px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--slate);
  background: var(--paper);
}
.chore::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 22px;
  width: 8px;
  height: 13px;
  border: solid var(--pine);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.chore-task {
  display: inline;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  font-weight: 500;
  color: var(--slate);
  background-image: linear-gradient(var(--marigold), var(--marigold));
  background-repeat: no-repeat;
  background-position: 0 58%;
  background-size: 100% 0.28em;
}
.chore-fix {
  display: block;
  margin-top: 4px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.3;
  color: var(--pine);
}
.chores figcaption {
  margin-top: 14px;
  font-size: var(--step--1);
  color: var(--slate);
}

@media (prefers-reduced-motion: no-preference) {
  .chore-task { animation: strike 0.55s cubic-bezier(.6,0,.3,1) both; }
  .chore-fix { animation: reveal 0.45s ease-out both; }
  .chore::after { animation: tick 0.25s ease-out both; }
  .chore:nth-child(1) .chore-task { animation-delay: 0.5s; }
  .chore:nth-child(1) .chore-fix, .chore:nth-child(1)::after { animation-delay: 0.95s; }
  .chore:nth-child(2) .chore-task { animation-delay: 1.2s; }
  .chore:nth-child(2) .chore-fix, .chore:nth-child(2)::after { animation-delay: 1.65s; }
  .chore:nth-child(3) .chore-task { animation-delay: 1.9s; }
  .chore:nth-child(3) .chore-fix, .chore:nth-child(3)::after { animation-delay: 2.35s; }
  .chore:nth-child(4) .chore-task { animation-delay: 2.6s; }
  .chore:nth-child(4) .chore-fix, .chore:nth-child(4)::after { animation-delay: 3.05s; }
}
@keyframes strike { from { background-size: 0% 0.28em; color: var(--ink); } }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } }
@keyframes tick { from { opacity: 0; transform: rotate(45deg) scale(0.4); } }

/* Sections */
.section { padding: 80px 0; border-top: 1px solid var(--rule); }
@media (min-width: 960px) { .section { padding: 112px 0; } }
.section h2 { font-size: var(--step-3); }

/* Services */
.split { display: grid; gap: 40px; }
@media (min-width: 960px) {
  .split { grid-template-columns: 5fr 7fr; gap: 80px; }
  .split-intro { position: sticky; top: 40px; align-self: start; }
}
.split-intro p { margin-top: 20px; color: var(--slate); max-width: 30em; }
.service-list { margin: 0; }
.service { padding: 28px 0; border-top: 2px solid var(--ink); }
.service:first-child { padding-top: 0; border-top: 0; }
.service dt {
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--step-2);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.service dd { margin: 10px 0 0; color: var(--slate); max-width: 38em; }

/* Engagements */
.engage { background: var(--paper-2); border-top: 0; }
.engage-grid { display: grid; gap: 32px; margin-top: 40px; }
@media (min-width: 820px) { .engage-grid { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.engage-item { border-top: 4px solid var(--pine); padding-top: 20px; }
.engage-item h3 { font-size: var(--step-1); }
.engage-item p { margin-top: 10px; color: var(--slate); }

.process-title { font-size: var(--step-2); margin-top: 80px; }
.process {
  list-style: none;
  counter-reset: step;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 20px;
}
@media (min-width: 820px) { .process { grid-template-columns: repeat(4, 1fr); gap: 28px; } }
.process li {
  counter-increment: step;
  position: relative;
  padding-top: 56px;
  color: var(--slate);
}
.process li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--pine);
  color: var(--pine);
  font-family: var(--display);
  font-weight: 700;
}
.process strong { display: block; color: var(--ink); font-family: var(--display); font-size: 1.125rem; margin-bottom: 4px; }

/* Work */
.case {
  display: grid;
  gap: 24px;
  padding: 40px 0;
  border-bottom: 1px solid var(--rule);
}
.work h2 + .case { margin-top: 16px; }
.case:last-child { border-bottom: 0; padding-bottom: 0; }
@media (min-width: 820px) {
  .case { grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
  .case:nth-of-type(even) .case-media { order: 2; }
}
.case-media {
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  background:
    repeating-linear-gradient(-45deg, transparent 0 18px, rgba(14, 79, 74, 0.06) 18px 19px),
    var(--paper-2);
}
.case-media img { width: 100%; height: 100%; object-fit: cover; }
.case-kind { font-size: var(--step--1); font-weight: 600; color: var(--pine); }
.case h3 { font-size: var(--step-3); margin-top: 8px; }
.case-body p:not(.case-kind) { margin: 14px 0 18px; color: var(--slate); max-width: 34em; }

/* About */
.about-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 820px) { .about-grid { grid-template-columns: 4fr 7fr; gap: 72px; } }
.about-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 400px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--pine-2);
}
.about-photo img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.monogram {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 6rem;
  color: var(--marigold);
  letter-spacing: -0.04em;
}
.about-copy h2 { max-width: 16ch; }
.about-copy p { margin-top: 20px; color: var(--slate); max-width: 36em; }
.about-copy .text-link { display: inline-block; margin-top: 24px; }

/* Contact */
.contact {
  background: #0E4F4A;
  color: #FFFFFF;
  padding: 88px 0;
}
@media (min-width: 960px) { .contact { padding: 120px 0; } }
.contact h2 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.03em; max-width: 14ch; }
.contact-intro > p:first-of-type { margin: 20px 0 28px; font-size: var(--step-1); color: #CFE3E0; max-width: 30em; }
.btn-light { background: var(--marigold); border-color: var(--marigold); color: #15212B; }
.btn-light:hover { background: #FFC857; border-color: #FFC857; color: #15212B; }
.btn-outline-light { background: transparent; border-color: rgba(255, 255, 255, 0.5); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }
.contact :focus-visible { outline-color: #FFFFFF; }
.contact-note { margin-top: 12px; font-size: var(--step--1); color: #CFE3E0; }
.contact-note a { color: #fff; text-decoration-color: var(--marigold); text-underline-offset: 4px; }
@media (max-width: 480px) { .btn-outline-light { font-size: 0.9375rem; } }

/* Footer */
.site-footer { padding: 28px 0; font-size: var(--step--1); color: var(--slate); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer-links { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }

/* Until a project image is added, the text runs full width */
.case-media:not(:has(img)) { display: none; }
@media (min-width: 820px) {
  .case:not(:has(img)) { grid-template-columns: 1fr; }
  .case:not(:has(img)) .case-body { display: grid; grid-template-columns: 5fr 7fr; column-gap: 80px; }
  .case:not(:has(img)) .case-kind { grid-column: 1; }
  .case:not(:has(img)) h3 { grid-column: 1; }
  .case:not(:has(img)) .case-body p:not(.case-kind) { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
  .case:not(:has(img)) .text-link { grid-column: 2; grid-row: 3; justify-self: start; }
}

/* Contact form */
.contact-grid { display: grid; gap: 48px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 5fr 6fr; gap: 80px; align-items: start; } }
.contact-form { background: #FFFFFF; color: #15212B; border-radius: 16px; padding: 24px; display: grid; gap: 18px; }
@media (min-width: 720px) { .contact-form { padding: 36px; } }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.9375rem; }
.optional { font-weight: 400; color: #56636E; }
.field input, .field textarea {
  font: inherit; color: #15212B; background: #FFFFFF;
  border: 1.5px solid #9AA7AE; border-radius: 8px; padding: 12px 14px; width: 100%;
}
.field textarea { resize: vertical; min-height: 128px; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid #1F6FEB; outline-offset: 1px; border-color: #0E4F4A; }
.contact-form :focus-visible { outline-color: #1F6FEB; }
.contact-form .btn { justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.contact-form .btn:disabled { opacity: 0.6; cursor: progress; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.5em; font-weight: 600; }
.form-status.is-error { color: #B42318; }
.form-status.is-sent { color: #0E4F4A; }
