/* Site-wide visual refinement: restrained cobalt accents, consistent cards, and section rhythm. */
:root {
  --font-heading: Montserrat, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px rgb(16 19 27 / 0.06);
  --shadow: 0 18px 42px -22px rgb(16 19 27 / 0.32);
}

/* Keep the established white / cool surface / charcoal rhythm, with cobalt for emphasis. */
main > [data-section="services"],
main > [data-section="story"],
main > [data-section="service-list"] { background-color: var(--color-bg); }
main > [data-section="about-preview"],
main > [data-section="values"] { background-color: var(--color-surface); }
main > [data-section="process"] { background-color: var(--color-dark); color: var(--color-on-dark); }
main > [data-section="process"] .section-heading h2,
main > [data-section="process"] .section-heading p,
main > [data-section="process"] .step h3 { color: var(--color-on-dark); }
main > [data-section="process"] .step p { color: var(--color-on-dark-muted); }
main > [data-section="process"] .section-heading .eyebrow { color: #D9E5FF; }
main > [data-section="trust-bar"] { background-color: var(--color-dark); }
main > [data-section="trust-bar"] .trust-item svg { color: var(--color-cta-electric); opacity: 1; }

/* Eyebrows: remove the leading dash and keep alignment consistent across the site. */
.eyebrow::before { display: none; }
.eyebrow {
  display: flex;
  width: fit-content;
  justify-content: flex-start;
  text-align: left;
}
@media (max-width: 63.99em) {
  .eyebrow { margin-inline: auto; text-align: center; justify-content: center; }
}

/* Tablet: align eyebrow labels to the left while preserving the mobile treatment. */
@media (min-width: 40em) and (max-width: 63.99em) {
  .eyebrow { margin-inline: 0; text-align: left; justify-content: flex-start; }
}

/* Clear heading hierarchy with a small, repeatable cobalt rule. */
h1, h2, h3 { font-weight: 700; }
.section-heading h2,
.service-row h2,
[data-section="story"] h2,
[data-section="about-preview"] h2 { color: var(--color-text); }
.section-heading h2::after,
.service-row h2::after,
[data-section="story"] h2::after,
[data-section="about-preview"] h2::after {
  content: "";
  display: block;
  width: 2.75rem;
  height: 3px;
  margin-top: 0.8rem;
  border-radius: 999px;
  background: var(--color-primary);
}
.section-heading.centered h2::after { margin-inline: auto; }

/* Cards use one subtle border, consistent padding and calm hover feedback. */
.card {
  border-color: var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.4rem, 2.6vw, 2rem);
}
.card-hover:hover { border-color: color-mix(in srgb, var(--color-primary) 32%, var(--color-border)); }
.icon-tile { border-radius: var(--radius-sm); }
.media-frame img,
.service-row img { border-radius: var(--radius-lg); }

/* Existing reverse split classes create a deliberate left/right image rhythm. */
[data-section="about-preview"] .split-reverse > :first-child { order: 2; }
[data-section="about-preview"] .split-reverse > :last-child { order: 1; }
.service-row.split-reverse > :first-child { order: 2; }
.service-row.split-reverse > :last-child { order: 1; }

/* Maintain readable foregrounds on charcoal and cobalt sections. */
.section-dark, .trust-band { background-color: var(--color-dark); color: var(--color-on-dark); }
.trust-band .trust-item span { color: var(--color-on-dark-muted); }
.cta-band { border: 1px solid color-mix(in srgb, var(--color-on-dark) 18%, transparent); }

@media (max-width: 39.99em) {
  [data-section="about-preview"] .split-reverse > :first-child,
  [data-section="about-preview"] .split-reverse > :last-child,
  .service-row.split-reverse > :first-child,
  .service-row.split-reverse > :last-child { order: initial; }
  .section-heading h2::after,
  .service-row h2::after,
  [data-section="story"] h2::after,
  [data-section="about-preview"] h2::after { margin-top: 0.65rem; }
}

/* Center decorative heading divider rules on mobile without changing the heading itself. */
@media (max-width: 39.99em) {
  .section-heading h2::after,
  .service-row h2::after,
  [data-section="story"] h2::after,
  [data-section="about-preview"] h2::after {
    margin-inline: auto;
  }
}

/* Match the Home About-preview checklist to the Service-row checklist on mobile. */
@media (max-width: 39.99em) {
  /* Align trust-band content with the inset Home About-preview checklist. */
  [data-section="trust-bar"] .trust-grid {
    padding-left: 1.625rem;
  }

  [data-section="about-preview"] .check-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: min(100%, 24rem);
    max-width: 100%;
    margin: 1.75rem auto 0;
    padding: 0 1.3125rem 0 1.625rem;
    gap: 0.6rem;
    text-align: left;
  }
  [data-section="about-preview"] .check-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    text-align: left;
  }
}

/* Center the About values eyebrow at every viewport size. */
[data-section="values"] .section-heading .eyebrow {
  margin-inline: auto;
  justify-content: center;
  text-align: center;
}

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

/* Home hero feature points stack in a left-aligned column on tablet and desktop. */
@media (min-width: 40em) {
  .hero .check-list-inline {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: fit-content;
    margin-inline: 0;
    text-align: left;
  }
  .hero .check-list-inline li { text-align: left; }
}

/* Slow fade-in for cards and Home trust-bar items as they enter the viewport. */
@keyframes cardFadeInSlow {
  from { opacity: 0; translate: 0 0.875rem; }
  to { opacity: 1; translate: 0 0; }
}
.card-fade-in,
.trust-fade-in { animation: cardFadeInSlow 1.35s ease-out both; }
[data-section="trust-bar"] .trust-item:nth-child(2).trust-fade-in { animation-delay: 120ms; }
[data-section="trust-bar"] .trust-item:nth-child(3).trust-fade-in { animation-delay: 240ms; }
[data-section="trust-bar"] .trust-item:nth-child(4).trust-fade-in { animation-delay: 360ms; }
@media (prefers-reduced-motion: reduce) {
  .card-fade-in,
  .trust-fade-in { animation: none; opacity: 1; translate: none; }
}

/* Slow, subtle fade-in for buttons as they enter the viewport. */
@keyframes buttonFadeInSlow {
  from { opacity: 0; }
  to { opacity: 1; }
}
.button-fade-in { animation: buttonFadeInSlow 1.4s ease-out both; }
.button-row .button-fade-in:nth-child(2) { animation-delay: 160ms; }
.button-row .button-fade-in:nth-child(3) { animation-delay: 320ms; }
@media (prefers-reduced-motion: reduce) {
  .button-fade-in { animation: none; opacity: 1; }
}

/* About value cards stack in one column on tablet, matching mobile. */
@media (min-width: 40em) and (max-width: 63.99em) {
  [data-section="values"] .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
  [data-section="values"] .grid-3 > article:last-child {
    grid-column: auto;
    width: auto;
    justify-self: stretch;
  }
}

/* Home services cards stack in one column on tablet, matching mobile. */
@media (min-width: 40em) and (max-width: 63.99em) {
  [data-section="services"] .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
  [data-section="services"] .grid-3 > article:last-child {
    grid-column: auto;
    width: auto;
    justify-self: stretch;
  }
}
