:root {
  color-scheme: light;
  --bg: #faf7f1;
  --ink: #302d2e;
  --ink-subtle: var(--ink); /* All text uses the same charcoal as headings. */
  --line: #9b9692;
  --line-soft: #d7d1cb;
  --quiet: #ece8e1;
  --focus: #6a785e;
  --gutter: clamp(16px, 2vw, 44px);
  --col-gap: clamp(18px, 2.3vw, 46px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font-head: 'Epilogue', Arial, sans-serif;
  --project-title-size: clamp(20px, 1.85vw, 31px);
  --font-body: 'Work Sans', Arial, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #242424;
  --ink: #f1eee7;
  --ink-subtle: var(--ink); /* Same treatment in dark mode, with light ink. */
  --line: #77746e;
  --line-soft: #494843;
  --quiet: #343431;
  --focus: #b7ccaa;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 18px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; -webkit-font-smoothing: antialiased; transition: color .45s ease, background-color .45s ease; }
body, button { font-family: var(--font-body); }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-underline-offset: .19em; }
img, video { display: block; max-width: 100%; }
button, input { font: inherit; }
button { cursor: pointer; }
::selection { background: #aac2a0; color: #20221f; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 5px; }
.page-gutter { padding-left: var(--gutter); padding-right: var(--gutter); }
.skip-link { z-index: 999; position: fixed; top: 12px; left: 12px; transform: translateY(-160%); padding: 12px 16px; background: var(--ink); color: var(--bg); }
.skip-link:focus { transform: translateY(0); }

/* The wordmark is deliberately live Epilogue type, measured to the viewport in script.js. */
.hero { min-height: min(74svh, 850px); display: flex; flex-direction: column; justify-content: space-between; border-bottom: 1px solid var(--line); overflow: hidden; }
.topbar { width: 100%; padding-top: 17px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.topbar-tagline, .topbar-email { font-family: var(--font-head); font-size: clamp(10px, .83vw, 14px); text-decoration: none; font-weight: 500; line-height: 1.4; }
.topbar-email:hover { text-decoration: underline; }
.topbar-actions { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); }
.theme-toggle { width: 39px; height: 39px; border: 1px solid var(--line-soft); border-radius: 999px; background: transparent; display: grid; place-items: center; transition: border-color .2s, transform .28s var(--ease), background .2s; }
.theme-toggle:hover { transform: rotate(-17deg); border-color: var(--ink); background: var(--quiet); }
.sun-icon { display: none; }
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
.hero-title-container { padding-top: 160px; width: 100%; overflow: hidden; }
.fit-title { font-family: var(--font-head); font-size: clamp(80px, 14vw, 275px); font-weight: 500; line-height: 1.01; white-space: nowrap; letter-spacing: -.073em; margin: 0; text-transform: none; display: block; width: 100%; }
.hero-title { transform-origin: left bottom; animation: title-entry 1.08s var(--ease) both; }
@keyframes title-entry { from { opacity: 0; transform: translateY(55%) } to { opacity: 1; transform: translateY(0) } }

.intro { min-height: 220px; display: flex; align-items: flex-start; padding-top: clamp(25px, 3.2vw, 54px); padding-bottom: clamp(45px, 5vw, 84px); }
.intro-copy { font-family: var(--font-head); font-weight: 500; font-size: clamp(25px, 2.5vw, 41px); line-height: 1.16; letter-spacing: -.035em; max-width: 65%; margin: 0; }
.ticker { width: 100%; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; white-space: nowrap; padding: 11px 0 10px; }
.ticker-track { display: flex; align-items: baseline; gap: 0; width: max-content; animation: marquee 54s linear infinite; font: 500 clamp(11px, .84vw, 14px)/1.4 var(--font-body); will-change: transform; }
.ticker-cycle { display: flex; flex: 0 0 auto; align-items: baseline; gap: clamp(12px, 1.3vw, 24px); padding-right: clamp(12px, 1.3vw, 24px); }
.ticker-track i { font-style: normal; font-size: 19px; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

.section { padding-top: clamp(46px, 4.3vw, 82px); padding-bottom: clamp(58px, 5.3vw, 108px); }
.section-heading { font: 500 clamp(31px, 3.1vw, 57px)/1.05 var(--font-head); letter-spacing: -.06em; margin: 0 0 clamp(32px, 3.7vw, 64px); }
.section-heading span { letter-spacing: -.045em; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: var(--col-gap); }
.project-card { min-width: 0; }
.project-name { font-size: clamp(10px, .88vw, 13px); line-height: 1.3; margin-bottom: 13px; font-weight: 450; }
.project-name span { color: var(--ink-subtle); }
.project-media { display: block; width: 100%; aspect-ratio: 1.74 / 1; overflow: hidden; border-radius: 10px; background: var(--quiet); isolation: isolate; }
.project-media img, .project-media video { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), filter .5s; }
.recent-grid .project-media-link:hover img, .recent-grid .project-media-link:hover video { transform: scale(1.032); }
.project-media-link:focus-visible { outline-offset: 4px; }
.project-media-roam img { object-position: center 88%; }
.project-tags { margin: 22px 0 17px; font-size: clamp(10px, .78vw, 12px); line-height: 1.5; color: var(--ink-subtle); min-height: 1.3em; }
.project-trigger { font: 500 var(--project-title-size)/1.1 var(--font-head); letter-spacing: -.047em; }
.accordion-trigger { border: none; border-radius: 0; padding: 0; background: none; width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; text-align: left; }
.accordion-trigger:hover[aria-expanded="false"] > span:first-child { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .16em; }
.accordion-trigger[aria-expanded="true"] > span:first-child { text-decoration: none; }
.toggle-sign { flex: 0 0 19px; width: 19px; height: 19px; position: relative; margin-top: .18em; }
.toggle-sign::before, .toggle-sign::after { content: ''; position: absolute; background: var(--ink); top: 50%; left: 0; width: 100%; height: 1px; transform: translateY(-50%); transition: transform .28s var(--ease); }
.toggle-sign::after { transform: translateY(-50%) rotate(90deg); }
[aria-expanded="true"] .toggle-sign::after { transform: translateY(-50%) rotate(0); }
.accordion-panel { display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden; transition: grid-template-rows .48s var(--ease), opacity .3s ease, visibility .48s; }
.accordion-panel[data-open] { grid-template-rows: 1fr; opacity: 1; visibility: visible; }
.accordion-inner { min-height: 0; overflow: hidden; font: 400 clamp(13px, .97vw, 16px)/1.65 var(--font-body); }
.accordion-inner p { margin: 22px 0 0; }
.accordion-inner em { font-style: italic; }
.project-external { display: inline-block; margin-top: 29px; margin-bottom: 4px; font-weight: 450; }
.project-external span { display: inline-block; transition: transform .25s ease; }
.project-external:hover span { transform: translate(2px, -2px); }

.about { border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .8fr); align-items: start; gap: clamp(32px, 6vw, 105px); padding-bottom: clamp(55px, 6vw, 110px); }
.about-copy { max-width: 780px; }
.about-heading { font: 500 clamp(38px, 4.1vw, 76px)/.99 var(--font-head); letter-spacing: -.065em; margin: 0 0 clamp(35px, 4vw, 70px); }
.about-copy p { font-size: clamp(17px, 1.47vw, 23px); line-height: 1.58; max-width: 58ch; margin: 0; }
.about-image { width: 100%; max-width: 580px; justify-self: end; aspect-ratio: 1 / 1; }
.about-image img { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 11px; }
.services-label { margin: 0 0 clamp(45px, 5.2vw, 82px); padding: 0 0 18px; border-bottom: 1px solid var(--line); font: 450 clamp(12px, 1vw, 15px)/1.3 var(--font-body); }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--col-gap); align-items: start; }
.service-card { display: flex; flex-direction: column; min-width: 0; }
.service-kicker { font: 450 clamp(15px, 1.2vw, 19px)/1.3 var(--font-body); margin-bottom: 17px; }
.service-card h4 { font: 500 clamp(22px, 2.25vw, 36px)/1.12 var(--font-head); letter-spacing: -.05em; margin: 0 0 18px; min-height: 2.3em; }
.service-card > p { font-size: clamp(13px, 1vw, 16px); line-height: 1.6; margin: 0 0 35px; max-width: 44ch; flex-grow: 0; min-height: 8.8em; }
.service-trigger { margin-top: 0; padding: 12px 0; border-top: 0; border-bottom: 0; font: 450 clamp(11px, .88vw, 13px)/1.4 var(--font-body); }
.service-trigger .toggle-sign { width: 14px; flex-basis: 14px; height: 14px; margin-top: 2px; }
.service-card .accordion-inner { font-size: clamp(12px, .94vw, 14px); }
.service-card .accordion-inner p { margin: 14px 0 0; }

.cta-section { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-top: clamp(46px, 5vw, 100px); padding-bottom: clamp(53px, 6vw, 110px); }
.cta-copy { font: 500 clamp(31px, 3.55vw, 65px)/1.06 var(--font-head); letter-spacing: -.06em; margin: 0 0 clamp(28px, 4.5vw, 78px); max-width: 100%; text-wrap: pretty; }
.cta-link { font: 500 clamp(25px, 2.7vw, 46px)/1.2 var(--font-head); letter-spacing: -.04em; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.cta-link span { display: inline-block; transition: transform .3s var(--ease); }
.cta-link:hover span { transform: translateX(10px); }

.archive { padding-bottom: clamp(65px, 7vw, 130px); }
.archive-grid .project-media { aspect-ratio: 1.72 / 1; }
.archive-grid .project-tags { margin-top: 17px; }
.archive-grid .project-trigger { font-size: clamp(19px, 1.63vw, 28px); }
.testimonials { display: grid; grid-template-columns: 45px minmax(0, 1fr) 45px; align-items: center; position: relative; min-height: clamp(260px, 32vw, 550px); padding: 65px 0 78px; column-gap: clamp(14px, 4vw, 78px); }
.carousel-arrow { background: var(--ink); border: 0; color: var(--bg); border-radius: 50%; display: grid; place-items: center; width: clamp(35px, 2.8vw, 47px); height: clamp(35px, 2.8vw, 47px); font-size: 18px; padding: 0; transition: transform .26s var(--ease), background .26s ease; }
.carousel-arrow:hover { transform: scale(1.11); }
.carousel-arrow:active { transform: scale(.97); }
.testimonial-stage { position: relative; min-height: 190px; display: flex; align-items: center; justify-content: center; text-align: center; }
.testimonial { margin: 0; width: 100%; max-width: 980px; animation: quote-in .53s var(--ease) both; }
.testimonial[hidden] { display: none; }
.testimonial blockquote { font: 500 var(--project-title-size)/1.13 var(--font-head); letter-spacing: -.048em; margin: 0 auto 27px; max-width: 880px; text-wrap: balance; }
.testimonial figcaption { font: 450 clamp(10px, .85vw, 13px)/1.45 var(--font-body); }
@keyframes quote-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.carousel-count { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--ink-subtle); letter-spacing: .12em; }
.archive-second-row { margin-top: 10px; }

.footer { border-top: 1px solid var(--line); padding-top: clamp(115px, 12vw, 230px); overflow: hidden; }
.footer-copy { text-align: center; display: flex; flex-direction: column; align-items: center; gap: clamp(35px, 4vw, 72px); }
.footer-copy h2 { font: 500 clamp(35px, 4vw, 73px)/1.05 var(--font-head); letter-spacing: -.065em; margin: 0; }
.footer-contact { display: flex; flex-direction: column; align-items: center; font: 450 clamp(14px, 1.2vw, 19px)/1.45 var(--font-body); }
.footer-contact p { margin: 0; }
.footer-contact a { text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; }
.footer-contact a:last-child { margin-top: 6px; font-size: .83em; text-decoration: underline; }
.footer-title-wrap { margin-top: clamp(100px, 14vw, 250px); overflow: hidden; }
.footer-title { text-decoration: none; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; border-top: 1px solid var(--line-soft); padding: 15px 0 20px; margin-top: 12px; color: var(--ink-subtle); font-size: 11px; }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { text-decoration: underline; }

/* Motion, progressively enhanced only when IntersectionObserver is available. */
.motion-ready .reveal { opacity: 0; transform: translateY(25px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--delay, 0ms); }
.motion-ready .reveal.visible { opacity: 1; transform: translateY(0); }

@media (min-width: 1750px) {
  .hero { min-height: min(80svh, 1100px); }
  .section { padding-top: 84px; }
}
@media (max-width: 1100px) {
  :root { --project-title-size: clamp(18px, 2.05vw, 24px); }
  .about-grid { gap: 5vw; grid-template-columns: minmax(0, 1.1fr) minmax(220px, .7fr); }
  .project-grid { gap: 18px; }
  .service-grid { gap: 24px; }
  .project-trigger { font-size: var(--project-title-size); }
  .project-tags { margin-top: 14px; font-size: 11px; }
  .service-card h4 { font-size: clamp(22px, 2.4vw, 29px); }
}
@media (max-width: 750px) {
  :root { --project-title-size: clamp(20px, 2.65vw, 26px); }
  .hero { min-height: 58svh; }
  .hero-title-container { padding-top: 115px; }
  .topbar { padding-top: 12px; }
  .intro { min-height: 0; padding-top: 27px; padding-bottom: 27px; }
  .intro-copy { max-width: 100%; font-size: clamp(24px, 4.5vw, 31px); }
  .ticker-track { font-size: 12px; }
  .section { padding-top: 46px; padding-bottom: 70px; }
  .section-heading { font-size: clamp(34px, 5vw, 44px); margin-bottom: 35px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 46px 20px; }
  .recent-grid .project-card:last-child { grid-column: 1 / 2; }
  .project-trigger, .archive-grid .project-trigger { font-size: var(--project-title-size); }
  .project-tags { min-height: 0; }
  .about-grid { grid-template-columns: 1.4fr .85fr; gap: 25px; }
  .about-heading { font-size: clamp(33px, 5vw, 48px); margin-bottom: 30px; }
  .service-grid { gap: 16px; }
  .service-card h4 { font-size: clamp(20px, 3vw, 26px); }
  .service-card p { font-size: 12px; }
  .cta-copy { font-size: clamp(31px, 5vw, 46px); }
  .testimonials { min-height: 350px; }
  .testimonial blockquote { font-size: var(--project-title-size); }
}
@media (max-width: 540px) {
  :root { --gutter: 16px; --project-title-size: 24px; }
  .topbar-tagline { max-width: min(46%, 182px); font-size: 10px; min-height: 34px; display: flex; align-items: center; text-wrap: balance; }
  .topbar-email { font-size: 10px; min-height: 34px; display: flex; align-items: center; }
  .topbar-actions { gap: 9px; flex: 0 0 auto; }
  .theme-toggle { width: 34px; height: 34px; }
  .theme-toggle svg { width: 16px; height: 16px; }
  .hero { min-height: 46svh; }
  .hero-title-container { padding-top: 75px; }
  .intro-copy { font-size: clamp(22px, 5.1vw, 28px); line-height: 1.17; max-width: 100%; }
  .intro { padding-top: 28px; padding-bottom: 28px; }
  .project-grid { grid-template-columns: 1fr; gap: 47px; }
  .recent-grid .project-card:last-child { grid-column: auto; }
  .section { padding-top: 40px; padding-bottom: 61px; }
  .section-heading { font-size: 35px; margin-bottom: 29px; }
  .project-name { font-size: 12px; margin-bottom: 9px; }
  .project-media { aspect-ratio: 1.65; }
  .project-tags { font-size: 11px; margin: 14px 0 11px; }
  .project-trigger, .archive-grid .project-trigger { font-size: var(--project-title-size); }
  .accordion-inner { font-size: 14px; }
  /* Full-width portrait followed by the complete About heading and copy. */
  .about-grid { display: flex; flex-direction: column; gap: 31px; align-items: stretch; padding-bottom: 50px; }
  .about-image { order: -1; margin: 0; width: 100%; max-width: none; aspect-ratio: auto; }
  .about-image img { width: 100%; height: auto; aspect-ratio: auto; object-fit: cover; }
  .about-copy { display: block; max-width: 100%; }
  .about-heading { font-size: clamp(31px, 8vw, 43px); margin-bottom: 25px; }
  .about-copy p { font-size: 17px; line-height: 1.55; margin: 0; }
  .service-grid { grid-template-columns: 1fr; gap: 33px; }
  .service-card + .service-card { border-top: 1px solid var(--line); padding-top: 33px; }
  .service-card > p { min-height: 0; }
  .service-card h4 { font-size: 27px; min-height: 0; margin-bottom: 12px; }
  .service-card > p { font-size: 14px; margin-bottom: 21px; max-width: 48ch; }
  .service-kicker { font-size: 16px; margin-bottom: 11px; }
  .service-trigger { font-size: 12px; }
  .cta-section { padding-top: 51px; padding-bottom: 59px; }
  .cta-copy { font-size: clamp(29px, 7.5vw, 41px); line-height: 1.1; margin-bottom: 36px; }
  .cta-link { font-size: 29px; }
  .archive { padding-bottom: 80px; }
  .testimonials { grid-template-columns: 38px minmax(0,1fr) 38px; column-gap: 7px; min-height: 395px; padding: 53px 0 68px; }
  .carousel-arrow { width: 32px; height: 32px; font-size: 17px; }
  .testimonial blockquote { font-size: var(--project-title-size); line-height: 1.18; margin-bottom: 23px; }
  .testimonial figcaption { font-size: 10px; }
  .testimonial-stage { min-height: 220px; }
  .footer { padding-top: 100px; }
  .footer-copy h2 { font-size: clamp(31px, 7.7vw, 43px); }
  .footer-contact { font-size: 14px; }
  .footer-title-wrap { margin-top: 125px; }
  .footer-bottom { font-size: 10px; }
  .footer-bottom span:nth-child(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .motion-ready .reveal { opacity: 1; transform: none; }
}

/* Final polish: predictable, independent cards and consistent one-pixel dividers. */
@media (min-width: 541px) and (max-width: 750px) { .service-card > p { min-height: 12em; } }
@media (max-width: 540px) { .services-label { margin-bottom: 50px; } }

/* Keep the About heading equal in size to other editorial headings. */
/* Version 5: apply the current About-heading size consistently to all four
   major editorial headings, including on tablet and mobile. */
:root { --editorial-heading-size: clamp(38px, 4.1vw, 76px); }
.section-heading,
.about-heading,
.cta-copy { font-size: var(--editorial-heading-size); }
@media (max-width: 750px) {
  :root { --editorial-heading-size: clamp(33px, 5vw, 48px); }
}
@media (max-width: 540px) {
  :root { --editorial-heading-size: clamp(31px, 8vw, 43px); }
}
