/* site.css — site-specific additions on top of the Industry design system.
   Hover states (ported from the design's style-hover attributes), a
   responsive collapsing nav, and small layout guards. industry.css stays
   the source of truth for the visual system; nothing here retunes tokens. */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px; /* clear the sticky header when jumping to #anchors */
}

/* [hidden] must win over inline display declarations (the contact form
   carries an inline display:flex that would otherwise defeat it). */
[hidden] { display: none !important; }

/* — hover feedback ported from the design — */
.svc-card { transition: background .18s ease, transform .18s ease, box-shadow .18s ease; position: relative; z-index: 0; }
.svc-card:hover,
.svc-card:focus-visible { background: #dcecff; transform: translateY(-4px); box-shadow: 0 14px 28px rgba(29,31,32,.16); z-index: 1; }

.btn-ghost-dark:hover,
.btn-ghost-dark:focus-visible { background: rgba(148, 188, 227, .16); }

.btn-on-dark:hover,
.btn-on-dark:focus-visible { background: #e2e5e7; }

/* — responsive navigation — */
.site-header .nav-toggle { display: none; }

@media (max-width: 860px) {
  .site-nav { flex-wrap: wrap; padding-left: 22px !important; padding-right: 22px !important; }

  .site-header .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; padding: 0; flex: none;
    background: transparent; border: 1px solid var(--color-divider);
    border-radius: 0; cursor: pointer;
  }
  .site-header .nav-toggle span {
    display: block; width: 20px; height: 1.5px; margin: 0 auto;
    background: var(--color-text); transition: transform .2s ease, opacity .2s ease;
  }
  .site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .site-menu {
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch !important;
    gap: 0 !important;
    display: none !important;
  }
  .site-header.nav-open .site-menu { display: flex !important; }

  .site-menu a {
    padding: 15px 2px;
    font-size: 16px;
    border-top: 1px solid var(--color-divider);
  }
  .site-menu .site-menu-cta {
    margin-top: 16px;
    padding: 14px 18px !important;
    justify-content: center;
    border-top: 0;
  }
}

/* — project-delivery accordion (Services page) —
   Native <details>/<summary>: keyboard-operable and works without JS.
   The blueprint frame keeps its corner marks, so the row list clips
   inside an inner wrapper rather than on .blueprint itself. */
.phase-list { overflow: hidden; }

.phase { display: block; }
.phase + .phase { border-top: 1px solid var(--color-divider); }

.phase > summary {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  transition: background .16s ease;
}
.phase > summary::-webkit-details-marker { display: none; }
.phase > summary::marker { content: ""; }
.phase > summary:hover { background: var(--color-accent-100); }
.phase > summary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }

.phase-num {
  font-size: 16px;
  color: var(--color-accent);
  font-variant-numeric: tabular-nums;
}
.phase-title {
  flex: 1;
  min-width: 0;
  font-size: 20px;
  line-height: 1.15;
}

.phase-toggle {
  position: relative;
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--color-accent);
}
.phase-toggle::before,
.phase-toggle::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.phase-toggle::before { left: 0; top: 50%; width: 100%; height: 1.5px; transform: translateY(-50%); }
.phase-toggle::after  { top: 0; left: 50%; width: 1.5px; height: 100%; transform: translateX(-50%); transition: transform .2s ease, opacity .2s ease; }
.phase[open] .phase-toggle::after { transform: translateX(-50%) scaleY(0); opacity: 0; }

.phase-body { padding: 0 24px 24px 56px; }
.phase-body p {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: color-mix(in srgb, var(--color-text) 72%, transparent);
  max-width: 68ch;
}

@media (max-width: 540px) {
  .phase > summary { padding: 18px 18px; gap: 14px; }
  .phase-title { font-size: 18px; }
  .phase-body { padding: 0 18px 22px 18px; }
}

/* — subsystem accordion (each of the six core areas on the Services page).
   Replaces the row of static tags; more compact than .phase. — */
.sub-list { border: 1px solid var(--color-divider); }
.subsystem { display: block; }
.subsystem + .subsystem { border-top: 1px solid var(--color-divider); }

.subsystem > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 500;
  transition: background .16s ease;
}
.subsystem > summary::-webkit-details-marker { display: none; }
.subsystem > summary::marker { content: ""; }
.subsystem > summary:hover { background: var(--color-accent-100); }
.subsystem > summary:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }

.sub-name { flex: 1; min-width: 0; }

.sub-toggle {
  position: relative;
  flex: none;
  width: 12px;
  height: 12px;
  color: var(--color-accent);
}
.sub-toggle::before,
.sub-toggle::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.sub-toggle::before { left: 0; top: 50%; width: 100%; height: 1.5px; transform: translateY(-50%); }
.sub-toggle::after  { top: 0; left: 50%; width: 1.5px; height: 100%; transform: translateX(-50%); transition: transform .2s ease, opacity .2s ease; }
.subsystem[open] .sub-toggle::after { transform: translateX(-50%) scaleY(0); opacity: 0; }

.sub-body { padding: 2px 14px 14px 14px; }
.sub-body p {
  margin: 0;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.6;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
  max-width: 64ch;
}

/* — registered professional associations (founder credential card, About) —
   Text wordmark tiles in the blueprint style; swap for real logo art later. */
.assoc-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.assoc {
  flex: 1 1 104px;
  max-width: 148px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  padding: 14px 8px;
  border: 1px solid var(--color-divider);
  min-height: 84px;
}
.assoc-mark {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 17px;
  letter-spacing: 0.04em;
  color: var(--color-text);
}
.assoc-mark-sm { font-size: 12px; letter-spacing: 0.02em; }
.assoc-name {
  font-size: 9px;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}

/* — top-right navigation: larger, bold — */
.site-menu > a { font-size: 16px; font-weight: 700; }

/* — contact form: full-ink labels — */
#contact-form .field > label { color: #1d1f20; font-size: 13px; font-weight: 500; }

/* — buttons: never break a label mid-phrase — */
.btn { white-space: nowrap; }
