/* Surfaces and input feedback for the existing public theme components. */
:root {
  --wb-surface-white: #fff;
  --wb-surface-mist: #f2f3f5;
  --wb-surface-warm: #f7f4f1;
  --wb-surface-ink: #141416;
  --wb-surface-line: #e2e3e6;
  --wb-surface-accent: var(--wb3-accent, #c91414);
  --wb-surface-halo: color-mix(in srgb, var(--wb-surface-accent) 19%, transparent);
}

/* Home sections already alternate between dark and light type. */
body.home #home-intro {
  background: linear-gradient(180deg, var(--wb-surface-white) 55%, #fafafb) !important;
}
body.home #home-projects {
  background: radial-gradient(ellipse at 94% 0%, rgba(202, 44, 47, .12), transparent 42%),
    linear-gradient(155deg, #101012, #1c1c20) !important;
}
body.home #home-services { background: var(--wb-surface-white) !important; }
body.home #home-reviews {
  background: linear-gradient(125deg, var(--wb-surface-warm), #f8f1f1) !important;
}

/* Use color at block edges so existing content and gallery columns stay aligned. */
.wb3-main .wb3-page-head,
.wb3-main .wb3-record-header {
  background-image: linear-gradient(0deg, rgba(110, 117, 132, .055), transparent 56%);
  box-shadow: inset 0 -1px var(--wb-surface-line);
}
.wb3-main :is(.wb3-project-collection, .wb3-gallery) {
  background-image: radial-gradient(ellipse at 50% 0, rgba(148, 156, 167, .09), transparent 55%);
}
.wb3-main :is(.wb3-project-card, .wb3-service-card, .wb3-post-card, .wb3-review-card,
  .wb3-home-review-card) { border-color: var(--wb-surface-line); }
.wb3-main .wb3-project-nav-link { background-color: var(--wb-surface-mist); color: #1c2026; }

/* The guides and funnels supply their own accent and text colors. */
.wbf-page .wbf-section[data-wbf-tone="light"] + .wbf-section[data-wbf-tone="light"] {
  background-color: #f6f6f5;
}
.wbf-page .wbf-section[data-wbf-tone="soft"] {
  box-shadow: inset 0 1px rgba(80, 70, 57, .09), inset 0 -1px rgba(80, 70, 57, .07);
}
.wbw-guide .wbw-section:nth-of-type(even) {
  background-image: linear-gradient(130deg, rgba(143, 151, 159, .075), transparent 70%);
}
#wb-van-landing .vq-section.vq-texture { box-shadow: inset 0 1px rgba(255, 255, 255, .11); }
body.home #home-reviews .wb3-home-section-head {
  background-image: radial-gradient(circle, rgba(90, 73, 73, .095) .75px, transparent 1px);
  background-size: 9px 9px;
}

:where(.wb3-main, .wb3-header, .wb3-footer, .wb3-contact-dock)
  :is(a[href], button):focus-visible {
  outline: 2px solid #23252a;
  outline-offset: 3px;
  box-shadow: 0 0 0 3px white;
}
@media (hover: hover) and (pointer: fine) {
  .wb3-main :is(.wb3-project-card, .wb3-service-card, .wb3-post-card):has(a:hover) {
    border-color: color-mix(in srgb, var(--wb-surface-accent) 44%, var(--wb-surface-line));
    box-shadow: 0 3px 14px rgba(30, 33, 38, .11);
  }
  .wb3-main :is(.wb3-project-nav-link, .wb3-button, .wb3-gallery-expand):hover {
    box-shadow: 0 0 0 2px var(--wb-surface-halo);
  }
  .wb3-main :is(.wb3-service-title-link, .wb3-recent-all-link, .wb3-inline-read-more):hover {
    text-decoration: underline;
    text-underline-offset: .18em;
  }
}
.wb3-main :is(.wb3-project-nav-link, .wb3-button, .wb3-gallery-expand, .wb3-service-link):active {
  filter: brightness(.91);
}
@media (prefers-reduced-motion: no-preference) {
  .wb3-main :is(.wb3-project-card, .wb3-service-card, .wb3-post-card, .wb3-project-nav-link) {
    transition: box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wb3-main :is(.wb3-project-card, .wb3-service-card, .wb3-post-card, .wb3-project-nav-link,
    .wb3-home-section-head, .wb3-button), .wbf-page :is(.wbf-card, .wbf-button) {
    animation: none !important;
    transition: none !important;
  }
}
