/* ============================================================
   Layout system — containers, grids, section variants, helpers
   ============================================================ */

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.container--narrow {
  max-width: 820px;
}

.section {
  padding-block: 5rem;
}

/* Section tone variants */
.section--white   { background-color: var(--background); }
.section--slate   { background-color: var(--secondary); }
.section--dark    { background-color: var(--foreground); color: var(--background); }

.dark .section--dark {
  background-color: var(--background);
  color: var(--foreground);
}
.section--compact { padding-block: 3rem; }

/* Section header block */
.section-header {
  margin-bottom: 3.5rem;
}
.section-header--center {
  text-align: center;
}
.section-header h2 {
  margin-top: 0.75rem;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.15;
}
.section-header p {
  margin-top: 0.75rem;
  color: var(--ink-4);
}

/* Eyebrow label */
.overline, .label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

/* Base grid - mobile first */
.grid-cols-1 { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 2rem; }
.grid-cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.grid-cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.grid-cols-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }

/* Simple two/three column grids used across interior pages */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }

/* Tablet */
@media (min-width: 768px) {
  .md\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Desktop */
@media (min-width: 1024px) {
  .lg\:grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .section { padding-block: 3.5rem; }
}

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-grow { flex-grow: 1; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

/* Typography/Spacing/Misc Utilities */
.text-center { text-align: center; }
.text-4xl { font-size: 2.25rem; line-height: 1.2; }
.md\:text-4xl { font-size: 2.25rem; line-height: 1.2; }
.lg\:text-6xl { font-size: 3.5rem; line-height: 1.1; }
.text-3xl { font-size: 1.875rem; line-height: 1.2; }
.text-2xl { font-size: 1.5rem; line-height: 1.2; }
.text-xl { font-size: 1.25rem; line-height: 1.4; }
.text-lg { font-size: 1.125rem; line-height: 1.5; }
.text-sm { font-size: 0.875rem; line-height: 1.4; }
.text-xs { font-size: 0.75rem; line-height: 1.4; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-muted-foreground { color: var(--muted-foreground); }
.text-accent { color: var(--accent); }
.text-primary { color: var(--primary); }
.text-green { color: var(--success); }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }

.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }

.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }

.space-y-4 > * + * { margin-top: 1rem; }

.uppercase { text-transform: uppercase; }
.block { display: block; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.object-cover { object-fit: cover; }
.aspect-video { aspect-ratio: 16/9; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.overflow-hidden { overflow: hidden; }
.z-10 { z-index: 10; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }

/* Hover lift card */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  border-color: color-mix(in srgb, var(--primary) 40%, transparent);
}

/* Case study section reveals (animate-on-scroll) */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.21, 0.47, 0.32, 0.98),
              transform 0.6s cubic-bezier(0.21, 0.47, 0.32, 0.98);
}
.animate-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
