/* Springhead site shell. Tokens only (tokens.css). Everything that touches a core class is gated
   with :has(.shp), so core pages (login, errors, agenda, certificates admin) keep their layout. */

.cnx-main:has(.shp) { padding: 0; }
.cnx-main:has(.shp) > .cnx-container { max-width: none; padding: 0; }
.cnx-header .cnx-container:has(.bar) { max-width: none; padding: 0; }
.cnx-brand:has(.bar) { flex: 1; }

.shp { color: var(--sh-ink-800); }
.shp a { color: var(--sh-teal); }
.shp p, .site-footer p { text-wrap: pretty; }
.shp h1, .shp h2 { font-family: var(--sh-font-display); font-weight: 600; color: var(--sh-navy); line-height: 1.1; text-wrap: balance; }

.wrap { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: var(--sh-r-5); }

/* ---- Header ---- */
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sh-r-2) var(--sh-r-5); min-height: var(--sh-r-8); }
.brand { display: inline-flex; align-items: center; min-height: var(--sh-touch-target-min); }
.brand img { display: block; height: auto; }
.bar ul { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sh-r-1) var(--sh-r-5); margin: 0; padding: 0; list-style: none; }
.bar li a:not(.btn) { display: inline-flex; align-items: center; min-height: var(--sh-touch-target-min); color: var(--sh-navy); text-decoration: none; border-bottom: 3px solid transparent; }
.bar li a:not(.btn):hover, .bar li a[aria-current] { border-bottom-color: var(--sh-yellow-ink); }

/* ---- Button and links ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--sh-touch-target-min); padding-inline: var(--sh-r-5); background: var(--sh-navy); color: var(--sh-white); border-radius: var(--sh-radius-md); font-weight: var(--sh-fw-strong); text-decoration: none; }
.shp a.btn, .bar a.btn { color: var(--sh-white); }
.btn:hover { background: var(--sh-teal); }
.btn:active { transform: scale(0.97); }
.link { display: inline-flex; align-items: center; min-height: var(--sh-touch-target-min); margin-left: var(--sh-r-4); }

/* ---- Hero (Persuadir): one idea, one CTA ---- */
.hero { padding-block: var(--sh-r-9) var(--sh-r-8); }
.hero h1 { max-width: 16ch; margin: 0 0 var(--sh-r-5); font-size: clamp(2.5rem, 7vw, 5rem); }
.hl { text-decoration: underline 0.1em var(--sh-yellow); text-underline-offset: 0.12em; }
.lede { max-width: 36rem; margin: 0 0 var(--sh-r-6); font-size: clamp(1.125rem, 2.4vw, 1.375rem); line-height: 1.5; color: var(--sh-ink-700); }
.eyebrow { margin: 0 0 var(--sh-r-3); font-family: var(--sh-font-display); font-size: clamp(4rem, 14vw, 9rem); line-height: 1; color: var(--sh-teal); }
.notfound h1 { font-size: clamp(2rem, 5vw, 3rem); }

/* ---- Footer ---- */
.site-footer { background: var(--sh-navy); color: var(--sh-white); padding-block: var(--sh-r-8) var(--sh-r-5); }
.site-footer a { color: var(--sh-white); }
.site-footer :focus-visible { outline-color: var(--sh-white); }
.foot { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--sh-r-7) var(--sh-r-6); }
.foot img { display: block; height: auto; }
.foot ul { margin: 0; padding: 0; list-style: none; }
.foot li a, .foot p a { display: inline-flex; align-items: center; min-height: var(--sh-touch-target-min); }
.foot__line { max-width: 24rem; margin: var(--sh-r-4) 0 0; }
.foot__title { margin: 0 0 var(--sh-r-3); font-family: var(--sh-font-text); font-size: 1rem; font-weight: var(--sh-fw-strong); color: var(--sh-white); }
.foot__legal { margin-block: var(--sh-r-7) 0; font-size: 0.875rem; color: var(--sh-white); }

@media (max-width: 40rem) {
  .hero { padding-block: var(--sh-r-7) var(--sh-r-7); }
  .bar ul { width: 100%; flex-wrap: nowrap; justify-content: space-between; gap: var(--sh-r-3); font-size: 1rem; }
  .bar li:has(.btn) { display: none; } /* each page body carries the CTA on small screens */
  .foot { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform var(--sh-motion-duration-fast) var(--sh-motion-ease-out); }
}

/* ---- Leer: long text, one comfortable column ---- */
.legal { padding-block: var(--sh-r-8); }
.legal > * { max-width: 42rem; }
.legal h1 { margin: 0 0 var(--sh-r-3); font-size: clamp(2rem, 5vw, 3rem); }
.legal h2 { margin: var(--sh-r-7) 0 var(--sh-r-3); font-size: clamp(1.375rem, 3vw, 1.75rem); }
.legal p { margin: 0 0 var(--sh-r-4); font-size: 1.125rem; line-height: 1.65; }
.legal__meta { color: var(--sh-ink-700); }

/* ---- Credential pages (core certificates module): the band stacks on small screens ---- */
@media (max-width: 40rem) {
  .cert-doc__mark { margin-right: auto; }
  .cert-doc__tag { order: 3; flex: 1 1 100%; }
}
