* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #53463b;
    color: #fff8eb;
    font-family: "IM Fell English",Georgia,serif;
}

a {
    color: inherit;
    text-underline-offset: 5px;
}

.scene {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(24px,5vw,85px);
    overflow: hidden;
}

.media,.shade {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.media {
    background: url("../images/adirondack-mendocino.jpg")  center center/cover no-repeat;
}

.shade {
    background: linear-gradient(90deg,transparent 25%,rgba(24,22,18,.27) 100%),linear-gradient(0deg,rgba(20,16,12,.57),transparent 25%,transparent 80%,rgba(20,16,12,.35));
}

header,footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

header {
    font: 400 12px/1.5 "IM Fell English",Georgia,serif;
    letter-spacing: .3em;
    text-transform: uppercase;
    padding-bottom: 18px;
}

main {
    align-self: flex-end;
    width: min(52%,780px);
    padding: 48px 0;
    text-shadow: 0 2px 22px #241b1266;
}

h1 {
    font-size: clamp(48px,7.8vw,144px);
    font-weight: 400;
    line-height: .91;
    letter-spacing: -.06em;
    margin: 0 0 30px;
}

h2 {
    font-size: clamp(23px,3vw,48px);
    font-weight: 400;
    font-style: italic;
    margin: 0 0 18px;
}

p {
    font-size: clamp(16px,1.45vw,23px);
    line-height: 1.55;
    max-width: 38ch;
    margin: 0;
}

footer {
    padding-top: 20px;
    font-size: clamp(14px,1.3vw,20px);
}

footer div:last-child {
    text-align: right;
}

small {
    display: block;
    font: 10px/1.8 "IM Fell English",Georgia,serif;
    letter-spacing: .15em;
    text-transform: uppercase;
    margin-top: 8px;
}

@media (max-width:700px) {
    .media {
        background-position: 34% center;
    }

    .shade {
        background: linear-gradient(180deg,#20170f55,transparent 23%,#20170f15 30%,#20170fb0 75%,#20170fd0);
    }

    main {
        align-self: stretch;
        width: 100%;
        margin-top: 24vh;
        padding: 24px 0;
    }

    header {
        font-size: 9px;
        letter-spacing: .18em;
    }

    footer {
        align-items: flex-start;
        gap: 15px;
    }

    footer div:first-child {
        max-width: 48%;
    }

    h1 {
        font-size: clamp(48px,12vw,80px);
    }
}

@media (min-width:701px) {
    html,body {
        height: 100%;
        margin: 0;
        overflow: hidden;
    }

    .scene {
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        padding: clamp(20px,5vh,85px) clamp(24px,5vw,85px);
    }

    main {
        padding: clamp(8px,3vh,48px) 0;
        min-height: 0;
    }

    h1 {
        font-size: clamp(36px,min(7.8vw,15vh),144px);
        margin-bottom: clamp(8px,3vh,30px);
    }

    h2 {
        font-size: clamp(19px,min(3vw,5vh),48px);
        margin-bottom: clamp(5px,2vh,18px);
    }

    header {
        padding-bottom: clamp(4px,2vh,18px);
    }

    footer {
        padding-top: clamp(4px,2vh,20px);
    }
}

/* The still image remains visible until the video is ready. */
.media video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.ocean-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    margin-top: 6px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-style: italic;
    cursor: pointer;
    text-shadow: 0 1px 5px #241b12;
}

.ocean-toggle:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.ocean-toggle:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 5px;
}

.ocean-toggle svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.ocean-toggle[aria-pressed="true"] .muted-mark {
    display: none;
}

.ocean-toggle[aria-pressed="false"] .sound-waves {
    display: none;
}

@media (max-width: 700px) {
    .media video {
        object-position: 34% center;
    }
}

.ocean-toggle[hidden] {
    display: none;
}
