/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root {
  --bg: #fdfdfc;
  --ink: #111111;
  --grey: #6b6b6b;
  --line: #d9d9d6;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1280px;
  --gutter: clamp(20px, 5vw, 64px);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

/* Monogram lockup recreating the attached "Cs" mark: stacked condensed caps */
.monogram {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Big Shoulders Display', sans-serif;
}

.monogram-img {
  height: 40px;
  width: auto;
  display: block;
}

.monogram .stack {
  display: inline-flex;
  flex-direction: column;
  line-height: 0.62;
}

.monogram .stack span:first-child {
  font-size: 34px;
  font-weight: 800;
}

.monogram .stack span:last-child {
  font-size: 16px;
  font-weight: 700;
  align-self: flex-end;
  margin-top: -22px;
}

.monogram .wordmark {
  font-size: 13px;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--grey);
  text-transform: uppercase;
}

nav.primary-nav ul {
  display: flex;
  gap: clamp(18px, 3vw, 36px);
  margin: 0;
  padding: 0;
  list-style: none;
}

nav.primary-nav a {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  position: relative;
}

nav.primary-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--ink);
  transition: width 0.35s var(--ease);
}

nav.primary-nav a:hover::after,
nav.primary-nav a[aria-current="page"]::after {
  width: 100%;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(80px, 12vw, 160px);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 28px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
}

.site-footer .socials {
  display: flex;
  gap: 20px;
}

.site-footer a:hover { color: var(--ink); }

/* ---------- Reveal-on-scroll animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Hero (home) ---------- */
.hero {
  display: flex;
  flex-direction: column;
  padding-top: clamp(24px, 3.5vw, 40px);
  padding-bottom: 20px;
}

.hero .eyebrow {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 14px;
}

.hero-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(64px, 10vw, 140px);
  align-items: end;
  margin-top: 14px;
}

@media (max-width: 640px) {
  .hero-body {
    grid-template-columns: 1fr;
  }
}

.hero h1 {
  font-size: clamp(36px, 5.5vw, 72px);
  line-height: 0.96;
  max-width: 18ch;
}

.hero .lede {
  max-width: 38ch;
  font-size: clamp(15px, 1.3vw, 17px);
  color: var(--grey);
  margin: 0;
}

.hero .cta {
  margin-top: 20px;
}

.btn-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 6px;
  transition: gap 0.3s var(--ease);
}

.btn-line:hover { gap: 16px; }

/* ---------- Section heading pattern ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(28px, 4vw, 48px);
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.section-head .count {
  font-size: 13px;
  color: var(--grey);
  letter-spacing: 0.08em;
}

section.block {
  padding-top: clamp(56px, 8vw, 110px);
}

/* ---------- Featured strip (home) ---------- */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
}

.featured-grid .card.large {
  grid-column: span 2;
}

@media (max-width: 880px) {
  .featured-grid { grid-template-columns: 1fr; }
  .featured-grid .card.large { grid-column: span 1; }
}

/* ---------- Project card ---------- */
.card {
  position: relative;
  display: block;
  overflow: hidden;
  background: #ededeb;
  aspect-ratio: 4 / 3;
}

.card .thumb {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ececea, #d8d8d4);
  transition: transform 0.7s var(--ease);
}

.card .thumb span {
  font-family: 'Big Shoulders Display', sans-serif;
  font-size: clamp(20px, 3vw, 30px);
  color: rgba(17,17,17,0.28);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 0 20px;
}

.card:hover .thumb { transform: scale(1.04); }

.card .meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0));
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.card:hover .meta,
.card:focus-visible .meta {
  opacity: 1;
  transform: translateY(0);
}

.card .meta .title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card .meta .role {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
  white-space: nowrap;
}

.card .tag {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 10px;
  background: rgba(255,255,255,0.85);
  color: var(--ink);
}

/* ---------- Works grid ---------- */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
}

@media (max-width: 880px) {
  .works-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .works-grid { grid-template-columns: 1fr; }
}

/* ---------- Doc carousel ---------- */
.carousel-outer {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 16px);
  margin: 0 calc(-1 * var(--gutter));
}

.carousel-viewport {
  flex: 1;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  gap: clamp(12px, 2vw, 20px);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.carousel-track .card {
  flex: 0 0 72%;
  aspect-ratio: 16 / 9;
  transform: scale(0.88);
  opacity: 0.55;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.carousel-track .card.is-active {
  transform: scale(1);
  opacity: 1;
}

@media (max-width: 700px) {
  .carousel-track .card { flex: 0 0 85%; }
}

.carousel-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.carousel-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
}

.carousel-btn:hover svg { stroke: var(--bg); }

.carousel-btn svg {
  width: 16px;
  height: 16px;
  stroke: var(--ink);
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.carousel-btn:disabled {
  opacity: 0.2;
  cursor: default;
  pointer-events: none;
}

/* Play button overlay on carousel cards */
.play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.card:hover .play-btn,
.social-card:hover .play-btn {
  opacity: 1;
  transform: scale(1.1);
}

/* ---------- Intro blurb ---------- */
.page-intro {
  padding-top: clamp(56px, 9vw, 120px);
  padding-bottom: clamp(40px, 6vw, 72px);
}

.page-intro .eyebrow {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 16px;
}

.page-intro h1 {
  font-size: clamp(40px, 7vw, 84px);
  max-width: 20ch;
}

.page-intro p {
  margin-top: 20px;
  max-width: 52ch;
  color: var(--grey);
  font-size: clamp(15px, 1.4vw, 17px);
}

/* ---------- Contact page ---------- */
.contact-hero {
  min-height: calc(100vh - 73px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(40px, 8vw, 90px);
  padding-bottom: clamp(40px, 8vw, 90px);
}

.contact-hero h1 {
  font-size: clamp(40px, 8vw, 96px);
  max-width: 16ch;
}

.contact-links {
  margin-top: clamp(36px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.contact-links a,
.contact-links .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.contact-links a {
  font-size: clamp(18px, 2.6vw, 26px);
  font-weight: 600;
  transition: opacity 0.3s var(--ease), padding-left 0.3s var(--ease);
}

.contact-links a:hover {
  opacity: 0.55;
  padding-left: 10px;
}

.contact-links .label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ---------- Contact split layout ---------- */
.contact-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
  min-height: calc(100vh - 73px);
  padding-top: clamp(40px, 8vw, 90px);
  padding-bottom: clamp(40px, 8vw, 90px);
}

.contact-split .photo-col img {
  width: 100%;
  height: clamp(400px, 70vh, 720px);
  object-fit: cover;
  object-position: center top;
  filter: grayscale(100%);
  display: block;
}

.contact-split .info-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 20px;
}

@media (max-width: 720px) {
  .contact-split {
    grid-template-columns: 1fr;
  }
  .contact-split .photo-col img {
    height: clamp(260px, 55vw, 480px);
  }
}

/* ---------- Marquee ticker ---------- */
.marquee-section {
  overflow: hidden;
  padding: 12px 0;
}

.marquee-track {
  display: flex;
  gap: 8px;
  width: max-content;
  animation: marquee-scroll 60s linear infinite;
}

/* speed controlled by JS — no CSS pause */

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

.marquee-item {
  flex: 0 0 auto;
  width: 520px;
  display: block;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.marquee-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e0dede;
  position: relative;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.marquee-item:hover .marquee-thumb {
  transform: scale(0.93);
}

.marquee-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.marquee-thumb .placeholder-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8e7e4, #d4d2cf);
}

.marquee-thumb .placeholder-bg span {
  font-family: 'Big Shoulders Display', sans-serif;
  font-size: 14px;
  color: rgba(17,17,17,0.3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  padding: 0 16px;
}

.marquee-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 3px;
  padding: 14px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0));
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  pointer-events: none;
}

.marquee-item:hover .marquee-caption {
  opacity: 1;
  transform: translateY(0);
}

.marquee-caption .m-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.marquee-caption .m-tag {
  order: -1;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
}

/* ---------- Logos strip ---------- */
.logos-section {
  padding: clamp(20px, 3vw, 36px) 0 clamp(32px, 5vw, 56px);
}

.logos-head {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
  text-align: center;
  max-width: var(--maxw);
  margin: 0 auto 32px;
  padding: 88px var(--gutter) 0;
  border-top: 1px solid var(--line);
}

.logos-layout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0px clamp(36px, 5vw, 64px);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.logos-layout img {
  width: 120px;
  height: 60px;
  object-fit: contain;
  object-position: center;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: opacity 0.3s;
  display: block;
}

.logos-layout img:hover { opacity: 1; }

.logos-layout img.logo-md {
  width: 180px;
  height: 90px;
}

.logos-layout img.logo-lg {
  width: 240px;
  height: 120px;
}

/* ---------- Social cards ---------- */
.social-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 2vw, 20px);
}

@media (max-width: 880px) {
  .social-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .social-grid { grid-template-columns: 1fr 1fr; }
}

.social-card {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e8e7e4;
  aspect-ratio: 9 / 16;
  color: inherit;
  text-decoration: none;
}

.social-card .thumb {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #e4e3e0, #d0cfcc);
  transition: transform 0.7s var(--ease);
}

.social-card .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.social-card .thumb span {
  font-family: 'Big Shoulders Display', sans-serif;
  font-size: 13px;
  color: rgba(17,17,17,0.3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 0 12px;
}

.social-card:hover .thumb { transform: scale(1.04); }

.social-card .platform {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 9px;
  background: rgba(255,255,255,0.88);
  color: var(--ink);
}

.social-card .s-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0));
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.social-card:hover .s-meta,
.social-card:focus-visible .s-meta {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Approach grid ---------- */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 4vw, 48px);
}

@media (max-width: 640px) {
  .approach-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ---------- Mobile overrides ---------- */
@media (max-width: 640px) {

  /* Header: shrink logo and hide wordmark */
  .monogram-img { height: 30px; }
  .monogram .wordmark { font-size: 11px; }

  /* Hero: smaller eyebrow, tighter spacing */
  .hero { padding-top: 20px; }

  /* Marquee: smaller thumbnails so they don't overflow */
  .marquee-item { width: clamp(240px, 72vw, 360px); }

  /* Carousel: full-bleed arrows closer in */
  .carousel-btn { width: 32px; height: 32px; }

  /* Logos: scale down large logos */
  .logos-layout img.logo-md { width: 120px; height: 60px; }
  .logos-layout img.logo-lg { width: 150px; height: 75px; }
  .logos-layout { gap: 12px 20px; }
}
