/* ==========================================================================
   Műszer Automatika – main stylesheet
   Design tokens follow the group's sister site (gazerzekelo.hu).
   ========================================================================== */

@font-face {
    font-family: "Rubik";
    font-style: normal;
    font-weight: 300 900;
    font-display: swap;
    src: url("../fonts/rubik-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Rubik";
    font-style: normal;
    font-weight: 300 900;
    font-display: swap;
    src: url("../fonts/rubik-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --navy: #212e5b;
    --navy-dark: #18224a;
    --navy-soft: #2d3c72;
    --red: #c41d48;
    --red-dark: #a3173b;
    --tint: #eff7ff;
    --line: #d9d9d9;
    --ink: #2a3352;
    --muted: #5d6685;
    --white: #fff;

    --font: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
    --radius: 0.28rem;
    --wrap: 1350px;
    --wrap-narrow: 860px;
    --gutter: 2rem;
    --section: clamp(3rem, 6vw, 5.5rem);
    --header-h: 6.5rem;
    --shadow: 0 0.5rem 1.5rem rgba(33, 46, 91, 0.1);
}

/* Base ------------------------------------------------------------------ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
    margin: 0;
    padding-top: var(--header-h);
    font-family: var(--font);
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--white);
    overflow-x: hidden;
}

img,
svg {
    max-width: 100%;
    vertical-align: middle;
}

img {
    height: auto;
}

a {
    color: var(--red);
}

a:hover {
    color: var(--red-dark);
}

:focus-visible {
    outline: 3px solid var(--red);
    outline-offset: 2px;
}

/* Red has too little contrast on navy (2.3:1) – use white on the dark sections (13:1) */
.hero :focus-visible,
.stats :focus-visible,
.site-footer :focus-visible {
    outline-color: var(--white);
}

h1,
h2,
h3 {
    margin: 0 0 1rem;
    color: var(--navy);
    line-height: 1.2;
    font-weight: 700;
    /* Hungarian has very long compound words (e.g. biztosítóberendezések) */
    hyphens: auto;
    overflow-wrap: break-word;
}

h1,
h2 {
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2rem);
}

h3 {
    font-size: 1.25rem;
}

p {
    margin: 0 0 1rem;
}

address {
    font-style: normal;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 10000;
    padding: 0.75rem 1rem;
    background: var(--navy);
    color: var(--white);
    border-radius: var(--radius);
}

.skip-link:focus {
    top: 1rem;
    color: var(--white);
}

.icon {
    width: 1.25em;
    height: 1.25em;
    flex: none;
}

/* Layout ---------------------------------------------------------------- */

.wrap,
.wrap-narrow {
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.wrap {
    max-width: var(--wrap);
}

.wrap-narrow {
    max-width: var(--wrap-narrow);
}

.section {
    padding: var(--section) 0;
}

.section-tint {
    background: var(--tint);
}

.section-intro {
    margin-bottom: 2.5rem;
}

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-bottom: 2.5rem;
}

.section-head h2 {
    margin: 0;
}

.text-center {
    text-align: center;
}

/* Signature: three crimson dots under headings */
.dotted::after {
    content: "";
    display: block;
    width: 32px;
    height: 6px;
    margin-top: 0.75rem;
    background: radial-gradient(circle, var(--red) 2.6px, transparent 3px) 0 0 / 12px 6px repeat-x;
}

.dotted-center::after {
    margin-left: auto;
    margin-right: auto;
}

/* Buttons & links ------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.6rem;
    border: 2px solid transparent;
    border-radius: 2rem;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary {
    background: var(--red);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--red-dark);
    color: var(--white);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.7);
    color: var(--white);
}

.btn-outline-light:hover {
    background: var(--white);
    border-color: var(--white);
    color: var(--navy);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    text-decoration: none;
}

.link-arrow .icon {
    transition: transform 0.2s;
}

.link-arrow:hover .icon {
    transform: translateX(4px);
}

.link-back .icon {
    transform: rotate(180deg);
}

.link-back:hover .icon {
    transform: rotate(180deg) translateX(4px);
}

/* Header ---------------------------------------------------------------- */

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 9000;
    background: var(--white);
    transition: box-shadow 0.3s;
}

.site-header.is-scrolled {
    box-shadow: 0 2px 1rem rgba(33, 46, 91, 0.12);
}

.header-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 2rem;
    min-height: var(--header-h);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 0;
    color: var(--navy);
    text-decoration: none;
}

.header-logo img {
    width: 54px;
}

.header-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-transform: uppercase;
}

.header-logo-name {
    font-size: 1.15rem;
    font-weight: 700;
}

.header-logo-sub {
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    color: var(--muted);
}

.header-logo:hover {
    color: var(--navy);
}

.header-nav {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 0.75rem;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.25rem;
}

.info-line {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 1rem;
    background: var(--navy);
    border-radius: 0 0 var(--radius) var(--radius);
    color: var(--white);
    font-size: 0.8rem;
}

.info-line a {
    color: var(--white);
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
}

.lang-switch ul {
    display: flex;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lang-switch a {
    color: var(--navy);
    font-size: 0.9rem;
    text-decoration: none;
}

.lang-switch a[aria-current] {
    color: var(--red);
    font-weight: 700;
}

.main-menu ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem 1.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-menu a {
    display: inline-flex;
    flex-direction: column;
    gap: 0.3rem;
    color: var(--navy);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.02em;
}

/* Dot underline, as on gazerzekelo.hu: three dots always shown; on hover and on the current
   page the last one stretches into a line */
.dots {
    display: flex;
    gap: 4px;
}

.dots i {
    width: 4px;
    height: 4px;
    border-radius: 2px;
    background: var(--red);
    transition: width 1s ease;
}

.main-menu a:hover .dots i:last-child,
.main-menu a[aria-current] .dots i:last-child {
    width: calc(100% - 16px);
}

.menu-toggle {
    display: none;
    align-self: center;
    width: 3rem;
    height: 3rem;
    border: none;
    border-radius: 2rem;
    background: var(--navy);
    cursor: pointer;
}

.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: var(--white);
    transition: transform 0.3s, background-color 0.3s;
}

.menu-toggle-bars {
    position: relative;
}

.menu-toggle-bars::before,
.menu-toggle-bars::after {
    content: "";
    position: absolute;
    left: 0;
}

.menu-toggle-bars::before {
    top: -6px;
}

.menu-toggle-bars::after {
    top: 6px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars {
    background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after {
    transform: translateY(-6px) rotate(-45deg);
}

/* Hero ------------------------------------------------------------------ */

.hero {
    position: relative;
    overflow: hidden;
    margin: 0 var(--gutter);
    border-radius: var(--radius);
    background:
        linear-gradient(100deg, rgba(24, 34, 74, 0.96) 0%, rgba(33, 46, 91, 0.88) 55%, rgba(45, 60, 114, 0.7) 100%),
        var(--hero-image, none) center / cover no-repeat,
        var(--navy);
    color: var(--white);
}

.hero-inner {
    position: relative;
    z-index: 1;
    padding-top: clamp(4rem, 10vw, 8rem);
    padding-bottom: clamp(4rem, 10vw, 8rem);
}

.hero h1 {
    max-width: 16em;
    color: var(--white);
    font-size: clamp(1.75rem, 5vw, 3.4rem);
}

.hero-lead {
    max-width: 38em;
    margin-bottom: 2rem;
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: rgba(255, 255, 255, 0.88);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Text + photo placeholder side by side; text alone when there is a background image */
.hero-inner:has(.hero-photo) {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
}

.hero-photo {
    aspect-ratio: 4 / 3;
}

/* Photo placeholders (config photo_placeholders) --------------------------- */

.photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 1.25rem;
    border: 2px dashed #9aa3c0;
    border-radius: var(--radius);
    background: repeating-linear-gradient(-45deg, var(--tint), var(--tint) 10px, #e4eefb 10px, #e4eefb 20px);
    color: var(--navy);
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.4;
}

.photo-placeholder .icon {
    width: 2rem;
    height: 2rem;
    color: var(--red);
}

.photo-placeholder strong {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.photo-placeholder-dark {
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.activity-card .photo-placeholder {
    border-width: 0 0 2px;
    border-radius: 0;
}

.page-photo {
    width: 100%;
    aspect-ratio: 21 / 9;
    margin-bottom: 2.5rem;
    border-radius: var(--radius);
    object-fit: cover;
}

/* Page header (inner pages) --------------------------------------------- */

.page-header {
    padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
    background: var(--tint);
}

.page-header h1 {
    margin-bottom: 0;
}

.page-lead {
    max-width: 44em;
    margin: 1.25rem 0 0;
    font-size: 1.2rem;
    color: var(--muted);
}

.page-date {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--red);
    font-weight: 600;
}

/* Breadcrumb (optional, in the page header) */
.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
    font-size: 0.9rem;
}

.breadcrumb li + li::before {
    content: "/";
    margin: 0 0.6rem;
    color: var(--line);
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--red);
}

.breadcrumb [aria-current] {
    color: var(--navy);
    font-weight: 600;
}

/* Prose (Markdown output) ----------------------------------------------- */

.prose h2 {
    margin-top: 2.5rem;
    font-size: 1.5rem;
}

.prose h3 {
    margin-top: 2rem;
}

.prose ul,
.prose ol {
    padding-left: 1.25rem;
}

.prose li {
    margin-bottom: 0.4rem;
}

.prose ul li::marker {
    color: var(--red);
}

.prose img {
    border-radius: var(--radius);
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 1rem;
}

@media (max-width: 700px) {
    /* Wide tables (e.g. cookie list) scroll instead of overflowing the page */
    .prose table {
        display: block;
        overflow-x: auto;
    }
}

.prose th,
.prose td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.prose th {
    color: var(--navy);
}

.prose > :last-child {
    margin-bottom: 0;
}

/* Welcome + services ---------------------------------------------------- */

.welcome .prose {
    font-size: 1.2rem;
}

.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service {
    padding: 2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-align: center;
}

.service-icon {
    display: inline-grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: var(--tint);
    color: var(--navy);
}

.service-icon .icon {
    width: 2.25rem;
    height: 2.25rem;
}

.service h3 {
    color: var(--red);
    text-transform: uppercase;
}

.service p {
    margin: 0;
    font-size: 1rem;
    color: var(--muted);
}

/* Cards ----------------------------------------------------------------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.activity-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--white);
    border-radius: var(--radius);
    border-top: 4px solid var(--navy);
    box-shadow: var(--shadow);
    transition: transform 0.25s, border-color 0.25s;
}

.activity-card:hover {
    transform: translateY(-4px);
    border-top-color: var(--red);
}

.activity-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.5rem 1.75rem 1.75rem;
}

.activity-photo {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.activity-title {
    font-size: 1.15rem;
}

.activity-card p {
    flex: 1;
    font-size: 0.98rem;
    color: var(--muted);
}

.activity-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
}

.activity-link .icon {
    width: 1rem;
    height: 1rem;
}

/* Stats ----------------------------------------------------------------- */

.stats {
    background: var(--navy);
    color: var(--white);
}

.stats h2 {
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2.5rem 0 0;
}

.stat {
    display: flex;
    flex-direction: column-reverse;
    padding-left: 1.25rem;
    border-left: 3px solid var(--red);
}

.stat dd {
    margin: 0;
    font-size: clamp(2.75rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1;
}

.stat dt {
    margin-top: 0.5rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.8);
}

/* News ------------------------------------------------------------------ */

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.news-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    transition: box-shadow 0.25s;
}

.news-card:hover {
    box-shadow: var(--shadow);
}

.news-card-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.news-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.5rem;
}

.news-card time {
    margin-bottom: 0.5rem;
    color: var(--red);
    font-size: 0.9rem;
    font-weight: 600;
}

.news-card h3 {
    font-size: 1.15rem;
}

.news-card h3 a {
    color: var(--navy);
    text-decoration: none;
}

/* Whole card is clickable */
.news-card h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.news-card p {
    flex: 1;
    font-size: 0.98rem;
    color: var(--muted);
}

.news-card-more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
    color: var(--red);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
}

.article-img {
    width: 100%;
    margin-bottom: 2rem;
    border-radius: var(--radius);
}

.article-back {
    margin-top: 3rem;
}

.empty {
    color: var(--muted);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a {
    min-width: 2.75rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 2rem;
    color: var(--navy);
    text-align: center;
    text-decoration: none;
}

.pagination a:hover,
.pagination a[aria-current] {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

/* Contact --------------------------------------------------------------- */

.office-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.office {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.office h3 {
    font-size: 1.15rem;
}

/* Map link sits at the bottom of every card, so the links line up across a row */
.office > .link-arrow {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.office-grid {
    margin-top: 2.5rem;
}

.office {
    background: var(--white);
}

.contact-top {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 3rem 4rem;
    align-items: start;
}

.contact-quick ul {
    display: grid;
    gap: 1rem;
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
}

.contact-quick li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--red);
}

.contact-quick a,
.contact-quick span {
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
}

/* Contact form ---------------------------------------------------------- */

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1.5rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.field-full {
    grid-column: 1 / -1;
}

.field label {
    color: var(--navy);
    font-size: 0.95rem;
    font-weight: 600;
}

.req {
    color: var(--red);
}

.field input,
.field textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    /* ≥ 3:1 against white so the field outline is visible (WCAG 1.4.11) */
    border: 1px solid #808aa6;
    border-radius: var(--radius);
    background: var(--white);
    color: var(--ink);
    font: inherit;
    font-size: 1rem;
}

.field textarea {
    resize: vertical;
    min-height: 9rem;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--navy);
    outline: 2px solid var(--navy);
    outline-offset: 0;
}

.has-error input,
.has-error textarea {
    border-color: var(--red);
}

.field-error {
    margin: 0;
    color: var(--red);
    font-size: 0.88rem;
    font-weight: 600;
}

.field-check {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.4rem 0.75rem;
    align-items: start;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.field-check input {
    width: 1.2rem;
    height: 1.2rem;
    margin-top: 0.2rem;
    accent-color: var(--red);
}

.field-check .field-error {
    grid-column: 2;
}

/* Honeypot – visually hidden, still in the DOM for bots */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alert {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border-left: 4px solid;
    border-radius: var(--radius);
}

.alert p {
    margin: 0.25rem 0 0;
}

.alert-success {
    border-color: #2e7d4f;
    background: #ecf7f0;
    color: #1d5434;
}

.alert-error {
    border-color: var(--red);
    background: #fdf0f3;
    color: var(--red-dark);
    font-weight: 600;
}

@media (max-width: 900px) {
    .contact-top {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.office dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 1rem;
    margin: 0 0 1rem;
    font-size: 0.98rem;
}

.office dt {
    color: var(--muted);
}

.office dd {
    min-width: 0;
    margin: 0;
    /* E-mails break before "@" (via <wbr>); mid-word only as a last resort */
    overflow-wrap: break-word;
}

@media (max-width: 420px) {
    .office {
        padding: 1.25rem;
    }

    .office dl {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .office dd {
        margin-bottom: 0.5rem;
    }
}

.contact-band {
    padding: 3rem 0;
    background: var(--tint);
}

.contact-band-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 3rem;
}

.contact-band h2 {
    margin-bottom: 0.5rem;
}

.contact-band p {
    margin: 0;
    color: var(--muted);
}

.contact-band-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.contact-band-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--red);
}

.contact-band-list a {
    color: var(--navy);
    font-weight: 700;
    text-decoration: none;
}

/* Downloads ------------------------------------------------------------- */

.prose + .download-groups {
    margin-top: 3rem;
}

.download-group + .download-group {
    margin-top: 2.5rem;
}

.download-group h2 {
    font-size: 1.25rem;
}

.download-list {
    display: grid;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.download {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--navy);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.download:hover {
    border-color: var(--red);
    box-shadow: var(--shadow);
    color: var(--navy);
}

.download-badge {
    flex: none;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius);
    background: var(--tint);
    color: var(--red);
    font-size: 0.75rem;
    font-weight: 800;
}

.download-text {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
}

.download-title {
    font-weight: 600;
    overflow-wrap: break-word;
}

.download-meta {
    color: var(--muted);
    font-size: 0.88rem;
}

.download .icon {
    color: var(--red);
}

/* Staff ----------------------------------------------------------------- */

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 1rem;
    margin: 2.5rem 0 0;
    padding: 0;
    list-style: none;
}

.person {
    display: flex;
    gap: 1rem;
    min-width: 0;
    padding: 1.25rem;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.person-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--tint);
    color: var(--navy);
}

.person > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
    font-size: 0.95rem;
}

.person-name {
    color: var(--navy);
    font-size: 1.05rem;
}

.person-role {
    color: var(--muted);
}

/* Breaks before "@" (via <wbr>); mid-word only as a last resort */
.person a {
    overflow-wrap: break-word;
}

/* Footer ---------------------------------------------------------------- */

.site-footer {
    background: var(--navy-dark);
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.98rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 3rem;
    padding-top: 4rem;
    padding-bottom: 3rem;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--white) !important;
    font-weight: 700;
    text-transform: uppercase;
}

/* Logo has navy parts – put it on a white tile so it stays visible */
.footer-logo img {
    width: 54px;
    padding: 6px;
    background: var(--white);
    border-radius: var(--radius);
}

.footer-tagline {
    max-width: 24em;
}

.footer-title {
    margin-bottom: 1.25rem;
    color: var(--white);
    font-size: 1rem;
    letter-spacing: 0.06em;
}

.footer-title::after {
    content: "";
    display: block;
    width: 32px;
    height: 6px;
    margin-top: 0.5rem;
    background: radial-gradient(circle, var(--red) 2.6px, transparent 3px) 0 0 / 12px 6px repeat-x;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-col li + li {
    margin-top: 0.4rem;
}

.footer-col address {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 1.25rem;
}

.social-links a {
    font-weight: 600;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.88rem;
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

/* Responsive ------------------------------------------------------------ */

@media (max-width: 1180px) {
    :root {
        --header-h: 5rem;
    }

    .menu-toggle {
        display: block;
    }

    /* Off-canvas menu */
    .header-nav {
        position: fixed;
        top: var(--header-h);
        right: 0;
        bottom: 0;
        width: min(100%, 24rem);
        flex-direction: column-reverse;
        justify-content: flex-end;
        gap: 2rem;
        padding: 2rem var(--gutter);
        background: var(--white);
        box-shadow: -1rem 0 2rem rgba(33, 46, 91, 0.12);
        overflow-y: auto;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.35s ease, visibility 0s 0.35s;
    }

    .header-nav.is-open {
        transform: none;
        visibility: visible;
        transition: transform 0.35s ease;
    }

    .main-menu ul {
        flex-direction: column;
        gap: 0;
    }

    .main-menu a {
        display: flex;
        padding: 0.9rem 0;
        border-bottom: 1px solid var(--line);
        font-size: 1rem;
    }

    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .info-line {
        border-radius: var(--radius);
    }
}

@media (max-width: 900px) {
    .hero-inner:has(.hero-photo) {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    :root {
        --gutter: 1rem;
    }

    body {
        font-size: 1.0625rem;
    }

    .header-logo img {
        width: 44px;
    }

    .header-logo-name {
        font-size: 1rem;
    }

    .hero {
        margin: 0;
        border-radius: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .card-grid,
    .news-grid,
    .office-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
