/* style.css — design tokens + component styles for Chris Gorney portfolio */

:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.75rem, 0.5rem + 6.5vw, 7.25rem);

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.4rem;
  --radius-lg: 0.6rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 1000px;
  --content-wide: 1280px;
  --content-full: 100%;

  /* Fonts */
  --font-display: 'Erode', 'Iowan Old Style', 'Georgia', serif;
  --font-body: 'General Sans', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ---------- Light (default) ---------- */
:root,
[data-theme='light'] {
  --color-bg: #e7dfce;
  --color-surface: #ece4d4;
  --color-surface-2: #f0eada;
  --color-surface-offset: #ddd3bf;
  --color-surface-offset-2: #d5cab2;
  --color-surface-dynamic: #ccc0a8;
  --color-divider: #c9bca0;
  --color-border: #b8a884;

  --color-text: #13100e;
  --color-text-muted: #5c544a;
  --color-text-faint: #8a8270;
  --color-text-inverse: #e7dfce;

  /* Primary accent — orange */
  --color-primary: #da5c22;
  --color-primary-hover: #c14d1a;
  --color-primary-active: #a83e12;
  --color-primary-highlight: #f0d5c5;

  --color-error: #a1352c;
  --color-success: #4c6b3f;

  --shadow-sm: 0 1px 2px oklch(0.25 0.03 50 / 0.08);
  --shadow-md: 0 6px 16px oklch(0.25 0.03 50 / 0.1);
  --shadow-lg: 0 16px 40px oklch(0.25 0.03 50 / 0.14);
}

/* ---------- Dark ---------- */
[data-theme='dark'] {
  --color-bg: #13100e;
  --color-surface: #1a1611;
  --color-surface-2: #1e1a14;
  --color-surface-offset: #221d16;
  --color-surface-offset-2: #2a241b;
  --color-surface-dynamic: #34291c;
  --color-divider: #2d261b;
  --color-border: #3e3527;

  --color-text: #ece4d2;
  --color-text-muted: #a89b87;
  --color-text-faint: #6e6255;
  --color-text-inverse: #13100e;

  --color-primary: #e06a30;
  --color-primary-hover: #ec8050;
  --color-primary-active: #f4986a;
  --color-primary-highlight: #3c2818;

  --color-error: #d9776a;
  --color-success: #8fb478;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 6px 16px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.45);
}

/* ==================== LAYOUT PRIMITIVES ==================== */

.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.container--narrow {
  max-width: var(--content-narrow);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.container--default {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

section {
  padding-block: clamp(var(--space-16), 9vw, var(--space-32));
}

/* ==================== TYPOGRAPHY ==================== */

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

h1, .h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-hero);
  letter-spacing: -0.01em;
}
h2, .h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-2xl);
  letter-spacing: -0.005em;
}
h3, .h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-xl);
}
.lede {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 42ch;
}
p.body-text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 64ch;
}

/* ==================== HEADER / NAV ==================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}
.logo svg { color: var(--color-primary); }

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.nav__links {
  display: flex;
  gap: var(--space-6);
}
.nav__links a {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  position: relative;
  padding-block: var(--space-1);
}
.nav__links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-interactive);
}
.nav__links a:hover,
.nav__links a[aria-current='page'] {
  color: var(--color-text);
}
.nav__links a:hover::after,
.nav__links a[aria-current='page']::after {
  transform: scaleX(1);
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
}
.theme-toggle:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
}

.nav-mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--color-text);
}

@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav-mobile-toggle { display: grid; }
}

/* Mobile nav sheet */
.mobile-sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
  transform: translateX(100%);
  transition: transform 0.3s var(--ease-out);
}
.mobile-sheet.is-open { transform: translateX(0); }
.mobile-sheet__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-12);
}
.mobile-sheet__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.mobile-sheet__links a {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text);
  text-decoration: none;
}
.mobile-sheet__close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--color-text);
}

/* ==================== BUTTONS ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition:
    background var(--transition-interactive),
    color var(--transition-interactive),
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
}
.btn--primary {
  background: var(--color-text);
  color: var(--color-text-inverse);
}
.btn--primary:hover {
  background: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid oklch(from var(--color-text) l c h / 0.18);
}
.btn--ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
}
.link-arrow svg { transition: transform var(--transition-interactive); }
.link-arrow:hover svg { transform: translateX(4px); }
.link-arrow:hover { color: var(--color-primary); }

/* ==================== HERO ==================== */

.hero {
  padding-top: clamp(var(--space-16), 12vw, var(--space-32));
  padding-bottom: clamp(var(--space-12), 6vw, var(--space-20));
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: end;
}
.hero__lockup { max-width: 900px; }
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-divider);
}
.hero__meta-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.hero__meta-item dt {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
}
.hero__meta-item dd { font-size: var(--text-sm); color: var(--color-text); }

/* ==================== WORK / PROJECT GRID ==================== */

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-1);
  border-top: 1px solid var(--color-divider);
}
.work-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-divider);
  border-right: 1px solid var(--color-divider);
  padding: var(--space-8) var(--space-8);
  overflow: hidden;
}
.work-card:nth-child(3n) { border-right: none; }
.work-card__media {
  aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-offset);
  margin-bottom: var(--space-5);
}
.work-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.work-card:hover .work-card__media img { transform: scale(1.04); }
.work-card__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-2);
}
.work-card__index {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.work-card__tags {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.work-card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}
.work-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 40ch;
}

@media (max-width: 980px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .work-card { border-right: 1px solid var(--color-divider); padding: var(--space-8); }
  .work-card:nth-child(2n) { border-right: none; }
}
@media (max-width: 780px) {
  .work-grid { grid-template-columns: 1fr; }
  .work-card { border-right: none !important; padding: var(--space-8) 0 !important; }
}

/* ==================== SECTION HEADERS ==================== */

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-6);
  margin-bottom: var(--space-12);
  flex-wrap: wrap;
}

/* ==================== FEATURE / SPLIT SECTIONS ==================== */

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: center;
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--space-16); }
  .split--reverse .split__media { order: 2; }
}
.split__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-offset);
}
.split__media img { width: 100%; height: 100%; object-fit: cover; }

/* ==================== CARDS (services/process) ==================== */

.stagger-list {
  display: flex;
  flex-direction: column;
}
.stagger-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: var(--space-6);
  padding-block: var(--space-8);
  border-top: 1px solid var(--color-divider);
}
.stagger-item:last-child { border-bottom: 1px solid var(--color-divider); }
.stagger-item__index {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-primary);
}
.stagger-item__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}
.stagger-item__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 56ch;
}

/* ==================== STATS BAND ==================== */

.stats-band {
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
  padding-block: var(--space-12);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-8);
}
.stat__value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--color-primary);
}
.stat__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* ==================== FOOTER ==================== */

.site-footer {
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-16) var(--space-10);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.footer-cta h2 { font-size: var(--text-2xl); margin-bottom: var(--space-6); }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
}
.footer-col a {
  display: block;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
}
.footer-col a:hover { color: var(--color-primary); }
.footer-bottom {
  margin-top: var(--space-16);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ==================== SCROLL REVEAL ==================== */
/* IntersectionObserver-based: elements start hidden, get .is-visible when
   they enter the viewport. Uses opacity + clip-path only (never translateY)
   to avoid CLS. Respects prefers-reduced-motion. */

/* Base state — hidden */
.reveal,
.reveal-up,
.reveal-stagger > * {
  opacity: 0;
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-up {
  clip-path: inset(16px 0 0 0);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
              clip-path 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Staggered children — sequential delay */
.reveal-stagger > *:nth-child(1)  { transition-delay: 0ms; }
.reveal-stagger > *:nth-child(2)  { transition-delay: 80ms; }
.reveal-stagger > *:nth-child(3)  { transition-delay: 160ms; }
.reveal-stagger > *:nth-child(4)  { transition-delay: 240ms; }
.reveal-stagger > *:nth-child(5)  { transition-delay: 320ms; }
.reveal-stagger > *:nth-child(6)  { transition-delay: 400ms; }
.reveal-stagger > *:nth-child(7)  { transition-delay: 480ms; }
.reveal-stagger > *:nth-child(8)  { transition-delay: 560ms; }
.reveal-stagger > *:nth-child(n+9) { transition-delay: 640ms; }

/* Visible state — triggered by JS adding .is-visible */
.reveal.is-visible,
.reveal-up.is-visible,
.reveal-stagger.is-visible > * {
  opacity: 1;
  clip-path: inset(0 0 0 0);
}

/* If JS is disabled, show everything */
@media (scripting: none) {
  .reveal, .reveal-up, .reveal-stagger > * {
    opacity: 1;
    clip-path: none;
  }
}

/* Hero entrance — fires on page load via body.is-loaded */
.hero-eyebrow,
.hero-headline,
.hero-lede,
.hero-actions {
  opacity: 0;
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-eyebrow  { transition-delay: 100ms; }
.hero-headline { transition-delay: 250ms; }
.hero-lede     { transition-delay: 400ms; }
.hero-actions  { transition-delay: 550ms; }

body.is-loaded .hero-eyebrow,
body.is-loaded .hero-headline,
body.is-loaded .hero-lede,
body.is-loaded .hero-actions {
  opacity: 1;
}

/* Sticky nav — subtle backdrop-blur past the fold */
.site-header {
  transition: background 300ms ease, backdrop-filter 300ms ease,
              box-shadow 300ms ease;
}
.site-header.is-scrolled {
  background: oklch(from var(--color-surface) l c h / 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 1px 0 var(--color-divider);
}

/* ==================== UTILITIES ==================== */

.pill {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1px solid oklch(from var(--color-text) l c h / 0.14);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.divider { height: 1px; background: var(--color-divider); border: none; }
.text-muted { color: var(--color-text-muted); }
.mt-0 { margin-top: 0 !important; }

/* Contact form */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  max-width: 560px;
}
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label { font-size: var(--text-sm); color: var(--color-text-muted); }
.field input, .field textarea {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
}
.field input:focus, .field textarea:focus {
  border-color: var(--color-primary);
}

/* ==================== INDUSTRY / WORK PAGES ==================== */

/* Category band header */
.category-band {
  border-top: 1px solid var(--color-divider);
  padding-top: clamp(var(--space-10), 6vw, var(--space-16));
  margin-top: clamp(var(--space-10), 6vw, var(--space-16));
}
.category-band:first-child {
  border-top: none;
  margin-top: 0;
}
.category-band__head {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  margin-bottom: var(--space-10);
  flex-wrap: wrap;
}
.category-band__num {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  letter-spacing: 0.08em;
}
.category-band__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-xl);
  flex: 1 1 auto;
}
.category-band__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 38ch;
}

/* Project detail page */
.project-hero {
  padding-block: clamp(var(--space-8), 5vw, var(--space-12)) 0;
}
.project-breadcrumb {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-6);
}
.project-breadcrumb a { color: var(--color-text-faint); }
.project-breadcrumb a:hover { color: var(--color-primary); }
.project-client {
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-4);
}
.project-headline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-3xl);
  letter-spacing: -0.01em;
  max-width: 22ch;
  line-height: 1.05;
}
.project-hero__media {
  margin-top: var(--space-10);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.project-hero__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* Case-story story blocks */
.case-story {
  max-width: var(--content-narrow);
  margin-inline: auto;
  padding-block: clamp(var(--space-12), 6vw, var(--space-20));
}
.case-story--wide {
  max-width: 860px;
}
.case-story--wide .case-block__label {
  padding-top: 0;
}
.case-story--wide .case-block {
  grid-template-columns: 1fr;
  gap: var(--space-3);
  border-top: none;
  padding-block: 0;
  align-content: start;
}
.case-story--wide .case-block__body > :first-child {
  margin-top: 0;
}
.case-story--wide .case-blocks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  row-gap: var(--space-6);
}
.case-story--wide .case-blocks-grid .case-block:nth-child(odd) {
  padding-right: var(--space-4);
}
.case-story--wide .case-blocks-grid .case-block:nth-child(even) {
  padding-left: var(--space-4);
}
.case-story--wide .case-blocks-grid .case-block:nth-child(n+3) {
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-8);
  margin-top: var(--space-4);
}
@media (max-width: 780px) {
  .case-story--wide .case-blocks-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .case-story--wide .case-block {
    border-top: 1px solid var(--color-divider);
    padding-block: var(--space-6);
    padding-left: 0;
    padding-right: 0;
  }
  .case-story--wide .case-block:first-child {
    border-top: none;
    padding-top: 0;
  }
}
.case-story__mission {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-xl);
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: var(--space-10);
}
.case-block {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--space-6);
  padding-block: var(--space-6);
  border-top: 1px solid var(--color-divider);
}
.case-block__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  padding-top: var(--space-1);
}
.case-block__body p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
}
.case-block__body p + p { margin-top: var(--space-4); }
.case-block__body strong { color: var(--color-text); font-weight: 600; }
.case-block__body ul {
  list-style: none;
  padding: 0;
}
.case-block__body li {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  padding-left: var(--space-4);
  position: relative;
}
.case-block__body li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
}
.case-block__body li + li { margin-top: var(--space-2); }
@media (max-width: 560px) {
  .case-block { grid-template-columns: 1fr; gap: var(--space-2); }
}

/* Project gallery — 12-col grid with per-item aspect ratios */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-2);
  margin-top: var(--space-4);
  align-items: stretch;
}
.project-gallery__item {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-offset);
  grid-column: span 6;
  aspect-ratio: 4 / 3;
  align-self: stretch;
}
.project-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Column spans */
.project-gallery__item--span-4 { grid-column: span 4; }
.project-gallery__item--span-3 { grid-column: span 3; }
.project-gallery__item--span-5 { grid-column: span 5; }
.project-gallery__item--span-6 { grid-column: span 6; }
.project-gallery__item--span-7 { grid-column: span 7; }
.project-gallery__item--span-8 { grid-column: span 8; }
.project-gallery__item--span-12 { grid-column: 1 / -1; }

/* Aspect variants — match the image's natural crop */
.project-gallery__item--tall     { aspect-ratio: 3 / 4; }
.project-gallery__item--square   { aspect-ratio: 1 / 1; }
.project-gallery__item--wide     { aspect-ratio: 4 / 3; }
.project-gallery__item--landscape{ aspect-ratio: 3 / 2; }
.project-gallery__item--panorama { aspect-ratio: 16 / 9; }
.project-gallery__item--ultrawide{ aspect-ratio: 21 / 9; }

@media (max-width: 780px) {
  .project-gallery { grid-template-columns: repeat(6, 1fr); gap: var(--space-2); }
  .project-gallery__item,
  .project-gallery__item--span-4,
  .project-gallery__item--span-5,
  .project-gallery__item--span-6,
  .project-gallery__item--span-7,
  .project-gallery__item--span-8,
  .project-gallery__item--span-3 { grid-column: span 6; }
}

/* Project nav (prev/next) */
.project-nav {
  border-top: 1px solid var(--color-divider);
  margin-top: var(--space-4);
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.project-nav a {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  text-decoration: none;
  color: var(--color-text);
  padding: var(--space-6) 0;
}
.project-nav a:hover .project-nav__title { color: var(--color-primary); }
.project-nav__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
}
.project-nav__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  transition: color var(--transition-interactive);
}
.project-nav__next { margin-left: auto; text-align: right; }

/* Services capabilities grid */
.cap-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--color-divider);
}
@media (min-width: 760px) {
  .cap-grid { grid-template-columns: 1fr 1fr; }
}
.cap-item {
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--color-divider);
}
.cap-item:nth-child(odd) { padding-right: var(--space-8); border-right: 1px solid var(--color-divider); }
.cap-item:nth-child(even) { padding-left: var(--space-8); }
@media (max-width: 759px) {
  .cap-item:nth-child(odd) { border-right: none; padding-right: 0; }
  .cap-item:nth-child(even) { padding-left: 0; }
}
.cap-item__num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-bottom: var(--space-2);
}
.cap-item__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}
.cap-item__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Testimonial block */
.testimonial {
  border-left: 3px solid var(--color-primary);
  padding-left: var(--space-8);
  margin-block: var(--space-12);
}
.testimonial__quote {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.4;
  color: var(--color-text);
}
.testimonial__cite {
  margin-top: var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* Value bullets (3-col) */
.value-bullets {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}
@media (min-width: 820px) {
  .value-bullets { grid-template-columns: repeat(3, 1fr); }
}
.value-bullet {
  padding: var(--space-6);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-divider);
}
.value-bullet__title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  margin-bottom: var(--space-2);
}
.value-bullet__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* Full-bleed media banner */
.media-banner {
  width: 100%;
  height: 50vh;
  min-height: 320px;
  max-height: 560px;
  overflow: hidden;
  position: relative;
}
.media-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Form select + checkbox group */
.field select {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
}
.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2) var(--space-4);
}
@media (max-width: 480px) {
  .checkbox-group { grid-template-columns: 1fr; }
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.checkbox-item input { accent-color: var(--color-primary); }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; }
}
