/* =========================================================
   COMMONGROUND SITE
   Tokens, reset, shared chrome, then page sections.
   ========================================================= */

/* --- tokens --- */
:root {
  --ink: #1a1a1a;
  --slate: #5a5a5a;
  --mute: #8a8a8a;
  --line: #e6e2d8;
  --paper: #f6f3ec;
  --white: #ffffff;
  --olive: #7a765a;
  --olive-d: #5f5b43;
  --film: #111;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Lato", Arial, sans-serif;
}

/* --- reset --- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 400 17px/1.65 var(--body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1,h2,h3 { font-family: var(--display); margin: 0; letter-spacing: -0.025em; line-height: 1.12; }
p { margin: 0 0 1em; }
button, input, textarea, select { font: inherit; }

.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.mark {
  font-family: var(--display); font-size: 11px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: var(--olive); margin: 0 0 14px;
}

/* =========================================================
   HEADER / NAV
   Home uses .site-head over the carousel (white type).
   Inner pages use .page-head (ink type on cream).
   Pill matches link height.
   ========================================================= */
.site-head, .page-head { z-index: 30; }
.site-head { position: absolute; inset: 0 0 auto; padding: 18px 0; }
.page-head { position: relative; background: var(--white); padding: 14px 0; border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo img { height: 22px; width: auto; }
.site-head .logo img { filter: invert(1); }
.nav { display: flex; align-items: center; gap: 6px; font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.nav a {
  text-decoration: none;
  height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1;
}
.site-head .nav a { color: #fff; }
.page-head .nav a { color: var(--ink); }
.page-head .nav a.is-on { color: var(--olive); }
.nav .pill {
  background: #fff; color: var(--ink); border-color: #fff;
}
.page-head .nav .pill { background: var(--ink); color: #fff; border-color: var(--ink); }
.menu-btn { display: none; background: 0; border: 0; width: 40px; height: 36px; cursor: pointer; color: inherit; }
.site-head .menu-btn { color: #fff; }
.page-head .menu-btn { color: var(--ink); }
.menu-btn span { display: block; height: 1.5px; background: currentColor; position: relative; }
.menu-btn span:before, .menu-btn span:after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; }
.menu-btn span:before { top: -7px; }
.menu-btn span:after { top: 7px; }

/* =========================================================
   HOME — HEADER CAROUSEL
   Crossfade + slow Ken Burns + slight slide.
   Height is 75% of the original (was min(86vh, 760px)).
   EXTEND: duplicate an <article class="slide"> in index.html,
   set background-image, kicker and h2. Buttons already count slides.
   ========================================================= */
.carousel { position: relative; height: min(64.5vh, 570px); background: var(--film); overflow: hidden; }
.slide {
  position: absolute; inset: 0; opacity: 0;
  background: #111 center/cover no-repeat;
  transform: scale(1.08) translateX(4%);
  transition: opacity 1.1s ease, transform 3.2s ease-out;
}
.slide.is-on { opacity: 1; transform: scale(1) translateX(0); z-index: 1; }
.slide.is-leaving { opacity: 0; transform: scale(1.04) translateX(-3%); z-index: 2; }
.slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,.58) 72%);
}
.slide-copy { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 0 0 56px; color: #fff; }
.slide-kicker { font-family: var(--display); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #cecaaf; margin-bottom: 10px; }
.slide h2 { font-size: clamp(28px, 4vw, 48px); font-weight: 800; max-width: 16ch; }
.car-nav {
  position: absolute; right: max(20px, calc((100% - 1120px) / 2));
  bottom: 52px; z-index: 4; display: flex; align-items: center; gap: 10px; color: #fff;
  font-family: var(--display); font-size: 13px; letter-spacing: .08em;
}
.car-nav button {
  width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.4);
  background: transparent; color: #fff; cursor: pointer; border-radius: 999px;
}
.car-nav button:hover { background: #fff; color: #111; }

/* =========================================================
   HOME — SECTIONS
   01 intro · 02 service cards · 03 clients tease · CTA
   EXTEND 02 cards: copy an <a class="card"> in index.html.
   ========================================================= */
.section { padding: 88px 0; }
.intro h1 { font-size: clamp(32px, 5vw, 52px); margin-bottom: 22px; max-width: none; }
.intro .copy { max-width: none; color: var(--slate); font-size: 18px; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 36px; }
.card {
  background: var(--white); border-radius: 18px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(26,26,26,.05);
  display: flex; flex-direction: column; min-height: 100%;
  text-decoration: none; color: inherit;
}
.card-pic { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #ddd; }
.card-pic img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px 18px 18px; }
.card h3 { font-size: 20px; margin-bottom: 6px; }
.card p { color: var(--slate); font-size: 14px; margin: 0 0 10px; }
.card .go { font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--olive); }

.quote-nav { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-family: var(--display); font-size: 12px; }
.quote-nav button {
  width: 36px; height: 36px; border: 1px solid var(--line); background: #fff; border-radius: 999px; cursor: pointer;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 18px; padding: 0 22px; height: 44px;
  font-family: var(--display); font-size: 12px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  background: var(--ink); color: #fff; border: 0; border-radius: 4px; cursor: pointer;
}
.btn:hover { background: var(--olive-d); }

.cta { text-align: center; }
.cta h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 12px; }

.site-foot {
  border-top: 1px solid var(--line); padding: 22px 0 36px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 13px; color: var(--mute);
}

/* =========================================================
   INNER PAGE HERO
   ========================================================= */
.page-hero { height: 280px; background: #111 center/cover no-repeat; position: relative; display: flex; align-items: flex-end; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.page-hero .wrap { position: relative; z-index: 1; color: #fff; padding-bottom: 28px; }
.page-hero h1 { font-size: clamp(32px, 5vw, 52px); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.prose { max-width: 72ch; color: var(--slate); font-size: 18px; }
.prose h2 { color: var(--ink); font-size: 28px; margin: 28px 0 10px; }

/* =========================================================
   VIDEO PAGE — featured + Clique-style work strip
   ========================================================= */
/* EXTEND video: copy a .work-tile button. Set data-id (Vimeo id),
   data-title and data-desc. Thumbnail is the button's background-image. */
.featured { margin-bottom: 12px; }
#featured-title { font-size: clamp(24px, 3vw, 34px); margin: 0 0 14px; }
.embed { position: relative; padding-top: 56.25%; background: #111; border-radius: 14px; overflow: hidden; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.featured-note { font-size: 15px; color: var(--slate); margin: 16px 0 0; max-width: 70ch; line-height: 1.55; min-height: 3em; }

.film-band { background: var(--film); color: #fff; padding: 56px 0 72px; }
.film-band h2 { color: #fff; }
.work-strip {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px 0 4px;
}
.work-tile {
  flex: 0 0 92px; height: 280px; border-radius: 14px; overflow: hidden;
  position: relative; cursor: pointer; scroll-snap-align: start;
  transition: flex-basis .45s ease;
  background: #222 center/cover no-repeat;
}
.work-tile:hover { flex-basis: 150px; }
.work-tile.is-on, .work-tile.is-on:hover { flex-basis: min(52vw, 560px); }
.work-tile span {
  position: absolute; left: 12px; right: 12px; bottom: 12px;
  font-family: var(--display); font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
.work-desc { font-size: 13px; color: rgba(255,255,255,.72); margin-top: 16px; max-width: 70ch; }

/* Photography: image ratios and row spans calculated in script.js. */
.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.photography-page h1 { font-size: clamp(32px, 5vw, 52px); margin-bottom: 22px; }
.photography-intro { max-width: 72ch; font-size: 18px; color: var(--slate); margin-bottom: 32px; }
.gallery-tabs { display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.gallery-tabs button { background: transparent; color: var(--slate); border: 1px solid var(--line); border-radius: 999px; padding: 11px 18px; cursor: pointer; font-size: 14px; }
.gallery-tabs button[aria-pressed="true"] { background: var(--olive); color: #fff; border-color: var(--olive); }
.gallery-stage { margin-top: 28px; min-height: 120px; }
.gallery-grid { display: grid; grid-auto-rows: 8px; gap: 16px; align-items: start; }
.gallery-photo { display: block; border: 0; padding: 0; border-radius: 12px; background: var(--line); overflow: hidden; cursor: zoom-in; min-width: 0; }
.gallery-photo img { display: block; width: 100%; height: 100%; object-fit: contain; transition: filter .2s ease; }
.gallery-photo:hover img { filter: brightness(.92); }
.gallery-photo:focus-visible { outline: 3px solid var(--olive); outline-offset: 4px; }
.gallery-status { margin: 20px 0 0; color: var(--slate); font-size: 13px; }
.photography-cta { border-top: 1px solid var(--line); }
.photo-lightbox { border: 0; padding: 24px; max-width: none; max-height: none; width: 100%; height: 100dvh; margin: 0; position: fixed; inset: 0; background: rgba(17,17,17,.98); color: #fff; z-index: 1000; }
.photo-lightbox::backdrop { background: rgba(0,0,0,.85); }
.lightbox-shell { max-width: 1500px; height: 100%; margin: auto; display: flex; flex-direction: column; gap: 18px; }
.lightbox-header, .lightbox-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.lightbox-header h2 { font-size: 18px; }
.photo-lightbox button { border: 1px solid #777; background: transparent; color: #fff; border-radius: 999px; padding: 10px 18px; min-height: 44px; cursor: pointer; font-size: 14px; }
.photo-lightbox button:hover { background: #333; }
.photo-lightbox button:focus-visible { outline: 3px solid #cecaaf; outline-offset: 3px; }
.lightbox-frame { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.lightbox-frame img { width: 100%; height: 100%; object-fit: contain; }
.lightbox-controls { font-size: 13px; }
@media(max-width: 550px) { .photo-lightbox { padding: 16px; } .photo-lightbox button { padding: 10px 12px; } .gallery-tabs { gap: 8px; } .gallery-tabs button { padding: 10px 13px; } }
@media(prefers-reduced-motion: reduce) { .gallery-photo img { transition: none; } }

/* Brand: equal featured cards, expandable selected work, modal case studies. */
.brand-page h1 { font-size: clamp(32px,5vw,52px); margin-bottom: 22px; }
.brand-intro { max-width: 72ch; color: var(--slate); font-size: 18px; margin-bottom: 36px; }
.brand-section-title { font-size: 30px; margin-bottom: 24px; }
.brand-featured-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.brand-project { background: #fff; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.brand-project > img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.brand-project-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.brand-project h3 { font-size: 23px; margin-bottom: 14px; }
.brand-project p { color: var(--slate); font-size: 15px; }
.brand-explore { margin-top: auto; align-self: flex-start; border: 0; border-bottom: 1px solid var(--olive); background: transparent; color: var(--olive-d); padding: 12px 0; cursor: pointer; font-size: 14px; }
.brand-section { padding-top: 42px; margin-top: 56px; border-top: 1px solid var(--line); }
.brand-section > h2 { font-size: 30px; margin-bottom: 18px; }
.brand-selected-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.brand-small-project img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; margin-bottom: 16px; }
.brand-small-project h3 { font-size: 19px; margin-bottom: 10px; }
.brand-small-project p { font-size: 14px; color: var(--slate); }
.brand-more { display: block; margin: 28px auto 0; padding: 11px 22px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--olive-d); cursor: pointer; }
.brand-more[hidden], .brand-small-project[hidden] { display: none; }
.brand-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px; }
.brand-steps h3 { font-size: 23px; margin-bottom: 12px; }
.brand-steps p { font-size: 15px; color: var(--slate); }
.brand-cta { border-top: 1px solid var(--line); }
.brand-case-dialog { position: fixed; inset: 0; margin: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; border: 0; padding: 32px 20px; background: var(--paper); color: var(--ink); overflow-y: auto; z-index: 1000; }
.brand-case-dialog::backdrop { background: rgba(0,0,0,.8); }
.brand-case-shell { max-width: 1000px; margin: 0 auto; }
.brand-case-header, .brand-case-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand-case-header { margin-bottom: 36px; }
.brand-case-header .mark { margin: 0; }
.brand-case-dialog button { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 11px 18px; color: var(--ink); cursor: pointer; font-size: 14px; }
#brand-case-title { font-size: clamp(30px,5vw,48px); margin-bottom: 20px; }
.brand-case-summary { max-width: 70ch; font-size: 18px; color: var(--slate); }
.brand-case-image { width: 100%; max-height: 65vh; object-fit: contain; margin: 28px 0; border-radius: 12px; }
.brand-case-scope h3 { font-size: 24px; margin-bottom: 12px; }
.brand-case-scope p { color: var(--slate); }
.brand-case-nav { padding-top: 24px; margin-top: 36px; border-top: 1px solid var(--line); font-size: 14px; }
@media(max-width:900px) { .brand-featured-grid, .brand-steps { grid-template-columns: 1fr; } .brand-selected-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:550px) { .brand-selected-grid { grid-template-columns: 1fr; } .brand-case-nav { gap: 10px; } .brand-case-dialog button { font-size: 12px; padding: 11px 14px; } }

/* =========================================================
   CLIENTS — featured quotes, then 4-up slider, then logo wall
   EXTEND featured: copy a .qcard in the wide pair, add <img class="q-mark">.
   EXTEND slider: copy a .qcard inside #t-row.
   EXTEND logos: add { name, src } to logos[] in script.js
   (PNG in images/logos/).
   ========================================================= */
.quote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.qcard {
  background: #fff; border-radius: 18px; padding: 22px 20px;
  box-shadow: 0 10px 30px rgba(26,26,26,.05);
}
.qcard .q-mark {
  width: 56px; height: 56px; border-radius: 10px; object-fit: cover;
  margin-bottom: 14px; background: #ece8df;
}
.qcard p { margin: 0 0 16px; }
.qcard cite { font-style: normal; color: var(--olive); font-family: var(--display); font-size: 12px; letter-spacing: .04em; }
.t-slider { position: relative; }
.t-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.t-row .qcard { min-height: 220px; }
.logo-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.logo-cell {
  background: #fff; border-radius: 12px; min-height: 88px;
  display: flex; align-items: center; justify-content: center;
  padding: 16px 12px; text-align: center;
  filter: grayscale(1); opacity: .78;
  transition: filter .25s, opacity .25s, transform .25s;
}
.logo-cell:hover { filter: none; opacity: 1; transform: translateY(-2px); }
.logo-cell span { font-family: var(--display); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.logo-cell img { max-height: 42px; width: auto; }

/* =========================================================
   ABOUT — team
   EXTEND: copy an <article class="member">, drop a square photo in images/team/.
   ========================================================= */
.team { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.member { display: grid; grid-template-columns: 160px 1fr; gap: 18px; align-items: start; }
.member img { width: 160px; height: 160px; object-fit: cover; border-radius: 18px; }
.member h3 { margin-bottom: 4px; }
.member .role { color: var(--olive); font-family: var(--display); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.member p { font-size: 15px; color: var(--slate); margin: 0; }

/* =========================================================
   CONTACT FORM
   ========================================================= */
form { display: grid; gap: 10px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { font-family: var(--display); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
input, textarea, select { border: 1px solid var(--line); background: #fff; padding: 12px; border-radius: 6px; width: 100%; }
textarea { min-height: 140px; resize: vertical; }

@media (max-width: 900px) {
  .nav {
    display: none; position: absolute; top: 62px; left: 0; right: 0;
    background: var(--white); flex-direction: column; align-items: stretch;
    padding: 12px 20px 18px; border-bottom: 1px solid var(--line);
  }
  .nav a { color: var(--ink) !important; }
  .nav.is-open { display: flex; }
  .menu-btn { display: block; }
  .cards, .cards-2, .split, .quote-grid, .t-row, .team, .form-row, .member { grid-template-columns: 1fr; }
  .carousel { height: 58.5vh; }
  .section { padding: 56px 0; }
  .work-tile { height: 220px; }
}
