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

*, *::before, *::after {
  transition: background-color var(--dur-med, 0.6s) var(--ease, ease), border-color var(--dur-med, 0.6s) var(--ease, ease), color var(--dur-med, 0.6s) var(--ease, ease);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

input, select, textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

img {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: auto;
}

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

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

ul { list-style: none; margin: 0; padding: 0; }

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
}

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--charcoal);
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); font-weight: 400; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: 1.25rem; font-weight: 600; font-family: var(--font-body); }

p { margin: 0 0 1em; color: var(--charcoal-soft); }

em {
  font-style: italic;
  color: var(--terracotta);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--charcoal);
  color: var(--cream);
  padding: 0.75rem 1.25rem;
  z-index: 999;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--gold-soft); color: var(--charcoal); }

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--glass-border);
}

section {
  padding: var(--space-2xl) 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 1rem;
}

.stitch-dot {
  width: 20px;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 5px, transparent 5px 9px);
  display: inline-block;
}

.section-head {
  max-width: 640px;
  margin: 0 0 var(--space-lg);
}

.section-lede {
  font-size: 1.08rem;
  max-width: 46ch;
}

/* ===== Scroll reveal ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}

/* Stagger children of grids so cards cascade in rather than pop together */
.services-grid > [data-reveal],
.why-grid > [data-reveal],
.testimonial-grid > [data-reveal] {
  transition-delay: calc(var(--stagger-i, 0) * 80ms);
}
.services-grid > [data-reveal]:nth-child(4n+1) { --stagger-i: 0; }
.services-grid > [data-reveal]:nth-child(4n+2) { --stagger-i: 1; }
.services-grid > [data-reveal]:nth-child(4n+3) { --stagger-i: 2; }
.services-grid > [data-reveal]:nth-child(4n+4) { --stagger-i: 3; }
.why-grid > [data-reveal]:nth-child(3n+1) { --stagger-i: 0; }
.why-grid > [data-reveal]:nth-child(3n+2) { --stagger-i: 1; }
.why-grid > [data-reveal]:nth-child(3n+3) { --stagger-i: 2; }
.testimonial-grid > [data-reveal]:nth-child(1) { --stagger-i: 0; }
.testimonial-grid > [data-reveal]:nth-child(2) { --stagger-i: 1; }
.testimonial-grid > [data-reveal]:nth-child(3) { --stagger-i: 2; }
