:root {
    --nav-accent: #14146d;
    --nav-text: #5e6373;
    --nav-surface: #ffffff;
    --nav-border: #e8eaf0;
}

body {
    margin: 0;
    background-color: var(--nav-surface);
    font-family: "Segoe UI", Arial, sans-serif;
}

.site-header {
    background-color: var(--nav-surface);
    border-bottom: 1px solid var(--nav-border);
}

.navbar {
    box-sizing: border-box;
    max-width: 1120px;
    margin-inline: auto;
    padding: 6px 20px;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--nav-accent);
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.035em;
    text-decoration: none;
}

.navbar-brand:focus-visible {
    outline: 2px solid var(--nav-accent);
    outline-offset: 2px;
}

.hero {
    position: relative;
    isolation: isolate;
    display: grid;
    align-items: end;
    box-sizing: border-box;
    min-height: clamp(410px, 66svh, 600px);
    overflow: hidden;
    background-color: #101426;
    color: #fff;
}

.hero-image,
.hero::after {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-image {
    z-index: -2;
    object-fit: cover;
    object-position: 27% 48%;
}

.hero::after {
    z-index: -1;
    content: "";
    background: linear-gradient(180deg, rgb(10 13 25 / 32%) 0%, rgb(10 13 25 / 74%) 52%, #0a0d19 100%);
}

.hero-content {
    box-sizing: border-box;
    width: min(100%, 1120px);
    margin-inline: auto;
    padding: 144px 20px 36px;
}

.hero-content h1 {
    max-width: 29ch;
    margin: 0;
    font-size: clamp(1.5rem, 5.7vw, 3rem);
    line-height: 1.12;
    letter-spacing: -0.025em;
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.hero-updates {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin-top: 12px;
    color: #f6e1cb;
    font-size: 1rem;
    font-weight: 600;
    text-underline-offset: 4px;
}

.hero-updates:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

@media (min-width: 768px) {
    .navbar {
        padding-inline: 32px;
    }

    .hero-image {
        object-position: center 45%;
    }

    .hero::after {
        background:
            linear-gradient(90deg, rgb(10 13 25 / 88%), transparent 92%),
            linear-gradient(0deg, #0a0d19, rgb(10 13 25 / 20%) 90%);
    }

    .hero-content {
        padding: 120px 32px 56px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }

    .hero-image {
        animation: hero-photo 1.5s ease-out both;
    }

    .hero-content {
        animation: hero-entrance 650ms ease-out both;
    }
}

@keyframes hero-photo {
    from { transform: scale(1.045); }
    to { transform: scale(1); }
}

@keyframes hero-entrance {
    from {
        opacity: 0.6;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.updates {
    background: #f6f7fa;
}

.day-update {
    box-sizing: border-box;
    width: min(100%, 1120px);
    margin-inline: auto;
    padding: clamp(40px, 7vw, 80px) clamp(16px, 4vw, 32px);
}

.day-update + .day-update {
    border-top: 1px solid var(--nav-border);
}

.day-heading {
    margin-block-end: clamp(20px, 4vw, 36px);
    padding-inline-start: 14px;
    border-inline-start: 3px solid #c26a29;
}

.day-date {
    margin: 0 0 6px;
    color: var(--nav-text);
    font-size: 0.875rem;
    font-weight: 600;
}

.day-update h2 {
    margin: 0;
    color: var(--nav-accent);
    font-size: clamp(1.875rem, 5vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.day-heading-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}

.before-video-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding-inline: 14px;
    border: 1px solid currentColor;
    border-radius: 6px;
    color: var(--nav-accent);
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
}

.before-video-link:hover {
    background-color: var(--nav-accent);
    color: #fff;
}

.before-video-link:focus-visible {
    outline: 2px solid var(--nav-accent);
    outline-offset: 3px;
}

.play-mark {
    border-block: 5px solid transparent;
    border-inline-start: 8px solid currentColor;
}

.photo-grid,
.photo-details {
    display: grid;
    gap: clamp(8px, 1.6vw, 16px);
}

.photo-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.day-feature {
    margin: 0;
    border-radius: 12px;
    background-color: #101426;
}

.photo-link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    background-color: #101426;
    aspect-ratio: 4 / 5;
}

.day-feature .photo-link {
    border-radius: 12px 12px 0 0;
    aspect-ratio: 9 / 16;
}

.photo-grid > .day-feature:only-child {
    grid-column: 1 / -1;
}

.day-feature .photo-wide {
    aspect-ratio: 16 / 9;
}

.photo-wide {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
}

.photo-link img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-link:focus-visible {
    z-index: 1;
    outline: 3px solid var(--nav-accent);
    outline-offset: 3px;
}

.photo-expand {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgb(255 255 255 / 45%);
    border-radius: 50%;
    background: rgb(16 20 38 / 84%);
    color: #fff;
}

.day-feature figcaption {
    padding: 14px 16px 16px;
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
}

.site-footer {
    border-top: 1px solid var(--nav-border);
}

.footer-content {
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
    max-width: 1120px;
    margin-inline: auto;
    padding: 12px clamp(16px, 4vw, 32px);
    color: var(--nav-text);
    font-size: 0.875rem;
}

.footer-content a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--nav-accent);
    text-underline-offset: 4px;
}

.media-viewer {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    height: 100%;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: #0a0d19;
    color: #fff;
}

body:has(.media-viewer[open]) {
    overflow: hidden;
}

.viewer-layout {
    box-sizing: border-box;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 12px;
    max-width: 1400px;
    height: 100%;
    margin-inline: auto;
    padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
        max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.viewer-header,
.viewer-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.viewer-header {
    font-weight: 600;
}

.viewer-stage {
    min-width: 0;
}

.viewer-image,
.viewer-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-viewer .viewer-layout {
    grid-template-rows: auto minmax(0, 1fr);
}

.viewer-button {
    display: grid;
    flex: 0 0 48px;
    place-items: center;
    min-height: 48px;
    padding: 0;
    border: 1px solid #626776;
    border-radius: 50%;
    background: #222737;
    color: #fff;
    font: 1.5rem/1 "Segoe UI", Arial, sans-serif;
    cursor: pointer;
}

.viewer-button:hover {
    background: #363d50;
}

.viewer-button[hidden] {
    display: none;
}

.viewer-button:focus-visible {
    outline: 2px solid #ffbb78;
    outline-offset: 3px;
}

.viewer-status {
    flex: 1;
    margin: 0;
    color: #e0e3eb;
    font-size: 0.875rem;
    text-align: center;
}

@media (min-width: 760px) {
    .photo-grid:not(.photo-grid--stacked) {
        grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    }

    .photo-grid:not(.photo-grid--stacked) .photo-details {
        grid-template-rows: repeat(3, minmax(0, 1fr));
    }

    .photo-grid:not(.photo-grid--stacked) .photo-details .photo-link {
        aspect-ratio: auto;
    }

    .photo-grid--stacked .photo-details {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .photo-link img {
        transition: transform 220ms ease-out;
    }

    .photo-link:hover img {
        transform: scale(1.04);
    }
}
