/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* ---------- Tokens ---------- */
:root {
  --bg: #efeeea;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border: #e3e1da;
  --text: #2b2317;
  --text-muted: #6b6355;
  --text-faint: #9a988f;
  --accent: #ff5a36;
  --accent-deep: #d9481f;
  --accent-soft: #ff5a3614;
  --available: #22c55e;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 5rem;
  --space-7: 8rem;

  --radius: 24px;
  --radius-sm: 14px;

  --max-width: 1200px;
  --shadow-card: 0 1px 2px rgba(20, 18, 10, 0.04), 0 4px 16px rgba(20, 18, 10, 0.04);
  --shadow-card-hover: 0 2px 4px rgba(20, 18, 10, 0.05), 0 16px 40px rgba(20, 18, 10, 0.1);
}

html {
  color-scheme: light;
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

/* ---------- Section eyebrows / labels ---------- */
.tile-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin: 0 0 var(--space-2);
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin-inline: auto;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(239, 238, 234, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 1px;
  background: var(--border);
}

body.post-page .site-header {
  background: rgba(255, 255, 255, 0.85);
}

.site-header .mark {
  font-size: 0.9rem;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

/* ---------- Header icon chips ---------- */
.icon-chips {
  display: flex;
  gap: 8px;
}

.icon-chip {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.icon-chip:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.icon-chip svg {
  width: 17px;
  height: 17px;
  color: var(--text);
}

.icon-chip.linkedin svg { color: #0a66c2; }

.icon-chip.email img {
  width: 18px;
  height: 18px;
}

/* ---------- Header right group / nav CTA ---------- */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.nav-cta:hover { background: var(--accent-deep); }

/* ---------- Availability pill ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border-radius: 999px;
  padding: 6px 14px 6px 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  width: fit-content;
}

.pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--available);
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    box-shadow: 0 0 0 0 var(--available);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0);
    opacity: 0.7;
  }
}

/* ---------- Photo hero (inset frame) ---------- */
.hero-full {
  max-width: var(--max-width);
  margin-inline: auto;
  width: 100%;
  box-sizing: border-box;
  padding: 0 var(--space-3) var(--space-4);
}

.hero-frame {
  position: relative;
  width: 100%;
  /* +68px over the original 60vh/380/620 makes room for the hero CTA
     without pushing the greeting/tagline up */
  height: calc(60vh + 68px);
  min-height: 448px;
  max-height: 688px;
  overflow: hidden;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-frame .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: filter 0.8s ease;
}

.hero-frame:hover .hero-bg {
  filter: brightness(1.07);
}

/* Sun ray that follows the cursor (x position driven by --ray-x from JS) */
.hero-frame::before {
  content: '';
  position: absolute;
  top: -25%;
  bottom: -25%;
  left: var(--ray-x, 50%);
  width: 55%;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 238, 190, 0.15) 30%,
    rgba(255, 250, 232, 0.3) 50%,
    rgba(255, 238, 190, 0.14) 70%,
    transparent 100%
  );
  mix-blend-mode: screen;
  filter: blur(24px);
  -webkit-mask-image: radial-gradient(ellipse 55% 60% at center, black 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 55% 60% at center, black 30%, transparent 75%);
  opacity: 0;
  transition: opacity 0.6s ease;
}

.hero-frame:hover::before {
  opacity: 1;
}

.hero-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.15) 30%,
    rgba(0, 0, 0, 0.05) 55%,
    rgba(0, 0, 0, 0.1) 75%,
    rgba(0, 0, 0, 0.55) 100%
  );
  z-index: 1;
}

.hero-polaroids {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.polaroid {
  position: absolute;
  margin: 0;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  width: 16%;
  transform: perspective(800px) rotate(var(--rot)) translateY(0) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.12s ease-out, box-shadow 0.25s ease;
}

.polaroid:hover {
  transform: perspective(800px) rotate(var(--rot)) translateY(-10px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.35);
}

.polaroid img {
  width: 100%;
  display: block;
  border-radius: 3px;
}

.polaroid-1 { left: 6%; bottom: 30%; width: 15%; --rot: -7deg; z-index: 3; }
.polaroid-2 { left: 19%; bottom: 40%; width: 14%; --rot: 5deg; z-index: 2; }
.polaroid-3 { right: 17%; bottom: 42%; width: 13%; --rot: -4deg; z-index: 2; }
.polaroid-4 { right: 5%; bottom: 30%; width: 14%; --rot: 7deg; z-index: 3; }

/* Custom cursor over polaroids + work cards (desktop pointer only, enabled via JS) */
.cursor-fx [data-cursor] { cursor: none; }

.cursor-arrow,
.cursor-pill {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  will-change: transform;
}

.cursor-arrow.show,
.cursor-pill.show { opacity: 1; }

.cursor-arrow { color: var(--accent); }

.cursor-pill {
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(20, 18, 10, 0.25);
}

.hero-text {
  position: relative;
  z-index: 2;
  padding: var(--space-4);
  color: #fff;
  width: 100%;
  text-align: center;
}

.hero-text .greeting {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.hero-text .tagline {
  font-size: 1.05rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}

.hero-text .tagline strong {
  color: #fff;
  font-weight: 700;
}

.hero-text .hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--space-3);
  padding: 12px 26px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-text .hero-cta:hover {
  background: var(--accent-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

/* ---------- Impact & press strip ---------- */
.impact-press {
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.impact-press-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  flex-shrink: 0;
}

.impact-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
}

.impact-list strong {
  color: var(--text);
  font-weight: 600;
}

.press-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
}

.press-links a {
  color: var(--text-faint);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border);
  transition: color 0.2s ease;
}

.press-links a:hover { color: var(--accent); }

/* ---------- Bento grid ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-2);
  padding-block: var(--space-2) var(--space-4);
}

.tile {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  padding: var(--space-4);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: none;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

a.tile:hover, .tile.interactive:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

/* ---------- Intro ---------- */
.intro {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding-block: var(--space-4) var(--space-2);
}

.about-lead {
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.45;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0;
  max-width: 56ch;
  align-self: center;
  text-align: center;
}

.about-lead em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.08em;
  color: var(--accent-deep);
  -webkit-text-stroke: 0 currentColor;
  transition: -webkit-text-stroke-width 0.15s ease;
}

.about-lead em:hover {
  -webkit-text-stroke: 0.035em currentColor;
}

.about-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--available);
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

/* Worked-with links */
.worked-with {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px var(--space-3);
  margin-block: var(--space-1);
}

.worked-with a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.worked-with img {
  width: 21px;
  height: 21px;
  object-fit: contain;
  border-radius: 4px;
}

.worked-with a:hover {
  color: var(--accent-deep);
}

/* Testimonials row */
.testi-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.testi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  align-items: start;
}

.testi-card {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-2);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  transition: border-color 0.25s ease;
}

.testi-card:hover {
  border-color: #cfccc2;
}

.testi-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.testi-person img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.testi-person strong {
  display: block;
  font-size: 0.78rem;
  line-height: 1.25;
}

.testi-person span {
  font-size: 0.68rem;
  color: var(--text-faint);
  line-height: 1.3;
}

.testi-quote {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.testi-link {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-faint);
  transition: color 0.15s ease;
}

.testi-link:hover {
  color: var(--accent-deep);
}

.testi-view-more {
  display: none;
  text-align: left;
}

/* Process block */
.process-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.process-heading {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

.process-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.process-step {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 11px 18px;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.process-step:hover {
  transform: translateY(-2px);
  border-color: #d5d2c9;
  box-shadow: 0 8px 18px rgba(20, 18, 10, 0.1);
}

.process-connector {
  position: relative;
  flex: 1;
  min-width: 24px;
  height: 2px;
  background: #c9c6bd;
}

.process-connector::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 5px solid #c9c6bd;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

.process-motto {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.3;
  color: var(--text);
  margin: var(--space-1) 0 0;
}

.intro-note {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 60ch;
  margin: 0;
}

.fly-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-right: -3px;
}

.craft-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.craft-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.craft-chip img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.craft-chip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%) translateY(2px);
  background: var(--text);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 5;
}

.craft-chip:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 1120px) and (min-width: 861px) {
  .process-step { padding: 8px 13px; gap: 7px; }
  .craft-label { font-size: 0.75rem; }
  .craft-chip img { width: 16px; height: 16px; }
  .fly-num { font-size: 0.75rem; }
}

/* Stats */
.stats-row {
  display: flex;
  border-top: 1px solid var(--border);
  padding-top: var(--space-4);
}

.stats-row .stat {
  flex: 1;
  border-left: 1px solid var(--border);
  padding-left: var(--space-4);
}

.stats-row .stat:first-child {
  border-left: none;
  padding-left: 0;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  max-width: 22ch;
}

/* Testimonial tile */
.tile-testimonial {
  grid-column: span 12;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-5);
}

.quote-mark {
  font-family: var(--font-serif);
  font-size: 4rem;
  line-height: 0.4;
  color: var(--accent);
  opacity: 0.3;
}

.quote-text {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 1.9vw, 1.4rem);
  line-height: 1.6;
  color: var(--text);
  max-width: 58ch;
  margin: 0 auto;
}

.quote-person {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-1);
  text-align: left;
}

.quote-person img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.quote-person strong {
  display: block;
  font-size: 0.9rem;
}

.quote-person span {
  font-size: 0.8rem;
  color: var(--text-faint);
}

/* ---------- Selected work ---------- */
.selected-work {
  padding-block: var(--space-5) var(--space-4);
  border-top: 1px solid var(--border);
  margin-top: var(--space-5);
}

.selected-work-header {
  margin-bottom: var(--space-5);
}

.selected-work-header h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  letter-spacing: -0.01em;
  line-height: 1.05;
  margin: 0;
}

.work-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.work-number {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.85rem;
}

.work-eyebrow-text {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
}

.work-heading {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2);
  max-width: 24ch;
  text-wrap: balance;
}

.work-description {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 46ch;
  margin: 0;
}

.work-note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-faint);
  margin: var(--space-3) 0 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-2);
}

.tags span {
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-muted);
}

/* Work rows (single-image projects) */
.work-row {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: var(--space-5);
  align-items: center;
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  box-shadow: none;
  padding: var(--space-5);
  margin-bottom: var(--space-3);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.work-row:hover {
  box-shadow: var(--shadow-card-hover);
}

.work-visual {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}

.work-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.4s ease;
}

.work-row:hover .work-visual img {
  transform: scale(1.02);
}

.work-visual.natural {
  aspect-ratio: auto;
}

.work-visual.natural img {
  height: auto;
}

.work-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-top: var(--space-4);
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 999px;
  white-space: nowrap;
  width: fit-content;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.work-cta:hover {
  background: var(--accent-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

/* Work cluster (multi-image bento, single project) */
.work-cluster {
  background: var(--bg-card);
  border: none;
  border-radius: var(--radius);
  box-shadow: none;
  padding: var(--space-5);
  margin-bottom: var(--space-3);
  transition: box-shadow 0.25s ease;
}

.work-cluster:hover {
  box-shadow: var(--shadow-card-hover);
}

.work-cluster-header {
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.work-cluster-header .work-cta {
  margin-top: 0;
}

.work-cluster-header .work-description {
  max-width: 60ch;
}

.work-cluster-grid img {
  width: 100%;
  border-radius: var(--radius-sm);
}

/* Featured work (text left, image right) */
.work-feature {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--space-5);
  align-items: center;
  margin-bottom: var(--space-3);
}

.work-feature + .work-feature {
  border-top: 1px solid var(--border);
  padding-top: var(--space-5);
  margin-top: var(--space-5);
}

/* Every other case study flips: image left, text right */
.work-feature:nth-child(even) {
  grid-template-columns: 7fr 5fr;
}

.work-feature:nth-child(even) .work-feature-visual {
  order: -1;
}

.work-feature-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.work-feature-text .work-heading {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 var(--space-2);
}

.work-feature-text .work-description {
  font-size: 1.05rem;
  max-width: 52ch;
  margin: 0;
}

.work-feature-text .tags {
  margin-top: var(--space-2);
}

.work-feature .tags span {
  background: var(--bg-card);
}

.work-feature-text .work-cta {
  margin-top: var(--space-3);
}

.work-visit {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

/* Impact stats under the case study button */
.work-stats {
  display: flex;
  width: 100%;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}

.work-stats .stat {
  flex: 1;
  border-left: 1px solid var(--border);
  padding-left: var(--space-2);
}

.work-stats .stat:first-child {
  border-left: none;
  padding-left: 0;
}

.work-stats .stat-number {
  font-size: 1.35rem;
}

.work-stats .stat-label {
  font-size: 0.72rem;
}

.work-visit:hover {
  color: var(--accent-deep);
}

.work-feature-visual {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.12s ease-out, box-shadow 0.25s ease;
}

.work-feature-visual img {
  width: 100%;
}

.work-feature-visual.crop-match {
  aspect-ratio: 1363 / 891;
}

.work-feature-visual.crop-match img {
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.work-feature-visual:hover {
  transform: perspective(1000px) translateY(-3px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  box-shadow: var(--shadow-card-hover);
}

@media (max-width: 860px) {
  .work-feature,
  .work-feature:nth-child(even) {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  .work-feature .work-feature-visual {
    order: -1;
  }
  .testi-row {
    grid-template-columns: 1fr;
  }
  .testi-row .testi-card:nth-child(n + 2) {
    display: none;
  }
  .testi-block.show-all .testi-row .testi-card:nth-child(n + 2) {
    display: flex;
  }
  .testi-view-more {
    display: block;
    width: 100%;
    text-align: center;
  }
}

.mobile-only {
  display: none;
}

/* ---------- Visuals masonry ---------- */
.playground {
  padding-block: var(--space-5) var(--space-4);
  border-top: 1px solid var(--border);
  margin-top: var(--space-5);
}

.playground-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin: 0 0 var(--space-4);
}

.masonry {
  columns: 3;
  column-gap: var(--space-2);
}

.masonry figure {
  margin: 0 0 var(--space-2);
  break-inside: avoid;
}

.masonry img,
.masonry video {
  width: 100%;
  display: block;
  border-radius: var(--radius-sm);
}

/* Full-width tile inside the masonry (spans all columns) */
.masonry .gallery-wide {
  column-span: all;
}

.masonry figcaption {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-faint);
  margin-top: 6px;
}

@media (max-width: 860px) {
  .masonry { columns: 2; }
}

/* ---------- Contact closer ---------- */
.contact {
  text-align: center;
  padding-block: var(--space-6) var(--space-6);
  border-top: 1px solid var(--border);
  margin-top: var(--space-5);
}

.contact h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-3);
}

.contact h2 em {
  font-style: italic;
  color: var(--accent);
}

.contact-sub {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 52ch;
  margin: 0 auto var(--space-4);
}

.contact-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-cta:hover {
  background: var(--accent-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.contact-link {
  padding: 15px 24px;
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  box-shadow: var(--shadow-card);
  transition: color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.contact-link:hover {
  color: var(--text);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

/* ---------- Footer ---------- */
footer.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: var(--space-4);
  color: var(--text-faint);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* ---------- Scroll reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js-reveal .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.25s ease;
  }

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

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .desktop-only {
    display: none;
  }
  .mobile-only {
    display: block;
  }
  .process-connector {
    display: none;
  }
  .intro { padding-block: var(--space-3) var(--space-1); }
  .work-row {
    grid-template-columns: 1fr;
    gap: var(--space-3);
    padding: var(--space-3);
  }
  .work-visual {
    order: -1;
  }
  .work-cluster {
    padding: var(--space-3);
  }
  .work-cluster-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .tile-testimonial {
    padding: var(--space-4);
  }
  .site-header nav { gap: var(--space-2); flex-wrap: wrap; justify-content: flex-end; }
  .case-content-inner { padding: var(--space-4); }
  .case-hero-img { height: 220px; }
}

@media (max-width: 480px) {
  .polaroid { display: none; }
  .polaroid-1, .polaroid-4 { display: block; width: 34%; }
  .site-header nav { gap: 10px; }
  .site-header nav a { font-size: 0.8rem; }
  .nav-cta { display: none; }
  .icon-chips { gap: 5px; }
  .icon-chip { width: 28px; height: 28px; }
  .icon-chip svg { width: 14px; height: 14px; }
  .icon-chip.email img { width: 15px; height: 15px; }
  .process-step { gap: 7px; padding: 6px 11px; }
  .craft-chip img { width: 15px; height: 15px; }
  .footer, footer.site-footer { flex-direction: column; gap: 4px; }
}

/* ---------- Case study article ---------- */
.case-content {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  max-width: 820px;
  margin: 0 auto var(--space-6);
  overflow: hidden;
}

.case-hero-img {
  display: block;
  width: 100%;
  height: 360px;
  object-fit: cover;
}

.case-content-inner {
  padding: var(--space-5) var(--space-6);
}

.case-header {
  padding-block: 0 var(--space-4);
  max-width: 72ch;
  margin-inline: auto;
}

.case-header .eyebrow {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.case-header h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: var(--space-2) 0;
}

.case-header .stakes {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  max-width: 68ch;
  margin-inline: auto;
  padding-block: var(--space-4);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-6);
}

.case-meta dt {
  font-size: 0.75rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.case-meta dd {
  margin: 0;
  font-size: 1rem;
}

article.case-body {
  max-width: 68ch;
  margin-inline: auto;
}

.case-body section {
  margin-bottom: var(--space-6);
}

.case-body h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.9rem;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
}

.case-body p {
  color: var(--text-muted);
  margin: 0 0 var(--space-3);
  font-size: 1.05rem;
}

.case-body p strong {
  color: var(--text);
}

.case-body figure {
  margin: var(--space-4) 0;
}

.case-body figure img {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card-hover);
}

/* Figure variants (used on the Rubic case study) */
.case-body .figure-duo {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.case-body .figure-duo img {
  width: calc(50% - var(--space-2) / 2);
  height: auto;
}

.case-body .figure-duo figcaption {
  width: 100%;
}

.case-body .figure-panel img {
  width: 100%;
  background: #11170f;
  padding: var(--space-4);
}

.case-body figcaption {
  margin-top: var(--space-1);
  font-size: 0.85rem;
  color: var(--text-faint);
}

.case-body .pull-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  margin: var(--space-4) 0;
}

.case-body .pull-metrics div strong {
  display: block;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 2.2rem;
  color: var(--accent);
  letter-spacing: -0.01em;
}

.case-body .pull-metrics div span {
  font-size: 0.85rem;
  color: var(--text-faint);
}

.case-body blockquote {
  border-left: 2px solid var(--accent);
  padding-left: var(--space-3);
  margin: var(--space-4) 0;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--text);
  font-style: italic;
}

.case-endorsement {
  max-width: 68ch;
  margin: var(--space-6) auto 0;
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.case-endorsement .quote-text {
  margin: 0;
  font-size: 1.15rem;
}

.back-link {
  display: block;
  max-width: 820px;
  margin: 0 auto var(--space-5);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.back-link:hover { color: var(--accent); }

/* ---------- Case study — editorial (Medium-style) ---------- */
body.post-page {
  background: #fff;
  --post-serif: 'Charter', 'Iowan Old Style', 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --post-ink: #33291b;
  --post-measure: 680px;
  --post-wide: 940px;
}

.post-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--accent);
  z-index: 100;
}

.post {
  max-width: var(--post-measure);
  margin-inline: auto;
  padding-block: var(--space-4) var(--space-6);
}

.post-back {
  display: inline-block;
  color: var(--text-faint);
  font-size: 0.9rem;
  margin-bottom: var(--space-5);
  transition: color 0.15s ease;
}

.post-back:hover { color: var(--accent); }

/* Header */
.post-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.post-header h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-3);
  text-wrap: balance;
}

.post-subtitle {
  font-family: var(--post-serif);
  font-size: 1.3rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}

.post-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: var(--space-4);
}

.post-byline img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg);
  padding: 6px;
}

.post-byline strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
}

.post-byline span {
  font-size: 0.82rem;
  color: var(--text-faint);
}

/* Hero + wide breakouts */
.post-wide {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100vw - 2 * var(--space-3)), var(--post-wide));
}

.post-hero {
  margin: var(--space-5) auto;
}

.post-hero img,
.post-hero video {
  width: 100%;
  border-radius: var(--radius-sm);
  display: block;
  /* 3D tilt-toward-cursor; vars set by the data-tilt script, 0 otherwise */
  transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 0.12s ease-out;
}

/* Meta strip */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: 0 0 var(--space-6);
  padding-block: var(--space-3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.post-meta dt {
  font-size: 0.72rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
}

.post-meta dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--post-ink);
}

/* Body */
.post-body h2 {
  font-family: var(--font-sans);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-3);
}

.post-body p {
  font-family: var(--post-serif);
  font-size: 1.22rem;
  line-height: 1.72;
  color: var(--post-ink);
  margin: 0 0 var(--space-3);
}

.post-body section + section::before {
  content: '\00B7\2004\00B7\2004\00B7';
  display: block;
  text-align: center;
  color: var(--text-faint);
  font-size: 1.4rem;
  letter-spacing: 0.4em;
  margin: var(--space-6) 0;
}

.post-opener::first-letter {
  font-family: var(--font-serif);
  font-size: 3.4em;
  line-height: 0.78;
  float: left;
  padding: 0.08em 0.12em 0 0;
  color: var(--accent-deep);
}

/* Figures */
.post-body figure {
  margin: var(--space-5) 0;
}

.post-body figure img {
  margin-inline: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card-hover);
}

.post-body figcaption {
  margin-top: var(--space-2);
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-faint);
  max-width: 56ch;
  margin-inline: auto;
}

/* Two-up figure (mobile screens side by side) */
.post-body figure.post-duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  justify-items: center;
  align-items: start;
}

.post-body .post-duo img {
  max-width: min(100%, 320px);
}

.post-body .post-duo figcaption {
  grid-column: 1 / -1;
}

/* Process row inside a case study column */
.post-body .process-row {
  margin: var(--space-2) 0 var(--space-4);
}

.post-body .process-step {
  padding: 8px 13px;
  gap: 7px;
}

.post-body .process-step .craft-label {
  font-size: 0.75rem;
}

.post-body .process-step .craft-chip img {
  width: 16px;
  height: 16px;
}

.post-body .process-step .fly-num {
  font-size: 0.75rem;
}

/* Callout */
.post-callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: var(--space-3) var(--space-4);
  margin: var(--space-4) 0;
}

.post-callout p {
  margin: 0;
  font-size: 1.1rem;
}

/* Metrics */
.post-metrics {
  display: flex;
  flex-wrap: wrap;
  margin: var(--space-4) 0 var(--space-4);
  padding-block: var(--space-4);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.post-metrics div {
  flex: 1;
  min-width: 140px;
  padding-inline: var(--space-4);
  border-left: 1px solid var(--border);
}

.post-metrics div:first-child {
  padding-left: 0;
  border-left: none;
}

.post-metrics strong {
  display: block;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 2.5rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--post-ink);
}

.post-metrics span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Pull quote */
.post-pullquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
  color: var(--post-ink);
  border: none;
  margin: var(--space-5) auto;
  max-width: 24ch;
}

/* Read next */
.post-next {
  margin-top: var(--space-7);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-next-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

.post-next a {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

.post-next a:hover { color: var(--accent-deep); }

@media (max-width: 700px) {
  .post { padding-block: var(--space-3) var(--space-5); }
  .post-back { margin-bottom: var(--space-4); }
  .post-subtitle { font-size: 1.15rem; }
  .post-body p { font-size: 1.1rem; }
  .post-hero { margin-block: var(--space-4); }
  .post-meta { gap: var(--space-2) var(--space-4); margin-bottom: var(--space-5); }
  .post-metrics div { min-width: 110px; padding-inline: var(--space-2); }
  .post-metrics strong { font-size: 1.9rem; }
  .post-callout { padding: var(--space-2) var(--space-3); }
  .post-body section + section::before { margin: var(--space-5) 0; }
}

/* ---------- Serif = Lora Italic everywhere ---------- */
.stat-number,
.quote-mark,
.quote-text,
.selected-work-header h2,
.work-heading,
.contact h2,
.case-header h1,
.case-body h2,
.case-body .pull-metrics div strong,
.post-header h1,
.post-metrics strong,
.post-next a,
.post-opener::first-letter {
  font-style: italic;
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
