/* Central Valley Casework, Inc. — "Charcoal Frame" design
   Palette sampled from the approved 03_Charcoal_Frame.png mock. All text pairs meet WCAG 2.1 AA. */

:root {
  --charcoal: #262825;
  --charcoal-deep: #1f211e;
  --charcoal-soft: #30332f;
  --charcoal-line: #3d403b;
  --copper: #d98a58;          /* on charcoal: 5.5:1 */
  --copper-ink: #9a5328;      /* on paper: 5.2:1 */
  --paper: #f6f4f0;
  --paper-2: #ece8e1;
  --white: #ffffff;
  --ink: #1f211e;
  --ink-muted: #5d5f5a;       /* on paper: 5.9:1 */
  --on-dark: #f4f2ee;
  --on-dark-muted: #c9c6bf;   /* on charcoal: 8.7:1 */
  --line: #ddd8cf;
  --error: #a3261b;
  --success: #2f6b3a;

  --font: "Jost", "Futura", "Century Gothic", "Avenir Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --container: 1240px;
  --gutter: clamp(20px, 5vw, 72px);
  --header-h: 112px;
  --radius: 2px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
}
@media (max-width: 1099px) { :root { --header-h: 84px; } }
@media (max-width: 599px)  { :root { --header-h: 72px; } }

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.65; font-weight: 400; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.15; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
button, input, textarea, select { font: inherit; color: inherit; }
main:focus { outline: none; }
/* short pages still fill the screen */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
main { flex: 1 0 auto; }
.page-home main { display: flex; flex-direction: column; background: var(--charcoal); }
.page-home .hero { flex: 1 0 auto; }
.hero__bar { flex: 1 0 auto; }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
.page-home :focus-visible, .site-header :focus-visible, .section--dark :focus-visible, .page-head :focus-visible, .cta-band :focus-visible, .lightbox :focus-visible { outline-color: var(--copper); }
.section :focus-visible, .contact-form :focus-visible { outline-color: var(--copper-ink); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 1000; padding: 12px 18px; background: var(--white); color: var(--ink); font-weight: 500; text-decoration: none; border: 2px solid var(--copper); }
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: calc(820px + 2 * var(--gutter)); }
.icon { display: inline-block; vertical-align: middle; flex: none; }

/* ------------------------------------------------------------------ buttons & links */
.btn { display: inline-flex; align-items: center; gap: .6em; min-height: 48px; padding: .7em 1.6em; border: 1px solid currentColor; border-radius: var(--radius); background: transparent; font-size: 1rem; font-weight: 500; letter-spacing: .02em; text-decoration: none; cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
.btn--copper { color: var(--on-dark); border-color: var(--copper); }
.btn--copper:hover { background: var(--copper); color: var(--charcoal); }
.btn--solid { color: var(--white); background: var(--charcoal); border-color: var(--charcoal); }
.btn--solid:hover { background: var(--charcoal-soft); }
.btn[disabled] { opacity: .6; cursor: progress; }
.text-link { display: inline-flex; align-items: center; gap: .4em; color: var(--copper-ink); font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.text-link:hover { color: var(--ink); }

/* ------------------------------------------------------------------ header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--charcoal); color: var(--on-dark); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; height: var(--header-h); max-width: 1520px; margin: 0 auto; padding: 0 var(--gutter); }
.brand { display: inline-flex; align-items: center; flex: none; text-decoration: none; }
.brand__logo { width: clamp(150px, 19vw, 260px); height: auto; }
.site-header .brand__logo { width: 240px; }
@media (max-width: 1099px) { .site-header .brand__logo { width: 190px; } }
@media (max-width: 599px)  { .site-header .brand__logo { width: 156px; } }

.nav { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: clamp(14px, 2.2vw, 40px); }
.nav__item { position: relative; }
.nav__row { display: flex; align-items: center; }
.nav__link { position: relative; display: inline-block; padding: 10px 0; font-size: 1.0625rem; font-weight: 400; letter-spacing: .01em; color: var(--on-dark); text-decoration: none; white-space: nowrap; }
.nav__link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--copper); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav__link:hover::after, .nav__item.is-current > .nav__link::after, .nav__item.is-current > .nav__row > .nav__link::after { transform: scaleX(1); }
.nav__sub-toggle { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 40px; margin-left: 2px; padding: 0; border: 0; background: none; color: var(--on-dark-muted); cursor: pointer; }
.nav__sub-toggle:hover { color: var(--copper); }
.nav__sub-toggle .icon { transition: transform .2s var(--ease); }
.nav__sub-toggle[aria-expanded="true"] .icon { transform: rotate(180deg); }
.nav__sub { list-style: none; margin: 0; padding: 10px 0; display: none; }
.nav__sublink { display: block; padding: 10px 22px; color: var(--on-dark); text-decoration: none; white-space: nowrap; font-size: 1rem; }
.nav__sublink:hover, .nav__sublink[aria-current="page"] { color: var(--copper); }

/* Contact as the framed call-to-action, as in the mock */
.nav__item--cta > .nav__row { border: 1px solid var(--copper); padding: 0 6px 0 26px; min-height: 48px; transition: background-color .2s var(--ease); }
.nav__item--cta > .nav__row:hover { background: rgba(217, 138, 88, .12); }
.nav__item--cta .nav__link::after { display: none; }

/* Instagram, framed like Contact, just to its right (the menu is pushed right so the two stay together) */
@media (min-width: 1100px) { .site-nav { margin-left: auto; } }
.header-social { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 48px; height: 48px; margin-left: -12px; border: 1px solid var(--copper); color: var(--on-dark); transition: background-color .2s var(--ease), color .2s var(--ease); }
.header-social:hover { background: rgba(217, 138, 88, .12); color: var(--copper); }
.header-social .icon { width: 20px; height: 20px; }

.nav-toggle { display: none; }

@media (min-width: 1100px) {
  .nav__sub { position: absolute; top: calc(100% + 8px); left: -22px; min-width: 240px; background: var(--charcoal-deep); border-top: 2px solid var(--copper); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
  .nav__sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
  .nav__item--cta .nav__sub { left: auto; right: 0; }
  .nav__item--has-sub.is-open > .nav__sub { display: block; }
}
@media (min-width: 1100px) and (hover: hover) {
  .nav__item--has-sub:hover > .nav__sub { display: block; }
}

@media (max-width: 1099px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 4px 8px 12px; border: 0; background: none; color: var(--on-dark); font-size: 1rem; letter-spacing: .04em; cursor: pointer; }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 24px; height: 2px; background: currentColor; transition: transform .25s var(--ease), background-color .2s; }
  .nav-toggle__bars { position: relative; }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bars::before { top: -7px; }
  .nav-toggle__bars::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

  .site-nav { display: none; position: fixed; inset: var(--header-h) 0 0 0; overflow-y: auto; overscroll-behavior: contain; background: var(--charcoal); border-top: 1px solid var(--charcoal-line); padding: 12px var(--gutter) 48px; }
  .site-header.is-open .site-nav { display: block; }
  .nav { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__item { border-bottom: 1px solid var(--charcoal-line); }
  .nav__link { display: block; padding: 16px 0; font-size: 1.375rem; font-weight: 300; }
  .nav__link::after { display: none; }
  .nav__item.is-current > .nav__link, .nav__item.is-current > .nav__row > .nav__link, .nav__link[aria-current="page"] { color: var(--copper); }
  .nav__row { justify-content: space-between; }
  .nav__sub-toggle { display: none; }
  .nav__sub { display: block; padding: 0 0 14px 16px; }
  .nav__sublink { padding: 9px 0; color: var(--on-dark-muted); }
  .nav__item--cta { border-bottom: 0; margin-top: 24px; }
  .nav__item--cta > .nav__row { padding: 0 20px; }
  .nav__item--cta .nav__sub { padding-left: 20px; padding-top: 10px; }
  body.nav-open { overflow: hidden; }
  /* logo on the left; Instagram and the Menu button together on the right */
  .site-header__inner { gap: 10px; }
  .header-social { order: 2; width: 44px; height: 44px; margin-left: auto; }
  .nav-toggle { order: 3; }
}
/* the smallest phones: the word "Menu" no longer fits beside the logo and Instagram, so only the bars show
   (screen readers still hear "Menu") */
@media (max-width: 359px) { .nav-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }

/* ------------------------------------------------------------------ home hero */
/* Photo framed as in the approved mock: full width, 1513:806, centred (trims ~10% top and bottom only). */
.hero { display: flex; flex-direction: column; background: var(--charcoal); }
.hero__media { position: relative; flex: none; aspect-ratio: 1513 / 806; overflow: hidden; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero__bar { display: flex; flex-direction: column; justify-content: center; background: var(--charcoal); color: var(--on-dark); }
.hero__bar-inner { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; max-width: 1520px; margin: 0 auto; padding: 26px var(--gutter); min-height: 104px; }
.hero__tagline { display: flex; align-items: center; gap: 28px; margin: 0; font-size: clamp(1.25rem, 2vw, 1.75rem); font-weight: 300; letter-spacing: .005em; }
.hero__tagline::before { content: ""; width: 64px; height: 2px; background: var(--copper); flex: none; }
.hero__actions { display: flex; align-items: center; gap: 28px; }
.hero__link { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 1.125rem; color: var(--on-dark); text-decoration: none; border-bottom: 2px solid var(--copper); }
.hero__link:hover { color: var(--copper); }
.hero__divider { width: 1px; height: 36px; background: var(--on-dark-muted); }
.hero__awi, .hero__awi a { display: inline-flex; align-items: center; gap: 12px; color: var(--on-dark); text-decoration: none; font-size: 1.0625rem; }
.hero__awi img { width: auto; height: 64px; }

@media (max-width: 899px) {
  /* phones/tablets: the photo fills the screen above a compact caption bar (centre of the photo kept) */
  .hero__media { aspect-ratio: auto; flex: 1 1 auto; min-height: max(280px, 66vw); }
  .hero__img { object-position: 50% 50%; }
  .hero__bar { flex: none; border-top: 1px solid var(--charcoal-line); }
  .hero__bar-inner { flex-direction: column; align-items: flex-start; gap: 18px; min-height: 0; padding-top: 22px; padding-bottom: 24px; }
  .hero__tagline { gap: 18px; }
  .hero__tagline::before { width: 40px; }
  .hero__actions { align-self: stretch; justify-content: space-between; gap: 16px; }
  .hero__divider { display: none; }
  .hero__awi { margin-left: auto; }
}
@media (max-width: 599px) {
  .cta-band__title { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hero__tagline { gap: 14px; font-size: 1.1875rem; line-height: 1.35; }
  .hero__tagline::before { width: 28px; }
  .hero__link { font-size: 1rem; }
  .hero__actions { flex-wrap: wrap; }
  .hero__awi { gap: 10px; font-size: .9375rem; }
  .hero__awi img { height: 44px; }
}

/* ------------------------------------------------------------------ page head (interior pages) */
.page-head { position: relative; overflow: hidden; isolation: isolate; background: var(--charcoal); color: var(--on-dark); padding: clamp(64px, 9vw, 136px) 0 clamp(48px, 6vw, 88px); border-top: 1px solid var(--charcoal-line); }
/* architectural slat lines, echoing the wood paneling in the photography */
.page-head::before { content: ""; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 8.333%); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 75%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 75%, transparent); }
/* oversized outline of the CVC wordmark */
.page-head::after { content: ""; position: absolute; z-index: -1; right: -5vw; bottom: -2.6vw; width: min(74vw, 1080px); aspect-ratio: 818 / 154; background: url("/assets/img/brand/cvc-mark-outline.svg") no-repeat center / contain; opacity: .1; animation: markDrift 1.8s var(--ease-out) both; }
.page-head__eyebrow { margin: 0 0 20px; font-size: .875rem; letter-spacing: .2em; text-transform: uppercase; color: var(--on-dark-muted); animation: fadeUp .8s var(--ease-out) both; }
.page-head__eyebrow a { color: var(--copper); text-decoration: none; border-bottom: 1px solid transparent; }
.page-head__eyebrow a:hover { border-bottom-color: currentColor; }
.page-head__eyebrow a::after { content: " /"; color: var(--on-dark-muted); }
.page-head__title { font-size: clamp(2.75rem, 7vw, 5.75rem); font-weight: 300; line-height: 1.02; letter-spacing: -.02em; animation: riseIn 1s var(--ease-out) .08s both; }
.page-head__title::after { content: ""; display: block; width: 72px; height: 2px; margin-top: 32px; background: var(--copper); transform-origin: left; animation: growX .9s var(--ease-in-out) .5s both; }
.subnav { animation: fadeUp .8s var(--ease-out) .35s both; }
.subnav ul { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.subnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 20px; border: 1px solid var(--charcoal-line); border-radius: 999px; color: var(--on-dark); text-decoration: none; transition: border-color .25s, color .25s, background-color .25s; }
.subnav a:hover { color: var(--charcoal); background: var(--copper); border-color: var(--copper); }

/* ------------------------------------------------------------------ sections */
.section { padding: clamp(56px, 8vw, 112px) 0; }
.section--tight { padding-bottom: clamp(24px, 3vw, 40px); }
.section--flush-top { padding-top: 0; }
.section--dark { background: var(--charcoal); color: var(--on-dark); }
.section-title { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 400; margin-bottom: 28px; }
.section--dark .section-title { color: var(--copper); font-size: 1rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 28px; }
.section-head .section-title { margin: 0; }
.prose { max-width: 68ch; }
.prose p { font-size: 1.125rem; line-height: 1.75; }
.lead { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 300; line-height: 1.5; }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px clamp(32px, 6vw, 96px); }
.split__aside .section-title::after { content: ""; display: block; width: 48px; height: 2px; margin-top: 20px; background: var(--copper); }
@media (min-width: 800px) { .split__aside { position: sticky; top: calc(var(--header-h) + 40px); align-self: start; } }
@media (max-width: 799px) { .split { grid-template-columns: 1fr; } }
.section--dark { position: relative; overflow: hidden; isolation: isolate; }
.section--dark::after { content: ""; position: absolute; z-index: -1; left: -4vw; bottom: -2vw; width: min(70vw, 980px); aspect-ratio: 818 / 154; background: url("/assets/img/brand/cvc-mark-outline.svg") no-repeat center / contain; opacity: .07; }

.image-band { overflow: hidden; }
.image-band img { width: 100%; height: clamp(280px, 48vw, 640px); object-fit: cover; object-position: 50% 58%; }
.mission { max-width: calc(1040px + 2 * var(--gutter)); }
.mission__statement { margin: 0; font-size: clamp(1.5rem, 3.2vw, 2.375rem); font-weight: 300; line-height: 1.4; }

.review-note { margin: 0; padding: 18px 22px; border: 1px dashed var(--copper-ink); background: #fbf3ec; color: var(--ink); font-size: 1rem; }
.review-note p { margin: 0; }
.review-note strong { color: var(--copper-ink); font-weight: 600; }
.empty-note { color: var(--ink-muted); }

/* ------------------------------------------------------------------ portfolio */
/* category buttons: black, rounded, with a soft copper glow; the selected one gets a copper frame */
.filters { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 40px; }
.filter { display: inline-flex; align-items: center; gap: 12px; min-height: 54px; padding: 12px 28px; border: 1px solid var(--charcoal-deep); border-radius: 12px; background: var(--charcoal-deep); color: var(--on-dark); font-size: 1.0625rem; font-weight: 500; letter-spacing: .01em; cursor: pointer; box-shadow: 0 10px 24px -12px rgba(217, 138, 88, .55); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .2s; }
.filter:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(217, 138, 88, .75); }
.filter[aria-pressed="true"] { border-color: var(--copper); box-shadow: inset 0 0 0 1px var(--copper), 0 14px 30px -12px rgba(217, 138, 88, .85); }
.filter__count { min-width: 1.6em; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: var(--on-dark-muted); font-size: .8125rem; text-align: center; }
.filter[aria-pressed="true"] .filter__count { background: var(--copper); color: var(--charcoal-deep); }
@media (max-width: 599px) { .filters { gap: 10px; } .filter { min-height: 50px; padding: 10px 20px; font-size: 1rem; } }

.project-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); }
@media (max-width: 1099px) { .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px)  { .project-grid { grid-template-columns: 1fr; } }
.project[hidden] { display: none; }
/* Projects grouped by category (Healthcare, Commercial, Residential), each under its own heading. */
.portfolio-group[hidden] { display: none; }
.portfolio-group + .portfolio-group { margin-top: clamp(56px, 7vw, 96px); }
/* Each heading is a dark rounded bar with a copper edge and a soft copper glow, in the same family as the filter buttons. */
.portfolio-group__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; margin: 0 0 28px; padding: clamp(12px, 1vw, 14px) clamp(20px, 2.4vw, 32px); border-left: 5px solid var(--copper); border-radius: 12px; background: var(--charcoal-deep); color: var(--on-dark); box-shadow: 0 16px 32px -20px rgba(217, 138, 88, .7); }
.portfolio-group__title { margin: 0; font-size: clamp(1.375rem, 2.4vw, 2rem); font-weight: 500; letter-spacing: .1em; line-height: 1.1; text-transform: uppercase; color: var(--white); }
.portfolio-group__count { margin: 0; padding: 4px 14px; border: 1px solid var(--copper); border-radius: 999px; color: var(--copper); font-size: .875rem; font-weight: 500; line-height: 1.4; letter-spacing: .04em; }
@media (max-width: 379px) { .portfolio-group__head { gap: 8px 12px; padding-left: 16px; padding-right: 16px; } .portfolio-group__title { font-size: 1.25rem; letter-spacing: .08em; } .portfolio-group__count { padding: 4px 12px; } }
@media (max-width: 339px) { .portfolio-group__head { flex-direction: column; align-items: flex-start; } }
.portfolio-group__head.is-entering { animation: tileIn .55s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); }
/* Photo on top, name and service/location underneath (always visible). */
.project__tile { display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; border: 0; background: none; color: var(--ink); text-align: left; text-decoration: none; }
button.project__tile { cursor: pointer; }
.project__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--charcoal); }
.project__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-out); }
:is(a, button).project__tile:hover .project__media img, :is(a, button).project__tile:focus-visible .project__media img { transform: scale(1.045); }
.project__count { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; background: rgba(31, 33, 30, .78); color: var(--on-dark); font-size: .8125rem; font-weight: 500; letter-spacing: .04em; line-height: 1.4; z-index: 1; transition: background-color .3s var(--ease), transform .3s var(--ease); }
:is(a, button).project__tile:hover .project__count, :is(a, button).project__tile:focus-visible .project__count { background: var(--copper-ink); transform: translateY(-4px); }
.project__media::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(to top, rgba(20, 21, 19, .6), rgba(20, 21, 19, 0)); opacity: 0; transform: translateY(10px); transition: opacity .3s var(--ease), transform .3s var(--ease); pointer-events: none; }
:is(a, button).project__tile:hover .project__media::after, :is(a, button).project__tile:focus-visible .project__media::after { opacity: 1; transform: none; }
.project__placeholder { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: flex-end; padding: 16px; background: repeating-linear-gradient(135deg, var(--charcoal) 0 18px, var(--charcoal-soft) 18px 19px); }
.project__placeholder span { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-muted); border: 1px solid var(--charcoal-line); padding: 4px 10px; background: var(--charcoal); }
.project__caption { position: relative; display: flex; flex: 1 0 auto; flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 2px 16px; border-bottom: 1px solid var(--line); }
.project__caption::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--copper-ink); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out); }
:is(a, button).project__tile:hover .project__caption::after, :is(a, button).project__tile:focus-visible .project__caption::after { transform: scaleX(1); }
/* the subtle "View Project" link (the whole card is the link) */
.project__view { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; color: var(--copper-ink); font-size: .9375rem; font-weight: 500; letter-spacing: .01em; }
.project__tile:hover .project__view .icon--arrow, .project__tile:focus-visible .project__view .icon--arrow { transform: translate(3px, -3px); }
.project__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.project__name { font-size: 1.25rem; font-weight: 400; line-height: 1.3; }
.project__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: .9375rem; color: var(--ink-muted); }
.project__sep { width: 18px; height: 1px; background: var(--copper); }
/* filtering: the projects that stay in view settle in gently */
.project.is-entering { animation: tileIn .55s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes tileIn { from { opacity: 0; transform: translateY(14px); } }

.careers-link:hover .icon--arrow, .text-link:hover .icon--arrow, .hero__link:hover .icon--arrow, .btn:hover .icon--arrow { transform: translate(3px, -3px); }
.icon--arrow { transition: transform .3s var(--ease-out); }

/* ------------------------------------------------------------------ team: photo cards (headshot, name and job title over a dark fade) */
.team-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
@media (max-width: 1099px) { .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 799px)  { .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.team-member { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--charcoal); }
.team-member__photo { position: absolute; inset: 0; display: block; }
.team-member__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-out); }
.team-member:hover .team-member__photo img { transform: scale(1.05); }
/* while a headshot is missing: the same pattern as projects without photos, with the CVC mark */
.team-member__placeholder { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: flex-end; padding: 16px; background: repeating-linear-gradient(135deg, var(--charcoal) 0 18px, var(--charcoal-soft) 18px 19px); }
.team-member__placeholder::before { content: ""; position: absolute; left: 16%; right: 16%; top: 34%; aspect-ratio: 818 / 154; background: url("/assets/img/brand/cvc-mark-outline.svg") no-repeat center / contain; opacity: .18; }
.team-member__placeholder span { position: relative; padding: 4px 10px; border: 1px solid var(--charcoal-line); background: var(--charcoal); color: var(--on-dark-muted); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }
.team-member__body { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 6px; padding: 64px 22px 22px; background: linear-gradient(to top, rgba(20, 21, 19, .95) 0%, rgba(20, 21, 19, .75) 55%, rgba(20, 21, 19, 0) 100%); }
.team-member__body::before { content: ""; width: 36px; height: 2px; margin-bottom: 10px; background: var(--copper); transition: width .5s var(--ease-out); }
.team-member:hover .team-member__body::before { width: 72px; }
.team-member__name { margin: 0; font-size: 1.25rem; font-weight: 400; line-height: 1.3; color: var(--white); }
.team-member__title { margin: 0; font-size: .8125rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--copper); }
@media (max-width: 599px) {
  .team-member__body { gap: 4px; padding: 44px 12px 12px; }
  .team-member__body::before { width: 28px; margin-bottom: 8px; }
  .team-member__name { font-size: 1rem; }
  .team-member__title { font-size: .6875rem; letter-spacing: .12em; }
  .team-member__placeholder { padding: 10px; }
  .team-member__placeholder span { padding: 3px 7px; font-size: .625rem; letter-spacing: .06em; white-space: nowrap; }
}
/* very narrow phones: the label would be clipped, the patterned CVC placeholder says enough */
@media (max-width: 374px) { .team-member__placeholder span { display: none; } }
.team-grid--preview, .team-grid--after-note { margin-top: 32px; }

/* ------------------------------------------------------------------ contact */
.contact-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 48px clamp(40px, 6vw, 96px); align-items: start; }
@media (max-width: 899px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 599px) { .field-row { grid-template-columns: 1fr; } }
.field label { font-weight: 500; font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }
.field input, .field textarea { width: 100%; min-height: 54px; padding: 14px 16px; border: 1px solid transparent; border-bottom: 2px solid #8b8d87; border-radius: 0; background: var(--white); font-size: 1.0625rem; line-height: 1.5; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--copper-ink); box-shadow: 0 2px 0 0 var(--copper-ink), 0 10px 28px rgba(31, 33, 30, .08); }
.field [aria-invalid="true"] { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
.field__error { margin: 0; color: var(--error); font-size: .9375rem; font-weight: 500; }
.form-note { margin: -6px 0 0; color: var(--ink-muted); font-size: .9375rem; }
.contact-form .btn { justify-self: start; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-alert { padding: 16px 18px; border-left: 3px solid var(--error); background: #fbeceb; }
.form-alert p { margin: 0; }
.form-success { padding: 32px; border-left: 3px solid var(--copper-ink); background: var(--white); }
.form-success:focus { outline: none; }
.form-success p { margin: 0; font-size: 1.1875rem; line-height: 1.6; }

.contact-details { position: relative; overflow: hidden; isolation: isolate; padding: 36px 32px; background: var(--charcoal); color: var(--on-dark); }
.contact-details::after { content: ""; position: absolute; z-index: -1; right: -40px; bottom: -14px; width: 420px; aspect-ratio: 818 / 154; background: url("/assets/img/brand/cvc-mark-outline.svg") no-repeat center / contain; opacity: .08; }
.contact-details__company { margin: 0 0 20px; font-size: 1.25rem; font-weight: 500; }
.contact-details dl { margin: 0; display: grid; gap: 18px; }
.contact-details dt { font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--copper); }
.contact-details dd { margin: 4px 0 0; font-size: 1.0625rem; }
.contact-details a { color: var(--on-dark); text-decoration: none; border-bottom: 1px solid var(--charcoal-line); }
.contact-details a:hover { color: var(--copper); border-bottom-color: var(--copper); }
.careers-link { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 16px; margin-top: 16px; padding: 22px 32px; border: 1px solid var(--line); background: var(--white); color: var(--ink); text-decoration: none; transition: border-color .2s; }
.careers-link:hover { border-color: var(--ink); }
.careers-link__label { font-size: 1.25rem; }
.careers-link__text { grid-row: 2; color: var(--ink-muted); font-size: .9375rem; }
.careers-link .icon--arrow { grid-row: 1 / span 2; grid-column: 2; color: var(--copper-ink); }

/* careers: résumé upload and the roles list */
.field__optional { font-weight: 400; letter-spacing: .06em; }
.field__hint { margin: 0; font-size: .875rem; color: var(--ink-muted); }
.field input[type="file"] { min-height: 0; padding: 12px; border: 1px dashed #8b8d87; background: var(--white); font-size: .9375rem; cursor: pointer; }
.field input[type="file"]:hover { border-color: var(--ink); }
.field input[type="file"]:focus { border-color: var(--copper-ink); border-style: solid; box-shadow: 0 10px 28px rgba(31, 33, 30, .08); }
.field input[type="file"]::file-selector-button { margin-right: 16px; padding: 10px 18px; border: 1px solid var(--charcoal); border-radius: var(--radius); background: var(--charcoal); color: var(--white); font: inherit; font-size: .9375rem; font-weight: 500; cursor: pointer; transition: background-color .2s var(--ease); }
.field input[type="file"]::file-selector-button:hover { background: var(--charcoal-soft); }
.careers-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px clamp(40px, 6vw, 96px); align-items: start; }
@media (max-width: 899px) { .careers-layout { grid-template-columns: 1fr; } }
@media (min-width: 900px) { .careers-layout__intro { position: sticky; top: calc(var(--header-h) + 40px); } }
.careers-layout__intro .review-note { margin-bottom: 24px; }
.careers-intro { font-size: 1.125rem; line-height: 1.75; }
.careers-apply-intro { max-width: 64ch; margin: 0 0 32px; color: var(--ink); line-height: 1.75; }
.roles-title { margin: 36px 0 14px; font-size: .9375rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }
.role-list { list-style: none; margin: 0 0 16px; padding: 0; border-top: 1px solid var(--line); }
.role-list li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.125rem; }

/* ------------------------------------------------------------------ services page */
/* CVC's text in full: a large opening statement, the four in-house sentences as cards with an icon each, the
   "We strive" sentence highlighted, the three sectors as numbered rows, the closing sentence in a dark band;
   then the photos of the shop and the drawings. */
.services-lead { max-width: 30em; margin: 0; font-size: clamp(1.5rem, 3vw, 2.625rem); font-weight: 300; line-height: 1.32; letter-spacing: -.01em; }
.services-lead::before { content: ""; display: block; width: 56px; height: 2px; margin-bottom: 32px; background: var(--copper); }
.services-points { list-style: none; margin: clamp(48px, 6vw, 80px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 24px); }
.services-point { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 0 24px; padding: 32px 34px; background: var(--white); border-top: 2px solid var(--copper-ink); }
.services-point svg { width: 42px; height: 42px; color: var(--copper-ink); transition: transform .5s var(--ease-out); }
.services-point:hover svg { transform: translateY(-3px); }
.services-point p { margin: 0; font-size: 1.0625rem; line-height: 1.75; }
@media (max-width: 799px) {
  .services-points { grid-template-columns: 1fr; }
  .services-point { gap: 0 18px; padding: 26px 22px; }
  .services-point svg { width: 36px; height: 36px; }
}
.services-highlight { max-width: 44em; margin: clamp(40px, 5vw, 64px) 0 0; padding-left: 28px; border-left: 2px solid var(--copper); font-size: clamp(1.1875rem, 1.6vw, 1.375rem); font-weight: 300; line-height: 1.6; }
/* image showcase: a dark band with the drawing-to-installation image large (shown whole, never cropped) and the
   shop and drawing photos in a row beneath it; every image opens in the photo viewer */
.services-feature { margin: 0; }
.services-feature button { display: block; width: 100%; padding: 0; border: 1px solid var(--charcoal-line); background: var(--white); cursor: zoom-in; }
.services-feature img { width: 100%; height: auto; }
.services-showcase__row { list-style: none; margin: clamp(12px, 1.4vw, 20px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 20px); }
.services-showcase__row > li { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--charcoal-deep); }
.services-showcase__row button { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.services-showcase__row img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-out); }
.services-showcase__row button:hover img, .services-showcase__row button:focus-visible img { transform: scale(1.045); }
@media (max-width: 599px) { .services-showcase__row { grid-template-columns: 1fr; } }
.services-sectors { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.services-sectors li { padding: 34px 0; border-bottom: 1px solid var(--line); }
.services-sectors p { max-width: 52em; margin: 0; font-size: clamp(1.1875rem, 1.7vw, 1.4375rem); font-weight: 300; line-height: 1.6; }
.services-sectors__name { color: var(--copper-ink); font-weight: 500; }
@media (max-width: 799px) { .services-sectors li { padding: 28px 0; } }
.services-closing__text { max-width: 30em; margin: 0; font-size: clamp(1.5rem, 3.2vw, 2.375rem); font-weight: 300; line-height: 1.4; }
.services-closing__text::before { content: ""; display: block; width: 56px; height: 2px; margin-bottom: 32px; background: var(--copper); }
/* shop photos and drawings: four sit in a mosaic (one large, two small, one wide), any other number in a grid */
.shop-mosaic, .shop-grid { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: clamp(12px, 1.4vw, 20px); }
.shop-mosaic { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); aspect-ratio: 2.5 / 1; }
.shop-mosaic > li:first-child { grid-row: 1 / span 2; }
.shop-mosaic > li:last-child { grid-column: 2 / span 2; }
.shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shop-grid > li { aspect-ratio: 4 / 3; }
.shop-mosaic > li, .shop-grid > li { position: relative; overflow: hidden; background: var(--charcoal); }
@media (max-width: 899px) {
  .shop-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; aspect-ratio: auto; }
  .shop-mosaic > li, .shop-mosaic > li:first-child, .shop-mosaic > li:last-child { grid-row: auto; grid-column: auto; aspect-ratio: 4 / 3; }
}
@media (max-width: 599px) { .shop-grid { grid-template-columns: 1fr; } } /* phones: one photo per row, full width */
.shop-photos button { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.shop-photos img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-out); }
.shop-photos button:hover img, .shop-photos button:focus-visible img { transform: scale(1.045); }
/* until CVC sends them: the same dark placeholder as a missing team headshot (pattern, CVC mark, label) */
.shop-ph { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: flex-end; padding: 16px; background: repeating-linear-gradient(135deg, var(--charcoal) 0 18px, var(--charcoal-soft) 18px 19px); }
.shop-ph::before { content: ""; position: absolute; left: 22%; right: 22%; top: 50%; aspect-ratio: 818 / 154; transform: translateY(-50%); background: url("/assets/img/brand/cvc-mark-outline.svg") no-repeat center / contain; opacity: .18; }
.shop-ph > span { position: relative; padding: 4px 10px; border: 1px solid var(--charcoal-line); background: var(--charcoal); color: var(--on-dark-muted); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
@media (max-width: 599px) {
  .shop-ph { padding: 10px; }
  .shop-ph > span { padding: 3px 7px; font-size: .625rem; letter-spacing: .06em; }
  .shop-ph__soon { display: none; } /* "Shop photo" fits on one line; the note above says they are coming */
}
.review-note--after { margin-top: clamp(32px, 4vw, 48px); }

/* ------------------------------------------------------------------ news */
.news-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.news-item { border-bottom: 1px solid var(--line); }
.news-item__inner { display: grid; gap: 20px 40px; padding: 32px 0; }
.news-item__inner:has(.news-item__media) { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
@media (max-width: 699px) { .news-item__inner:has(.news-item__media) { grid-template-columns: 1fr; } }
.news-item__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper-2); }
.news-item__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.news-item__meta { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 10px; font-size: .8125rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }
.news-item__meta span::before { content: ""; display: inline-block; width: 18px; height: 1px; margin-right: 12px; vertical-align: middle; background: var(--copper); }
.news-item__title { margin: 0 0 12px; font-size: clamp(1.375rem, 2.2vw, 1.75rem); font-weight: 400; line-height: 1.3; }
.news-item__title a { text-decoration: none; }
.news-item__title a:hover { color: var(--copper-ink); }
.news-item__summary { color: var(--ink-muted); }
/* no news yet: a dark "coming soon" panel in the page-head style (slat lines, CVC mark) */
.news-soon { position: relative; overflow: hidden; isolation: isolate; padding: clamp(44px, 6vw, 88px) clamp(28px, 5vw, 80px); background: var(--charcoal); color: var(--on-dark); animation: fadeUp .9s var(--ease-out) .35s both; }
.news-soon::before { content: ""; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 8.333%); }
.news-soon::after { content: ""; position: absolute; z-index: -1; right: -40px; bottom: -18px; width: min(70%, 640px); aspect-ratio: 818 / 154; background: url("/assets/img/brand/cvc-mark-outline.svg") no-repeat center / contain; opacity: .09; }
.news-soon__label { display: flex; align-items: center; gap: 16px; margin: 0 0 18px; font-size: .8125rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--copper); }
.news-soon__label::before { content: ""; width: 40px; height: 2px; background: var(--copper); }
.news-soon__title { margin: 0 0 16px; font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 300; line-height: 1.1; letter-spacing: -.01em; }
.news-soon__text { max-width: 46ch; margin: 0 0 32px; color: var(--on-dark-muted); font-size: 1.125rem; }
.news-soon__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
.news-soon .text-link { color: var(--on-dark); border-bottom-color: var(--copper); }
.news-soon .text-link:hover { color: var(--copper); }
.news-soon :focus-visible { outline-color: var(--copper); }
html.intro-on .news-soon { animation-delay: 2.5s; }

/* ------------------------------------------------------------------ project pages (/portfolio/<project>/) */
.page-head--project { padding-bottom: clamp(48px, 6vw, 88px); }
.page-head--project .page-head__title { max-width: 20ch; font-size: clamp(2.5rem, 5vw, 4.25rem); }
.section--project { padding-top: clamp(40px, 5vw, 72px); padding-bottom: clamp(40px, 5vw, 64px); }
/* Phones: cover photo, then the description panel, then the gallery.
   Desktop: the panel on the left (staying in view on tall screens) beside the photos on the right. */
.project-layout { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "cover" "panel" "gallery"; gap: 32px; align-items: start; }
.project-layout > .project-hero { grid-area: cover; }
.project-layout > .project-panel { grid-area: panel; }
.project-layout > .project-gallery { grid-area: gallery; margin: 0; }
@media (min-width: 900px) {
  .project-layout { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); grid-template-areas: "panel cover" "panel gallery"; column-gap: clamp(32px, 5vw, 72px); row-gap: clamp(12px, 1.6vw, 22px); }
}
@media (min-width: 900px) and (min-height: 820px) { .project-panel { position: sticky; top: calc(var(--header-h) + 32px); } }
.project-panel { animation: fadeUp .9s var(--ease-out) .35s both; }
.project-panel__facts { margin: 0; }
.project-panel__facts div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.project-panel__facts div:first-child { border-top: 1px solid var(--line); }
.project-panel__facts dt { font-size: .8125rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); }
.project-panel__facts dd { margin: 0; text-align: right; }
.project-panel__facts a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); transition: color .2s, border-color .2s; }
.project-panel__facts a:hover { color: var(--copper-ink); border-bottom-color: currentColor; }
.project-panel__btn { margin-top: 28px; }
html.intro-on .project-panel { animation-delay: 2.5s; }
.project-hero { position: relative; display: block; width: 100%; margin: 0; padding: 0; border: 0; background: var(--charcoal); overflow: hidden; cursor: zoom-in; animation: clipOpen 1.3s var(--ease-out) .25s both; }
.project-hero__media { display: block; aspect-ratio: 3 / 2; overflow: hidden; animation: imgSettle 1.8s var(--ease-out) .25s both; }
@media (max-width: 599px) { .project-hero__media { aspect-ratio: 4 / 3; } }
.project-hero__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out); }
.project-hero:hover .project-hero__media img, .project-hero:focus-visible .project-hero__media img { transform: scale(1.025); }
.project-hero__hint { position: absolute; right: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 9px; padding: 8px 15px; border-radius: 999px; background: rgba(31, 33, 30, .8); color: var(--on-dark); font-size: .875rem; font-weight: 500; letter-spacing: .02em; transition: background-color .3s var(--ease); }
.project-hero:hover .project-hero__hint, .project-hero:focus-visible .project-hero__hint { background: var(--copper-ink); }
.project-hero:focus-visible { outline-offset: -5px; } /* the reveal's clip-path would hide an outside focus ring */
/* Gallery in rows planned by tools/render.mjs: each photo keeps its proportions and the photos in a row share
   one height (each one's width is proportional to its aspect ratio, --r). Phones: rows reflow two-up. */
.project-gallery { --gap: clamp(12px, 1.6vw, 24px); display: flex; flex-direction: column; gap: var(--gap); margin: var(--gap) 0 0; }
.project-gallery__row { display: flex; gap: var(--gap); }
/* flex-grow is 10 × the ratio: still proportional, but never below 1 (a total under 1 would leave a gap) */
.project-gallery__item { flex: calc(var(--r) * 10) 1 0; min-width: 0; }
.project-gallery__row--partial .project-gallery__item { flex: 0 1 calc(var(--r) * var(--partial, 33.33%)); } /* --partial: row height / row width, set by render.mjs */
@media (max-width: 599px) {
  .project-gallery { flex-direction: row; flex-wrap: wrap; }
  .project-gallery__row { display: contents; }
  .project-gallery__item, .project-gallery__row--partial .project-gallery__item { flex: calc(var(--r) * 10) 1 calc(var(--r) * 170px); max-width: calc(var(--r) * 280px); } /* a lone tall photo stays a sensible size */
}
.project-gallery__item button { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--paper-2); overflow: hidden; cursor: zoom-in; }
.project-gallery__item img { width: 100%; height: auto; aspect-ratio: var(--r); object-fit: cover; transition: transform .9s var(--ease-out), filter .4s var(--ease); }
.project-gallery__item button:hover img, .project-gallery__item button:focus-visible img { transform: scale(1.04); filter: brightness(.94); }
.project-pager { padding: clamp(32px, 5vw, 64px) 0 clamp(56px, 8vw, 112px); }
.project-pager__inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.project-pager__link { display: flex; align-items: center; gap: clamp(16px, 2vw, 24px); padding: 28px 24px 28px 0; color: var(--ink); text-decoration: none; }
.project-pager__link--next { grid-column: 2; flex-direction: row-reverse; padding: 28px 0 28px 24px; border-left: 1px solid var(--line); text-align: right; }
.project-pager__thumb { position: relative; flex: none; width: clamp(96px, 10vw, 148px); aspect-ratio: 4 / 3; overflow: hidden; background: var(--charcoal); }
.project-pager__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-out); }
.project-pager__link:hover .project-pager__thumb img, .project-pager__link:focus-visible .project-pager__thumb img { transform: scale(1.07); }
.project-pager__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.project-pager__label { display: inline-flex; align-items: center; gap: 8px; font-size: .8125rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--copper-ink); }
.project-pager__link--next .project-pager__label { justify-content: flex-end; }
.project-pager__label .icon { transition: transform .3s var(--ease-out); }
.project-pager__link--prev:hover .icon--prev { transform: translateX(-4px); }
.project-pager__link--next:hover .icon--next { transform: translateX(4px); }
.project-pager__name { font-size: clamp(1.125rem, 1.8vw, 1.5rem); line-height: 1.25; transition: color .2s var(--ease); }
.project-pager__link:hover .project-pager__name { color: var(--copper-ink); }
.project-pager__meta { font-size: .9375rem; color: var(--ink-muted); }
@media (max-width: 699px) {
  .project-pager__inner { grid-template-columns: 1fr; }
  .project-pager__link, .project-pager__link--next { grid-column: auto; flex-direction: row; padding: 22px 0; text-align: left; border-left: 0; }
  .project-pager__link--next { border-top: 1px solid var(--line); }
  .project-pager__link--next .project-pager__label { justify-content: flex-start; }
}

/* ------------------------------------------------------------------ gentle entrances (load animations above the fold) */
/* the same reveal the original review site uses for its photo band ([data-reveal="clip"]), run on load */
@keyframes clipOpen { from { clip-path: inset(14% 0 14% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes imgSettle { from { transform: scale(1.12); } }
.services-lead { animation: fadeUp .9s var(--ease-out) .35s both; }
.form-success:not([hidden]) { animation: fadeUp .7s var(--ease-out) both; }
/* when the first-visit intro curtain is playing, wait for it to lift */
html.intro-on .project-hero, html.intro-on .project-hero__media { animation-delay: 2.35s; }
html.intro-on .services-lead { animation-delay: 2.5s; }

/* ------------------------------------------------------------------ CTA band */
.cta-band { position: relative; overflow: hidden; isolation: isolate; background: var(--charcoal-soft); color: var(--on-dark); }
.cta-band::after { content: ""; position: absolute; z-index: -1; right: -3vw; top: 50%; width: min(56vw, 760px); aspect-ratio: 818 / 154; transform: translateY(-50%); background: url("/assets/img/brand/cvc-mark-outline.svg") no-repeat center / contain; opacity: .08; }
.cta-band__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px 40px; padding-top: clamp(48px, 7vw, 88px); padding-bottom: clamp(48px, 7vw, 88px); }
.cta-band__title { display: flex; align-items: center; gap: 24px; font-size: clamp(1.625rem, 3.4vw, 2.75rem); font-weight: 300; letter-spacing: -.01em; }
.cta-band__title::before { content: ""; width: 48px; height: 2px; background: var(--copper); flex: none; }

/* ------------------------------------------------------------------ lightbox (built by site.js) */
.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(18, 19, 17, .97); color: var(--on-dark); }
.lightbox::backdrop { background: rgba(18, 19, 17, .9); }
.lightbox[open] { animation: lightboxIn .35s var(--ease-out); }
@keyframes lightboxIn { from { opacity: 0; } }
.lightbox__inner { display: grid; grid-template-rows: auto 1fr auto; height: 100%; }
.lightbox__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px clamp(16px, 3vw, 32px); }
.lightbox__title { margin: 0; font-size: 1.125rem; font-weight: 500; }
.lightbox__title span { display: block; font-size: .9375rem; font-weight: 400; color: var(--on-dark-muted); }
.lightbox__stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 clamp(8px, 7vw, 96px); touch-action: pan-y; }
.lightbox__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: opacity .35s var(--ease); }
.lightbox__stage img.is-loading { opacity: 0; }
.lightbox__bottom { display: flex; align-items: center; justify-content: center; gap: 24px; padding: 16px; }
.lightbox__counter { min-width: 5ch; text-align: center; font-variant-numeric: tabular-nums; color: var(--on-dark-muted); }
.lightbox__btn { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 1px solid var(--charcoal-line); border-radius: 50%; background: transparent; color: var(--on-dark); cursor: pointer; }
.lightbox__btn:hover { border-color: var(--copper); color: var(--copper); }
.lightbox__btn[disabled] { opacity: .3; cursor: default; }
.lightbox__btn svg { width: 20px; height: 20px; }
body.lightbox-open { overflow: hidden; }

/* ------------------------------------------------------------------ motion: shared keyframes */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(40px); } }
@keyframes growX { from { transform: scaleX(0); } }
@keyframes markDrift { from { opacity: 0; transform: translateX(60px); } }
@keyframes heroSettle { from { transform: scale(1.06); } }

.hero__img { animation: heroSettle 1.8s var(--ease-out) both; }

/* header frosts once the page scrolls */
/* The frosted glass sits on a pseudo-element: a backdrop-filter on .site-header itself would become the
   containing block for the fixed-position mobile menu and collapse it to the header's height. */
.site-header { transition: box-shadow .3s; }
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--charcoal); transition: background-color .3s; }
.site-header.is-scrolled { background: transparent; box-shadow: 0 12px 32px rgba(0, 0, 0, .22); }
.site-header.is-scrolled::before { background: rgba(38, 40, 37, .9); -webkit-backdrop-filter: saturate(140%) blur(12px); backdrop-filter: saturate(140%) blur(12px); }
.site-header.is-open::before { background: var(--charcoal); }

/* scroll reveal (applied by site.js only to content below the fold, never in edit mode) */
[data-reveal] { opacity: 0; transform: translateY(36px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: calc(var(--rd, 0) * 90ms); }
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal="clip"] { opacity: 1; transform: none; clip-path: inset(14% 0 14% 0); transition: clip-path 1.3s var(--ease-out); }
[data-reveal="clip"] img { transform: scale(1.12); transition: transform 1.8s var(--ease-out); }
[data-reveal="clip"].is-in { clip-path: inset(0 0 0 0); }
[data-reveal="clip"].is-in img { transform: none; }

/* ------------------------------------------------------------------ intro / loading screen (first view per session) */
.intro { display: none; }
html.intro-on .intro { display: block; position: fixed; inset: 0; z-index: 2000; }
.intro__copper, .intro__panel { position: absolute; inset: 0; clip-path: inset(0 0 0 0); }
.intro__copper { background: var(--copper); animation: introWipe .95s var(--ease-in-out) 1.96s forwards; }
.intro__panel { display: flex; align-items: center; justify-content: center; background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .03) 0 1px, transparent 1px 8.333%),
    radial-gradient(120% 90% at 50% 42%, #30332f 0%, var(--charcoal) 52%, var(--charcoal-deep) 100%);
  animation: introWipe .95s var(--ease-in-out) 1.9s forwards; }
.intro__content { display: grid; justify-items: center; gap: 24px; width: min(72vw, 540px); animation: introLift .6s var(--ease-in-out) 1.72s forwards; }
.intro__mark { width: 100%; height: auto; overflow: visible; animation: markIn 1.8s var(--ease-out) both; }
.intro__glyph { fill: #fff; fill-opacity: 0; stroke: var(--copper); stroke-width: 2.4; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 1;
  animation: glyphDraw .85s var(--ease-in-out) calc(.1s + var(--i) * .07s) forwards, glyphFill .55s ease calc(.72s + var(--i) * .06s) forwards; }
.intro__rule { display: block; width: 100%; height: 1px; background: linear-gradient(90deg, transparent, var(--copper) 18%, var(--copper) 82%, transparent); transform: scaleX(0); animation: growIn .8s var(--ease-in-out) .9s forwards; }
.intro__name { display: flex; justify-content: center; margin-right: -.42em; overflow: hidden; font-size: clamp(.625rem, 1.5vw, .9375rem); font-weight: 400; letter-spacing: .42em; text-transform: uppercase; color: var(--on-dark-muted); white-space: nowrap; }
.intro__name span { display: inline-block; opacity: 0; transform: translateY(110%); animation: letterUp .6s var(--ease-out) calc(1s + var(--i) * .018s) forwards; }
.intro__progress { position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--copper); transform: scaleX(0); transform-origin: left; animation: growIn 1.75s cubic-bezier(.45, .05, .2, 1) .05s forwards; }
@media (max-width: 599px) { .intro__content { width: 84vw; gap: 18px; } .intro__name { letter-spacing: .26em; margin-right: -.26em; } }
.intro.is-leaving .intro__panel { animation: introWipe .7s var(--ease-in-out) forwards; }
.intro.is-leaving .intro__copper { animation: introWipe .7s var(--ease-in-out) .05s forwards; }
.intro.is-leaving .intro__content { animation: introLift .4s var(--ease-in-out) forwards; }
@keyframes introWipe { to { clip-path: inset(0 0 100% 0); } }
@keyframes introLift { to { opacity: 0; transform: translateY(-32px); } }
@keyframes markIn { from { transform: scale(.94); } }
@keyframes glyphDraw { to { stroke-dashoffset: 0; } }
@keyframes glyphFill { to { fill-opacity: 1; stroke-opacity: 0; } }
@keyframes growIn { to { transform: scaleX(1); } }
@keyframes letterUp { to { opacity: 1; transform: none; } }
/* the page settles in as the curtain lifts */
html.intro-on .hero__img { animation: heroSettle 2.2s var(--ease-out) 1.95s both; }
html.intro-on .hero__bar-inner > * { animation: fadeUp .9s var(--ease-out) 2.35s both; }
html.intro-on .hero__bar-inner > :nth-child(2) { animation-delay: 2.5s; }
html.intro-on .page-head__eyebrow { animation-delay: 2.1s; }
html.intro-on .page-head__title { animation-delay: 2.18s; }
html.intro-on .page-head__title::after { animation-delay: 2.6s; }
html.intro-on .subnav { animation-delay: 2.45s; }
html.intro-on .page-head::after { animation-delay: 2.1s; }

/* ------------------------------------------------------------------ page-to-page transitions (supporting browsers) */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-old(root) { animation: vtOut .25s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vtIn .45s var(--ease-out) both; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; } }

::selection { background: var(--copper); color: var(--charcoal); }

@media print {
  .site-header, .cta-band, .nav-toggle { display: none !important; }
  .page-head { background: none; color: #000; }
}
