/* Base page setup */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif;
    color: var(--text-main);
}

body {
    display: flex;
    flex-direction: column;
    background-color: var(--brand-primary-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#pageContainer {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* ensures page fills viewport */
}

main {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    min-height: 0; /* important for Safari */
}

/* Header & error */
header {
    padding: 20px 40px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--brand-divider);
    display: flex;
    justify-content: space-between;
}

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

/* Main content */
.main-content {
    padding: 40px;
    max-width: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
}

h1 {
    font-size: 2.5rem;
    font-weight: 500;
    margin: 0 0 20px 0;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.description {
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Footer */
footer {
    background-color: var(--brand-secondary-bg);
    padding: 40px 20px;
    font-size: 0.9rem;
    line-height: 1.6;
    border-top: 1px solid var(--brand-divider);
}

footer .container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 equal columns for the 3 content sections */
    gap: 20px;
}

footer section:first-child {
    grid-column: 1 / -1; /* spans all columns */
    border-bottom: 1px solid var(--brand-divider);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

footer section:first-child h2 {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
    padding-bottom: 5px; /* small space above the separator line */
}

footer section:not(:first-child) {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.6;
}

footer section p {
    margin: 0;
    margin-bottom: 5px; /* spacing between lines */
}

/* Responsive */
@media (max-width: 768px) {
    footer .container {
        grid-template-columns: 1fr; /* stack sections on mobile */
    }

    footer section:first-child {
        grid-column: auto;
        margin-bottom: 15px;
        border-bottom: none;
    }
}
