/* Shared pages complement design 05. Load after assets/style.css. */
body.site-body {
  color: var(--ink);
  background: var(--paper);
  font-size: 1rem;
}
.site-body button,
.site-body input,
.site-body select,
.site-body textarea { font-family: Manrope, Arial, sans-serif; }
.site-body button { cursor: pointer; }
.site-body [hidden] { display: none !important; }
.site-body .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.site-body :is(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 5px;
}
.site-body .dark :is(a, button, input, select, textarea, summary):focus-visible {
  outline-color: var(--pale);
}
.site-body :is(h1, h2, h3, p, dt, dd, a, button, label) { overflow-wrap: break-word; }
.site-body :is(#brief, #contacts, .page-heading, .related-section) { scroll-margin-block-start: 30px; }
.site-body .draft {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 20px;
  padding: 9px var(--gutter);
  color: #4b4c4d;
  background: #e9e6df;
  font-size: .625rem;
  line-height: 1.5;
}

/* Navigation: explicit selectors override design 05's mobile nav hiding. */
.site-header .header { position: relative; gap: 28px; }
.site-header .brand { min-width: 0; flex-shrink: 0; }
.site-header .brand > span { font-size: .9375rem; }
.site-header .brand small { font-size: .625rem; }
.site-header .header .nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-size: .75rem;
}
.site-header .header .nav > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: 10px;
  line-height: 1.5;
}
.site-header .nav > a.active,
.site-header .nav > a[aria-current="page"] {
  color: var(--pale);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}
.site-header .nav .nav-cta {
  gap: 22px;
  padding-inline: 17px;
  border-color: #90949d;
  font-weight: 600;
}
.site-header .menu-toggle {
  display: none;
  min-height: 44px;
  padding: 10px 14px;
  color: #f6f6f2;
  background: transparent;
  border: 1px solid #90949d;
  border-radius: 0;
  font-size: .75rem;
  font-weight: 650;
  line-height: 1.4;
}
.site-header .menu-toggle[aria-expanded="true"] {
  color: var(--dark);
  background: var(--pale);
  border-color: var(--pale);
}

.menu-icon { display: grid; gap: 5px; width: 22px; }
.menu-icon > span { display: block; height: 2px; background: currentColor; transition: transform .24s ease, opacity .18s ease; }
.menu-toggle[aria-expanded="true"] .menu-icon > span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon > span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-icon > span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Portfolio index and shared project cards. */
.site-body .page-heading { padding-block: 48px 48px; }
.page-heading .breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.6;
}
.page-heading .breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding-block: 4px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.page-heading .eyebrow { color: var(--purple); font-size: .625rem; }
.page-heading h1 {
  max-width: 23ch;
  margin-top: 18px;
  font-size: clamp(2.375rem, 4.8vw, 4.75rem);
  line-height: 1.1;
  font-weight: 550;
  letter-spacing: -.055em;
}
.page-heading > p:not(.eyebrow):not(.breadcrumb) {
  max-width: 68ch;
  margin-top: 24px;
  color: var(--muted);
  font-size: .9375rem;
  line-height: 1.75;
}
.site-body .portfolio-list { padding-block: 0 90px; }
.portfolio-list .filters { display: flex; flex-wrap: wrap; gap: 10px; }
.portfolio-list .filter {
  min-height: 44px;
  max-width: 100%;
  padding: 11px 17px;
  color: var(--ink);
  background: transparent;
  border: 1px solid #959793;
  border-radius: 0;
  font-size: .75rem;
  line-height: 1.55;
  font-weight: 600;
  text-align: start;
}
.portfolio-list .filter[aria-pressed="true"] {
  color: #fff;
  background: var(--purple);
  border-color: var(--purple);
}
.portfolio-list .results {
  margin-block: 19px 32px;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.6;
}
.portfolio-list .noscript { display: block; margin-top: 28px; color: var(--muted); font-size: .8125rem; }
.site-body .projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 52px 32px;
}
.site-body .project-card { min-width: 0; }
.project-card > a { display: block; }
.project-card .project-photo {
  position: relative;
  aspect-ratio: 1.5;
  background: #e4e1da;
}
.project-card .project-photo img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1.5;
  object-fit: cover;
  outline: 1px solid #0000001a;
  outline-offset: -1px;
}
.project-card .project-open {
  position: absolute;
  inset-block-end: 15px;
  inset-inline-end: 15px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: var(--paper);
  font-size: 1.375rem;
  line-height: 1;
}
.project-card .project-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px 20px;
  margin-top: 20px;
}
.project-info > div { min-width: 0; }
.project-info h3 {
  font-size: clamp(1.25rem, 1.7vw, 1.625rem);
  line-height: 1.25;
  letter-spacing: -.035em;
  font-weight: 600;
}
.project-info p {
  margin-top: 7px;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.6;
}
.project-info > span {
  display: inline-block;
  max-width: 20ch;
  padding: 5px 8px;
  color: #41464c;
  background: #e0e2dd;
  border: 1px solid #afb4ac;
  font-size: .625rem;
  font-weight: 600;
  line-height: 1.5;
}
.project-card[data-category="concept"] .project-photo {
  border: 1px dashed #9a80ae;
  padding: 5px;
}
.project-card[data-category="concept"] .project-info > span {
  color: var(--purple);
  background: #e8dfee;
  border: 1px dashed #9a80ae;
}

/* Case detail: complete images, a compact fact sheet, readable story. */
.site-body .case-cover { margin-block: 0; }
.case-cover img {
  width: 100%;
  height: auto;
  background: #e4e1da;
  outline: 1px solid #0000001a;
  outline-offset: -1px;
}
.site-body .case-body {
  display: grid;
  grid-template-columns: minmax(210px, .42fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(38px, 7vw, 112px);
  padding-block: 65px 80px;
}
.case-details { min-width: 0; padding-top: 20px; border-top: 2px solid var(--purple); }
.case-details dl { display: grid; gap: 21px; margin: 0; }
.case-details dl > div { padding-bottom: 18px; border-bottom: 1px solid var(--rule); }
.case-details dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: .6875rem;
  line-height: 1.5;
}
.case-details dd { margin: 0; font-size: .9375rem; font-weight: 600; line-height: 1.6; }
.case-details .source-link {
  display: inline-block;
  max-width: 100%;
  margin-top: 20px;
  padding-block: 6px;
  color: var(--purple);
  font-size: .75rem;
  line-height: 1.65;
  text-decoration: underline;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}
.case-story { min-width: 0; max-width: 74ch; }
.case-story h2 {
  max-width: 25ch;
  margin: 0 0 25px;
  font-size: clamp(1.75rem, 2.65vw, 2.5rem);
  line-height: 1.18;
}
.case-story p { margin-top: 20px; color: #535a61; font-size: .9375rem; line-height: 1.8; }
.case-story p + h2 { margin-top: 42px; }
.case-story p a { color: var(--purple); text-decoration: underline; text-underline-offset: 4px; }
.case-story .concept-note {
  margin-top: 28px;
  padding: 18px 20px;
  color: #4b365e;
  background: #e8dfee;
  border-inline-start: 3px solid var(--purple);
  font-size: .875rem;
  line-height: 1.7;
}
.site-body .button.outline {
  color: var(--purple);
  background: transparent;
  border: 1px solid var(--purple);
  text-decoration: none;
}
.case-story > .button { margin-top: 32px; }
.site-body .case-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 26px;
  padding-block: 0 80px;
}
.case-gallery > img {
  width: 100%;
  height: auto;
  background: #e4e1da;
  outline: 1px solid #0000001a;
  outline-offset: -1px;
}
.case-gallery > img:only-child { grid-column: 1 / -1; }
.site-body .related-section { padding-block: 65px 80px; border-top: 1px solid var(--rule); }
.related-section .section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px 32px;
  margin-bottom: 34px;
}
.related-section h2 { font-size: clamp(1.875rem, 3vw, 2.75rem); }
.site-body .text-link { min-height: 44px; }

/* Brief: a dark form with readable native controls and persistent labels. */
.site-body .contact-section { padding-block: 80px; }
.contact-section .contact-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: clamp(36px, 7vw, 110px);
}
.contact-layout > div { min-width: 0; }
.contact-section .eyebrow { color: var(--pale); }
.contact-section h2 { margin-top: 20px; font-size: clamp(2.25rem, 3.8vw, 3.625rem); line-height: 1.12; }
.contact-section .intro {
  max-width: 43ch;
  margin-top: 24px;
  color: #c2c6ce;
  font-size: .9375rem;
  line-height: 1.75;
}
.contact-section .contact-links { display: flex; align-items: flex-start; flex-direction: column; gap: 10px; margin-top: 30px; }
.contact-links > a {
  display: inline-block;
  max-width: 100%;
  min-height: 40px;
  padding-block: 6px;
  font-size: clamp(1.0625rem, 1.65vw, 1.5rem);
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-color: #777b86;
  text-underline-offset: 6px;
  overflow-wrap: anywhere;
}
.contact-section .archive-note { max-width: 50ch; margin-top: 18px; color: #b5bac4; font-size: .75rem; line-height: 1.7; }
.contact-section .brief-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 18px;
  min-width: 0;
  color-scheme: dark;
}
.brief-form .field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  color: #e9e8e4;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.5;
}
.brief-form :is(input, select, textarea) {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  margin: 0;
  padding: 13px 14px;
  color: #f6f6f2;
  background: #24282f;
  border: 1px solid #9297a0;
  border-radius: 0;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
}
.brief-form :is(input, textarea)::placeholder { color: #b7bbc3; opacity: 1; }
.brief-form textarea { min-height: 138px; resize: vertical; }
.brief-form :is(input, select, textarea):focus-visible { outline-offset: 3px; border-color: var(--pale); }
.brief-form .full,
.brief-form .form-help,
.brief-form .form-actions,
.brief-form .noscript { grid-column: 1 / -1; }
.brief-form .form-help { margin: 0; color: #c2c6ce; font-size: .75rem; line-height: 1.7; }
.brief-form .form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; }
.brief-form .button {
  justify-content: space-between;
  max-width: 100%;
  min-height: 54px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 0;
  font-size: .8125rem;
  line-height: 1.5;
  text-align: start;
}
.brief-form .button:disabled { color: #e0e3e9; background: #4c525c; cursor: not-allowed; }
.brief-form .status { flex: 1 1 170px; margin: 0; color: #e1d4f8; font-size: .8125rem; line-height: 1.6; }
.brief-form .status:empty { display: none; }
.brief-form .brief-result { padding: 26px; border: 1px solid #696373; background: #292a30; min-width: 0; }
.brief-form .brief-result[hidden] { display: none; }
.brief-result h3 { margin-top: 12px; font-size: 1.75rem; }
.brief-result > p:not(.eyebrow) { margin-block: 16px 22px; font-size: .875rem; line-height: 1.7; color: #c2c6ce; }
.brief-result .field { margin-block: 24px; }
.brief-result textarea { min-height: 250px; font-size: .875rem; line-height: 1.65; }
.brief-form .brief-copy { background: transparent; color: #e1d4f8; border: 1px solid #8d819b; }
.brief-result:focus-visible { outline: 2px solid var(--pale); outline-offset: 5px; }
@media(max-width:600px){.brief-form .brief-result{padding:20px}.brief-result h3{font-size:1.5rem}}
.brief-form .noscript { display: block; margin: 0; padding: 15px 18px; color: #e9e8e4; background: #24282f; border-inline-start: 3px solid var(--pale); font-size: .8125rem; line-height: 1.65; }

/* Footer resets design 05's generic footer and mobile footer-link rules. */
.site-body .site-footer { display: block; padding: 0; color: #c2c6ce; border-top: 1px solid #474c55; }
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, .8fr);
  gap: 35px;
  align-items: start;
  padding-block: 42px;
}
.site-footer .brand { display: flex; margin: 0; color: #f6f6f2; text-decoration: none; }
.site-footer .brand > span { font-size: .875rem; }
.site-footer .brand small { font-size: .625rem; }
.site-footer .footer-links { display: flex; align-items: flex-start; flex-direction: column; gap: 9px; }
.site-footer .footer-links a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  margin: 0;
  padding-block: 5px;
  font-size: .75rem;
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-color: #777b86;
  text-underline-offset: 4px;
}
.site-footer .copyright { display: flex; flex-direction: column; gap: 7px; align-items: flex-end; text-align: end; font-size: .625rem; line-height: 1.7; }
.site-footer .copyright span { display: block; }
.site-footer .copyright p { margin: 0; }

@media (hover: hover) {
  .site-header .nav > a:hover { color: var(--pale); text-decoration: underline; text-underline-offset: 7px; }
  .portfolio-list .filter:not([aria-pressed="true"]):hover { color: var(--purple); border-color: var(--purple); background: #e9e1ee; }
  .project-card > a:hover h3 { color: var(--purple); text-decoration: underline; text-underline-offset: 5px; }
  .project-card > a:hover .project-open { color: #fff; background: var(--purple); }
  .site-body .button.outline:hover { color: #fff; background: var(--purple); }
  .contact-links > a:hover,
  .site-footer .footer-links a:hover { color: var(--pale); text-decoration-color: currentColor; }
  .brief-form .button:not(:disabled):hover { background: #d1b8ff; }
}

@media (max-width: 980px) {
  .site-header .header { min-height: 90px; flex-wrap: wrap; gap: 0 20px; padding-block: 18px; }
  .site-header .brand > span { font-size: .875rem; }
  .site-header .menu-toggle { display: inline-flex; align-items: center; margin-inline-start: auto; }
  .site-header .header .nav { display: none; flex: 1 1 100%; align-items: stretch; flex-direction: column; gap: 4px; padding-top: 18px; }
  .site-header .header .nav.open { display: flex; }
  .site-header .header .nav > a { display: flex; min-height: 48px; padding: 12px 10px; font-size: .875rem; }
  .site-header .header .nav > .nav-cta { justify-content: space-between; margin-top: 6px; padding-inline: 14px; }
  .site-body .projects-grid { gap: 40px 24px; }
  .project-card .project-info { display: flex; flex-wrap: wrap; gap: 12px; }
  .project-info > div { flex: 1 1 220px; }
  .project-info > span { max-width: 100%; }
  .site-body .case-body { grid-template-columns: minmax(180px, .45fr) minmax(0, 1fr); gap: 35px; }
  .contact-section .contact-layout { grid-template-columns: minmax(0, 1fr); gap: 42px; }
  .contact-section .intro { max-width: 60ch; }
  .contact-section .archive-note { max-width: 65ch; }
  .contact-section .brief-form { max-width: 900px; }
  .site-footer .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
  .site-footer .copyright { grid-column: 1 / -1; align-items: flex-start; text-align: start; }
}

@media (max-width: 680px) {
  .site-body .page-heading { padding-block: 30px 35px; }
  .page-heading .breadcrumb { margin-bottom: 20px; font-size: .6875rem; }
  .page-heading h1 { font-size: clamp(2rem, 7.6vw, 3rem); line-height: 1.13; letter-spacing: -.045em; }
  .page-heading > p:not(.eyebrow):not(.breadcrumb) { font-size: .875rem; line-height: 1.7; margin-top: 20px; }
  .site-body .portfolio-list { padding-bottom: 55px; }
  .portfolio-list .filters { gap: 8px; }
  .portfolio-list .filter { padding-inline: 12px; font-size: .6875rem; }
  .portfolio-list .results { margin-block: 17px 25px; }
  .site-body .projects-grid { grid-template-columns: minmax(0, 1fr); gap: 35px; }
  .project-card .project-info { margin-top: 16px; }
  .project-info h3 { font-size: 1.375rem; }
  .project-info > div { flex-basis: 190px; }
  .project-card .project-open { width: 38px; height: 38px; inset-block-end: 12px; inset-inline-end: 12px; }
  .site-body .case-body { grid-template-columns: minmax(0, 1fr); gap: 38px; padding-block: 35px 50px; }
  .case-details dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .case-details dl > div { min-width: 0; padding-bottom: 15px; }
  .case-details dd { font-size: .8125rem; }
  .case-story h2 { font-size: 1.875rem; margin-bottom: 20px; }
  .case-story p { font-size: .9375rem; line-height: 1.75; }
  .case-story > .button { margin-top: 26px; }
  .site-body .case-gallery { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-bottom: 50px; }
  .site-body .related-section { padding-block: 45px 55px; }
  .related-section .section-title-row { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 26px; }
  .related-section h2 { font-size: 1.875rem; }
  .site-body .contact-section { padding-block: 50px 55px; }
  .contact-section h2 { font-size: clamp(2.125rem, 7vw, 3rem); }
  .contact-section .intro { font-size: .875rem; margin-top: 20px; }
  .contact-section .contact-links { margin-top: 24px; gap: 6px; }
  .contact-links > a { font-size: 1.1875rem; }
  .contact-section .brief-form { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .brief-form .field { font-size: .8125rem; }
  .brief-form :is(input, select, textarea) { min-height: 52px; }
  .brief-result textarea[readonly] { font-size: 1rem; }
  .brief-form .form-actions { align-items: stretch; flex-direction: column; gap: 16px; }
  .brief-form .button { width: 100%; }
  .brief-form .status { flex-basis: auto; }
  .site-footer .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 32px; }
  .site-footer .copyright { grid-column: auto; }
  .site-footer .footer-links { gap: 5px; }
  .site-footer .footer-links a { min-height: 44px; }
}

@media (max-width: 390px) {
  .site-header .header { min-height: 82px; gap: 0 12px; }
  .site-header .brand { gap: 9px; }
  .site-header .brand img { width: 33px; }
  .site-header .brand > span { font-size: .75rem; letter-spacing: .01em; }
  .site-header .brand small { font-size: .5625rem; }
  .site-header .menu-toggle { padding-inline: 11px; font-size: .6875rem; }
  .site-body .draft { font-size: .5625rem; }
  .page-heading h1 { font-size: 2rem; }
  .project-info h3 { font-size: 1.25rem; }
  .case-details dl { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .case-story h2 { font-size: 1.6875rem; }
  .contact-links > a { font-size: 1.0625rem; }
  .contact-section h2 { font-size: 2rem; }
}

@media (forced-colors: active) {
  .site-body :is(a, button, input, select, textarea, summary):focus-visible { outline-color: Highlight; }
  .portfolio-list .filter[aria-pressed="true"] { border: 2px solid Highlight; }
  .project-card .project-open { border: 1px solid ButtonText; }
}

/* Keep the header in flow; the open menu overlays without moving the page. */
@media (max-width: 980px) {
  :root { --mobile-header-height: calc(68px + env(safe-area-inset-top, 0px)); scroll-padding-block-start: 0; }
  html .site-body :is([id], #brief, #contacts):not(.process-snap-marker) { scroll-margin-block-start: calc(var(--mobile-header-height) + 16px); }
  .site-body .site-header { position: sticky; top: 0; z-index: 50; padding-top: env(safe-area-inset-top, 0px); box-shadow: 0 1px 0 #ffffff17; }
  .site-body .site-header .header { min-height: 68px; height: 68px; padding-block: 0; flex-wrap: nowrap; }
  .site-body .site-header .menu-toggle { width: 44px; height: 44px; flex: 0 0 44px; padding: 10px; justify-content: center; border-color: #ffffff3d; }
  .site-body .site-header .header .nav {
    position: absolute; top: 100%; inset-inline: 0; margin: 0; flex-wrap: nowrap;
    max-height: calc(100vh - var(--mobile-header-height)); max-height: calc(100dvh - var(--mobile-header-height));
    overflow-y: auto; overscroll-behavior-y: contain;
    padding: 12px var(--gutter) max(20px, env(safe-area-inset-bottom, 0px));
    background: var(--dark); border-top: 1px solid #ffffff17; box-shadow: 0 16px 24px #0003;
  }
  .site-body .skip { z-index: 60; }
  .site-body .site-header .header .nav > a { flex-shrink: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .menu-icon > span { transition: none; }
}
