* { box-sizing: border-box; }
html, body { width: 100%; margin: 0; }
body {
    min-height: 100%;
    background: #f5f0e8;
}
main {
    width: 100%;
    min-height: 100vh;
    background: url('background.png') center center / cover no-repeat fixed;
}

.page {
    width: min(92vw, 1180px);
    margin: 0 auto;
    padding: clamp(2.5rem, 8vh, 6rem) 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero {
    text-align: center;
    color: #18252b;
    white-space: nowrap;
}

.title {
    margin: 0;
    font-family: "Times New Roman", Georgia,   serif;
    font-size: clamp(4rem, 7vw, 7rem);
    font-weight: 400;
    line-height: 0.95;
}

.subtitle {
    margin: 1.25rem 0 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(0.7rem, 1.15vw, 1rem);
    font-weight: 400;
    letter-spacing: 0.05em;
    color: #596064;
}

/* Heading over the list of every page on the site. */
.pages-heading {
    margin: clamp(2.5rem, 6vh, 4rem) 0 1.5rem;
    font-family: "Times New Roman", Georgia, serif;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 400;
    text-align: center;
    color: #18252b;
}

/* The one line that says what this site is - pinned to the bottom of the page. */
.tagline {
    width: min(92vw, 40rem);
    margin: 4.5rem 0 0;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    line-height: 1.4;
    color: #18252b;
}

@media (max-aspect-ratio: 1/1) {
    main { background-size: auto 100%; background-position: center; }
    .hero { width: min(94vw, 100%); }
    .title { white-space: nowrap; }
    .subtitle {
        white-space: normal;
        line-height: 1.4;
        margin: 1.25rem auto 0;
        max-width: 100%;
    }
}

/* ---- Homepage links to every page (data lives in pages-data.js) ---- */

.links-list { width: 100%; }

[hidden] { display: none !important; }

.links-group { margin-bottom: 2.25rem; }

.links-group__title {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0 0 0.9rem;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #6d7377;
}

.links-group__title::after {
    content: "";
    flex: 1;
    border-top: 1px solid rgba(24, 37, 43, 0.12);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
}

.link-tile {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(24, 37, 43, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.55);
    color: inherit;
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.link-tile:hover,
.link-tile:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(24, 37, 43, 0.35);
    background: #fff;
}

.link-tile__avatar {
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    background: #18252b;
    color: #f5f0e8;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 1rem;
    line-height: 2rem;
    text-align: center;
}

.link-tile__body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.link-tile__title {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
    color: #18252b;
}

.link-tile__desc {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #6f7579;
}

.links-empty {
    margin: 3rem auto;
    max-width: 30rem;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #6f7579;
}

@media (prefers-reduced-motion: reduce) {
    .link-tile { transition: none; }
}

@media (max-width: 420px) {
    .links-grid { grid-template-columns: 1fr; }
}