* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background-color: #000000;
    color: #ffffff;
    font-family: "montserrat", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 28px 200px;
    border-bottom: 1px solid #333333;
}

.site-logo {
    display: flex;
    flex-direction: column;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
}

.site-logo span {
    margin-top: 5px;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 13px;
}

.social-links a {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    color: inherit;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.social-links svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.social-links .social-icon-fill {
    fill: currentColor;
    stroke: none;
}

.social-links a:hover {
    opacity: 0.55;
    transform: translateY(-2px);
}

.site-nav {
    display: flex;
    gap: 28px;
}

.site-nav a {
    font-size: 15px;
}

.site-nav a:hover {
    opacity: 0.55;
}

.site-nav a[aria-current="page"] {
    border-bottom: 1px solid currentColor;
}

main {
    padding: 80px 200px;
}


h1 {
    margin: 0;
    font-size: clamp(42px, 7vw, 90px);
    line-height: 1;
}

main p {
    max-width: 600px;
    margin-top: 20px;
    font-size: 20px;
    line-height: 1.5;
}

.work-section {
    width: 100%;
}

.section-heading {
    margin-bottom: 0px;
}

.section-heading p {
    max-width: 600px;
    margin-top: 20px;
    font-size: 20px;
    line-height: 1.5;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}
.project-grid.random-grid .project-card {
    grid-column: span 2;
}

.project-card.grid-third {
    grid-column: span 2;
}

.project-card.grid-half {
    grid-column: span 3;
}

.project-card {
    min-width: 0;
}

.project-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background-color: #eeeeee;
}

.project-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.82),
        rgba(0, 0, 0, 0.05) 65%
    );
    color: #ffffff;
}

.project-client {
    align-self: flex-start;
    width: max-content;
    max-width: 100%;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition:
        opacity 0.25s ease,
        transform 0.3s ease;
}

.project-overlay h2 {
    align-self: flex-start;
    width: max-content;
    max-width: 100%;
    margin: 0;
    font-size: 20px;
    line-height: 1.1;
    transition:
        opacity 0.25s ease,
        transform 0.3s ease;
}

.project-overlay p {
    margin: 8px 0 0;
    font-size: 15px;
}

.project-hover-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.project-hover-credit {
    width: max-content;
    max-width: 80%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(8px);
    transition:
        max-height 0.3s ease,
        margin-top 0.3s ease,
        opacity 0.25s ease,
        transform 0.3s ease;
}

.project-overlay .project-hover-credit {
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
}

.project-hover-credit-label {
    display: block;
    margin-bottom: 2px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.project-link:hover .project-hover-credit,
.project-link:focus-visible .project-hover-credit {
    max-height: 60px;
    margin-top: 14px;
    text-align: left;
    opacity: 1;
    transform: translateY(0);
}

.project-link:hover .project-hover-director,
.project-link:focus-visible .project-hover-director {
    margin-top: 10px;
}

.project-link:hover img {
    transform: scale(1.03);
}

.project-page {
    max-width: 1500px;
    margin: 0 auto;
}

.back-link {
    display: inline-block;
    margin-bottom: 28px;
    font-size: 14px;
}

.back-link:hover {
    opacity: 0.55;
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #000000;
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.project-details {
     display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
    align-items: center;
    gap: 60px;
    padding-top: 35px;
}

.project-details h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 76px);
}

.project-category {
    display: none;
    grid-column: 1 / -1;
    margin: 0 0 -35px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.project-credits {
    padding-top: 0px;
}

.project-credits p {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.5;
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 35px;
}

.work-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0;
}

.randomized-reel-button {
    flex-shrink: 0;
}


.filter-button {
    padding: 10px 16px;
    border: 1px solid #555555;
    border-radius: 100px;
    background: transparent;
    color: #ffffff;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.filter-button:hover {
    background-color: #222222;
}

.filter-button.active {
    border-color: #ffffff;
    background-color: #ffffff;
    color: #000000;
}

.about-page {
    max-width: 1400px;
    margin: 0 auto;
}

.about-intro {
    display: grid;
    grid-template-columns: minmax(240px, 38%) minmax(0, 1fr);
    align-items: start;
    gap: 60px;
}

.about-image {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background-color: #eeeeee;
}

.about-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-copy {
    min-width: 0;
    max-width: 700px;
}
.eyebrow {
    margin: 0 0 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.about-copy h1 {
    margin-bottom: 35px;
}

.about-copy p {
    margin: 0 0 24px;
    font-size: 18px;
    line-height: 1.65;
}

.about-copy .about-lead {
    font-size: clamp(23px, 3vw, 34px);
    line-height: 1.35;
}

.text-link {
    display: inline-block;
    margin-top: 12px;
    padding-bottom: 4px;
    border-bottom: 1px solid currentColor;
    font-size: 16px;
}

.text-link:hover {
    opacity: 0.55;
}

.contact-page {
    max-width: 1500px;
    margin: 0 auto;
}

.contact-intro {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(400px, 1.2fr);
    gap: clamp(50px, 8vw, 120px);
    align-items: start;
}

.contact-heading {
    max-width: 600px;
}

.contact-heading h1 {
    margin-bottom: 28px;
}

.contact-heading > p:not(.eyebrow) {
    margin: 0;
    font-size: 19px;
    line-height: 1.6;
}

.contact-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.form-field-full {
    grid-column: 1 / -1;
}

.form-field label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 14px 0;
    border: 0;
    border-bottom: 1px solid #666666;
    border-radius: 0;
    background: transparent;
    color: #ffffff;
    font: inherit;
}

.form-field textarea {
    resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-bottom-color: #ffffff;
}

.submit-button {
    padding: 15px 24px;
    border: 1px solid #ffffff;
    background-color: #ffffff;
    color: #000000;
    font: inherit;
    cursor: pointer;
}

.submit-button:hover {
    background-color: transparent;
    color: #ffffff;
}

body.modal-open {
    overflow: hidden;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.video-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 40px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.video-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.75);

    backdrop-filter: grayscale(100%) brightness(45%);
    -webkit-backdrop-filter: grayscale(100%) brightness(45%);
}

.video-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(1200px, 100%);
    background-color: #111111;
    color: #ffffff;
}

.video-modal-scroll {
    max-height: calc(100vh - 80px);
    overflow: visible;
}

.video-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 1px solid #ffffff;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    font-size: 28px;
    cursor: pointer;
}

.video-modal-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000000;
}

.video-modal-player iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-modal-details {
    display: none;
    grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
    align-items: start;
    gap: 48px;
    padding: 36px 48px 42px;
}

.video-modal-category {
    margin: 0 0 10px;
    font-size: 12px;
    text-transform: uppercase;
}

.video-modal-title h2 {
    margin: 0;
    font-size: clamp(24px, 3.5vw, 48px);
    line-height: 1.08;
}

.video-modal-credits {
    padding-top: 4px;
}

/* =========================
   RESPONSIVE LAYOUT
   ========================= */

/* Align the portrait with the visible top of the About heading on desktop. */
@media (min-width: 1025px) {
    .about-image {
        margin-top: 8px;
    }
}

/* Narrow desktop cards */
@media (min-width: 1025px) and (max-width: 1199px) {
    .project-overlay .project-hover-credit {
        max-width: 70%;
        font-size: 9px;
        line-height: 1.15;
    }

    .project-hover-credit-label {
        margin-bottom: 1px;
        font-size: 6.5px;
    }

    .project-link:hover .project-client,
    .project-link:focus-visible .project-client {
        max-width: 70%;
        margin-bottom: 2px;
        font-size: 8px;
        line-height: 1.1;
    }

    .project-link:hover .project-overlay h2,
    .project-link:focus-visible .project-overlay h2 {
        max-width: 70%;
        font-size: 11px;
    }

    .project-link:hover .project-hover-credit,
    .project-link:focus-visible .project-hover-credit {
        margin-top: 5px;
    }

    .project-link:hover .project-hover-director,
    .project-link:focus-visible .project-hover-director {
        margin-top: 4px;
    }
}

/* iPad and smaller tablets */
@media (max-width: 1024px) {
    .site-header {
        padding: 28px 70px;
    }

    main {
        padding: 60px 70px;
    }

    .filter-bar {
        flex-wrap: wrap;
    }

    .randomized-reel-button {
        margin-left: auto;
    }

    .project-grid,
    .project-grid.random-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-card.grid-third,
    .project-card.grid-half,
    .project-grid.random-grid .project-card {
        grid-column: span 1;
    }

    .project-client {
        font-size: 9px;
    }

    .project-overlay h2 {
        font-size: 15px;
    }

    .project-overlay .project-hover-credit {
        font-size: 10.5px;
    }

    .project-hover-credit-label {
        font-size: 7.5px;
    }

    .video-modal-details {
        display: grid;
        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1.5fr)
            minmax(0, 1fr);
        grid-template-rows: auto auto;
        align-items: end;
        gap: 2px 20px;
        min-height: 80px;
        padding: 14px 20px;
        background-color: rgba(0, 0, 0, 0.8);
    }

    .video-modal-title {
        grid-column: 2;
        grid-row: 2;
        min-width: 0;
        text-align: center;
    }

    .video-modal-title h2 {
        font-size: 18px;
        line-height: 1.1;
    }

    .video-modal-credits {
        display: contents;
    }

    .video-modal-credit {
        margin: 0;
        font-size: 11px;
        line-height: 1.25;
    }

    .video-modal-credit strong {
        display: block;
        font-size: 8px;
        letter-spacing: 0.1em;
        text-transform: uppercase;
    }

    .video-modal-credit-client {
        grid-column: 2;
        grid-row: 1;
        text-align: center;
    }

    .video-modal-credit-client strong {
        display: none;
    }

    .video-modal-credit-agency {
        grid-column: 1;
        grid-row: 1 / 3;
        text-align: left;
    }

    .video-modal-credit-director {
        grid-column: 3;
        grid-row: 1 / 3;
        text-align: right;
    }

    .video-modal-credit-editor {
        display: none;
    }

    .video-modal.has-incomplete-modal-credits .video-modal-details {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .video-modal.has-incomplete-modal-credits .video-modal-title,
    .video-modal.has-incomplete-modal-credits .video-modal-credit-client {
        grid-column: 1;
        text-align: left;
    }

    .video-modal.has-incomplete-modal-credits .video-modal-credit-agency,
    .video-modal.has-incomplete-modal-credits .video-modal-credit-director {
        grid-column: 3;
        text-align: right;
    }
}

/* Phones */
@media (max-width: 650px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
        padding: 28px 24px;
    }

    .site-brand {
        width: 100%;
    }

    .site-logo {
        font-size: 28px;
    }

    .site-nav {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 20px;
    }

    .site-nav a {
        font-size: 16px;
    }

    main {
        padding: 40px 24px;
    }

    .filter-bar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 28px;
    }

    .work-filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
        margin-bottom: 0;
    }

    .work-filters .filter-button {
        width: 100%;
        text-align: center;
    }

    .randomized-reel-button {
        align-self: stretch;
        width: 100%;
        margin: 0;
        text-align: center;
    }

    .project-grid,
    .project-grid.random-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .project-card.grid-third,
    .project-card.grid-half,
    .project-grid.random-grid .project-card {
        grid-column: 1 / -1;
    }

    .project-overlay {
        padding: 20px;
    }

    .project-details {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .project-category {
        margin-bottom: -10px;
    }

    .about-intro {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image {
        max-width: 100%;
    }

    .about-copy p {
        font-size: 17px;
    }

    .contact-intro {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .contact-form {
        grid-template-columns: 1fr;
    }

    .form-field-full {
        grid-column: auto;
    }

    .video-modal {
        padding: 12px;
    }

    .video-modal-scroll {
        max-height: calc(100vh - 24px);
    }

    .video-modal-details {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1.4fr)
            minmax(0, 1fr);
        gap: 2px 10px;
        min-height: 72px;
        padding: 10px 12px;
    }

    .video-modal-title h2 {
        font-size: 14px;
    }

    .video-modal-credit {
        font-size: 9px;
    }

    .video-modal-credit strong {
        font-size: 7px;
    }

    .video-modal-close {
        display: none;
    }
	
}

/* Phones rotated to landscape */
@media (orientation: landscape) and (max-height: 650px) and (max-width: 1000px) {
    .video-modal {
        padding: 12px;
    }

    .video-modal-dialog {
        width: min(
            100%,
            calc(177.7778vh - 156.4444px)
        );
    }

    .video-modal-scroll {
        max-height: calc(100vh - 24px);
    }

    .video-modal-close {
        display: none;
    }

    .video-modal-details {
        min-height: 64px;
        height: 64px;
        padding: 8px 12px;
    }

    .video-modal-title h2 {
        font-size: 13px;
    }
}
