/* Archetype Core watchdog layer
   Accessibility, contrast, focus, and editorial consistency.
   Loaded after the core design system. */

:root {
  --ac-dark-border: rgba(243, 239, 231, .24);
}

/* Keep all present and future content images inside the viewport. */
img {
  max-width: 100%;
  height: auto;
}

/* Dark-section grids must stay dark. The base card rule otherwise
   creates white panels beneath light text, as seen on the Review page. */
.section-dark .grid-2,
.section-dark .grid-3 {
  border-color: var(--ac-dark-border);
}

.section-dark .grid-2 > .grid-item,
.section-dark .grid-2 > .card-item,
.section-dark .grid-3 > .grid-item,
.section-dark .grid-3 > .card-item {
  background: transparent;
  border-color: var(--ac-dark-border);
}

.section-dark .grid-2 .grid-item h3,
.section-dark .grid-3 .grid-item h3 {
  color: #ffffff;
}

.section-dark .grid-2 .grid-item p,
.section-dark .grid-3 .grid-item p {
  color: #d8d1c5;
}

/* Keep light surfaces readable and labels purposeful. */
.section:not(.section-dark) .grid-item h3,
.section:not(.section-dark) .card-item h3 {
  color: var(--text);
}

.section:not(.section-dark) .grid-item p,
.section:not(.section-dark) .card-item p {
  color: var(--text-mid);
}

.section-dark .label,
.label-light {
  color: #d8d1c5;
}

.subtle {
  color: #646a75;
}

/* Visible keyboard navigation is part of a credible technical site. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #c8a65b;
  outline-offset: 3px;
}

/* Make text links recognizable without adding visual noise. */
.prose a,
.project-links a,
.micro-cta a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

/* Preserve square, architectural forms everywhere. */
.btn,
.grid-item,
.card-item,
.point-card,
.offer-grid > div,
.sidebar,
.project-card,
.form-panel,
.offer-card,
.micro-cta,
.faq-item,
.tech-tag,
.status,
input,
select,
textarea {
  border-radius: 0 !important;
}

/* Footer links may wrap instead of forcing horizontal overflow. */
.footer-links {
  flex-wrap: wrap;
  row-gap: .65rem;
}

/* Give the mobile menu control a comfortable touch target. */
@media (max-width: 940px) {
  .nav-toggle {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    flex-shrink: 0;
  }
}

@media (max-width: 680px) {
  .footer-inner {
    align-items: flex-start;
  }

  .footer-links {
    width: 100%;
    gap: .55rem 1.1rem;
  }

  .footer-links a {
    line-height: 1.45;
  }
}

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