
:root {
  --bg-warm: #f1f2ea;
  --bg-offwhite: #f9f9f6;
  --bg-section: #e4e5dc;
  --bg-white: #ffffff;
  --bg-dark: #1a1a19;
  --text-primary: #1a1a19;
  --text-muted: #686963;
  --text-secondary: #82837c;
  --text-inverse: #ffffff;
  --text-inverse-muted: rgba(255, 255, 255, 0.5);
  --border-subtle: #cfd0c8;
  --border-light: #e4e5dc;
  --brand-blue: #2d62ff;
  --brand-blue-light: #d9e5ff;
  --brand-blue-hover: #1a4de0;
  --radius-md: 10px;
  --radius-pill: 48px;
  --max-content: 960px;
  --max-wide: 1280px;
  --max-article: 720px;
  --section-y: 80px;
  --section-x: 48px;
  --nav-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-warm);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--brand-blue); color: #fff; }

/* Typography */
.serif {
  font-family: 'Besley', Georgia, 'Times New Roman', serif;
  font-weight: 400;
}
.serif-italic {
  font-family: 'Besley', Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
}

h1, h2, h3, h4 {
  font-family: 'Besley', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1 { font-size: clamp(36px, 5.5vw, 68px); letter-spacing: -0.03em; line-height: 1.05; }
h2 { font-size: clamp(28px, 3.5vw, 44px); }
h3 { font-size: clamp(20px, 2.2vw, 28px); }
h4 { font-size: 20px; }

p { color: var(--text-muted); font-size: 18px; line-height: 1.65; }
p.lead { font-size: 20px; color: var(--text-primary); }

a {
  color: var(--brand-blue);
  text-decoration: none;
  transition: opacity 0.2s ease;
}
a:hover { opacity: 0.7; }

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* Layout */
.container {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 var(--section-x);
}
.container-narrow {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 var(--section-x);
}
.container-article {
  max-width: var(--max-article);
  margin: 0 auto;
  padding: 0 var(--section-x);
}

@media (max-width: 768px) {
  .container, .container-narrow, .container-article {
    padding: 0 24px;
  }
  :root { --section-y: 56px; }
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(241, 242, 234, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(207, 208, 200, 0.4);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav .logo {
  font-family: 'Besley', serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.nav .logo span { color: var(--brand-blue); }
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-links a:not(.btn) {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 400;
}
.nav-links a.btn-primary {
  color: var(--text-inverse);
  font-size: 14px;
  padding: 9px 18px;
}
@media (max-width: 720px) {
  .nav-links a:not(.btn) { display: none; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  line-height: 1.2;
}
.btn-primary {
  background: var(--bg-dark);
  color: var(--text-inverse);
}
.btn-primary:hover {
  background: rgba(26,26,25,0.85);
  opacity: 1;
}
.btn-blue {
  background: var(--brand-blue);
  color: var(--text-inverse);
}
.btn-blue:hover {
  background: var(--brand-blue-hover);
  opacity: 1;
}
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}
.btn-outline:hover {
  background: var(--bg-section);
  opacity: 1;
}
.btn-ghost {
  background: transparent;
  color: var(--text-inverse);
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.6); opacity: 1; }

/* Hero */
.hero {
  padding: 100px 0 var(--section-y);
  background: var(--bg-warm);
}
.hero h1 {
  margin-bottom: 24px;
  max-width: 14ch;
}
.hero h1 em {
  font-style: italic;
  color: var(--brand-blue);
}
.hero p {
  font-size: 20px;
  max-width: 620px;
  margin-bottom: 36px;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Sections */
section {
  padding: var(--section-y) 0;
}
.section-warm { background: var(--bg-warm); }
.section-offwhite { background: var(--bg-offwhite); }
.section-section { background: var(--bg-section); }
.section-white { background: var(--bg-white); }
.section-dark { background: var(--bg-dark); color: var(--text-inverse); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: var(--text-inverse); }
.section-dark p { color: var(--text-inverse-muted); }

.section-header {
  margin-bottom: 56px;
}
.section-header .eyebrow {
  margin-bottom: 16px;
  display: block;
}
.section-header h2 {
  margin-bottom: 12px;
}
.section-header p {
  font-size: 18px;
  max-width: 620px;
}

/* Filter chips */
.filters {
  margin-bottom: 40px;
}
.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}
.filter-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-right: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.chip {
  display: inline-flex;
  align-items: center;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
}
.chip:hover { border-color: var(--text-primary); }
.chip.active {
  background: var(--text-primary);
  color: var(--text-inverse);
  border-color: var(--text-primary);
}
.chip.active.industry { background: var(--brand-blue); border-color: var(--brand-blue); }

/* Case grid */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}
.case-card {
  display: block;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 28px;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.25s ease, border-color 0.25s ease;
  position: relative;
}
.case-card:hover {
  transform: translateY(-2px);
  border-color: var(--text-primary);
  opacity: 1;
}
.case-card .case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.tag {
  display: inline-flex;
  align-items: center;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-warm);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  letter-spacing: 0.02em;
}
.tag.tag-blue {
  background: var(--brand-blue-light);
  color: var(--brand-blue);
  border-color: transparent;
}
.tag.tag-dark {
  background: var(--bg-dark);
  color: var(--text-inverse);
  border-color: transparent;
}
.case-card h3 {
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 12px;
}
.case-card p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.case-card .case-cta {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--brand-blue);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.case-card .case-cta::after {
  content: '→';
  transition: transform 0.2s ease;
}
.case-card:hover .case-cta::after {
  transform: translateX(4px);
}

@media (max-width: 600px) {
  .case-grid { grid-template-columns: 1fr; }
  .case-card { padding: 24px; }
}

/* Case detail */
.case-detail {
  padding: 96px 0 var(--section-y);
}
.case-detail .eyebrow { margin-bottom: 16px; display: block; }
.case-detail h1 {
  font-size: clamp(32px, 4.5vw, 56px);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  max-width: 22ch;
}
.case-detail .summary {
  font-size: 22px;
  line-height: 1.4;
  font-style: italic;
  color: var(--text-primary);
  font-family: 'Besley', serif;
  margin-bottom: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--border-light);
}
.case-section {
  margin-bottom: 48px;
}
.case-section h2 {
  font-size: 28px;
  margin-bottom: 20px;
}
.case-section p {
  font-size: 18px;
  margin-bottom: 16px;
}
.case-section ul {
  list-style: none;
  padding: 0;
  margin-top: 16px;
}
.case-section li {
  position: relative;
  padding-left: 28px;
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.55;
}
.case-section li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 16px;
  height: 1px;
  background: var(--brand-blue);
}
.case-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 56px;
}
.case-meta-item .label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.case-meta-item .value {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}
.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

/* Testimonial */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.testimonial {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 36px;
}
.testimonial blockquote {
  font-family: 'Besley', serif;
  font-style: italic;
  font-size: 22px;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 24px;
}
.testimonial .author {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.testimonial .role {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.testimonial.placeholder { opacity: 0.55; }
.testimonial.placeholder blockquote { font-style: italic; color: var(--text-secondary); }

/* CTA */
.cta-section {
  background: var(--bg-dark);
  color: var(--text-inverse);
  text-align: center;
  padding: 96px 0;
}
.cta-section h2 {
  color: var(--text-inverse);
  font-size: clamp(32px, 4vw, 52px);
  margin-bottom: 20px;
  max-width: 16ch;
  margin-left: auto;
  margin-right: auto;
}
.cta-section h2 em { color: var(--brand-blue); font-style: italic; }
.cta-section p {
  color: var(--text-inverse-muted);
  font-size: 18px;
  max-width: 540px;
  margin: 0 auto 36px;
}
.cta-section .email-display {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--text-inverse);
  display: inline-block;
  padding: 16px 28px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-pill);
  margin-top: 8px;
  transition: all 0.25s ease;
}
.cta-section .email-display:hover {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  opacity: 1;
}

/* Services */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.service-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
}
.service-card .eyebrow { margin-bottom: 12px; display: block; }
.service-card h3 {
  font-size: 24px;
  margin-bottom: 14px;
  line-height: 1.2;
}
.service-card p {
  font-size: 16px;
  flex: 1;
  margin-bottom: 24px;
}
.service-card ul {
  list-style: none;
  margin-bottom: 24px;
}
.service-card li {
  font-size: 14px;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
  margin-bottom: 8px;
  line-height: 1.5;
}
.service-card li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--brand-blue);
  font-weight: 700;
}

/* Footer */
footer {
  background: var(--bg-dark);
  color: var(--text-inverse);
  padding: 64px 0 36px;
}
footer .container {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
footer .footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 36px;
  flex-wrap: wrap;
}
footer .footer-brand h3 {
  font-family: 'Besley', serif;
  color: var(--text-inverse);
  font-size: 28px;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
footer .footer-brand h3 span { color: var(--brand-blue); }
footer .footer-brand p {
  color: var(--text-inverse-muted);
  font-size: 15px;
  max-width: 380px;
}
footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}
footer .footer-links a {
  color: var(--text-inverse-muted);
  font-size: 14px;
}
footer .footer-links a:hover { color: var(--text-inverse); opacity: 1; }
footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-inverse-muted);
  flex-wrap: wrap;
  gap: 16px;
}
footer .footer-bottom a { color: var(--text-inverse-muted); }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 56px;
  padding-top: 56px;
  border-top: 1px solid var(--border-light);
}
.stat .number {
  font-family: 'Besley', serif;
  font-size: 56px;
  font-weight: 400;
  color: var(--brand-blue);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}
.stat .label {
  font-size: 14px;
  color: var(--text-muted);
}

/* Hidden state */
.hidden { display: none !important; }

/* Logo strip */
.logos-strip {
  margin-top: 64px;
  padding-top: 56px;
  border-top: 1px solid var(--border-light);
}
.logos-strip .logos-label {
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 36px;
}
.logos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 40px 48px;
  align-items: center;
  justify-items: center;
  max-width: 1180px;
  margin: 0 auto;
}
.logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 58px;
  width: 100%;
  max-width: 200px;
  opacity: 0.45;
  transition: opacity 0.25s ease;
}
.logo-item img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.logo-item:hover { opacity: 0.85; }
@media (max-width: 600px) {
  .logos-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .logo-item { height: 48px; }
}

/* About page */
.about-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-hero .about-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}
@media (max-width: 900px) {
  .about-hero { grid-template-columns: 1fr; gap: 40px; }
  .about-hero .about-photo { max-width: 360px; margin: 0 auto; }
}

/* Back link */
.back-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
}
.back-link::before { content: '←'; }
