/* ==========================================================================
   Mustang Commercial — design system
   Palette   : high-altitude survey. Cool paper, spruce, brass hairline data.
   Type      : Archivo (signage grotesque) / Source Serif 4 (body) /
               IBM Plex Mono (survey plates + labels)
   Signature : the "plat plate" — a title-block data table on every project.
   ========================================================================== */

:root {
  --paper:      #F1F2EE;
  --paper-2:    #E7E9E3;
  --stone:      #D3D7CD;
  --ink:        #12181A;
  --ink-60:     rgba(18, 24, 26, .62);
  --ink-38:     rgba(18, 24, 26, .38);
  --spruce:     #1E3B34;
  --spruce-deep:#14241F;
  --brass:      #A5822F;

  --rule:       1px solid rgba(18, 24, 26, .16);
  --rule-light: 1px solid rgba(241, 242, 238, .20);

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body:    "Source Serif 4", Georgia, serif;
  --mono:    "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --gut: clamp(20px, 5vw, 64px);
  --max: 1240px;
}

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

html { scroll-behavior: smooth; }

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

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

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

/* --- type ---------------------------------------------------------------- */

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

.display-xl { font-size: clamp(2.6rem, 7.2vw, 5.6rem); text-transform: uppercase; letter-spacing: -0.035em; }
.display-l  { font-size: clamp(2rem, 4.4vw, 3.2rem); text-transform: uppercase; letter-spacing: -0.03em; }
.display-m  { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }

.lede { font-size: clamp(1.06rem, 1.6vw, 1.32rem); line-height: 1.55; color: var(--ink-60); max-width: 62ch; }

.eyebrow {
  font-family: var(--mono);
  font-size: .70rem;
  letter-spacing: .20em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::after { content: ""; flex: 1; height: 1px; background: rgba(18, 24, 26, .16); }

.on-dark .eyebrow::after { background: rgba(241, 242, 238, .22); }

/* --- header -------------------------------------------------------------- */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: rgba(241, 242, 238, .92);
  backdrop-filter: blur(10px);
  border-bottom: var(--rule);
}
.masthead-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: 74px;
}
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.logo-img { width: 40px; height: 40px; object-fit: contain; }
.foot-logo { filter: invert(1); opacity: .85; margin-bottom: 18px; }
.logo-mark {
  font-family: var(--display); font-weight: 800; font-size: 1.06rem;
  letter-spacing: .01em; text-transform: uppercase;
}
.logo-sub {
  font-family: var(--mono); font-size: .60rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ink-38);
}
.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; text-decoration: none; color: var(--ink-60);
  padding: 6px 0; border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brass); }
.nav-toggle { display: none; }

/* --- hero ---------------------------------------------------------------- */

.hero {
  position: relative; overflow: hidden;
  background: var(--spruce-deep); color: var(--paper);
  padding: clamp(80px, 13vw, 168px) 0 0;
}
.hero-contours { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .34; }
.hero-contours path { fill: none; stroke: #6E8C80; stroke-width: 1; }
.hero-inner { position: relative; }
.hero h1 { max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--brass); }
.hero .lede { color: rgba(241, 242, 238, .70); margin-top: 26px; }

/* survey legend strip under the hero headline */
.legend {
  margin-top: clamp(44px, 7vw, 84px);
  border-top: var(--rule-light);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.legend div { padding: 20px 22px 30px 0; border-right: var(--rule-light); }
.legend div:last-child { border-right: 0; }
.legend dt {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .18em;
  text-transform: uppercase; color: rgba(241, 242, 238, .45); margin-bottom: 8px;
}
.legend dd {
  margin: 0; font-family: var(--display); font-weight: 700;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem); letter-spacing: -.02em;
}

/* --- sections ------------------------------------------------------------ */

.band { padding: clamp(64px, 9vw, 128px) 0; }
.band-dark { background: var(--spruce); color: var(--paper); }
.band-dark .lede { color: rgba(241, 242, 238, .68); }
.band-tint { background: var(--paper-2); }
.band + .band-tint, .band-tint + .band { border-top: var(--rule); }

.section-head { display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: clamp(34px, 5vw, 58px); }
@media (min-width: 860px) {
  .section-head { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: end; gap: 48px; }
}

/* --- plat plate (signature) ---------------------------------------------- */

.plate {
  font-family: var(--mono);
  font-size: .74rem;
  border-top: var(--rule);
  margin: 22px 0 0;
}
.plate div {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 0; border-bottom: var(--rule);
}
.plate dt { color: var(--ink-38); letter-spacing: .10em; text-transform: uppercase; font-size: .66rem; }
.plate dd { margin: 0; text-align: right; letter-spacing: -.01em; }
.on-dark .plate, .band-dark .plate { border-top-color: rgba(241, 242, 238, .22); }
.on-dark .plate div, .band-dark .plate div { border-bottom-color: rgba(241, 242, 238, .22); }
.on-dark .plate dt, .band-dark .plate dt { color: rgba(241, 242, 238, .48); }

/* --- project cards ------------------------------------------------------- */

.grid-projects { display: grid; gap: clamp(28px, 4vw, 46px); grid-template-columns: 1fr; }
@media (min-width: 760px)  { .grid-projects { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .grid-projects.three { grid-template-columns: repeat(3, 1fr); } }

.card { text-decoration: none; display: block; color: inherit; }
.card-frame {
  position: relative; overflow: hidden; background: var(--stone);
  aspect-ratio: 4 / 3; border: var(--rule);
}
.card-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.card:hover .card-frame img { transform: scale(1.035); }
.status {
  position: absolute; left: 0; bottom: 0; z-index: 2;
  font-family: var(--mono); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase;
  background: var(--paper); color: var(--ink); padding: 7px 13px; border-top: var(--rule); border-right: var(--rule);
}
.status-active { background: var(--brass); color: #1b1403; border-color: transparent; }
.card h3 { margin-top: 18px; font-size: 1.32rem; letter-spacing: -.02em; }
.card .place {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink-38); margin-top: 8px;
}
.card p { margin: 12px 0 0; font-size: .96rem; color: var(--ink-60); }

/* --- feature row --------------------------------------------------------- */

.feature { display: grid; gap: clamp(26px, 4vw, 56px); align-items: center; }
@media (min-width: 900px) {
  .feature { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .feature.flip > *:first-child { order: 2; }
}
.feature-media { border: var(--rule); background: var(--stone); }
.band-dark .feature-media { border-color: rgba(241, 242, 238, .22); }

/* --- people -------------------------------------------------------------- */

/* auto-fill (not auto-fit) so two people don't stretch into billboards */
.grid-people {
  display: grid; gap: clamp(26px, 3vw, 40px);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
}
.person-portrait { aspect-ratio: 3 / 4; background: var(--stone); border: var(--rule); overflow: hidden; }
.person-portrait img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.04); transition: filter .5s ease; }
.person:hover .person-portrait img { filter: grayscale(0); }
.person h3 { margin-top: 16px; font-size: 1.16rem; }
.person .role {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brass); margin-top: 8px;
}
.person p { font-size: .94rem; color: var(--ink-60); margin: 10px 0 0; }

/* horizontal person row — used where two people would otherwise float in space */
.grid-people-inline { display: grid; gap: clamp(26px, 4vw, 52px); grid-template-columns: 1fr; }
@media (min-width: 780px) { .grid-people-inline { grid-template-columns: repeat(2, 1fr); } }
.person-inline { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; align-items: start; }
.person-inline .person-portrait { margin: 0; }
.person-inline h3 { margin-top: 0; }
@media (max-width: 480px) { .person-inline { grid-template-columns: 110px minmax(0, 1fr); gap: 18px; } }

/* --- bio / article ------------------------------------------------------- */

.bio-head { display: grid; gap: clamp(26px, 4vw, 56px); }
@media (min-width: 900px) { .bio-head { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); } }
.prose p { margin: 0 0 1.15em; }
.prose h3 { margin: 2em 0 .6em; font-size: 1.16rem; }
.prose ul { margin: 0 0 1.4em; padding-left: 1.1em; }
.prose li { margin-bottom: .5em; }

/* --- gallery ------------------------------------------------------------- */

.gallery { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 860px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery figure { margin: 0; }
.gallery img { border: var(--rule); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.gallery figcaption {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-38); margin-top: 8px;
}

/* --- lightbox ------------------------------------------------------------ */

.gallery figure { position: relative; }
.js .gallery button.shot {
  display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none;
  cursor: zoom-in; position: relative;
}
.js .gallery button.shot::after {
  content: ""; position: absolute; inset: 0; background: rgba(18,24,26,0);
  transition: background .25s ease;
}
.js .gallery button.shot:hover::after { background: rgba(18,24,26,.10); }

.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(10, 16, 14, .95);
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox-figure { margin: 0; max-width: min(1400px, 92vw); max-height: 88vh; text-align: center; }
.lightbox-figure img {
  max-width: 100%; max-height: 78vh; width: auto; height: auto; margin: 0 auto;
  border: 1px solid rgba(241,242,238,.18);
}
.lightbox-figure figcaption {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(241,242,238,.62); margin-top: 16px;
}
.lightbox-count {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .18em;
  color: rgba(241,242,238,.38); margin-top: 8px;
}
.lightbox button {
  position: absolute; background: none; border: 1px solid rgba(241,242,238,.28);
  color: var(--paper); font-family: var(--mono); font-size: .8rem; line-height: 1;
  padding: 14px 16px; cursor: pointer; transition: background .2s ease, border-color .2s ease;
}
.lightbox button:hover { background: rgba(241,242,238,.12); border-color: rgba(241,242,238,.6); }
.lightbox .lb-close { top: 22px; right: 22px; }
.lightbox .lb-prev  { left: 22px;  top: 50%; transform: translateY(-50%); }
.lightbox .lb-next  { right: 22px; top: 50%; transform: translateY(-50%); }
@media (max-width: 720px) {
  .lightbox .lb-prev { left: 12px; }
  .lightbox .lb-next { right: 12px; }
  .lightbox-figure { max-width: 94vw; }
}

/* --- buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none; padding: 15px 24px; border: 1px solid var(--ink); color: var(--ink);
  background: transparent; transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-brass { background: var(--brass); border-color: var(--brass); color: #1b1403; }
.btn-brass:hover { background: transparent; color: var(--brass); }
.on-dark .btn, .band-dark .btn { border-color: rgba(241, 242, 238, .45); color: var(--paper); }
.on-dark .btn:hover, .band-dark .btn:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* --- notes / callouts ---------------------------------------------------- */

.note {
  border-left: 3px solid var(--brass); padding: 4px 0 4px 20px;
  font-size: .95rem; color: var(--ink-60); margin: 26px 0;
}

/* --- table --------------------------------------------------------------- */

.table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: .78rem; }
.table th, .table td { text-align: left; padding: 13px 16px 13px 0; border-bottom: var(--rule); }
.table th {
  font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-38); font-weight: 400;
}
.table td.num { text-align: right; padding-right: 0; }

/* --- footer -------------------------------------------------------------- */

.foot { background: var(--ink); color: rgba(241, 242, 238, .72); padding: clamp(50px, 7vw, 84px) 0 34px; }
.foot a { color: rgba(241, 242, 238, .72); text-decoration: none; }
.foot a:hover { color: var(--brass); }
.foot-grid { display: grid; gap: 34px; grid-template-columns: 1fr; }
@media (min-width: 780px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr; } }
.foot h4 {
  font-family: var(--mono); font-weight: 400; font-size: .64rem; letter-spacing: .18em;
  text-transform: uppercase; color: rgba(241, 242, 238, .40); margin-bottom: 16px;
}
.foot ul { list-style: none; margin: 0; padding: 0; font-size: .95rem; }
.foot li { margin-bottom: 9px; }
.foot-base {
  margin-top: 46px; padding-top: 22px; border-top: var(--rule-light);
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  font-family: var(--mono); font-size: .64rem; letter-spacing: .10em; color: rgba(241, 242, 238, .40);
}

/* --- motion -------------------------------------------------------------- */

/* progressive enhancement: only hide if JS is running */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

.draw path { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 2.6s cubic-bezier(.25,.8,.3,1) forwards; }
.draw path:nth-child(2) { animation-delay: .12s; }
.draw path:nth-child(3) { animation-delay: .24s; }
.draw path:nth-child(4) { animation-delay: .36s; }
.draw path:nth-child(5) { animation-delay: .48s; }
.draw path:nth-child(6) { animation-delay: .60s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .draw path { animation: none; stroke-dashoffset: 0; }
  .card-frame img, .person-portrait img { transition: none; }
}

/* --- small screens ------------------------------------------------------- */

@media (max-width: 720px) {
  body { font-size: 17px; }
  .logo-sub { display: none; }
  .legend { grid-template-columns: repeat(2, 1fr); }
  .legend div { border-right: 0; border-bottom: var(--rule-light); }
  .nav { display: none; }
  .nav.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
    position: absolute; top: 74px; left: 0; right: 0; background: var(--paper);
    padding: 22px var(--gut) 28px; border-bottom: var(--rule);
  }
  .nav-toggle {
    display: inline-flex; background: none; border: var(--rule); padding: 10px 14px;
    font-family: var(--mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; cursor: pointer;
  }
}
