/* colours */
:root {
    --sand-50:  #faf5ef;
    --sand-100: #f0e6da;
    --sand-200: #e5d5c3;
    --sand-300: #d4bfa8;
    --ink:      #2e2a26;
    --ink-soft: #6b6058;
    --accent:   #7a8b9c;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Inter, sans-serif;
    color: var(--ink);
    background-color: var(--sand-200);
    line-height: 1.6;
    font-size: 1.05rem;
}

/* headings */
h1 {
    font-family: Fraunces, serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 6vw, 4rem);
    line-height: 1.05;
}

h2 {
    font-family: Fraunces, serif;
    font-weight: 600;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
}

h3 {
    font-family: Fraunces, serif;
    font-weight: 600;
    font-size: 1.6rem;
    line-height: 1.2;
    margin-bottom: 0.4rem;
}

.tagline {
    font-size: 1.15rem;
    max-width: 34rem;
    margin-top: 1.2rem;
}

/* nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background-color: rgba(229, 213, 195, 0);
    box-shadow: 0 2px 5px rgba(46, 42, 38, 0.1);
}

nav {
    display: flex;
    justify-content: center;
    gap: 3.5rem;
    padding: 1.5rem;
}

nav a {
    color: var(--ink);
    text-decoration: none;
    font-size: 1.15rem;
}

nav a:hover {
    color: var(--ink-soft);
}

/* ==================== HOME ==================== */

/* hero */
.hero {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    /* the top padding clears the fixed nav, so the content can never slide under it */
    padding: 7rem 2rem 2rem;
    background-image:
            linear-gradient(to bottom, rgba(229, 213, 195, 0) 35%, var(--sand-200) 100%),
            url("assets/images/hero-sky.webp");
    background-size: cover;
    background-position: center;
}

.socials {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.socials a {
    color: var(--ink-soft);
    font-size: 2.4rem;
    filter: drop-shadow(-1px 1px 2px rgba(46, 42, 38, 0.3));
    transition: color 0.2s ease, transform 0.2s ease;
}

.socials a:hover {
    color: var(--ink);
    transform: translateY(-3px);
}

.hero h1 {
    font-size: clamp(2.8rem, 7vw, 4.6rem);
}

.meta {
    color: var(--ink-soft);
    font-size: 0.9rem;
    margin-top: 1.6rem;
}
/* showreel video */
.showreel {
    padding: 0 2rem 3rem;
    margin-top: -5rem;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.video-wrap {
    position: relative;
    width: 100%;
    max-width: 960px;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: var(--sand-300);
    box-shadow: 0 10px 30px rgba(46, 42, 38, 0.15);
}

.video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    background: rgba(46, 42, 38, 0.45);
    color: var(--sand-50);
    border: none;
    cursor: pointer;
    font-family: Fraunces, serif;
    font-size: 1.6rem;
    transition: opacity 0.3s ease;
}

.video-overlay i {
    font-size: 30px;
}

.video-overlay span {
    font-family: Inter, sans-serif;
    font-size: 1.4rem;
}

.video-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* project preview */
.preview-link {
    position: relative;
    display: block;
    max-width: 1000px;
    margin: 0 auto;
}

.project-preview {
    padding-top: 4rem;
    margin-bottom: 6rem;
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    transition: transform 0.3s ease;
}

.tile-grid img {
    width: 100%;
    display: block;
    border-radius: 24px;
}

.btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    padding: 1.25rem 3.2rem;
    font-size: 1.15rem;
    background-image: url("assets/images/btn-sand.webp");
    background-size: 187px auto;
    background-repeat: repeat;
    color: var(--ink);
    text-decoration: none;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(46, 42, 38, 0.7);
    transition: transform 0.25s ease;
}

.preview-link:hover .btn {
    transform: translate(-50%, calc(-50% - 4px));
    background-image: url("assets/images/btn-sand-hover.webp");
    box-shadow: 0 6px 16px rgba(46, 42, 38, 0.7);
}

/* ==================== ABOUT ==================== */

.hero-about{
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    /* the top padding clears the fixed nav, so the content can never slide under it */
    padding: 7rem 2rem 2rem;
    background-image:
            linear-gradient(to bottom, rgba(229, 213, 195, 0) 35%, var(--sand-200) 100%),
            url("assets/images/hero-sky.webp");
    background-size: cover;
    background-position: center;
}

.profile-photo{
    width: 320px;
    height: 390px;
    border-radius: 25px;
    object-fit: cover;
    justify-self: end;
}

.about-inner {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    align-items: center;
    gap: 4rem;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.btn-cv {
    position: static;
    transform: none;
    padding: 0.85rem 1.9rem;
    font-size: 1rem;
    box-shadow: 0 2px 6px rgba(46, 42, 38, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-cv:hover {
    transform: translateY(-3px);
    background-image: url("assets/images/btn-sand-hover.webp");
    box-shadow: 0 6px 14px rgba(46, 42, 38, 0.28);
}

.cv-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.about-text {
    text-align: left;
}

.about-text h1 {
    margin-bottom: 1.4rem;
}

.about-text p {
    margin-bottom: 1.1rem;
    max-width: 34rem;
}

.tools {
    max-width: none;
    font-size: 0.95rem;
}

.tools-label {
    margin-top: 2.2rem;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* ==================== CONTACT ==================== */

.contact {
    padding: 0rem 2rem 8rem;
    margin: 2rem;
    margin-top: -3rem;
}

.contact-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3.5rem;
    max-width: 1100px;
    margin: 0 auto;

    padding: 3.5rem;
    background-color: var(--sand-100);
    border-radius: 28px;
    box-shadow: 0 8px 28px rgba(46, 42, 38, 0.12);
}

.contact-intro {
    text-align: center;
}

.envelope {
    width: 200px;
    border-radius: 20px;
    margin-bottom: 1.6rem;
}

.invite {
    color: var(--ink-soft);
    margin-top: 0.8rem;
}

.contact-mail {
    display: inline-block;
    margin-top: 1.2rem;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--sand-300);
}

.contact-mail:hover {
    color: var(--ink-soft);
}

.contact-intro .socials {
    justify-content: center;
    margin-top: 1.6rem;
    margin-bottom: 0;
}

.contact-card {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 2rem;
    background-color: var(--sand-50);
    border-radius: 20px;
}

.contact-card input,
.contact-card textarea {
    font-family: Inter, sans-serif;
    font-size: 1rem;
    color: var(--ink);
    padding: 0.9rem 1.1rem;
    background-color: #fffdfa;
    border: 2px solid var(--sand-300);
    border-radius: 12px;
    resize: vertical;
}

.contact-card input::placeholder,
.contact-card textarea::placeholder {
    color: #a39990;
}

.contact-card input:focus,
.contact-card textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-send {
    position: static;
    transform: none;
    align-self: center;
    margin-top: 0.6rem;
    padding: 0.85rem 2.4rem;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    font-family: Inter, sans-serif;
    box-shadow: 0 2px 6px rgba(46, 42, 38, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-send:hover {
    transform: translateY(-3px);
    background-image: url("assets/images/btn-sand-hover.webp");
    box-shadow: 0 6px 14px rgba(46, 42, 38, 0.28);
}

/* ==================== PROJECTS ==================== */

.hero-projects {
    max-width: calc(1100px + 4rem);
    margin: 0 auto;
    padding: 11rem 2rem 3rem;
}

.project-cards {
    max-width: calc(1100px + 4rem);
    margin: 0 auto;
    padding: 0 2rem 6rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.card {
    display: grid;
    grid-template-columns: 240px 1fr;
    align-items: center;
    gap: 2.5rem;
    padding: 0;
    background-color: var(--sand-100);
    border-radius: 20px;
    text-decoration: none;
    color: var(--ink);
    box-shadow: 0 2px 6px rgba(46, 42, 38, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(46, 42, 38, 0.15);
}

.card img {
    width: 100%;
    display: block;
    border-radius: 0;
}

.card-text{
    padding: 2rem;
}

.card p {
    color: var(--ink-soft);
}



/* ==================== PROJECT PAGE ==================== */

.project-head {
    max-width: calc(1100px + 4rem);
    margin: 0 auto;
    padding: 11rem 2rem 2.5rem;
}

.back {
    display: inline-block;
    margin-bottom: 1.6rem;
    color: var(--ink-soft);
    text-decoration: none;
    font-size: 0.95rem;
}

.back:hover {
    color: var(--ink);
}

.role {
    margin-top: 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* full-bleed media that dissolves into the background at both ends */
.project-video video,
.project-video img {
    width: 100%;
    display: block;
    --fade: linear-gradient(to bottom,
        rgba(0,0,0,0)   0%,
        rgba(0,0,0,.06) 6%,
        rgba(0,0,0,.22) 12%,
        rgba(0,0,0,.5)  18%,
        rgba(0,0,0,.78) 24%,
        rgba(0,0,0,.94) 30%,
        rgba(0,0,0,1)   36%,
        rgba(0,0,0,1)   58%,
        rgba(0,0,0,.94) 65%,
        rgba(0,0,0,.78) 72%,
        rgba(0,0,0,.5)  80%,
        rgba(0,0,0,.22) 88%,
        rgba(0,0,0,.06) 95%,
        rgba(0,0,0,0)   100%);
    -webkit-mask-image: var(--fade);
            mask-image: var(--fade);
}

.project-block {
    max-width: calc(1100px + 4rem);
    margin: 0 auto;
    padding: 4.5rem 2rem 0;
}

.project-block p {
    max-width: 34rem;
    margin-top: 0.8rem;
}

/* the video fades out before its box ends, so the first block needs extra air */
.project-video + .project-block {
    padding-top: 7rem;
}

/* ---- reusable pieces ---- */

.shot {
    margin-top: 2rem;
    background-color: var(--sand-50);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(46, 42, 38, 0.08);
}

.shot img,
.shot video {
    width: 100%;
    display: block;
}

/* media on one side, text on the other */
.media-text {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3.5rem;
    align-items: center;
}

/* two cards side by side; minmax(0,1fr) stops a wide image
   from setting the column's minimum width */
.card-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

/* the pattern tiled live, so the repeat is visible rather than described */
.pattern-band {
    margin-top: 2rem;
    height: 440px;
    border-radius: 16px;
    background-image: url("assets/images/green-haven-pattern.webp");
    background-size: 560px;
    background-repeat: repeat;
    box-shadow: 0 2px 8px rgba(46, 42, 38, 0.08);
}

/* three cards in a row */
.card-trio {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* a card above, swatches below, filling the same height as the neighbour */
.card-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
}

.shot-half {
    max-width: 520px;
}

.media-text .shot,
.card-pair .shot,
.card-trio .shot,
.card-stack .shot {
    margin-top: 0;
}

/* ---- colour swatches ---- */

.swatches {
    display: flex;
    gap: 0.7rem;
    margin-top: 2rem;
}

.card-stack .swatches,
.card-pair > .swatches {
    flex: 1;
    margin-top: 0;
}

.swatch {
    flex: 1;
    min-width: 0;          /* lets the hex label shrink instead of forcing a wrap */
    display: flex;
    flex-direction: column;
}

.swatch span {
    flex: 1;
    min-height: 90px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(46, 42, 38, 0.1);
}

.swatch small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.68rem;
    color: var(--ink-soft);
}

/* ---- end of a project page ---- */

.project-outro {
    max-width: calc(1100px + 4rem);
    margin: 0 auto;
    padding: 5rem 2rem 6rem;
    text-align: center;
}

/* .btn is positioned absolutely for the video overlay, so undo that here */
.btn-live {
    position: static;
    transform: none;
    display: inline-block;
    padding: 1rem 2.6rem;
    font-size: 1.05rem;
    box-shadow: 0 2px 8px rgba(46, 42, 38, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-live:hover {
    transform: translateY(-3px);
    background-image: url("assets/images/btn-sand-hover.webp");
    box-shadow: 0 6px 14px rgba(46, 42, 38, 0.28);
}

.next-project {
    margin-top: 2.6rem;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

.next-project a {
    color: var(--ink);
}


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

/* tablet: anything that is two columns of content becomes one */
@media (max-width: 900px) {
    .about-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .profile-photo {
        justify-self: start;
    }

    .tile-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .contact-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 2.5rem 1.8rem;
    }

    .media-text {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .card-pair {
        grid-template-columns: 1fr;
    }

    .card-trio {
        grid-template-columns: 1fr;
    }

    .pattern-band {
        height: 300px;
        background-size: 320px;
    }

    /* project cards stack the image above the text */
    .card {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* phone: tighten the side gutters and let the swatches wrap */
@media (max-width: 620px) {
    nav {
        gap: 1.8rem;
        padding: 1.1rem;
    }

    nav a {
        font-size: 1rem;
    }

    .hero,
    .hero-about {
        padding: 7.5rem 1.5rem 1.5rem;
    }

    .hero-projects,
    .project-head,
    .project-block,
    .project-outro,
    .project-cards {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .hero-projects,
    .project-head {
        padding-top: 7.5rem;
    }

    .project-block {
        padding-top: 3rem;
    }

    .project-video + .project-block {
        padding-top: 3.5rem;
    }

    .swatches {
        flex-wrap: wrap;
    }

    .swatch {
        flex: 1 1 28%;
    }

    .swatch span {
        min-height: 64px;
    }
}

/* respect the system setting for people who get motion sick */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}


/* ==================== FOOTER ==================== */

footer {
    border-top: 1px solid var(--sand-300);
    margin-top: 2rem;
    padding: 2.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: calc(1100px + 4rem);
    margin-left: auto;
    margin-right: auto;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 1.6rem;
}

.footer-links a {
    color: var(--ink-soft);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--ink);
}

/* the mark is a bitmap, the lettering is traced vector, so they are
   two images stacked rather than one flattened picture */
.logo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 3rem 2.5rem;
    aspect-ratio: 1200 / 936;
}

/* .shot img sets width:100%, so these need the extra class to win */
.logo-card .logo-mark {
    width: 46%;
}

.logo-card .logo-word {
    width: 66%;
}

/* a paragraph that runs the full column, matching the heading above it */
.project-block.wide-text p {
    max-width: none;
}

/* small icons sitting beside their text, rather than three big panels */
.icon-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-self: center;
}

.icon-row .shot {
    margin-top: 0;
}
