/* "Introducing Altigrid": a one-off post, unlike the other blog posts (design-refs/intro.png).
   A full-screen opening photo with a large white title and the byline near its bottom, centered, after
   design-refs/Introblog.png. The article below it is the same as every other post (static/blog-post.css). */

:root {
    --intro-text: #ffffff;
    --intro-text-muted: #a3a3a3;
}

.intro-post {
    background-color: #ffffff; /* the article below the photo is on white, like every other post */
    font-family: "Geist", sans-serif;
}

/* Opening panel: the whole first screen at every size, a dark, grainy photo of light beams (after design-refs/Introblog.png),
   the title near its bottom. It runs up behind the header (pulled up by the header's height and its 1px line),
   so the header floats over the photo. */
.intro-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    min-height: 100vh; /* fallback for browsers without svh */
    min-height: 100svh; /* exactly the screen (the header floats over it); the article starts below the fold */
    margin-top: calc(-1 * var(--header-height) - 1px);
    padding: calc(var(--header-height) + 4rem) var(--gutter) clamp(3rem, 2rem + 4vw, 6rem);
    background-color: #000000;
}

.intro-hero__photo {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: 70% 50%; /* on narrow screens, keep the beams in view */
}

/* Shade: darker at the top for the header, and toward the bottom for the title */
.intro-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0) 22%),
        linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.15) 60%, rgba(0, 0, 0, 0));
}

/* The header over the photo: no white bar, white logo and links, white buttons. static/intro-post.js adds
   .is-over while the photo is behind it; scrolled past, or with a dropdown or the menu open, it's the usual
   white bar. */
body:not(.menu-open) .site-header.is-over:not(:has(.nav-dropdown__panel.is-open)) {
    background-color: transparent;
    border-bottom-color: transparent;
}

.site-header__logo img {
    transition: filter 0.3s ease;
}

body:not(.menu-open) .site-header.is-over:not(:has(.nav-dropdown__panel.is-open)) .site-header__logo img {
    filter: invert(1);
}

body:not(.menu-open) .site-header.is-over:not(:has(.nav-dropdown__panel.is-open)) .site-nav__link {
    color: #ffffff;
}

@media (hover: hover) and (pointer: fine) {
    body:not(.menu-open) .site-header.is-over:not(:has(.nav-dropdown__panel.is-open)) .site-nav__link:hover {
        color: rgba(255, 255, 255, 0.65);
    }
}

body:not(.menu-open) .site-header.is-over:not(:has(.nav-dropdown__panel.is-open)) .header-btn--outline {
    --btn-fill: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.45);
    color: #ffffff;
}

@media (min-width: 1024px) {
    body:not(.menu-open) .site-header.is-over:not(:has(.nav-dropdown__panel.is-open)) .header-btn--solid {
        --btn-fill: #e8e8e8;
        background-color: #ffffff;
        color: #000000;
    }
}

.intro-hero__title {
    max-width: 14ch;
    margin: 0;
    color: var(--intro-text);
    font-size: clamp(2.75rem, 1.519rem + 5.047vw, 4.75rem); /* 76px from 1024px; scales down to 44px on phones */
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.04em;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.intro-hero__meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    margin: clamp(1.5rem, 1rem + 2vw, 2.5rem) 0 0;
    color: var(--intro-text-muted);
    font-size: 0.875rem; /* 14px, all grey */
    line-height: 1.5;
}

/* Two lines at every size: the names and role, then the date. The names line never wraps; on small phones it
   shrinks just enough to fit (12px at 360px, 14px from about 410px) and may use half of the side gutter. */
.intro-hero__byline,
.intro-hero__meta time {
    white-space: nowrap;
}

@media (max-width: 639.98px) {
    .intro-hero__meta {
        margin-left: calc(var(--gutter) / -2);
        margin-right: calc(var(--gutter) / -2);
        font-size: clamp(0.75rem, (100vw - var(--gutter)) / 28.6, 0.875rem);
    }
}
