/* =========================================================
   WYATT HANSON — COMPOSER & SOUND DESIGNER
   Main stylesheet
   ========================================================= */


/* =========================================================
   RESET
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    position: relative;

    background: #3e4448;
    color: #171717;

    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}


/* =========================================================
   CENTRAL PAGE
   ========================================================= */

body::before {
    content: "";
    position: fixed;

    top: 0;
    bottom: 0;
    left: 50%;

    width: min(1240px, calc(100% - 24px));

    transform: translateX(-50%);

    background: #f5f5f3;

    box-shadow:
        0 0 55px rgba(0, 0, 0, 0.24),
        0 0 18px rgba(0, 0, 0, 0.12);

    z-index: 0;
    pointer-events: none;
}

body > * {
    position: relative;
    z-index: 1;
}


/* =========================================================
   ELEMENTS
   ========================================================= */

img,
video,
iframe {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

::selection {
    background: #171717;
    color: #f5f5f3;
}


/* =========================================================
   GLOBAL
   ========================================================= */

.container {
    width: min(1160px, calc(100% - 48px));
    margin: 0 auto;
}

h1,
h2,
h3 {
    font-weight: 500;
    letter-spacing: -0.035em;
}

h1,
h2,
h3,
p {
    margin: 0;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    padding: 30px 0 14px;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: baseline;
    gap: 12px;
    min-width: 0;
}

.brand h1 {
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    line-height: 0.86;
    font-weight: 600;
    letter-spacing: -0.065em;
    white-space: nowrap;
}

.brand span {
    font-size: 0.78rem;
    color: #777;
    white-space: nowrap;
}


/* =========================================================
   PROJECTS NAVIGATION
   ========================================================= */

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.main-nav a {
    position: relative;
    color: #777;
    font-size: 0.8rem;

    transition:
        color 180ms ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #171717;
}

.main-nav a.active::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;

    height: 1px;

    background: #171717;
}


/* =========================================================
   HOME
   ========================================================= */

.home-section {
    padding: 40px 0 30px;
}

.home-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(330px, 0.9fr);

    gap: 52px;
    align-items: start;
}

.featured-music {
    min-width: 0;
}


/* =========================================================
   MUSIC PLAYERS
   ========================================================= */

.music-player {
    padding: 0 0 4px;
    margin-bottom: 4px;
}

.music-player-info {
    display: flex;
    align-items: flex-start;
    gap: 15px;

    margin-bottom: 3px;
}

.music-number {
    flex: 0 0 auto;

    padding-top: 2px;

    color: #92928e;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
}

.music-player h2 {
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    line-height: 1.01;
}

.music-player-info p {
    margin-top: 4px;

    color: #92928e;
    font-size: 0.8rem;
    line-height: 1.1;
}

.music-player audio {
    width: 100%;
    height: 32px;
}


/* =========================================================
   MORE TRACKS
   ========================================================= */

.more-tracks {
    display: inline-flex;

    margin-top: 2px;
    padding-bottom: 4px;

    border-bottom: 1px solid #777;

    font-size: 0.8rem;

    transition:
        border-color 180ms ease,
        transform 180ms ease;
}

.more-tracks:hover {
    border-color: #171717;
    transform: translateX(2px);
}


/* =========================================================
   HOME IMAGE
   ========================================================= */

.home-photo {
    width: 100%;
    aspect-ratio: 4.5 / 3.5;

    overflow: hidden;

    background: #dededb;
}

.home-photo img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center center;

    image-rendering: auto;
}


/* =========================================================
   BIO + VIDEO
   ========================================================= */

.bio-video-section {
    padding: 0 0 76px;
}

.bio-video-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 0.8fr)
        minmax(0, 1.2fr);

    gap: 52px;
    align-items: start;
}


/* =========================================================
   BIO
   ========================================================= */

.bio-box {
    min-width: 0;
}

.bio-content {
    max-width: 680px;
}

.bio-content h2 {
    margin-bottom: 16px;

    font-size: clamp(2.1rem, 4.5vw, 3.7rem);
    line-height: 0.96;
}

.bio-content p {
    max-width: 640px;

    color: #666;

    font-size: 0.95rem;
    line-height: 1.6;
}

.full-bio-button {
    display: inline-flex;

    margin-top: 22px;
    padding: 9px 0;

    border: 0;
    border-bottom: 1px solid #777;

    background: transparent;
    color: #171717;

    font-size: 0.8rem;

    transition:
        border-color 180ms ease,
        transform 180ms ease;
}

.full-bio-button:hover {
    border-color: #171717;
    transform: translateX(2px);
}


/* =========================================================
   VIDEO
   ========================================================= */

.video-box {
    min-width: 0;
}

.video-container {
    position: relative;

    width: 100%;
    aspect-ratio: 16 / 9;

    overflow: hidden;

    background: #ddddda;
}

.video-container iframe,
.video-container video {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    border: 0;
}


/* =========================================================
   FULL BIO
   ========================================================= */

.full-bio-section {
    display: none;

    padding: 0 0 64px;
}

.full-bio-section.is-open {
    display: block;
}

.full-bio-content {
    position: relative;

    max-width: 920px;

    padding: 36px;

    background: #e6e6e2;
}

.full-bio-content h2 {
    margin-bottom: 20px;

    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1;
}

.full-bio-content p {
    max-width: 820px;

    color: #646464;

    font-size: 0.95rem;
    line-height: 1.65;
}

.full-bio-content p + p {
    margin-top: 15px;
}

.close-bio {
    position: absolute;

    top: 18px;
    right: 18px;

    width: 30px;
    height: 30px;

    border: 0;

    background: transparent;
    color: #666;

    font-size: 1.5rem;
    line-height: 1;
}

.close-bio:hover {
    color: #171717;
}


/* =========================================================
   CONTACT
   ========================================================= */

.contact-section {
    padding: 18px 0 78px;
}

.contact-container {
    display: grid;

    grid-template-columns:
        minmax(220px, 0.75fr)
        minmax(0, 1.25fr);

    gap: 52px;

    padding: 44px;

    border-radius: 30px;

    background: #171717;
    color: #f5f5f3;
}


/* =========================================================
   CONTACT TITLE
   ========================================================= */

.contact-title h2 {
    font-size: clamp(2.3rem, 5vw, 4.6rem);
    line-height: 0.94;
}


/* =========================================================
   FORM
   ========================================================= */

.contact-form {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 22px 20px;
}

.form-field {
    min-width: 0;
}

.form-field.message-field {
    grid-column: 1 / -1;
}

.form-field label {
    display: block;

    margin-bottom: 7px;

    color: #aaa;
    font-size: 0.72rem;
}

.form-field input,
.form-field textarea {
    width: 100%;

    border: 0;
    border-bottom: 1px solid #555;
    border-radius: 0;

    outline: none;

    padding: 10px 0;

    background: transparent;
    color: #f5f5f3;

    font-size: 0.9rem;

    transition: border-color 180ms ease;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #777;
}

.form-field input:focus,
.form-field textarea:focus {
    border-color: #f5f5f3;
}

.form-field textarea {
    resize: vertical;
    min-height: 150px;
}

.send-button {
    grid-column: 1 / -1;

    justify-self: start;

    padding: 10px 18px;

    border: 1px solid #777;
    border-radius: 999px;

    background: transparent;
    color: #f5f5f3;

    font-size: 0.8rem;

    transition:
        background 180ms ease,
        color 180ms ease,
        border-color 180ms ease,
        transform 180ms ease;
}

.send-button:hover {
    border-color: #f5f5f3;

    background: #f5f5f3;
    color: #171717;

    transform: translateY(-1px);
}

/* =========================================================
   PROJECTS PAGE
   ========================================================= */

.projects-header {
    padding: 38px 0 40px;
}

.section-label,
.project-type {
    margin-bottom: 10px;

    color: #858581;

    font-size: 0.66rem;
    font-weight: 600;

    letter-spacing: 0.12em;
    line-height: 1;
}

.projects-header h2 {
    max-width: 950px;

    font-size: clamp(2.5rem, 6vw, 5.1rem);
    line-height: 0.93;
}


/* =========================================================
   FEATURED PROJECT
   ========================================================= */

.projects-video {
    padding: 0 0 52px;
}

.project-feature {
    display: grid;

    grid-template-columns:
        minmax(0, 1.5fr)
        minmax(220px, 0.7fr);

    gap: 20px;

    align-items: end;
}

.project-feature-video {
    min-width: 0;
}

.project-feature-info {
    padding: 0 2px 4px;
}

.project-feature-info h2 {
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 0.95;
}

.project-feature-info p:not(.project-type) {
    margin-top: 8px;

    color: #777;

    font-size: 0.82rem;
}


/* =========================================================
   SLOTS UP LINK
   ========================================================= */

.project-link {
    display: inline-flex;

    align-items: center;

    width: fit-content;

    margin-top: 18px;
    padding-bottom: 5px;

    border-bottom: 1px solid #777;

    color: #171717;

    font-size: 0.8rem;

    transition:
        border-color 180ms ease,
        transform 180ms ease;
}

.project-link:hover {
    border-color: #171717;
    transform: translateX(2px);
}


/* =========================================================
   PROJECT GRID
   ========================================================= */

.projects-list {
    padding-bottom: 84px;
}

.projects-list > .container {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;

    align-items: start;
}


/* =========================================================
   PROJECT COLUMNS
   ========================================================= */

.projects-column {
    display: flex;

    min-width: 0;

    flex-direction: column;

    gap: 18px;
}


/* =========================================================
   PROJECT CARDS
   ========================================================= */

.project-item {
    display: block;

    min-width: 0;

    padding: 16px;

    background: #e8e8e4;

    align-self: stretch;
}


/* =========================================================
   WORM CAPITALIST
   ========================================================= */

.projects-worm {
    padding: 0 0 52px;
}

.worm-project {
    width: min(1100px, 100%);
    margin: 0 auto;

    display: grid;

    grid-template-columns:
        minmax(0, 1.2fr)
        minmax(260px, 0.8fr);

    gap: 25px;

    padding: 12px 23px;

    align-items: center;
}

.worm-project .project-item-image {
    min-height: 280px;
}

.worm-project .project-item-image img {
    height: 100%;
    object-fit: contain;
}

.worm-project .project-item-image {
    background: #e8e8e4;
}

.worm-project .project-item-content {
    gap: 10px;
}

.worm-project .project-item-content h2 {
    font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.worm-project .project-item-content > p:not(.project-type) {
    font-size: 0.8rem;
    line-height: 1.5;
}

.worm-project .project-link {
    margin-top: 30px;
}


/* =========================================================
   PROJECT IMAGES
   ========================================================= */

.project-item-image {
    width: 100%;
    aspect-ratio: 16 / 9;

    overflow: hidden;

    margin-bottom: 18px;

    background: #dededb;
}

.project-item-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 350ms ease;
}

.project-item:hover .project-item-image img {
    transform: scale(1.025);
}


/* =========================================================
   LEGEND OF ZELDA
   ========================================================= */

/*
   Zelda is a portrait cover, so it gets its own natural
   image height instead of being forced into 16:9.
*/

#legend-of-zelda .project-item-image {
    aspect-ratio: auto;
    height: auto;

    overflow: visible;

    background: transparent;
}

#legend-of-zelda .project-item-image img {
    display: block;

    width: 100%;
    height: auto;

    object-fit: contain;
    object-position: center;

    transform: none;
}

#legend-of-zelda:hover .project-item-image img {
    transform: none;
}

/* =========================================================
   CLAIR OBSCUR EXPEDITION 33
   ========================================================= */

#coe-33 .project-item-image {
    aspect-ratio: auto;
    height: auto;

    overflow: visible;

    background: transparent;
}

#coe-33 .project-item-image img {
    display: block;

    width: 100%;
    height: auto;

    object-fit: contain;
    object-position: center;

    transform: none;
}

#coe-33:hover .project-item-image img {
    transform: none;
}


/* =========================================================
   PROJECT CONTENT
   ========================================================= */

.project-item-content {
    display: flex;

    min-width: 0;

    flex-direction: column;
    gap: 14px;
}

.project-item-content h2 {
    font-size: clamp(1.45rem, 2.8vw, 2.45rem);
    line-height: 0.98;
}

.project-item-content > p:not(.project-type) {
    color: #666;

    font-size: 0.84rem;
    line-height: 1.55;
}


/* =========================================================
   PERFORMERS
   ========================================================= */

.performers {
    margin-top: auto;
}

.performers h3 {
    margin-bottom: 5px;

    font-size: 0.7rem;
    font-weight: 600;

    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.performers p {
    color: #70706d;

    font-size: 0.74rem;
    line-height: 1.55;
}


/* =========================================================
   BLANK PROJECT
   ========================================================= */

#project-3 {
    min-height: 350px;

    display: flex;

    align-items: center;
    justify-content: center;

    border: 1px dashed #c3c3bf;

    background: #e5e5e1;
}

#project-3 .project-item-content {
    align-items: center;
    justify-content: center;

    text-align: center;
}

#project-3 h2 {
    color: #777;
}


/* =========================================================
   PROJECT VIDEOS
   ========================================================= */

.project-video {
    width: 100%;
    aspect-ratio: 16 / 9;

    margin-top: 4px;

    border: 0;

    background: #dcdcd9;
}


/* =========================================================
   AUDIO
   ========================================================= */

.project-item audio {
    width: 100%;
    height: 36px;
}


/* =========================================================
   TRACK LIBRARY
   ========================================================= */

.track-library {
    grid-column: 1 / -1;

    grid-row: 6;

    padding-top: 26px;
}

.track-library-header {
    display: flex;

    align-items: baseline;
    justify-content: space-between;

    gap: 24px;

    padding-bottom: 12px;

    border-bottom: 1px solid #d0d0cc;
}

.track-library-header h2 {
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    line-height: 1;
}

.track-list {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 0 24px;
}

.track-item {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(170px, 0.9fr);

    gap: 16px;

    align-items: center;

    min-width: 0;

    padding: 16px 0;

    border-bottom: 1px solid #d0d0cc;
}

.track-item h3 {
    font-size: 0.9rem;
    font-weight: 500;
}

.track-item audio {
    width: 100%;
    height: 36px;
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    padding: 18px 0 30px;

    color: #858581;
}

.site-footer p {
    font-size: 0.7rem;
}


/* =========================================================
   FOCUS
   ========================================================= */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
audio:focus-visible,
video:focus-visible {
    outline: 2px solid #171717;
    outline-offset: 3px;
}

/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .container {
        width: min(100% - 32px, 860px);
    }


    /* =====================================================
       HOME
       ===================================================== */

    .home-layout {
        grid-template-columns: 1fr;
        gap: 38px;
    }

    .home-photo {
        max-width: 700px;
    }


    /* =====================================================
       BIO
       ===================================================== */

    .bio-video-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .bio-content {
        max-width: 700px;
    }


    /* =====================================================
       CONTACT
       ===================================================== */

    .contact-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }


    /* =====================================================
       FEATURED PROJECT
       ===================================================== */

    .project-feature {
        grid-template-columns: 1fr;
        gap: 16px;
    }


    /* =====================================================
       PROJECT GRID
       ===================================================== */

    .projects-list > .container {
    grid-template-columns: 1fr;
    gap: 18px;
}

.projects-column {
    gap: 18px;
}

.project-item {
    grid-column: auto !important;
    grid-row: auto !important;
}

    .track-library {
        grid-column: 1 / -1;
        grid-row: auto;
    }


    /*
       At tablet width the cards become a normal
       single-column flow again.
    */

}


/* =========================================================
   RESPONSIVE — PHONE
   ========================================================= */

@media (max-width: 640px) {

    body::before {
        width: calc(100% - 16px);
    }

    .container {
        width: calc(100% - 24px);
    }


    /* =====================================================
       HEADER
       ===================================================== */

    .site-header {
        padding: 20px 0 10px;
    }

    .header-container {
        align-items: flex-start;
        flex-wrap: wrap;

        gap: 15px;
    }

    .brand {
        gap: 8px;
        width: 100%;
    }

    .brand h1 {
        font-size: 2.25rem;
        white-space: normal;
    }

    .brand span {
        display: none;
    }

    .main-nav {
        width: 100%;
        gap: 16px;
    }


    /* =====================================================
       HOME
       ===================================================== */

    .home-section {
        padding: 30px 0 44px;
    }

    .home-layout {
        gap: 28px;
    }

    .music-player h2 {
        font-size: 1.25rem;
    }

    .home-photo {
        aspect-ratio: 4 / 5;
    }


    /* =====================================================
       BIO
       ===================================================== */

    .bio-video-section {
        padding-bottom: 48px;
    }

    .bio-content,
    .bio-content p {
        max-width: 100%;
    }

    .full-bio-content {
        max-width: 100%;
        padding: 25px 20px;
    }

    .full-bio-content p {
        max-width: 100%;
    }


    /* =====================================================
       CONTACT
       ===================================================== */

    .contact-section {
        padding-bottom: 50px;
    }

    .contact-container {
        padding: 26px 22px;

        border-radius: 23px;

        gap: 26px;
    }

    .contact-form {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .form-field.message-field,
    .send-button {
        grid-column: auto;
    }


    /* =====================================================
       PROJECTS
       ===================================================== */

    .projects-header {
        padding: 28px 0 30px;
    }

    .projects-header h2 {
        font-size: clamp(2.3rem, 12vw, 4rem);
    }

    .project-section-heading {
        font-size: 2.3rem !important;
    }

    .projects-list > .container {
        gap: 14px;
    }

    .project-item {
        padding: 12px;

        grid-column: 1 / -1 !important;
        grid-row: auto !important;
    }


        .worm-project {
        width: 100%;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .worm-project .project-item-image {
        margin-bottom: 0;
    }

    #project-3 {
        min-height: 230px;
    }

    /* =====================================================
       IMAGES
       ===================================================== */

    .project-item-image {
        aspect-ratio: 16 / 10;
    }


    /*
       Keep Zelda's natural portrait image on mobile.
    */

    #legend-of-zelda .project-item-image {
        aspect-ratio: auto;
    }

    #legend-of-zelda .project-item-image img {
        width: 100%;
        height: auto;
    }


    /* =====================================================
       TRACK LIBRARY
       ===================================================== */

    .track-list {
        grid-template-columns: 1fr;
    }

    .track-item {
        grid-template-columns: 1fr;

        gap: 8px;
    }

    .track-library-header {
        display: block;
    }

    .track-library-header h2 {
        margin-top: 7px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* =========================================================
   NETLIFY HONEYPOT
   ========================================================= */

.hidden-field {
    position: absolute;

    overflow: hidden;

    clip: rect(0 0 0 0);

    width: 1px;
    height: 1px;

    margin: -1px;
    padding: 0;

    border: 0;
}

.project-section-heading {
    font-size: 3rem !important;
}