/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hanken Grotesk', sans-serif;
    background-color: #fafaf8;
    color: #111827;
}

/* Homepage Container */
.homepage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 2rem;
    min-height: 100vh;
    min-width: 62.5vw;
    max-width: 100rem;
    margin: 0 auto;
}

/* Nav Spacer */
.nav {
    background-color: white;
    height: 1rem;
    opacity: 0;
    width: 100%;
    flex-shrink: 0;
}

/* Hero Section */
.hero {
    height: auto;
    position: relative;
    width: 100%;
    flex-shrink: 0;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 50px 100px 0 100px;
    height: 100%;
    width: 100%;
}

.hero-title-container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 20px;
    position: relative;
    width: 100%;
    margin-bottom: 2rem;

}

.hero-title {
    flex-shrink: 0;
    width: fit-content;
    white-space: normal;
    color: #111827;
}

.title-sans {
    font-family: 'Hanken Grotesk', sans-serif;
    font-weight: 900;
    font-size: 128px;
    line-height: 100px;
    letter-spacing: -6.4px;
}

.title-serif {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-style: italic;
    font-size: 140px;
    line-height: 125px;
    letter-spacing: -7px;
}

.title-strikethrough {
    text-decoration: line-through;
    text-decoration-skip-ink: none;
}

.dot-grid-container {
    flex-grow: 1;
    position: relative;
    /* height: auto; */
    /* margin-top: 10px; */
    max-width: 70%;
    /* min-width: 450px; */
    -webkit-mask-image:
        linear-gradient(to right, transparent 0%, black 15%, black 92%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    -webkit-mask-composite: destination-in;
    mask-image:
        linear-gradient(to right, transparent 0%, black 15%, black 92%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-composite: intersect;
}

.dot-grid-container canvas {
    display: block;
}

.hero-text-wrapper {
    display: flex;
    align-items: flex-start;
    position: relative;
    flex-shrink: 0;
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 45px;
    align-items: flex-start;
    position: relative;
    flex-shrink: 0;
    width: 65%;
    min-width: 30rem;
}

.hero-description {
    font-family: 'Hanken Grotesk', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: normal;
    color: #111827;
    width: 100%;
    white-space: pre-wrap;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 5rem;
    border: none;
    border-radius: 5px;
    font-family: 'Hanken Grotesk', sans-serif;
    font-weight: 400;
    font-size: 24px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #8c4009;
    color: #fafaf8;
}

.btn-primary:hover {
    background-color: #683107;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid #111827;
    color: #111827;
}

.btn-secondary:hover {
    background-color: #dddddd;
}

/* Authors Section */
.authors {
    background-color: white;
    border: 2px solid #8c4009;
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 75px;
    justify-content: center;
    padding: 25px 75px;
}

.author {
    text-align: center;
    flex: 1;
    /* min-width: 150px; */
}

.author-name {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    font-size: 24px;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
}

.author-email {
    font-family: 'Hanken Grotesk', sans-serif;
    font-weight: 300;
    font-size: 16px;
}

.author:nth-child(4) {
    position: relative;
}

.author:nth-child(4)::after {
    content: '';
    position: absolute;
    right: -37px;
    /* half of the 75px gap */
    top: 0;
    height: 100%;
    width: 1px;
    background-color: #8c4009;
}

/* Content Sections */
.content-section {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 50px 200px;
}

.section-title {
    font-family: 'Hanken Grotesk', sans-serif;
    font-weight: 500;
    font-size: 48px;
    line-height: normal;
    color: black;
    width: 100%;
    white-space: pre-wrap;
}

.section-title-center {
    text-align: center;
}

.section-two-column {
    display: flex;
    gap: 150px;
    align-items: flex-start;
    justify-content: center;
    line-height: normal;
    color: black;
    width: 100%;
    flex-shrink: 1;
}

.section-title-vertical {
    font-family: 'Hanken Grotesk', sans-serif;
    font-weight: 500;
    font-size: 48px;
    flex-shrink: 0;
    white-space: nowrap;
}

.section-title-vertical p {
    margin: 0;
}

.section-text {
    flex: 1 0 0;
    min-height: 1px;
    min-width: 1px;
    font-family: 'Castoro', serif;
    font-weight: 400;
    font-size: 16px;
    white-space: pre-wrap;
}

.section-text-full {
    display: flex;
    flex-direction: column;
    width: 100%;
    font-family: 'Castoro', serif;
    font-weight: 400;
    font-size: 16px;
    line-height: normal;
    color: black;
    white-space: pre-wrap;
}

.section-text-full p {
    margin: 0;
}

.section-text-full p.section-text-equation {
    margin: 0.75em 0;
    text-align: center;
}

.section-text-image-row {
    display: flex;
    gap: 50px;
    align-items: flex-start;
    width: 100%;
}

.section-text-image-row .section-text-full {
    flex: 1;
}

.section-image {
    width: 300px;
    height: auto;
    flex-shrink: 0;
}

.callout {
    background-color: #f0f0f0;
    border-left: 4px solid #8c4009;
    padding: 15px 20px;
    font-family: 'Hanken Grotesk', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: normal;
    color: black;
    width: 100%;
}

/* Window Boxes */
.window-box {
    background-color: white;
    border: 2px solid #8c4009;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 25px 75px;
    position: relative;
    flex-shrink: 0;
    width: 60%;
    margin: 0 auto;
}

.window-inline {
    flex: 1 0 0;
    min-height: 1px;
    min-width: 1px;
}

.window-title {
    font-family: 'Hanken Grotesk', sans-serif;
    font-weight: 500;
    font-size: 32px;
    line-height: normal;
    color: black;
    text-align: center;
    width: 100%;
    padding-bottom: 1rem;
}

.window-content {
    display: flex;
    flex-direction: row;
    /* Keep them side-by-side */
    gap: 20px;
    width: 100%;
    align-items: flex-start;
    overflow: hidden;
    /* Prevents children from spilling out */
}

.window-content-vertical {
    display: flex;
    flex-direction: row;
    gap: 26px;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
}

.window-text {
    flex: 1; 
    min-width: 0; 
    font-family: 'Hanken Grotesk', sans-serif;
    line-height: 1.6;
    padding-left: 1rem;
}

.window-text-vertical {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: black;
    flex-shrink: 0;
    white-space: normal;
    flex: 0 1 auto;
    max-width: 256px;
}

.window-text-vertical p {
    margin: 0;
}

.batch-charts-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex-shrink: 0;
    max-width: 100%;
}

.batch-charts-stack svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Placeholder Images */
.placeholder-image {
    background-color: #d9d9d9;
    display: flex;
    height: 300px;
    width: 400px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.placeholder-image p {
    font-family: 'Playfair Display', serif;
    font-weight: 500;
    font-size: 24px;
    line-height: normal;
    color: black;
    text-align: center;
}

.placeholder-image-small {
    background-color: #d9d9d9;
    height: 200px;
    width: 300px;
    flex-shrink: 0;
}

.interactive-plot-wrapper {
    background-color: #fafaf8;
    border: 1px solid #d9d9d9;
    border-radius: 5px;
    padding: 15px;
    width: 100%;
    max-width: 450px;
    flex-shrink: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.plot-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 14px;
}

.control-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-group input[type="range"] {
    width: 60%;
}

.status-indicator {
    padding-top: 5px;
    font-size: 14px;
    font-weight: 500;
}

.image-grid-3 {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.plot-column {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 12px;
    align-items: center;
    flex: 1;
    min-width: 280px;
    max-width: 380px;
}

.plot-column img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.adam-visuals {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    flex-shrink: 0;
}

.adam-plot-row {
    width: 100%;
    max-width: 1200px;
    height: 360px;
    min-height: 280px;
    max-height: 85vh;
    padding: 12px 16px;
    border: 2px solid #8c4009;
    border-radius: 10px;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    overflow: hidden;
}

.adam-plot-row .adam-row-iframe {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
    display: block;
    flex: 1 1 auto;
}

.image-stack {
    height: 417px;
    width: 300px;
    position: relative;
    flex-shrink: 0;
}

.image-stack .placeholder-image-small:first-child {
    position: absolute;
    left: 0;
    top: 0;
}

.image-stack .placeholder-image-small:last-child {
    position: absolute;
    left: 0;
    top: 215px;
}

.reference {
    margin-bottom: 1.5em;
    padding-left: 2em;
    text-indent: -2em;
    line-height: 1.6;
}

/* Footer */
.footer {
    background-color: #8c4009;
    display: flex;
    height: 8rem;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    width: 100%;
    flex-shrink: 0;
}

.footer p {
    font-family: 'Hanken Grotesk', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: normal;
    color: #fafaf8;
    text-align: center;
    width: 568px;
    white-space: pre-wrap;
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(64px) scale(0.98);
    filter: blur(6px);
    transition:
        opacity 950ms ease,
        transform 950ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 950ms ease;
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform, filter;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
    }
}

@media (max-width: 1500px) {
        .window-content {
        flex-direction: column;
        align-items: center;
    }
}

/* Tablet: slightly smaller plot rows so they don't dominate or clip */
@media (max-width: 1024px) {
    .adam-plot-row {
        height: 320px;
        min-height: 260px;
        max-height: 70vh;
        padding: 12px 14px;
    }
}

@media (max-width: 768px) {
    .homepage {
        width: 100vw;
    }

    /*****************************
        Hero 
    *****************************/
    .hero-content {
        padding: 25px 50px;
    }
    .hero-title-container {
        flex-direction: column;
        align-items: center;
    }
    .title-sans {
        font-size: 80px;
        line-height: 40px;
        letter-spacing: -2.4px;
    }
    .title-serif {
        font-size: 96px;
        line-height: 50px;
        letter-spacing: -2.8px;
    }
    .hero-text {
        width: 100%;
        min-width: auto;
        align-items: center;
    }
    .dot-grid-container {
        margin-top: 20px;
        max-width: 120%;
    }
    .button-group {
        flex-direction: column;
        gap: 1rem;
    }
    .btn {
        padding: 0.6rem 4rem;
        font-size: 18px;
        width: 100%;
    }

    /*****************************
        Authors 
    *****************************/
    .authors{
        width: 100%;
        padding: 2rem;
    }
    .author:nth-child(4)::after {
        display: none;
    }


    /*****************************
        Content Sections 
    *****************************/
    .content-section {
        padding: 25px 50px;
    }
    .section-two-column {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .section-title-vertical {
        font-size: 36px;
        white-space: normal;
        text-align: center;
    }
    .section-text {
        width: 100%;
        flex: 1;
        min-height: auto;
        text-align: center;
    }
    .section-text-image-row {
        flex-direction: column;
        align-items: center;
    }

    .section-image {
        width: 100%;
        max-width: 400px;
    }

    /*****************************
        Window Boxes 
    *****************************/
    .window-box {
        width: 100%;
        padding: 1rem;
    }
    .window-content {
        flex-direction: column;
        align-items: center;
    }
    .window-text {
        width: 100%;
        padding-top: 20px;
    }

    .adam-visuals {
        gap: 16px;
        max-width: 100%;
    }

    .adam-plot-row {
        max-width: 100%;
        height: 300px;
        min-height: 260px;
        max-height: 55vh;
        padding: 10px 12px;
    }

    .adam-plot-row .adam-row-iframe {
        min-height: 0;
    }

    .interactive-plot-wrapper {
        max-width: 100%;
    }



}