/* ============================================================
   Peter — Design Director Portfolio
   Style: Clean & Minimal
   ============================================================ */

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

:root {
  --bg:           #FAFAF8;
  --bg-alt:       #F2F2EE;
  --text:         #1A1A1A;
  --text-muted:   #6B6B6B;
  --text-subtle:  #A0A09A;
  --accent:       #1E3A5F;
  --accent-light: #EAF0F8;
  --border:       #E4E4DF;
  --white:        #FFFFFF;

  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
  --font-serif:   'DM Serif Display', Georgia, serif;
  --font-display: 'Raleway', system-ui, sans-serif;

  --max-w:        1440px;
  --nav-h:        68px;

  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--white);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
}

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

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

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

/* Shared section heading class (Raleway) */
.section-heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 3vw, 2.75rem);
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 3rem;
}

/* Narrower content width for all sections below the hero */
#about .container,
#leadership .container,
#approach .container,
#capabilities .container,
#clients .container,
#engagement .container,
#contact .container {
  max-width: 1200px;
}

#clients .container {
  padding-bottom: 3rem;
}

/* Work section is wider to fit 4 card columns */
.work-section .container {
  max-width: 1320px;
}

section {
  padding: 100px 0;
}

/* ============================================================
   NAV
   ============================================================ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: var(--white);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

nav.scrolled {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
}

nav.nav-hidden {
  transform: translateY(-100%);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

nav:not(.nav-hidden) {
  transform: translateY(0);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 3rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;
  font-size: 1.25rem;
  letter-spacing: -0.07em;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
  margin-left: auto;
}

.nav-links a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 98px;
  padding: 0.75rem 1.125rem;
  border-radius: 100px;
  background: var(--bg-alt);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
  transition: background 0.2s ease;
}

.nav-contact:hover {
  background: var(--border);
}

/* hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ============================================================
   HERO
   ============================================================ */
#work {
  padding: 0;
}

/* Outer wrap: white page background, full width.
   overflow: hidden clips carousel cards that bleed outside the hero area
   on wide viewports, so they can't appear in the surrounding white space. */
.hero-wrap {
  position: relative;
  background: var(--white);
  padding-top: var(--nav-h);
  min-height: calc(var(--nav-h) + 673px);
  overflow: hidden;
}

/* Centered dark box — starts below the fixed nav */
.hero-bg {
  position: absolute;
  top: var(--nav-h);
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(1352px, calc(100% - 88px));
  min-height: 673px;
  background: #111;
  border-radius: 8px;
  z-index: 0;
  perspective: 2800px;
  perspective-origin: 50% 42%;
}

/* Corner mask — sibling of hero-bg, NOT inside it.
   Transparent inside the rounded rect; white box-shadow outside covers any
   carousel cards that bleed beyond the hero box edges. A sibling avoids the
   overflow:hidden 3D-flattening problem while still giving rounded corners. */
.hero-corner-mask {
  position: absolute;
  top: var(--nav-h);
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(1352px, calc(100% - 88px));
  min-height: 673px;
  border-radius: 8px;
  box-shadow: 0 0 0 80px var(--white);
  z-index: 1;
  pointer-events: none;
}

/* 3D cylinder container — rotates all cards as a unit.
   Shifted down 35px so front-arc cards (which rise upward) land in frame.
   Starts at opacity 0; JS fades it in after positioning cards so users
   never see the un-positioned cluster flash. */
.hero-carousel {
  position: absolute;
  top: calc(50% + 35px);
  left: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  animation: carousel-spin 90s linear infinite;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.hero-carousel.ready { opacity: 1; }

/* X tilt lifts front cards up; Z makes axis diagonal */
@keyframes carousel-spin {
  from { transform: rotateX(10deg) rotateZ(15deg) rotateY(0deg); }
  to   { transform: rotateX(10deg) rotateZ(15deg) rotateY(-360deg); }
}

/* Card ring positions — all 13 slides pre-positioned in CSS so the ring
   is correct from the very first paint (no JS-positioning flash).
   Angles: 360/13 ≈ 27.692°, radius 1150px */
.hero-slide:nth-child(1) { transform: rotateY(  0deg) translateZ(960px); }
.hero-slide:nth-child(2) { transform: rotateY( 45deg) translateZ(960px); }
.hero-slide:nth-child(3) { transform: rotateY( 90deg) translateZ(960px); }
.hero-slide:nth-child(4) { transform: rotateY(135deg) translateZ(960px); }
.hero-slide:nth-child(5) { transform: rotateY(180deg) translateZ(960px); }
.hero-slide:nth-child(6) { transform: rotateY(225deg) translateZ(960px); }
.hero-slide:nth-child(7) { transform: rotateY(270deg) translateZ(960px); }
.hero-slide:nth-child(8) { transform: rotateY(315deg) translateZ(960px); }

/* Individual floating cards — 2.4:1 ratio (540×225px).
   No backface-visibility:hidden so the back arc of the ring is visible. */
.hero-slide {
  position: absolute;
  width: 680px;
  height: 383px;
  margin-top: -192px;
  margin-left: -340px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 4px 16px rgba(0,0,0,0.3);
  animation: card-fadein 0.8s ease 0.2s both;
}

@keyframes card-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Local perspective + dual-axis rotation creates a bent-leaf curvature on
     each card in its own coordinate space, independent of the ring's perspective */
  transform: none;
}

/* Overlay: radial keeps front card visible; linear gradient darkens the bottom
   half where text lives for contrast. Combined they darken edges + lower zone. */
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 45% 55% at 50% 38%, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.82) 100%),
    linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.72) 100%);
  z-index: 10;
  pointer-events: none;
}


/* Real video sits above overlay; invisible until src is set */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 11;
}

/* 3-column, 2-row grid — row 1: titles/CTA, row 2: subtitle/metrics */
.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  align-content: end;
  column-gap: 4rem;
  row-gap: 2.5rem;
  max-width: min(1352px, calc(100% - 88px));
  padding-top: 2.5rem;
  padding-bottom: 40px;
  padding-left: 3.5rem;
  padding-right: 3.5rem;
  min-height: 673px;
  box-sizing: border-box;
}

/* Hero text columns enter one by one: col 1 → col 2 → col 3 */
@keyframes hero-enter {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Column 1: hero-title (child 1) + hero-sub (child 4) */
.hero-content > :nth-child(1),
.hero-content > :nth-child(4) {
  animation: hero-enter 0.65s ease both;
  animation-delay: 0.35s;
}

/* Column 2: hero-title (child 2) + hero-metrics (child 5) */
.hero-content > :nth-child(2),
.hero-content > :nth-child(5) {
  animation: hero-enter 0.65s ease both;
  animation-delay: 0.6s;
}

/* Column 3: hero-cta (child 3) + hero-metrics (child 6) */
.hero-content > :nth-child(3),
.hero-content > :nth-child(6) {
  animation: hero-enter 0.65s ease both;
  animation-delay: 0.85s;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.5rem, 4vw, 4rem);
  color: white;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 0;
  align-self: end;
}

.hero-sub {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  color: white;
  line-height: 1.4;
}

.hero-cta {
  display: flex;
  gap: 0.875rem;
  align-self: end;
  align-items: center;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 100px;
  padding: 0.75rem 1.125rem;
  border-radius: 100px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.hero-btn:hover { opacity: 0.85; }

.hero-btn--primary {
  background: white;
  color: #1a1a1a;
}

.hero-btn--ghost {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.hero-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hero-metric {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.hero-metric-num {
  font-family: var(--font-display);
  font-weight: 600;
  color: white;
  flex-shrink: 0;
  min-width: 2.5rem;
  line-height: 1.4;
}

.hero-metric-label {
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
}

/* ============================================================
   WORK — unified grid with filter tabs
   ============================================================ */
.work-section {
  background: var(--white);
  padding: 80px 0 100px;
  position: relative;
  z-index: 2; /* explicitly above the carousel GPU compositing layer */
}

.work-header {
  display: flex;
  flex-direction: column;
  gap: 1.875rem;
  margin-bottom: 2.5rem;
}

.work-heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 2.8vw, 2.5rem);
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
}

.filter-tabs {
  display: flex;
  gap: 0.625rem;
  align-items: center;
  flex-wrap: wrap;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.125rem;
  border-radius: 100px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: -0.02em;
  cursor: pointer;
  border: none;
  background: var(--bg-alt);
  color: var(--text);
  transition: background 0.2s ease, color 0.2s ease;
}

.filter-tab.active {
  background: var(--text);
  color: white;
}

.filter-tab:hover:not(.active) {
  background: var(--border);
}

/* Cards grid — 4 columns */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem 1.25rem;
}

/* Individual card */
.project-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: opacity 0.2s ease;
}

.project-card.hidden {
  display: none;
}

.project-card:hover .project-thumb img {
  transform: scale(1.06);
}

/* Thumbnail */
.project-thumb {
  width: 100%;
  height: 375px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-alt);
  flex-shrink: 0;
  position: relative;
  border: 0.5px solid rgba(26, 26, 26, 0.2);
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-out);
}

/* Overlay tags */
.card-tag {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.625rem;
  border-radius: 100px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.625rem;
  color: white;
  background: rgba(26, 26, 26, 0.7);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  white-space: nowrap;
  letter-spacing: -0.01em;
  right: 0.5rem;
}

.card-tag--brand {
  bottom: 2.875rem;
}

.card-tag--category {
  bottom: 0.5rem;
}

/* Card body */
.project-body {
  padding: 1rem 0.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

.project-desc {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================================
   ABOUT
   ============================================================ */
#about {
  background: var(--white);
}

.about-split {
  display: grid;
  grid-template-columns: 1fr 1.75fr;
  gap: 5rem;
  align-items: start;
}

.about-photo {
  aspect-ratio: 4/5;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

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

.about-headline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 2.8vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.about-text p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.about-actions {
  display: flex;
  gap: 0.625rem;
  margin-top: 0.5rem;
}

.about-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 80px;
  padding: 0.75rem 1.125rem;
  border-radius: 100px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: -0.02em;
  transition: opacity 0.2s ease;
}

.about-btn:hover {
  opacity: 0.8;
}

.about-btn--primary {
  background: var(--text);
  color: white;
}

.about-btn--ghost {
  background: var(--bg-alt);
  color: var(--text);
}

/* ============================================================
   DESIGN LEADERSHIP
   ============================================================ */
#leadership {
  background: var(--white);
}

.leadership-split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4rem;
  margin-bottom: 4rem;
}

.leadership-heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 3vw, 2.75rem);
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
  line-height: 1.1;
  flex-shrink: 0;
}

.leadership-intro {
  max-width: 640px;
}

.leadership-intro p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.leadership-intro p:last-child {
  margin-bottom: 0;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
  text-align: center;
}

.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.metric-num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(5rem, 7vw, 7rem);
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
}

.metric-unit {
  font-size: 0.5em;
  vertical-align: baseline;
}

.metric-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 180px;
}

/* ============================================================
   APPROACH / PHILOSOPHY
   ============================================================ */
#approach {
  background: var(--white);
}

.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 1.875rem;
}

.approach-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.approach-num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.875rem;
  color: var(--text-subtle);
  flex-shrink: 0;
  line-height: 1.7;
}

.approach-item div {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.approach-item strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.7;
}

/* ============================================================
   CAPABILITIES
   ============================================================ */
#capabilities {
  background: var(--white);
}

.capabilities-split {
  display: grid;
  grid-template-columns: 1fr 1.75fr;
  gap: 5rem;
  align-items: start;
}

.capabilities-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 3vw, 2.75rem);
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}

.capabilities-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.capabilities-list span {
  font-family: var(--font-sans);
  font-size: 1.625rem;
  font-weight: 400;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 1rem 2.25rem;
  background: var(--white);
  line-height: 1;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.capabilities-list span:hover {
  border-color: transparent;
  color: white;
}

.capabilities-list span:nth-child(1):hover  { background: linear-gradient(135deg, #8B5CF6, #3B82F6); }
.capabilities-list span:nth-child(2):hover  { background: linear-gradient(135deg, #F97316, #EC4899); }
.capabilities-list span:nth-child(3):hover  { background: linear-gradient(135deg, #10B981, #06B6D4); }
.capabilities-list span:nth-child(4):hover  { background: linear-gradient(135deg, #6366F1, #A855F7); }
.capabilities-list span:nth-child(5):hover  { background: linear-gradient(135deg, #F59E0B, #EF4444); }
.capabilities-list span:nth-child(6):hover  { background: linear-gradient(135deg, #0EA5E9, #6366F1); }
.capabilities-list span:nth-child(7):hover  { background: linear-gradient(135deg, #14B8A6, #22C55E); }
.capabilities-list span:nth-child(8):hover  { background: linear-gradient(135deg, #F43F5E, #FB923C); }
.capabilities-list span:nth-child(9):hover  { background: linear-gradient(135deg, #A855F7, #EC4899); }
.capabilities-list span:nth-child(10):hover { background: linear-gradient(135deg, #3B82F6, #14B8A6); }

/* ============================================================
   CLIENTS / PRODUCTS SHIPPED
   ============================================================ */
#clients {
  background: var(--white);
  padding: 100px 0;
}

.clients-marquee {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.clients-track {
  display: flex;
  align-items: center;
  gap: 5rem;
  width: max-content;
  animation: marquee-scroll 30s linear infinite;
  animation-play-state: paused;
}

.clients-marquee.playing .clients-track {
  animation-play-state: running;
}

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

.client-logo-img {
  height: 26px;
  width: auto;
  opacity: 0.4;
  filter: grayscale(1);
  display: block;
  flex-shrink: 0;
}

.client-logo-text {
  font-family: var(--font-serif);
  font-size: 1.625rem;
  color: var(--text);
  opacity: 0.45;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================================
   ENGAGEMENT & AWARDS
   ============================================================ */
#engagement {
  background: var(--white);
}

/* Two-column split */
.section-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

/* Simple list */
.simple-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.simple-list li {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.simple-list li:first-child {
  border-top: 1px solid var(--border);
}

.simple-list-year {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
  flex-shrink: 0;
  width: 2.75rem;
}

.simple-list-text {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.5;
}

.simple-list-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-left: 0.4rem;
}

.award-note--silver {
  color: #888;
  font-weight: 500;
}

/* ============================================================
   CONTACT
   ============================================================ */
#contact {
  background: var(--text);
  color: var(--white);
  padding: 120px 0;
}

.contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
}

.contact-heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(3rem, 6.5vw, 5.875rem);
  color: white;
  letter-spacing: -0.02em;
  line-height: 1.1;
  white-space: nowrap;
  flex-shrink: 0;
}

.contact-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.875rem 1.75rem;
  border-radius: 100px;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.contact-btn:hover {
  opacity: 0.85;
}

.contact-btn--primary {
  background: var(--white);
  color: var(--text);
}

.contact-btn--ghost {
  background: #3f3e3e;
  color: var(--white);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--text);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

footer p {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  text-align: center;
}

/* ============================================================
   REVEAL ANIMATIONS
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(72px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

.reveal.revealed {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }
.reveal-delay-4 { transition-delay: 0.6s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* --- Tablet (≤1024px) ------------------------------------ */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr 1fr;
    padding-top: 140px;
    padding-bottom: 60px;
  }

  .about-split {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-photo { aspect-ratio: 4/3; }

  .leadership-split {
    flex-direction: column;
    gap: 2rem;
  }

  .metrics-row { grid-template-columns: repeat(3, 1fr); }

  .section-split {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .capabilities-split { grid-template-columns: 1fr 1.75fr; }

  .approach-grid { grid-template-columns: repeat(2, 1fr); }

  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }

  .contact-inner { flex-direction: column; align-items: flex-start; gap: 2.5rem; }
  .contact-heading { white-space: normal; }
}

/* --- Mobile (≤768px) ------------------------------------- */
@media (max-width: 768px) {
  section { padding: 60px 0; }

  .container { padding: 0 1.25rem; }

  /* Nav */
  .nav-toggle {
    display: flex;
    margin-left: auto; /* push hamburger to the right */
  }
  .nav-contact { display: none; }

  /* Nav drawer — animated slide-down */
  .nav-links {
    display: flex;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--border);
    /* closed state */
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: transform 0.32s var(--ease-out), opacity 0.25s ease, visibility 0s linear 0.32s;
    z-index: 99;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition: transform 0.32s var(--ease-out), opacity 0.25s ease, visibility 0s;
  }

  /* Hero — match width to mobile container padding (1.25rem each side) */
  .hero-bg,
  .hero-corner-mask {
    width: calc(100% - 2.5rem);
  }

  .hero-content {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    align-content: start;
    max-width: calc(100% - 2.5rem);
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    padding-top: 120px;
    padding-bottom: 48px;
    gap: 2.5rem;
    min-height: auto;
  }

  .hero-title { align-self: start; }
  .hero-content > .hero-title:first-of-type { margin-top: 80px; }
  .hero-content > .hero-metrics + .hero-metrics { margin-top: -1.75rem; }

  .hero-title { font-size: 2.75rem; }
  .hero-cta { margin-top: 0; }
  .hero-sub { margin-top: 0; }

  /* Work — 2 columns with consistent aspect ratio */
  .work-section { padding: 60px 0; }
  .work-header { margin-bottom: 2rem; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 3rem 0.75rem; }
  .project-thumb { height: auto; aspect-ratio: 4/5; }
  .project-title { font-size: 1.125rem; }
  .project-desc { font-size: 0.8rem; }

  /* About */
  .about-split { grid-template-columns: 1fr; }

  /* Leadership */
  .leadership-split { flex-direction: column; gap: 1.5rem; }
  .metrics-row { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .metric-num { font-size: 3.5rem; }
  .metric-label { font-size: 0.75rem; }

  /* Philosophy */
  .approach-grid { grid-template-columns: 1fr; }

  /* Capabilities */
  .capabilities-split { grid-template-columns: 1fr; gap: 2rem; }
  .capabilities-list span { font-size: 1.25rem; padding: 0.75rem 1.5rem; }

  /* Clients */
  .clients-static { gap: 1rem 2.5rem; }
  .clients-static span { font-size: 1.25rem; }

  /* Engagement */
  .section-split { grid-template-columns: 1fr; }

  /* Contact */
  #contact { padding: 80px 0; }
  .contact-inner { flex-direction: column; align-items: flex-start; gap: 2rem; }
  .contact-heading { font-size: 2.75rem; white-space: normal; }
  .contact-links { flex-direction: column; align-items: flex-start; }
}

/* --- Small mobile (≤480px) ------------------------------- */
@media (max-width: 480px) {
  .container { padding: 0 1rem; }

  .hero-title { font-size: 2.25rem; }

  .metrics-row { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .metric-num { font-size: 3rem; }

  .capabilities-list span { font-size: 1rem; padding: 0.6rem 1.25rem; }

  /* Work — keep 2 columns, tighter gap */
  .cards-grid { gap: 2.5rem 0.5rem; }
  .project-title { font-size: 1.125rem; }
  .project-desc { font-size: 0.75rem; }
}

/* ============================================================
   CASE STUDY — responsive
   ============================================================ */

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
  .cs-hero-grid { grid-template-columns: 1fr !important; gap: 2rem; }
  .cs-section-grid { grid-template-columns: 1fr 2fr !important; gap: 2rem; }
  .cs-impact-cards { grid-template-columns: repeat(3, 1fr) !important; }
  .cs-image-full { aspect-ratio: 16/8; }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
  .cs-hero { padding-top: calc(var(--nav-h) + 32px) !important; padding-bottom: 2rem !important; }
  /* Content section right after the hero image uses inline padding: 5rem 0 100px; override on mobile */
  section[style*="padding: 5rem 0 100px"] { padding-top: 2rem !important; padding-bottom: 60px !important; }
  .cs-title { font-size: clamp(3rem, 9vw, 5rem) !important; margin-bottom: 2rem; word-break: break-word; }
  .cs-hero-grid { grid-template-columns: 1fr !important; gap: 1.5rem; }
  .cs-details-bar { grid-template-columns: 1fr 1fr !important; }
  .cs-section-grid { grid-template-columns: 1fr !important; gap: 1rem; margin-bottom: 3rem; }
  .cs-section-heading h2 { position: static; font-size: 1.75rem; margin-bottom: 0.75rem; }
  .cs-impact-cards { grid-template-columns: repeat(2, 1fr) !important; }
  .cs-impact-num { font-size: 3.5rem !important; }
  .cs-impact-unit { font-size: 1.75rem !important; }
  .cs-image-full { aspect-ratio: 4/3 !important; margin: 0 !important; }
  .cs-image-half { grid-template-columns: 1fr !important; }
  .cs-content { max-width: 100%; }
  .cs-content p { font-size: 1rem; }
  .cs-content ul li { font-size: 1rem; }
  .cs-subtitle { font-size: 1rem; }
}

/* Small mobile (≤480px) */
@media (max-width: 480px) {
  .cs-title { font-size: clamp(2.5rem, 11vw, 3.5rem) !important; }
  .cs-impact-cards { grid-template-columns: repeat(2, 1fr) !important; }
  .cs-impact-num { font-size: 2.5rem !important; }
  .cs-impact-unit { font-size: 1.5rem !important; }
  .cs-details-bar { grid-template-columns: 1fr !important; }
  .cs-image-full { aspect-ratio: 4/3 !important; }
  .cs-snapshot { aspect-ratio: 4/3; }
}

/* ============================================================
   CASE STUDY — shared list styles
   ============================================================ */
.cs-content ul {
  margin: 0 0 1.25rem 1.25rem;
  padding: 0;
}

.cs-content ul li {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.5rem;
  font-family: 'Inter', system-ui, sans-serif;
}

.cs-section-heading h2 {
  font-weight: 500;
}

.cs-impact-label,
.cs-outcome-label,
.cs-subtitle {
  font-family: 'Inter', system-ui, sans-serif;
}

.cs-impact-num,
.cs-outcome-num {
  font-weight: 500;
}

.cs-goal + .cs-section-body li,
.cs-goal + .cs-section-body p {
  color: var(--text-muted);
}

.cs-goal + .cs-section-body strong {
  font-weight: 500;
}
