/* Architectural footer: quiet navigation, compact spacing, original brand artwork. */
/* The starter theme's .page article spacing also applies to body.page. */
body.page { margin-bottom: 0; }

.merade-footer {
 --footer-text: var(--merade-on-dark-secondary);
 --footer-muted: var(--merade-on-dark-muted);
 --footer-rule: var(--merade-border-on-dark);
 padding: 40px clamp(20px, 4vw, 56px) 20px;
 background: var(--merade-navy);
 color: var(--merade-ivory);
 border-top: 1px solid var(--merade-accent-border);
 font: 400 16px/1.6 var(--merade-font-body);
 -webkit-font-smoothing: antialiased;
}
.merade-footer *, .merade-footer *::before, .merade-footer *::after { box-sizing: border-box; }
.merade-footer-inner {
 display: grid;
 grid-template-columns: minmax(0, 1.25fr) minmax(0, .8fr) minmax(0, 1fr);
 gap: clamp(40px, 6vw, 88px);
 max-width: 1328px;
 margin-inline: auto;
}
.merade-footer-inner > div { min-width: 0; overflow-wrap: anywhere; }
.merade-footer a, .merade-footer a:visited { color: var(--footer-text); text-decoration: none; }
.merade-footer a {
 border-radius: 2px;
 text-underline-offset: 5px;
 text-decoration-thickness: 1px;
 transition: color 240ms ease;
}
.merade-footer a:focus-visible { outline: 2px solid var(--merade-gold); outline-offset: 5px; }
.merade-footer-brand-link {
 display: inline-block;
 max-width: 100%;
 font: 500 clamp(36px, 4vw, 48px)/1.1 var(--merade-font-heading);
 letter-spacing: .08em;
}
.merade-footer-logo { display: block; width: auto; height: auto; max-width: min(240px, 100%); max-height: 168px; }
.merade-footer-intro { max-width: 32ch; margin: 16px 0 0; color: var(--footer-text); font-size: 15px; }
.merade-footer-contacts { display: grid; gap: 10px; max-width: 34ch; margin-top: 16px; }
.merade-footer-contacts p, .merade-footer-contacts address { margin: 0; }
.merade-footer-contacts span { display: block; margin-bottom: 2px; color: var(--footer-muted); font-size: 12px; line-height: 1.5; }
.merade-footer-contacts a { display: inline-block; padding-block: 3px; font-size: 18px; line-height: 1.5; }
.merade-footer address { color: var(--footer-text); font-size: 14px; line-height: 1.7; font-style: normal; }
.merade-footer-column { padding-top: 8px; }
.merade-footer h2 {
 margin: 0 0 12px;
 color: var(--merade-ivory);
 font: 500 30px/1.2 var(--merade-font-heading);
 letter-spacing: -.015em;
 text-transform: none;
}
.merade-footer-menu, .merade-footer-socials { list-style: none; margin: 0; padding: 0; }
.merade-footer-menu > li { margin: 0; }
.merade-footer-menu a { display: inline-flex; align-items: center; min-height: 36px; max-width: 100%; padding-block: 6px; color: var(--footer-text); font-size: 15px; line-height: 1.6; }
.merade-footer-menu .sub-menu { list-style: none; margin: 2px 0 8px; padding-inline-start: 16px; border-inline-start: 1px solid var(--footer-rule); }
.merade-footer-socials { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 12px; }
.merade-footer-socials a { display: inline-flex; align-items: center; min-height: 44px; color: var(--footer-text); font-size: 13px; }
.merade-footer-bottom { max-width: 1328px; margin: 28px auto 0; padding-top: 16px; border-top: 1px solid var(--footer-rule); color: var(--footer-muted); text-align: center; font-size: 12px; line-height: 1.8; }
.merade-footer-bottom p { margin: 0; }
@media (hover: hover) and (pointer: fine) {
 .merade-footer a:hover, .merade-footer a:visited:hover { color: var(--merade-gold); text-decoration: none; }
 .merade-footer-brand-link:hover { text-decoration: none; }
}
/* A shared first row aligns headings with the actual logo height, without fixed offsets. */
.merade-footer-brand-details { display: contents; }
@media (min-width: 761px) {
 .merade-footer-inner { grid-template-rows: auto 1fr; row-gap: 16px; }
 .merade-footer-brand, .merade-footer-column { display: grid; grid-row: 1 / span 2; grid-template-rows: subgrid; padding-top: 0; }
 .merade-footer-brand { grid-column: 1; }
 .merade-footer-developers { grid-column: 2; }
 .merade-footer-information { grid-column: 3; }
 .merade-footer-brand-link { grid-row: 1; align-self: end; justify-self: start; }
 .merade-footer-column h2 { grid-row: 1; align-self: end; margin-bottom: 0; }
 .merade-footer-column nav { grid-row: 2; align-self: start; }
 .merade-footer-column .merade-footer-menu > li:first-child > a { display: flex; padding-top: 0; min-height: 0; }
 .merade-footer-brand-details { display: block; grid-row: 2; }
 .merade-footer-brand-details > :first-child { margin-top: 0; }
}
@media (max-width: 1000px) {
 .merade-footer { padding-top: 36px; }
 .merade-footer-inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, .85fr) minmax(0, 1fr); gap: 32px; }
 .merade-footer-logo { max-height: 148px; }
 .merade-footer h2 { font-size: 28px; }
}
@media (max-width: 760px) {
 .merade-footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; }
 .merade-footer-brand { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); gap: 0 32px; align-items: start; }
 .merade-footer-brand-link { grid-column: 1; grid-row: 1; justify-self: start; }
 .merade-footer-contacts { grid-column: 2; grid-row: 1 / span 3; margin-top: 4px; }
 .merade-footer-intro, .merade-footer-socials { grid-column: 1; }
 .merade-footer-column { padding-top: 16px; border-top: 1px solid var(--footer-rule); }
 .merade-footer h2 { margin-bottom: 12px; }
 .merade-footer-bottom { margin-top: 24px; }
}
@media (max-width: 600px) {
 .merade-footer { padding-top: 28px; padding-bottom: 20px; }
 .merade-footer-brand { display: block; }
 .merade-footer-logo { max-height: 136px; max-width: min(220px, 100%); }
 .merade-footer-contacts { margin-top: 16px; gap: 8px; }
 .merade-footer-intro { max-width: 38ch; margin-top: 16px; }
 .merade-footer-contacts a { min-height: 44px; }
 .merade-footer-inner { column-gap: 24px; }
 .merade-footer-menu a { min-height: 44px; font-size: 14px; }
}
@media (max-width: 380px) {
 .merade-footer-inner { grid-template-columns: minmax(0, 1fr); gap: 20px; }
 .merade-footer h2 { margin-bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
 .merade-footer a { transition: none; }
}
@media (forced-colors: active) {
 .merade-footer a { text-decoration: underline; }
}

/* Keep generous hit areas on touch screens without adding desktop whitespace. */
@media (pointer: coarse) {
 .merade-footer-menu a, .merade-footer-contacts a { min-height: 44px; }
}
