@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600&display=swap");

/* --------------------------------------------------
   Variables
-------------------------------------------------- */

:root {
    --cream: #f1e8d8;
    --gold: #b48a2b;
    --light-gold: #ddcba9;
    --white: #fffdf8;
    --text: #20201e;
    --black: #111111;
    --max-width: 1640px;
}

/* --------------------------------------------------
   Page base
-------------------------------------------------- */

.genealogy-page {
    width: 100%;
    margin: 0;
    background: var(--cream);
    color: var(--text);
    font-family: "DM Sans", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

.genealogy-page *,
.genealogy-page *::before,
.genealogy-page *::after {
    box-sizing: border-box;
}

.genealogy-page h1,
.genealogy-page h2,
.genealogy-page h3,
.genealogy-page p {
    margin-top: 0;
}

.genealogy-page h1,
.genealogy-page h2,
.genealogy-page h3 {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 500;
}

.genealogy-page a {
    color: inherit;
    text-decoration: none;
}

/* --------------------------------------------------
   Shared alignment container
--------------------------------------------------

   The hero text, contact card, and research content
   all use the same left and right boundaries.
-------------------------------------------------- */

.hero-content,
.content-section {
    width: min(calc(100% - 15.2vw), var(--max-width));
    margin-left: auto;
    margin-right: auto;
}

/* --------------------------------------------------
   Hero
-------------------------------------------------- */

.hero {
    position: relative;
    min-height: 414px;
    padding: 56px 0;
    display: flex;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
    background-color: var(--black);
    color: var(--white);
}

/* Grayscale hero background image */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;

    background-image: url("../images/genealogy-records.png");
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;

    filter: grayscale(100%);
    transform: scale(1.01);
}

/* Dark overlay on top of the image */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;

    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.9) 0%,
            rgba(0, 0, 0, 0.7) 45%,
            rgba(0, 0, 0, 0.48) 100%
        );
}

/* Hero text container */
.hero-content {
    position: relative;
    z-index: 1;
    text-align: left;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 44px;
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.7px;
    line-height: 1.4;
    text-transform: uppercase;
}
.genealogy-page .breadcrumbs a {
    color: var(--white);
    text-decoration: none;
    transition: color 180ms ease;
}

.genealogy-page .breadcrumbs a:hover,
.genealogy-page .breadcrumbs a:focus-visible {
    color: var(--gold);
}

/* Small gold heading above main title */
.eyebrow {
    margin-bottom: 12px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.7px;
    line-height: 1.3;
    text-transform: uppercase;
}

/* Main hero heading */
.hero h1 {
    max-width: 520px;
    margin-bottom: 0;
    color: var(--white);
    font-size: clamp(58px, 6vw, 86px);
    line-height: 0.88;
    letter-spacing: -3px;
}

/* Hero description */
.hero-description {
    max-width: 530px;
    margin: 24px 0 0;
    color: var(--white);
    font-size: 16px;
    line-height: 1.55;
}

/* --------------------------------------------------
   Main section below hero
-------------------------------------------------- */

.content-section {
    padding-top: 92px;
    padding-bottom: 125px;
}

/*
   Desktop layout:

   Left column: contact card
   Right column: research records
*/
.research-grid {
    display: grid;
    grid-template-columns: minmax(180px, 27%) minmax(0, 1fr);
    column-gap: 7.5vw;
    align-items: start;
}

/* Prevent grid content from overflowing */
.records {
    min-width: 0;
}

/* --------------------------------------------------
   Contact card
-------------------------------------------------- */

.contact-card {
    grid-column: 1;
    padding-top: 15px;
    border-top: 2px solid var(--light-gold);
    color: var(--text);
    font-size: 14px;
}

.contact-title {
    margin-bottom: 14px;
    color: #90702d;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    line-height: 1.4;
    text-transform: uppercase;
}

.contact-card p {
    margin: 0 0 18px;
}

.contact-card p:last-child {
    margin-bottom: 0;
}

.phone {
    color: #997529;
    font-weight: 700;
}

/* --------------------------------------------------
   Available research records
-------------------------------------------------- */

.records h2,
.assistance h2 {
    margin-bottom: 0;
    color: var(--text);
    font-size: clamp(42px, 4vw, 55px);
    line-height: 1;
    letter-spacing: -2px;
}

/*
   The records remain in two columns on desktop.
*/
.record-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px;
    margin-top: 18px;
}

.record-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.record-list li {
    padding: 13px 0;
    border-top: 1px solid var(--light-gold);
    font-size: 14px;
    line-height: 1.45;
}

/* --------------------------------------------------
   Research assistance
-------------------------------------------------- */

.assistance {
    width: 100%;
    max-width: none;
    margin: 48px 0 0;
    padding: 26px 0 0;
    border-top: 1px solid var(--light-gold);
}

.assistance h2 {
    margin: 0;
    text-align: left;
}

.assistance p {
    width: 100%;
    margin: 18px 0 0;
    text-align: left;
}
/* --------------------------------------------------
   Tablet layout
-------------------------------------------------- */

@media (max-width: 1000px) {
    .research-grid {
        grid-template-columns: minmax(170px, 25%) minmax(0, 1fr);
        column-gap: 5vw;
    }

    .record-columns {
        gap: 24px;
    }

    .records h2,
    .assistance h2 {
        font-size: clamp(38px, 5vw, 50px);
    }
}

/* --------------------------------------------------
   Mobile layout
-------------------------------------------------- */

@media (max-width: 850px) {
    .hero {
        min-height: auto;
        padding: 52px 0 60px;
    }

    .hero-content,
    .content-section {
        width: calc(100% - 14vw);
    }

    .hero h1 {
        font-size: clamp(54px, 10vw, 76px);
        letter-spacing: -2.5px;
    }

    .content-section {
        padding-top: 70px;
        padding-bottom: 85px;
    }

    /*
       On mobile, stack the contact card above the records.
    */
    .research-grid {
        display: grid;
        grid-template-columns: 1fr;
        row-gap: 45px;
    }

    .contact-card,
    .records {
        grid-column: 1;
    }

    .contact-card {
        max-width: 280px;
    }

    .assistance {
        margin-left: 0;
    }
}

/* --------------------------------------------------
   Small mobile screens
-------------------------------------------------- */

@media (max-width: 560px) {
    .hero {
        padding: 44px 0 52px;
    }

    .hero-content,
    .content-section {
        width: calc(100% - 12vw);
    }

    .breadcrumbs {
        margin-bottom: 34px;
        font-size: 10px;
    }

    .hero h1 {
        font-size: 54px;
        letter-spacing: -2px;
    }

    .hero-description {
        font-size: 15px;
    }

    .record-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .records h2,
    .assistance h2 {
        font-size: 42px;
        letter-spacing: -1.5px;
    }

    .assistance {
        margin-top: 42px;
    }
}
