/* Chapter mini-site landing — matches the site's understated typography-
   driven ethos (light backgrounds, brand color accents, no aggressive
   colour gradients). All colours resolve to brand tokens in brand.css.
   Reference for tone: document_translation.css / home_page.css. */

.ms-page {
    color: rgb(var(--color-dark));
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
}

.ms-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

@media (min-width: 768px) {
    .ms-container { padding: 0 2rem; }
}

/* -------- hero -------- */

.ms-hero {
    position: relative;
    padding: 3rem 0;
    color: rgb(var(--color-light));
    background: rgb(var(--color-dark-blue));
    overflow: hidden;
}

@media (min-width: 768px) {
    .ms-hero { padding: 5rem 0; }
}

.ms-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.ms-hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgb(var(--color-dark-blue) / 0.72) 0%,
        rgb(var(--color-dark-blue) / 0.82) 100%
    );
    z-index: 1;
}

.ms-hero .ms-container {
    position: relative;
    z-index: 2;
}

.ms-hero-inner {
    max-width: 780px;
}

.ms-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgb(var(--color-yellow) / 0.2);
    border: 1px solid rgb(var(--color-yellow) / 0.7);
    color: rgb(var(--color-yellow));
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.ms-hero-name {
    font-family: 'Literata', Georgia, serif;
    font-size: clamp(1.9rem, 4.2vw, 2.85rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 0.85rem;
    color: rgb(var(--color-light));
    text-shadow: 0 2px 12px rgb(var(--color-dark-blue) / 0.5);
}

.ms-hero-legal {
    font-family: 'Literata', Georgia, serif;
    font-size: 1.05rem;
    font-style: italic;
    color: rgb(var(--color-light) / 0.9);
    line-height: 1.5;
    margin: 0 0 1.5rem;
    max-width: 640px;
}

.ms-hero-cta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* Buttons override on the dark hero — primary yellow-tinted, ghost
   white-outline for contrast against the dark scrim. Sits above the
   global .ms-btn-* rules further down. */
.ms-hero .ms-btn-primary {
    background: rgb(var(--color-yellow));
    color: rgb(var(--color-dark-blue));
    border-color: rgb(var(--color-yellow));
}

.ms-hero .ms-btn-primary:hover {
    background: rgb(var(--color-yellow) / 0.88);
    color: rgb(var(--color-dark-blue));
    border-color: rgb(var(--color-yellow) / 0.88);
}

.ms-hero .ms-btn-ghost {
    color: rgb(var(--color-light));
    border-color: rgb(var(--color-light) / 0.5);
}

.ms-hero .ms-btn-ghost:hover {
    background: rgb(var(--color-light) / 0.1);
    color: rgb(var(--color-light));
    border-color: rgb(var(--color-light));
}

/* -------- buttons -------- */

.ms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.35rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    border: 1px solid transparent;
    cursor: pointer;
    line-height: 1.2;
}

.ms-btn:hover { text-decoration: none; }

.ms-btn-primary {
    background: rgb(var(--color-blue));
    color: rgb(var(--color-light));
    border-color: rgb(var(--color-blue));
}

.ms-btn-primary:hover {
    background: rgb(var(--color-dark-blue));
    color: rgb(var(--color-light));
    border-color: rgb(var(--color-dark-blue));
}

.ms-btn-ghost {
    background: transparent;
    color: rgb(var(--color-dark-blue));
    border-color: rgb(var(--color-dark-blue) / 0.35);
}

.ms-btn-ghost:hover {
    background: rgb(var(--color-dark-blue) / 0.05);
    color: rgb(var(--color-dark-blue));
    border-color: rgb(var(--color-dark-blue));
}

/* -------- sections -------- */

.ms-section {
    padding: 3rem 0;
}

.ms-section-alt {
    background: rgb(var(--color-seasalt));
}

@media (min-width: 768px) {
    .ms-section { padding: 4rem 0; }
}

.ms-h2 {
    font-family: 'Literata', Georgia, serif;
    font-size: clamp(1.4rem, 2.6vw, 1.8rem);
    font-weight: 700;
    color: rgb(var(--color-dark-blue));
    margin: 0 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgb(var(--color-yellow));
    display: inline-block;
}

.ms-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.ms-section-head .ms-h2 { margin-bottom: 0; }

.ms-count {
    font-size: 0.9rem;
    color: rgb(var(--color-dark) / 0.55);
}

.ms-see-all {
    font-size: 0.9rem;
    color: rgb(var(--color-blue));
    font-weight: 600;
    text-decoration: none;
}

.ms-see-all:hover { text-decoration: underline; }

.ms-prose {
    font-size: 1.02rem;
    line-height: 1.7;
    max-width: 780px;
    color: rgb(var(--color-dark) / 0.9);
}

.ms-prose p { margin: 0 0 1rem; }

.ms-empty {
    font-style: italic;
    color: rgb(var(--color-dark) / 0.55);
}

/* -------- contact section -------- */

.ms-contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}

@media (min-width: 900px) {
    .ms-contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

.ms-chair {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.15rem;
    background: rgb(var(--color-light));
    border: 1px solid rgb(var(--color-dark-blue) / 0.12);
    border-radius: 10px;
    margin: 0 0 1.5rem;
}

.ms-chair-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgb(var(--color-blue) / 0.1);
    color: rgb(var(--color-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.05rem;
    flex-shrink: 0;
    font-family: 'Literata', Georgia, serif;
    border: 1px solid rgb(var(--color-blue) / 0.2);
}

.ms-chair-name {
    font-weight: 600;
    color: rgb(var(--color-dark-blue));
    font-size: 1rem;
    line-height: 1.3;
}

.ms-chair-role {
    color: rgb(var(--color-dark) / 0.6);
    font-size: 0.88rem;
    line-height: 1.5;
    margin-top: 0.15rem;
}

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

.ms-contact-list li {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 0.75rem;
    align-items: baseline;
    font-size: 0.95rem;
    line-height: 1.45;
}

.ms-contact-label {
    font-weight: 600;
    color: rgb(var(--color-dark) / 0.55);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ms-contact-list a {
    color: rgb(var(--color-blue));
    word-break: break-word;
    text-decoration: none;
}

.ms-contact-list a:hover { text-decoration: underline; }

/* -------- contact form -------- */

.ms-form-card {
    background: rgb(var(--color-light));
    border: 1px solid rgb(var(--color-dark-blue) / 0.12);
    border-radius: 12px;
    padding: 1.6rem;
}

.ms-form-title {
    font-family: 'Literata', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: rgb(var(--color-dark-blue));
    margin: 0 0 1.1rem;
}

.ms-form { display: grid; gap: 0.95rem; }

.ms-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.ms-form-field > span {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgb(var(--color-dark) / 0.7);
}

.ms-form-field input,
.ms-form-field textarea {
    font-family: 'Roboto', sans-serif;
    font-size: 0.98rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid rgb(var(--color-dark-blue) / 0.2);
    border-radius: 8px;
    background: rgb(var(--color-light));
    color: rgb(var(--color-dark));
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ms-form-field input:focus,
.ms-form-field textarea:focus {
    outline: none;
    border-color: rgb(var(--color-blue));
    box-shadow: 0 0 0 3px rgb(var(--color-blue) / 0.15);
}

.ms-form-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
    height: 0;
    width: 0;
}

.ms-form-submit { justify-self: start; }

.ms-form-success {
    padding: 0.9rem 1.1rem;
    background: rgb(var(--color-success) / 0.1);
    border: 1px solid rgb(var(--color-success) / 0.35);
    color: rgb(var(--color-success));
    border-radius: 8px;
    font-weight: 500;
    margin: 0;
}

.ms-form-error {
    padding: 0.7rem 0.95rem;
    background: rgb(var(--color-danger) / 0.08);
    border: 1px solid rgb(var(--color-danger) / 0.3);
    color: rgb(var(--color-danger));
    border-radius: 8px;
    font-size: 0.9rem;
    margin: 0;
}

/* -------- members grid -------- */

.ms-member-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.7rem;
}

.ms-member-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem;
    background: rgb(var(--color-light));
    border: 1px solid rgb(var(--color-dark-blue) / 0.1);
    border-radius: 10px;
    text-decoration: none;
    color: rgb(var(--color-dark));
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    height: 100%;
}

.ms-member-card:hover {
    border-color: rgb(var(--color-dark-blue) / 0.3);
    box-shadow: 0 3px 10px rgba(10, 35, 75, 0.06);
    text-decoration: none;
}

.ms-member-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ms-member-avatar-fallback {
    background: rgb(var(--color-blue) / 0.1);
    color: rgb(var(--color-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: 'Literata', Georgia, serif;
    border: 1px solid rgb(var(--color-blue) / 0.2);
}

.ms-member-name {
    font-size: 0.88rem;
    font-weight: 500;
    color: rgb(var(--color-dark));
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* -------- feed section (news + events) -------- */

.ms-feed-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 900px) {
    .ms-feed-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}
