:root {
    --text: #1f2328;
    --muted: #656d76;
    --bg: #ffffff;
    --surface: #f6f8fa;
    --border: #d8dee4;
    --accent: #2f5d8a;
    --accent-hover: #234767;
    --success-bg: #e6f4ea;
    --success-text: #1b5e20;
    --error: #b00020;
    --radius: 8px;
}

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

body {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 24px;
}

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

a:hover {
    color: var(--accent-hover);
}

h1,
h2,
h3 {
    line-height: 1.25;
    margin: 0 0 12px;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Header */

.site-header {
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding-top: 20px;
    padding-bottom: 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

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

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
}

.site-nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}

.site-nav a:hover {
    color: var(--text);
}

.site-nav a[aria-current="page"] {
    color: var(--text);
    border-bottom-color: var(--accent);
}

/* Main content */

main {
    flex: 1;
}

.page-title {
    font-size: 2rem;
    margin-bottom: 32px;
}

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

.content-section {
    margin-bottom: 48px;
}

.content-section.has-image {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 32px;
    align-items: start;
}

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

.content-text p:first-child {
    margin-top: 0;
}

/* Cards and grids */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.grid-wide {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

.card {
    margin: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg);
}

.card > img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.card figcaption,
.card-body {
    padding: 16px;
}

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

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

.video-frame {
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.video-missing {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    color: var(--muted);
}

.featured {
    margin-top: 56px;
}

.featured-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 20px;
}

.featured-header h2 {
    margin: 0;
}

/* Contact form */

.form-panel {
    max-width: 560px;
    padding: 28px;
    margin-bottom: 48px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.contact-form input,
.contact-form textarea {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font: inherit;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
}

.contact-form .errorlist {
    color: var(--error);
    padding-left: 0;
    margin: 0 0 4px;
    list-style: none;
    font-size: 0.9rem;
}

.button {
    padding: 10px 24px;
    font: inherit;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.button:hover {
    background: var(--accent-hover);
}

.notice {
    padding: 12px 16px;
    border-radius: 6px;
}

.notice-success {
    background: var(--success-bg);
    color: var(--success-text);
    font-weight: 600;
}

/* Footer */

.site-footer {
    margin-top: 40px;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.9rem;
}

/* Small screens */

@media (max-width: 640px) {
    .container {
        padding: 0 16px;
    }

    .content-section.has-image {
        grid-template-columns: 1fr;
        gap: 16px;
    }

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

    .form-panel {
        padding: 20px;
    }
}
