/* Additions to the approved V5 material system. */
/* Give chrome text its full ink area: Inter descenders extend past tight line boxes. */
.hero h1 .headline-secondary { padding-bottom: .2em; margin-bottom: -.2em; }

/* Compact motion and back-to-top controls share the footer utility group. */
.footer-controls .motion-toggle { width: 44px; height: 44px; padding: 10px; }
.footer-controls .motion-toggle svg { width: 18px; height: 18px; }
.footer-controls .motion-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.footer-controls .motion-toggle[aria-pressed=true] { color: var(--link); border-color: var(--control); }
.footer-controls .motion-toggle:disabled { opacity: .65; }
.footer-controls { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.footer-controls .back-top { margin: 0; width: 44px; height: 44px; }
.site-header nav { gap: clamp(16px, 1.8vw, 30px); }

.contact-map { padding-bottom: 80px; }
.map-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; }
.map-heading h2 { margin-top: 14px; }
.map-frame { background: var(--surface); border: 1px solid; border-image: var(--fx-frame) 1; box-shadow: 0 20px 44px var(--fx-shadow); }
.map-frame iframe { display: block; width: 100%; height: clamp(340px, 36vw, 460px); border: 0; color-scheme: light; }
.map-address { display: flex; gap: 18px; align-items: center; padding: 25px; background: var(--fx-metal); border: 1px solid var(--line); border-top: 0; }
.map-address .eyebrow { color: var(--muted); font-size: 10px; margin-bottom: 5px; }
.map-address address { font-style: normal; font-size: 14px; }
.map-address > a { margin-left: auto; flex-shrink: 0; }

.certificates-section { border-top: 1px solid var(--line); }
.certificate-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 32px; }
.certificate-card { min-width: 0; }
.certificate-preview { display: block; position: relative; padding: 46px 30px 32px; border: 1px solid; border-image: var(--fx-frame) 1; background: var(--fx-metal); box-shadow: 0 12px 32px var(--fx-shadow); transition: box-shadow 220ms ease; }
.certificate-preview > img { display: block; width: 100%; height: 300px; object-fit: contain; filter: drop-shadow(0 7px 10px rgb(0 0 0 / .2)); }
.certificate-index { position: absolute; top: 14px; left: 17px; font: 9px/1.6 Consolas,monospace; color: var(--muted); letter-spacing: .05em; }
.certificate-open { position: absolute; right: 14px; bottom: 14px; display: grid; place-items: center; width: 44px; height: 44px; background: var(--fx-metal); color: var(--link); border: 1px solid var(--line); box-shadow: 0 4px 14px var(--fx-shadow); }
.certificate-open svg { width: 20px; height: 20px; }
.certificate-preview:hover { box-shadow: 0 18px 35px var(--fx-deep-shadow),0 0 18px var(--fx-blue); }
.certificate-copy { padding-block: 24px 8px; }
.certificate-copy .eyebrow { font-size: 10px; color: var(--link); margin-bottom: 10px; }
.certificate-copy h3 { font-size: 23px; line-height: 1.3; overflow-wrap: anywhere; }
.certificate-copy p { color: var(--muted); font-size: 14px; margin: 13px 0; white-space: pre-line; }
.certificate-copy > .detail-link { min-height: 44px; margin-top: 10px; }
.certificate-pages { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.certificate-pages a { border: 1px solid var(--line); background: var(--surface); padding: 6px; }
.certificate-pages img { display: block; width: 65px; height: 90px; object-fit: contain; }
.certificate-empty { display: flex; align-items: center; gap: 30px; padding: 40px; border: 1px solid; border-image: var(--fx-frame) 1; background: var(--fx-metal); box-shadow: 0 14px 35px var(--fx-shadow); }
.document-symbol { width: 74px; height: 90px; display: grid; place-items: center; color: var(--link); border-right: 1px solid var(--line); padding-right: 24px; flex-shrink: 0; }
.document-symbol svg { width: 43px; height: 52px; }
.certificate-empty .eyebrow { font-size: 10px; color: var(--muted); }
.certificate-empty p { font-size: clamp(17px,1.9vw,25px); margin: 10px 0 0; letter-spacing: -.025em; }
.document-rule { height: 1px; flex: 1; min-width: 20px; margin-left: 20px; background: linear-gradient(90deg,var(--line),var(--link),var(--line)); box-shadow: 0 0 14px var(--fx-blue); }
.certificate-archive { padding-top: 0; }
.certificate-dialog { width: min(980px,calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 20px; border: 1px solid var(--control); background: var(--bg); color: var(--ink); box-shadow: 0 20px 80px rgb(0 0 0 / .55); overscroll-behavior: contain; }
.certificate-dialog::backdrop { background: rgb(3 8 17 / .85); }
body:has(.certificate-dialog[open]) { overflow: hidden; }
.certificate-dialog-bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 18px; }
.certificate-dialog-bar h2 { font-size: 20px; overflow-wrap: anywhere; }
.certificate-close { flex-shrink: 0; }
.certificate-close svg { transform: rotate(45deg); }
.certificate-dialog-image { background: var(--surface); padding: 16px; }
.certificate-dialog-image img { display: block; width: 100%; height: auto; max-height: 70dvh; object-fit: contain; }
.certificate-download { margin-top: 12px; }

/* Keep navigation off the header rail before its labels and controls collide. */
@media(min-width:901px) and (max-width:1100px) {
 .header-inner { min-height: 80px; }
 .menu-toggle { display: inline-flex; }
 .menu-toggle[aria-expanded=true] .menu-lines { display: none; }
 .menu-toggle[aria-expanded=true] .menu-cross { display: block; transform: rotate(45deg); }
 .site-header nav { display: none; position: absolute; top: 79px; left: var(--gutter); right: var(--gutter); padding: 12px 20px; border: 1px solid var(--line); background: var(--fx-metal); box-shadow: 0 18px 35px var(--fx-deep-shadow); }
 .site-header nav.open { display: flex; flex-direction: column; gap: 0; }
 .site-header nav a { min-height: 52px; padding: 10px 0; border-bottom: 1px solid var(--line); }
 .site-header nav a::after { display: none; }
 .site-header nav a:last-child { border-bottom: 0; }
}
@media(max-width:900px) {
 .certificate-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px; }
 .map-address { flex-wrap: wrap; }
 .map-address > a { margin-left: 62px; }
}
@media(max-width:600px) {
 .footer-controls { grid-column: 2; grid-row: 1/4; align-self: start; margin: 0; }
 .contact-map { padding-bottom: 48px; }
 .map-heading { flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
 .map-heading h2 { font-size: 33px; }
 .map-frame iframe { height: 340px; }
 .map-address { padding: 20px; gap: 14px; }
 .map-address > div { flex: 1; min-width: 0; }
 .map-address address { font-size: 13px; }
 .map-address > a { margin-left: 0; width: 100%; min-height: 44px; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 14px; }
 .certificate-grid { grid-template-columns: 1fr; gap: 28px; }
 .certificate-preview > img { height: 320px; }
 .certificate-copy h3 { font-size: 22px; }
 .certificate-empty { padding: 24px; gap: 20px; align-items: start; }
 .document-symbol { width: 48px; height: 64px; padding-right: 14px; }
 .document-symbol svg { width: 30px; height: 40px; }
 .certificate-empty .eyebrow { font-size: 9px; }
 .document-rule { display: none; }
 .certificates-section .section-heading { flex-wrap: wrap; }
 .certificates-section .section-heading > .button { margin-top: 0; min-height: 44px; }
 .certificate-dialog { padding: 16px; }
 .certificate-dialog-bar h2 { font-size: 17px; }
}
