/* CSS Variables & Reset */
:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --accent-color: #000000;
    --grey-light: #f5f5f7;
    --grey-medium: #e0e0e0;
    --grey-dark: #888888;

    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    --container-width: 1400px;
    --header-height: 80px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: initial;
    /* Let Lenis handle it */
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
    background-color: var(--grey-medium);
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

h3 {
    font-size: 1.25rem;
    font-weight: 500;
}

p {
    margin-bottom: var(--spacing-sm);
    color: #444;
}

.tagline {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: var(--grey-dark);
    margin-bottom: var(--spacing-md);
    font-weight: 400;
}

.tagline2 {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: var(--grey-dark);
    margin-bottom: 5px;
    font-weight: 400;
}

.tagline3 {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: black;
    margin-bottom: var(--spacing-md);
    font-weight: 400;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
}

.grid {
    display: grid;
    gap: var(--spacing-md);
}

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

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

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

@media (max-width: 768px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    :root {
        --spacing-xl: 4rem;
        --spacing-md: 1.5rem;
    }

    body:not(.case-study) .container {
        padding-left: 1.6rem;
        padding-right: 1.6rem;
    }

    body.case-study .container {
        padding-left: 1.6rem;
        padding-right: 1.6rem;
    }

    html,
    body {
        overflow-x: hidden;
    }

    body.page-home main,
    body.page-contact main {
        overflow-x: hidden;
        overflow-x: clip;
    }

    /* Work page filters: make them fit ~2 rows */
    body.page-work .filters {
        gap: 0.6rem;
        /* slightly smaller */
        justify-content: flex-start;
    }

    body.page-work .filter-btn {
        font-size: 0.85rem;
        /* a bit smaller */
        padding: 0.45rem 0.75rem;
        flex: 1 1 calc(50% - 0.6rem);
        /* 2 columns */
        text-align: center;
        white-space: nowrap;
        /* keep single-line pills */
    }
}

/* Navigation */
.site-header {
    width: 100%;
    padding: 1.25rem 2rem;
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--grey-medium);
    position: relative;
    /* NOT fixed */
    z-index: 100;
}

.site-header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.site-title {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text-color);
}

.site-name-main {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
}

.site-name-sub {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--grey-dark);
    margin-top: 2px;
}

/* Homepage Hero Layout */
.hero-flex {
    position: relative;
    /* Container for absolute image */
    display: block;
    /* Remove flex */
}

.hero-text {
    /* Remove flex: 1 */
    position: relative;
    z-index: 1;
    /* Ensure text is above image */
}

.hero-image {
    position: absolute;
    top: -58%;
    right: 2%;
    z-index: -1;
    pointer-events: none;
}

.hero-image img {
    max-width: 780px;
    width: 100%;
    height: auto;
    opacity: 0.04;
    display: block;
}

@media (max-width: 768px) {
    .hero-image {
        top: 20%;
        /* Adjust for mobile if needed, or keep same */
        right: -20%;
        /* Allow it to bleed off screen if large */
        max-width: 100vw;
        overflow: hidden;
    }
}

.site-nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-color);
    white-space: nowrap;
}

/* Highlight active page based on body class */
body.page-work .nav-link-work,
body.page-about .nav-link-about,
body.page-contact .nav-link-contact {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Hamburger Menu & Mobile Drawer */
.nav-toggle,
.nav-close,
.nav-backdrop {
    display: none;
}

@media (max-width: 768px) {
    .site-header {
        padding: 1rem 1.25rem;
    }

    .site-title {
        max-width: 80%;
        /* Ensure title fits */
    }

    .site-name-main {
        font-size: 0.95rem;
        letter-spacing: -0.01em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    .site-name-sub {
        letter-spacing: -0.01em;
        /* Tighten slightly for mobile */
    }

    /* Hide normal nav layout */
    .site-nav {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 280px;
        /* Drawer width */
        background-color: #fff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        z-index: 1000;
        padding: 2rem;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
        transform: translateX(100%);
        /* Closed state */
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .site-nav.is-open {
        transform: translateX(0);
        /* Open state */
    }

    /* Stacking order when menu is open */
    body.menu-open .nav-backdrop {
        opacity: 1;
        visibility: visible;
        z-index: 2000;
    }

    body.menu-open .site-nav {
        z-index: 2100;
    }

    body.menu-open .nav-close {
        z-index: 2200;
    }

    body.menu-open .nav-toggle {
        opacity: 0;
        pointer-events: none;
    }

    /* Disable background interaction when menu is open */
    body.menu-open {
        overflow: hidden;
    }

    body.menu-open main {
        pointer-events: none;
    }

    /* Hamburger Button */
    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
        /* Stay below overlay when open */
    }

    .nav-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--text-color);
        border-radius: 2px;
    }

    /* Close Button inside Drawer */
    .nav-close {
        display: block;
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--text-color);
        cursor: pointer;
    }

    /* Links in Drawer */
    .nav-link {
        font-size: 1.2rem;
    }

    /* Backdrop */
    .nav-backdrop {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.3);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .nav-backdrop.is-open {
        visibility: visible;
        /* Opacity and z-index handled by .menu-open above */
    }
}

/* Footer */
/* Footer – full width background */
.site-footer {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    background-color: #000000;
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-xl);
}

/* Inner content stays aligned with layout */
.footer-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    text-align: center;
}

.site-footer p {
    color: #ffffff;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Components */
.project-card {
    display: block;
    position: relative;
    transform: translateY(0);
    opacity: 1;
    will-change: transform, box-shadow;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

.project-card .image-wrapper {
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 0;
    /* Removed margin since text is now inside */
    background-color: var(--grey-light);
    aspect-ratio: 4/3;
    position: relative;
    /* Ensure overlay is positioned relative to this */
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.project-card:hover img {
    transform: scale(1.05);
}

/* Overlay Styles */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    /* Slightly higher opacity for readability */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    /* Faster + slightly snappier fade */
    transition: opacity 0.12s ease-out;
    padding: 1.5rem;
    text-align: center;
}

.project-card:hover .card-overlay {
    opacity: 1;
}

.project-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.project-card:hover h3 {
    transform: translateY(0);
}

.project-card .category {
    font-size: 0.85rem;
    color: var(--grey-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transform: translateY(10px);
    transition: transform 0.3s ease 0.05s;
    /* Slight delay */
}

.project-card:hover .category {
    transform: translateY(0);
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.filter-btn {
    background: none;
    border: 1px solid var(--grey-medium);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--text-color);
    color: white;
    border-color: var(--text-color);
}

/* Case Study Layouts */
.hero-project {
    padding-top: calc(var(--header-height) + var(--spacing-md));
    /* was: var(--spacing-lg) */
    padding-bottom: var(--spacing-sm);
    max-width: 1000px;
}

.project-meta {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
    color: var(--grey-dark);
    font-size: 0.9rem;
}

.project-content {
    max-width: 1000px;
    margin: 0 auto;
}

.content-block {
    margin-bottom: var(--spacing-md);
    /* was spacing-lg (much bigger) */
}

.content-block h3 {
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
    color: var(--grey-dark);
    text-transform: uppercase;
}

.full-width-image {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 0;
}



/* Video Placeholder */
.video-placeholder {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--grey-medium);
    aspect-ratio: 16/9;
    border-radius: 8px;
}

/* Figma embed styling – same width as videos */

.figma-embed {
    width: 100%;
    height: 650px;
    /* adjust height to fit your design */
    border: none;
    border-radius: 8px;
    display: block;
}

.styleguide-video-section {
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.video-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

/* Main Toolset Section */
.tools-section {
    margin-top: 1.5rem;
}

.tools-section2 {
    margin-top: 0px;
}

.tools-compact {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important;
}

.tools-compact h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--grey-dark);
    text-transform: uppercase;
    font-weight: 600;
    height: auto;
    width: auto;
}

.credits-section {
    padding-top: 1rem !important;
    margin-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
    margin-bottom: 0 !important;
}

.tools-grid {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

.tool-item img {
    width: 60px;
    height: 60px;
    background-color: #ccc;
    border-radius: 8px;
    transition: transform 0.25s ease;
}

.tool-item img:hover {
    transform: scale(1.5);
}

/* Mobile behavior */
@media (max-width: 768px) {
    .tools-grid {
        flex-wrap: wrap;
        gap: 1.5rem;
    }
}

/* Home Tool Labels - Scoped to homepage */
.home-tools .tools-grid {
    flex-wrap: wrap;
    /* Allow wrapping if 10 icons are too many for one row */
}

.home-tools .tool-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-tools .tool-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    width: max-content;
    font-size: 0.8rem;
    color: var(--grey-dark);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    margin-top: 25px;
    text-align: center;
}

.home-tools .tool-item:hover .tool-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Home – Focus Areas Section */
.home-focus {
    margin-top: var(--spacing-xl);
    border-top: 1px solid var(--grey-medium);
    padding-top: var(--spacing-lg);
}

.home-focus h2 {
    margin-bottom: var(--spacing-md);
}

.home-focus-grid {
    align-items: stretch;
}

.focus-card {
    background-color: var(--grey-light);
    border-radius: 12px;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: space-between;
    min-height: 160px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.focus-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.focus-card p {
    font-size: 0.9rem;
    color: var(--grey-dark);
    margin-bottom: 0.75rem;
}

.back-to-top a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.focus-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.focus-link::after {
    content: "→";
    font-size: 0.9rem;
}

.focus-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
    background-color: #ffffff;
}

/* Mobile tweaks */
@media (max-width: 768px) {
    .home-focus {
        margin-top: var(--spacing-lg);
        padding-top: var(--spacing-md);
    }

    .focus-card {
        min-height: auto;
    }
}

/* Case Study Hero Image */
.project-hero-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 0;
    display: block;
}

.project-content ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-top: 1rem;
}

.project-content li {
    margin-bottom: .5rem;
    line-height: 1.5;
}


.problem-outcome-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

@media (max-width: 768px) {
    .problem-outcome-grid {
        grid-template-columns: 1fr;
    }
}


.role-background {
    width: 100vw;
    /* full viewport width */
    margin-left: calc(50% - 50vw);
    /* push outward to edges */
    background-color: #f6f6f6;
    padding: 3rem 0;
}

/* keep inner content aligned with your layout */
.role-background .content-block {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Full-width blue band behind Style Guide image */
.styleguide-background {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    background-color: #0065A4;
    padding: 3rem 0;
}

/* Keep the image aligned with the layout width */
.styleguide-background .fullwidth-image-section {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.page-contact .hero-image img {
    width: 550px !important;
    max-width: 550px !important;
    /* bigger */
    opacity: 0.04;
    /* same subtle look as homepage */
    margin-top: 650px;

}

.page-contact .hero-image {
    right: 30% !important;
    /* increase this number to push it left */
}

/* Anxiety Heart – Inspiration Grid */
.inspo-section {
    margin-bottom: var(--spacing-lg);
    margin-top: 80px;
}

.inspo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-sm);
}

/* Make all images the same height, flexible width */
.inspo-grid img {
    width: 100%;
    height: 190px;
    /* tweak this height if you want taller/shorter */
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* Responsive: stack nicely on smaller screens */
@media (max-width: 900px) {
    .inspo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .inspo-grid {
        grid-template-columns: 1fr;
    }
}



/* PATH – Sketches Section */
.sketches-section {
    margin-top: 10px;
}

.sketches-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
}

.sketches-grid img {
    width: 100%;
    height: 280px;
    /* tweak this if you want taller/shorter sketches */
    object-fit: cover;
    /* keeps them the same height, crops nicely */
    border-radius: 8px;
    display: block;
}

/* Stack on smaller screens */
@media (max-width: 900px) {
    .sketches-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .sketches-grid {
        grid-template-columns: 1fr;
    }
}

/* ----- SIMPLE IMAGE CAROUSEL ----- */
.carousel-section {
    /* smaller vertical padding than the default .section */
    position: relative;
    /* NEW */
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    margin-top: 0;
}

.carousel {
    position: relative;
    width: 100%;
    max-width: 1000px;
    /* full layout width */
    margin: 0 auto 1.5rem;
    /* was 3rem – closer to next section */
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    /* native smooth scroll */
    gap: 1rem;
    padding: 30px;
    /* Add padding to prevent shadow clipping */
    margin: -30px 0;
    /* Negate margin to keep layout flow */
    /* room for scrollbar if visible */
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.carousel-track::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.carousel-image {
    width: 100%;
    flex-shrink: 0;
    border-radius: 6px;
    object-fit: cover;
}

/* Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transition: all 0.2s ease;
}

.carousel-btn:hover {
    background-color: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.carousel-btn.prev {
    left: -20px;
}

.carousel-btn.next {
    right: -20px;
}

@media (max-width: 768px) {

    .carousel-btn.prev {
        left: 10px;
    }

    .carousel-btn.next {
        right: 10px;
    }
}

/* Related Project Cards - New Hover Style */
.related-projects {
    margin-top: 4rem;
    margin-bottom: 2rem;
    border-top: 1px solid var(--grey-medium);
    padding-top: 3rem;
}

.related-projects h3 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--grey-dark);
    text-transform: uppercase;
    font-weight: 600;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-card {
    display: block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    aspect-ratio: 4/3;
}

.related-image-wrapper {
    width: 100%;
    height: 100%;
    margin-bottom: 0;
    background-color: #f0f0f0;
}

.related-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-card:hover .related-image {
    transform: scale(1.05);
}

/* Overlay Styles */
.related-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 1rem;
    text-align: center;
}

.related-card:hover .related-overlay {
    opacity: 1;
}

.related-overlay h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #000;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.related-overlay p {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transform: translateY(10px);
    transition: transform 0.3s ease 0.05s;
}

.related-card:hover .related-overlay h4,
.related-card:hover .related-overlay p {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =========================================
   CASE STUDY CONSISTENT SPACING
   ========================================= */

/* Reduce .section padding on case studies */
body.case-study .section {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

/* Reduce hero padding so titles sit higher */
body.case-study .hero-project {
    padding-top: calc(var(--header-height) + 1.5rem) !important;
    padding-bottom: 1rem !important;
}

/* Reduce image bottom margin to bring Overview closer */
body.case-study .project-hero-image {
    margin-bottom: 2rem !important;
}

/* Normalize varied sections - Spacing ONLY */
/* Removed selectors that broke full-width/carousel visuals (e.g. padding: 0 overrides) */
body.case-study .styleguide-video-section,
body.case-study .tools-section,
body.case-study .tools-section2,
body.case-study .tools-compact {
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
    /* Removed padding: 0 !important so internal padding for backgrounds/shadows is preserved */
}

/* Ensure Back to Top has no gap after */
body.case-study .back-to-top {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Also ensure no massive bottom margin on the element before footer */
body.case-study main {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* =========================================
   RESTORED MISSING STYLES & REFINEMENTS
   ========================================= */

/* Shadow Image - More dramatic, offset right/down */
.shadow-img {
    box-shadow: 6px 6px 30px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    /* Assuming default radius */
}

/* Full Width Image */
.fw-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Ripley's Grey Background */
.ripley-grey-bg {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    background-color: #E6E6E6;
    padding: 3rem 0;
}

/* Orange Background */
.orange-background {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    background-color: #FEF8F0;
    background-color: #FEF8F0;
    padding: 3rem 0;
}

/* Constrain image inside orange background */
.orange-background .fullwidth-image-section {
    max-width: 1000px;
    margin: 0 auto;
}

/* Ripley's Location Section Constraint */
.ripley-location-section {
    max-width: 1000px;
    margin: 0 auto;
}

/* Gokoo Two Column Grid */
.two-col-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .two-col-images {
        grid-template-columns: 1fr;
    }
}

/* Spacing Adjustments */
.styleguide-video-section {
    margin-top: 3rem;
}

.video-wrapper {
    /* Removed margin-top here so it doesn't double up or affect inner layouts */
    width: 100%;
}

/* Motion Design Page Specifics */
body.page-motion .content-block h2 {
    margin-top: 6rem;
    /* Increased spacing between projects */
}

body.page-motion .video-wrapper {
    width: 100%;
    max-width: none;
    /* Ensure full width */
}

/* YouTube Embed Fix for Motion Page */
body.page-motion .styleguide-video-section .video-wrapper iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    display: block;
    border: none;
}

/* Add breathing room after Overview block */
/* Target the first content block within the first section after the hero */
.hero-project+.section .content-block:first-child {
    margin-bottom: 3rem;
}

/* Homepage only: clickable “Design” word */
.page-home .design-word {
    cursor: pointer;
    display: inline-block;
    /* lets transforms work nicely */
    transition: color 0.2s ease, transform 0.15s ease;
}

.page-home .design-word:hover {
    transform: translateY(-1px);
    text-decoration: underline;
    text-underline-offset: 4px;
}


/* ===== THINGS I DO BEST ===== */
.things-best-section {
    margin-top: 5rem;
    margin-bottom: 3rem;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.skills-col h4 {
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: #000;
}

.skills-col ul {
    list-style: disc;
    padding-left: 1.2rem;
    margin: 0;
}

.skills-col li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* THINGS I DO BEST - card look (like focus area) */
.skills-col {
    background-color: var(--grey-light);
    border-radius: 12px;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}



.skills-grid {
    align-items: stretch;
}

.skills-col {
    height: 100%;
}


.about-portrait {
    width: 100%;
    max-width: 600px;
    height: 420px;
    /* controls size on the left */
    overflow: hidden;
    border-radius: 12px;
    /* subtle rounded rectangle */
}

.about-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* crops sides if needed */
    display: block;
}




/* =========================
   VERTICAL (PHONE) CAROUSEL
   ========================= */

.vcarousel-section {
    position: relative;
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-md);
}

.vcarousel {
    position: relative;
    width: 100%;
    max-width: 1000px;
    /* same as your layout content */
    margin: 0 auto;
}

/* Horizontal scrolling row (same idea), but cards are tall phone frames */
.vcarousel-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 30px;
    /* keeps shadow from clipping */
    margin: -30px 0;
    /* negates padding space so layout stays clean */
    scrollbar-width: none;
}

.vcarousel-track::-webkit-scrollbar {
    display: none;
}

/* Each phone slide is a “card” with fixed height */
.vcarousel-item {
    flex: 0 0 auto;
    height: 520px;
    /* controls the phone preview height */
    width: 300px;
    /* controls phone width */
    border-radius: 12px;
    overflow: hidden;
    /* keeps image inside rounded corners */
    background: var(--grey-light);
}

/* The actual phone image */
.vcarousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* IMPORTANT: shows whole vertical screenshot */
    background: #fff;
    /* nice if PNG has transparency */
    display: block;
}

/* Buttons (new class names so no conflict) */
.vcarousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transition: all 0.2s ease;
}

.vcarousel-btn:hover {
    background-color: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.vcarousel-btn.prev {
    left: -20px;
}

.vcarousel-btn.next {
    right: -20px;
}

@media (max-width: 768px) {
    .vcarousel-btn.prev {
        left: 10px;
    }

    .vcarousel-btn.next {
        right: 10px;
    }

    /* on mobile, make phone cards a bit narrower */
    .vcarousel-item {
        width: 240px;
        height: 480px;
    }
}








/* =========================
   MATCH VERTICAL CAROUSEL ARROWS TO CAROUSEL2
   ========================= */

/* Base arrow style */
.vcarousel-btn {
    background: none !important;
    border: none !important;

    width: auto;
    height: auto;
    padding: 10px;

    color: #fff;
    font-size: 50px;
    line-height: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    z-index: 10;

    /* same visual treatment as carousel2 */
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
    box-shadow: none !important;

    transition: opacity 0.2s ease;
}

/* Hover (subtle, not bubbly) */
.vcarousel-btn:hover {
    opacity: 0.85;
    transform: translateY(-50%);
}

/* Positioning — keep your existing offsets */
.vcarousel-btn.prev {
    left: -20px;
}

.vcarousel-btn.next {
    right: -20px;
}

/* Phone size tweaks (match carousel2 behavior) */
@media (max-width: 768px) {
    .vcarousel-btn {
        font-size: 30px;
        padding: 8px;
    }
}












/* ===========================
   CASE STUDY TOOL LABELS (Anxiety Heart)
   Uses: .tool-label2
   =========================== */

/* Make sure tool items can position labels */
body.case-study .tool-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Default hidden label */
body.case-study .tool-label2 {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-2px);
    width: max-content;
    font-size: 0.8rem;
    color: var(--grey-dark);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    margin-top: 25px;
    /* tweak this number for more/less gap */
    text-align: center;
}

/* Show on hover */
body.case-study .tool-item:hover .tool-label2 {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* ABOUT — 2 images side-by-side, no gap */
.mood-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 0;
    /* no outer gap */
    padding: 0;
    /* no outer gap */
    margin-top: 8rem;
}

.mood-img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    /* no image gap */
    padding: 0;
    border-radius: 0;
    /* keep edges touching */
}

/* Mobile: stack, still no gap */
@media (max-width: 768px) {
    .mood-strip {
        grid-template-columns: 1fr;
    }
}

/* Homepage Mobile Optimizations (< 480px) */
@media (max-width: 480px) {
    .page-home .hero-line-one {
        display: block;
        white-space: nowrap;
        font-size: 0.9rem;
        /* Sized to fit on a single line on small phones */
    }

    .page-home .home-tools .tools-grid {
        flex-wrap: nowrap;
        gap: 0.75rem;
        justify-content: space-between;
    }

    .page-home .home-tools .tool-item img {
        width: 40px;
        height: 40px;
    }

    .page-home .home-tools .tool-label {
        font-size: 0.7rem;
        margin-top: 15px;
    }
}

/* About Page Mobile Optimizations (< 480px) */
@media (max-width: 480px) {
    .page-about .tagline {
        white-space: nowrap;
        font-size: 1.05rem;
        /* Adjusted to fit one line on small phones */
    }

    /* Target Beyond Design grid items */
    .page-about .content-block div[style*="grid-template-columns"]>div {
        white-space: nowrap;
        font-size: 0.85rem;
        /* Slightly smaller to ensure fit */
    }
}

/* Related Projects Mobile Optimization (< 600px) */
@media (max-width: 600px) {
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .related-card:nth-child(4) {
        display: none;
    }
}



/* Mobile-only: "You may also like" overlay text tweaks */
@media (max-width: 600px) {
    .related-overlay p {
        display: none !important;
        /* hide subtitle */
    }

    .related-overlay h4 {
        font-size: 0.95rem;
        /* smaller title */
        line-height: 1.2;
    }
}


@media (max-width: 600px) {
    body.case-study .tool-item img:hover {
        transform: scale(1);
    }
}

/* ===============================
   CASE STUDIES – TOOLSET (MOBILE)
   Remove hover zoom, keep labels


   /* Case studies: MAIN TOOLSET - fit 4 per row on phones */
@media (max-width: 600px) {
    body.case-study .tools-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
        justify-items: center;
        align-items: center;
    }

    body.case-study .tool-item img {
        width: 55px;
        /* tweak: 40–50 */
        height: 55px;
        border-radius: 8px;
    }
}


@media (max-width: 600px) {
    body.case-study .tools-section {
        padding-left: 0;
        padding-right: 0;
    }

    body.case-study .tools-compact {
        margin-left: 0;
        margin-right: 0;
    }

    body.case-study .tools-grid {
        padding-left: 0;
        padding-right: 0;
    }
}


@media (max-width: 600px) {
    /* Reduce heavy shadows on mobile so carousels feel bigger */

    .shadow-img,
    .carousel-image,
    .vcarousel-item,
    .project-hero-image {
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12) !important;
    }
}




/* ===============================
   SIMPLE CAROUSEL
================================ */
/* ===== Carousel 2 ===== */
.carousel2 {
    width: 100%;
}

/* The fixed “shadow frame” */
.carousel2-frame {
    position: relative;
    width: 100%;

    /* this is the magic: it clips the slides so you don't see the next image */
    overflow: hidden;

    /* shadow stays in place (not per slide) */
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.25));
}

@media (max-width: 768px) {
    .carousel2-frame {
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
        padding: 8px;
    }

}

/* Track */
.carousel2-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;

    /* hide scrollbar */
    scrollbar-width: none;
}

.carousel2-track::-webkit-scrollbar {
    display: none;
}

/* Slides */
.carousel2-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
}

/* Image full width, no shadow here */
.carousel2-slide img {
    width: 100%;
    height: auto;
    display: block;
}

/* Dots */
.carousel2-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.carousel2-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;

    background: #000;
    opacity: 0.35;

    border: none;
    padding: 0;
    cursor: pointer;
}

.carousel2-dot.is-active {
    opacity: 1;
}

/* Arrows */
.carousel2-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;

    background: none;
    border: none;
    color: #fff;

    font-size: 100px;
    line-height: 1;
    padding: 8px 10px;

    cursor: pointer;

    /* subtle shadow so white shows on bright images */
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.carousel2-arrow.prev {
    left: 8px;
}

.carousel2-arrow.next {
    right: 8px;
}

/* optional: let arrows “bleed” a bit outside */
.carousel2-frame {
    overflow: visible;
    /* <-- DON'T do this if you want to clip slides */
}





@media (max-width: 768px) {
    .carousel2-arrow {
        display: none;
    }
}


@media (max-width: 768px) {
    .carousel-section2.container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .carousel2-slide img {
        border-radius: 0;
        /* optional if you want true edge-to-edge */
    }
}

/* Small rounded corners on carousel images */
.carousel2-slide img {
    border-radius: 10px;
    /* adjust: 4px, 6px, 10px, etc */
}



@media (max-width: 768px) {
    .vcarousel-btn {
        display: none;
    }
}






/* =========================
   RIPLEY GREY BG – FIX CAROUSEL WIDTH
   ========================= */

/* Make sure the grey band itself doesn't stretch children */
.ripley-grey-bg {
    width: 100%;
}

/* Force carousel sections to behave like normal layout sections */
.ripley-grey-bg .carousel-section2 {
    width: 100%;
}

/* THIS is the key part */
.ripley-grey-bg .carousel2 {
    width: 100%;
    max-width: 100%;
}

/* Constrain the actual visible carousel frame */
.ripley-grey-bg .carousel2-frame {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Make sure slides & images don't exceed container */
.ripley-grey-bg .carousel2-track,
.ripley-grey-bg .carousel2-slide,
.ripley-grey-bg .carousel2-slide img {
    width: 100%;
    max-width: 100%;
}



/* FULL-WIDTH GREY BAND */
.ripley-grey-bg {
    width: 100vw;
    /* full screen width */
    margin-left: calc(50% - 50vw);
    /* break out of any parent container */
    margin-right: calc(50% - 50vw);
    background: #f2f2f2;
    /* your grey */
    padding: var(--spacing-lg) 0;
    /* vertical spacing only */
}

/* Make sure all content inside uses your normal centered layout */
.ripley-grey-bg .container,
.ripley-grey-bg .fullwidth-image-section {
    width: 100%;
    max-width: var(--max-width, 1000px);
    /* use your site max width var if you have one */
    margin: 0 auto;
}

/* If your fullwidth-image-section was truly full width before, keep it layout-width here */
.ripley-grey-bg .fw-img {
    width: 100%;
    display: block;
}






/* MOBILE: turn inspo into a 2x2-per-page horizontal carousel */
@media (max-width: 768px) {

    /* Make the whole block the positioning parent for the arrow */
    .inspo-section {
        position: relative;
    }

    .inspo-grid {
        --gap: 12px;

        display: grid;
        gap: var(--gap);

        /* We want 2 rows visible */
        grid-template-rows: repeat(2, auto);

        /* Items fill down the column first, then create a new column to the right */
        grid-auto-flow: column;

        /* Each column should be half the visible width (minus the gap),
       so 2 columns fit in the viewport */
        grid-auto-columns: calc((100% - var(--gap)) / 2);

        overflow-x: auto;
        overflow-y: hidden;

        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;

        padding-right: 56px;
        /* space so arrow doesn't cover images */
        scrollbar-width: none;
    }

    .inspo-grid::-webkit-scrollbar {
        display: none;
    }

    /* Images scale nicely + keep proportions */
    .inspo-grid img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 10px;
    }

    /* IMPORTANT: snap only at the start of each "page" (every 4 images) */
    .inspo-grid img {
        scroll-snap-align: none;
    }

    .inspo-grid img:nth-child(4n + 1) {
        scroll-snap-align: start;
    }

    /* Arrow on the right */
    .inspo-arrow {
        position: absolute;
        top: 50%;
        right: -10px;
        /* can bleed outside layout */
        transform: translateY(-50%);
        z-index: 5;

        background: none;
        border: none;
        cursor: pointer;

        color: #fff;
        font-size: 32px;
        line-height: 1;

        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
        padding: 10px;
    }
}



/* MOBILE: make inspo images uniform tiles */
@media (max-width: 768px) {

    .inspo-grid img {
        width: 100%;
        height: 100%;

        /* This is the key */
        object-fit: cover;

        display: block;
        border-radius: 10px;
    }

    /* Give each grid cell a fixed ratio */
    .inspo-grid>img {
        aspect-ratio: 1 / 1;
        /* adjust if you want taller/shorter */
    }
}




/* =========================================
   MAIN TOOLSET – HORIZONTAL SCROLL (MOBILE)
   Labels always visible (no hover)
   Scoped with .tools-scroll-mobile
   ========================================= */
@media (max-width: 768px) {

    .tools-scroll-mobile .tools-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 16px;

        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;

        padding-bottom: 6px;
        scrollbar-width: none;
    }

    .tools-scroll-mobile .tools-grid::-webkit-scrollbar {
        display: none;
    }

    /* Make sure items don't shrink so scrolling happens */
    .tools-scroll-mobile .tool-item {
        flex: 0 0 auto;
        min-width: 78px;
        /* tweak if needed */
        text-align: center;
    }

    /* Keep icons a consistent size */
    .tools-scroll-mobile .tool-item img {
        width: 56px;
        /* tweak if needed */
        height: auto;
        display: block;
        margin: 0 auto;
    }

    /* Labels always visible */
    .tools-scroll-mobile .tool-label2 {
        display: block;
        margin-top: 8px;
        font-size: 12px;
        color: #bdbdbd;
        /* your light grey */
        opacity: 1 !important;
        transform: none !important;
    }

    /* Kill hover behavior just for this section on mobile */
    .tools-scroll-mobile .tool-item:hover .tool-label2 {
        opacity: 1;
        transform: none;
    }
}






@media (max-width: 768px) {

    /* 1) Make the row scroll horizontally */
    .tools-scroll-mobile .tools-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: flex-start !important;
        gap: 18px !important;

        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;

        padding: 6px 2px 10px !important;
        scrollbar-width: none;
    }

    .tools-scroll-mobile .tools-grid::-webkit-scrollbar {
        display: none;
    }

    /* 2) Force each tool card to be a centered stack */
    .tools-scroll-mobile .tool-item {
        flex: 0 0 auto !important;
        min-width: 88px !important;
        /* makes scroll actually happen */
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        text-align: center !important;
        gap: 8px !important;

        /* kill any old layout constraints */
        width: auto !important;
        margin: 0 !important;
    }

    /* 3) Normalize icon size so all align */
    .tools-scroll-mobile .tool-item img {
        width: 56px !important;
        height: 56px !important;
        object-fit: contain !important;
        display: block !important;
        margin: 0 !important;
    }

    /* 4) Make labels normal (no hover positioning) */
    .tools-scroll-mobile .tool-label2 {
        position: static !important;
        opacity: 1 !important;
        transform: none !important;

        display: block !important;
        margin: 0 !important;
        padding: 0 !important;

        font-size: 12px !important;
        line-height: 1.2 !important;
        color: #bdbdbd !important;

        /* keeps them neat */
        width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}


/* CONTACT: hide watermark logo on mobile only */
@media (max-width: 768px) {
    .hero-image.contact-hero-image {
        display: none !important;
    }
}


/* CONTACT page: add breathing room between form + "Get in Touch" on mobile */
@media (max-width: 768px) {
    .page-contact .grid.grid-2>div:nth-child(2) {
        margin-top: 5rem;
        /* increase if you want more */
        padding-left: 0 !important;
        /* optional: removes weird left indent on mobile */
    }
}




@media (max-width: 768px) {

    /* make sure the hero section becomes the positioning parent */
    .page-contact .section.hero.container {
        position: relative;
    }

    /* place the watermark at the top, centered */
    .page-contact .hero-image.contact-hero-image {
        display: block !important;
        /* (only if you previously hid it) */
        position: absolute !important;
        top: 0 !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;

        width: min(300px, 70vw) !important;
        /* keeps it responsive */
        margin: 0 !important;
        pointer-events: none;
        z-index: 0;
        /* behind content */
    }

    /* prevent cropping */
    .page-contact .hero-image.contact-hero-image img {
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        display: block !important;
    }

    /* make sure text sits above it */
    .page-contact .section.hero.container>* {
        position: relative;
        z-index: 1;
    }

    /* optional: add breathing room so it doesn't overlap the h1 */
    .page-contact .section.hero.container {
        padding-top: 120px;
        /* tweak: 80–160px */
    }
}