/* Base Styles */
:root {
    --primary-color: #111;
    --text-light: #aaa;
    --text-muted: #666;
    --logo-green: #803A31;
    /* Brand Accent */
    --font-main: 'Jost', sans-serif;
    --container-width: 100%;
    /* We use direct paddings for layout */
}

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

body {
    font-family: var(--font-main);
    color: var(--primary-color);
    background-color: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#canvas {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

main {
    flex: 1;
}


ul {
    list-style: none;
}

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

img {
    max-width: 100%;
    display: block;
}

/* Typography & Logo */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-wrapper {
    display: flex;
    align-items: flex-end;
}

.logo-text {
    font-family: 'Oswald', sans-serif;
    color: var(--logo-green);
    font-size: 3.8rem;
    font-weight: 400;
    letter-spacing: 2px;
    line-height: 0.8;
    transform: scaleY(1.3);
    transform-origin: bottom;
}

.logo-ltd {
    font-family: var(--font-main);
    color: var(--logo-green);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    margin-left: 6px;
    margin-bottom: 2px;
}

/* Header */
.desktop-header {
    display: none;
    padding: 40px 0;
    margin-bottom: 40px;
}

.desktop-header .header-inner {
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.desktop-nav ul {
    display: flex;
    gap: 35px;
}

.desktop-nav a,
.desktop-nav label {
    font-family: var(--font-main);
    font-size: 17px;
    color: #999;
    text-transform: uppercase;
    transition: color 0.3s ease;
    font-weight: 400;
    padding: 13px 0;
    display: inline-block;
    line-height: 1.6em;
    font-style: normal;
    text-decoration: none;
    cursor: pointer;
}

.desktop-nav a.nav-active {
    color: var(--primary-color);
}

.desktop-nav a:hover,
.desktop-nav label:hover {
    color: var(--primary-color);
}

/* Mobile Header */
.mobile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px 40px;
}

.menu-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 16px;
    letter-spacing: 1px;
    margin-bottom: 25px;
    cursor: pointer;
    font-family: var(--font-main);
    text-transform: uppercase;
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    opacity: 0;
}

.mobile-nav-overlay.active,
.menu-toggle:checked~.mobile-nav-overlay {
    transform: translateY(0);
    opacity: 1;
}

.close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--primary-color);
}

.mobile-nav-overlay ul {
    text-align: center;
}

.mobile-nav-overlay li {
    margin: 20px 0;
}

.mobile-nav-overlay a,
.mobile-nav-overlay label {
    font-family: var(--font-main);
    font-size: 32px;
    letter-spacing: 1px;
    color: #999;
    font-weight: 400;
    text-transform: uppercase;
    line-height: 1.6em;
    font-style: normal;
    text-decoration: none;
    transition: color 0.3s ease;
    cursor: pointer;
}

.mobile-nav-overlay a.nav-active {
    color: var(--primary-color);
}

.mobile-nav-overlay a:hover,
.mobile-nav-overlay label:hover {
    color: var(--primary-color);
}

/* Main Content */
.gallery-section {
    width: 100%;
    margin: 20px auto 80px;
}

/* Gallery Header & Switcher */
.gallery-header {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 50px;
}

.section-title {
    text-align: center;
    font-size: 22px;
    letter-spacing: 0.06em;
    font-weight: 300;
    color: var(--primary-color);
    line-height: 1.5em;
    margin: 0;
}

.gallery-header .section-title {
    margin-bottom: 0;
}

.view-switcher {
    display: none;
    /* Desktop only */
    position: absolute;
    right: 0;
    gap: 15px;
}

.switch-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    transition: all 0.3s ease;
}

.switch-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Toggle logic */
#toggle-collage:checked~main .collage-btn,
#toggle-grid:checked~main .grid-btn,
#toggle-grid:checked~.desktop-header label[for="toggle-grid"],
#toggle-grid:checked~.mobile-nav-overlay label[for="toggle-grid"] {
    color: var(--primary-color);
}

/* Default Grid Container Styles */
.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 15px;
    column-gap: 15px;
    transition: all 0.4s ease;
}

/* Collage View (Desktop Default) */
@media (min-width: 768px) {
    .view-switcher {
        display: flex;
    }

    /* Target grid container when collage is checked */
    #toggle-collage:checked~main .grid-container {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        grid-auto-rows: 240px;
        grid-auto-flow: dense;
        gap: 2px;
    }

    #toggle-collage:checked~main .grid-item {
        position: relative;
        overflow: hidden;
        height: 100%;
        width: 100%;
        display: block;
    }

    #toggle-collage:checked~main .grid-item .image-wrapper {
        height: 100%;
        width: 100%;
        margin-bottom: 0;
    }

    #toggle-collage:checked~main .grid-item .item-title {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 10px 15px;
        background: rgba(0, 0, 0, 0.7);
        color: #fff;
        font-size: 11px;
        letter-spacing: 2px;
        text-align: left;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s;
        z-index: 2;
    }

    #toggle-collage:checked~main .grid-item:hover .item-title {
        opacity: 1;
        visibility: visible;
    }

    /* Grid View Specifics */
    #toggle-grid:checked~main .grid-container {
        grid-template-columns: repeat(3, 1fr);
        column-gap: 34px;
        row-gap: 34px;
    }

    #toggle-grid:checked~main .grid-item .item-title {
        position: static;
        opacity: 1;
        visibility: visible;
        background: none;
        color: var(--text-muted);
        padding: 0;
        text-align: center;
        width: auto;
    }



    /* Perfect 6-Column Mathematical Mapping for 14 Items */
    
    /* Rows 1 & 2 */
    #toggle-collage:checked~main .grid-item:nth-child(1) { grid-column: span 4; grid-row: span 2; }
    #toggle-collage:checked~main .grid-item:nth-child(2) { grid-column: span 2; grid-row: span 1; }
    #toggle-collage:checked~main .grid-item:nth-child(3) { grid-column: span 2; grid-row: span 1; }

    /* Rows 3 & 4 */
    #toggle-collage:checked~main .grid-item:nth-child(4) { grid-column: span 2; grid-row: span 2; }
    #toggle-collage:checked~main .grid-item:nth-child(5) { grid-column: span 4; grid-row: span 1; }
    #toggle-collage:checked~main .grid-item:nth-child(6) { grid-column: span 4; grid-row: span 1; }

    /* Rows 5 & 6 */
    #toggle-collage:checked~main .grid-item:nth-child(7) { grid-column: span 3; grid-row: span 2; }
    #toggle-collage:checked~main .grid-item:nth-child(8) { grid-column: span 3; grid-row: span 1; }
    #toggle-collage:checked~main .grid-item:nth-child(9) { grid-column: span 3; grid-row: span 1; }

    /* Rows 7 & 8 */
    #toggle-collage:checked~main .grid-item:nth-child(10) { grid-column: span 2; grid-row: span 2; }
    #toggle-collage:checked~main .grid-item:nth-child(11) { grid-column: span 2; grid-row: span 2; }
    #toggle-collage:checked~main .grid-item:nth-child(12) { grid-column: span 2; grid-row: span 2; }

    /* Rows 9 & 10 */
    #toggle-collage:checked~main .grid-item:nth-child(13) { grid-column: span 3; grid-row: span 1; }
    #toggle-collage:checked~main .grid-item:nth-child(14) { grid-column: span 3; grid-row: span 1; }
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    scroll-margin-top: 100px;
}

.image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    margin-bottom: 12px;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.5s ease;
}

/* Colorsplash Focus Effect */
@media (hover: hover) {
    /* Only apply grayscale to others if ONE item is being hovered */
    .grid-container:has(.grid-item:hover) .grid-item:not(:hover) img {
        filter: grayscale(100%) opacity(0.7);
    }

    /* Keep the hovered item in full color and scale it */
    .grid-item:hover img {
        filter: grayscale(0%) opacity(1);
        transform: scale(1.05);
    }
}

.item-title {
    font-size: 14px;
    letter-spacing: .06em;
    font-weight: 300;
    color: var(--text-muted);
    text-transform: uppercase;
    text-align: center;
}

/* Footer */
footer {
    padding: 40px 20px;
}

.footer-inner {
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
}

.footer-left p {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 2px;
}

.footer-left p a {
    text-decoration: underline;
    text-underline-offset: 5px;
    transition: color 0.3s ease;
}

.footer-left p a:hover {
    color: var(--primary-color);
}

.footer-right {
    display: flex;
    gap: 25px;
}

.footer-right a {
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: opacity 0.3s ease;
}

.footer-right a:hover {
    opacity: 0.6;
}

/* Media Queries for Desktop */
@media (min-width: 768px) {
    .mobile-header {
        display: none;
    }

    .desktop-header {
        display: block;
    }

    .gallery-section {
        margin: 0px auto 100px;
    }

    .gallery-header {
        justify-content: flex-start;
    }

    .section-title {
        text-align: left;
        margin-bottom: 0px;
    }

    .image-wrapper {
        margin-bottom: 15px;
    }

    .footer-inner {
        flex-direction: row;
    }
}

@media (min-width: 1200px) {
    #canvas {
        padding: 0;
        /* Keep desktop flush to the 1200px line when screen is wide enough */
    }
}

/* --- Designer Detail Modals --- */

/* The Background Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

/* Show modal when the ID is in the URL */
.modal-overlay:target {
    opacity: 1;
    visibility: visible;
}

/* Modal Content Box */
.modal-content {
    max-width: 700px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 60px 40px;
    background: #fff;
    position: relative;
    text-align: left;
    box-shadow: 0 30px 60px rgba(0,0,0,0.05);
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 24px;
    color: #999;
    line-height: 1;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover { 
    color: #000; 
    background: #f9f9f9;
    border-radius: 50%;
}

/* Bio Content Styling */
.modal-content h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
    line-height: 1.2;
}

.designer-url {
    display: block;
    font-size: 0.9rem;
    color: var(--logo-green);
    margin-bottom: 30px;
    text-decoration: none;
    font-weight: 500;
}

.designer-bio p {
    margin-bottom: 20px;
    color: #444;
    line-height: 1.8;
    font-size: 1.05rem;
}

/* Action Buttons Area */
.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 40px;
    width: 100%;
}

.modal-actions .btn-detail {
    flex: 1;
    width: 0; /* Ensures equal width distribution */
}

.btn-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 30px;
    background: #111;
    color: #fff;
    border: 1px solid #111;
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: 400;
    min-width: 180px; /* Refined consistent width */
    white-space: nowrap;
}

.btn-detail i {
    margin-right: 12px;
    font-size: 1rem;
}

.btn-detail.primary {
    background: #111;
    color: #fff;
}

.btn-detail.primary:hover {
    background: var(--logo-green);
    border-color: var(--logo-green);
}

.btn-detail.secondary {
    background: transparent;
    color: #111;
}

.btn-detail.secondary:hover {
    background: #111;
    color: #fff;
}

@media (max-width: 600px) {
    .modal-actions {
        flex-direction: column;
    }
    .modal-actions .btn-detail {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* --- Global Line Sheet Password Overlay --- */
.ls-gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff; /* Solid white to prevent content overlap */
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#ls-gate-toggle:checked ~ .ls-gate-overlay {
    opacity: 1;
    visibility: visible;
}

.ls-gate-content {
    max-width: 450px;
    width: 90%;
    text-align: center;
    padding: 40px;
}

.ls-gate-content h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.ls-gate-close {
    position: absolute;
    top: 40px;
    right: 40px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ls-gate-close:hover {
    color: #000;
    background: #f9f9f9;
    border-radius: 50%;
}

.ls-input {
    width: 100%;
    padding: 15px;
    border: 1px solid #eee;
    font-family: var(--font-main);
    text-align: center;
    letter-spacing: 2px;
    margin-bottom: 20px;
    outline: none;
}

.ls-input:focus {
    border-color: var(--logo-green);
}

.ls-download {
    display: none;
    width: 100%;
}

.ls-input:valid ~ .ls-download {
    display: inline-block;
}

.ls-success-msg {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.ls-success-msg .fa-circle-check {
    font-size: 4rem;
    color: var(--logo-green);
    margin: 0 auto 25px auto;
    display: block;
    width: fit-content;
}

/* Let the success screen button use the standard artisan styles */
.ls-success-msg .btn-detail {
    margin: 30px auto 0 auto;
}

/* Absolute lock on button icon sizes to prevent warping across all artisan buttons */
.btn-detail i {
    margin-right: 12px !important;
    font-size: 1rem !important; 
    display: inline-block !important;
    line-height: 1 !important;
    width: auto !important;
    height: auto !important;
    margin-bottom: 0 !important;
    color: inherit !important;
    vertical-align: middle;
}
/* Toggle logic for success state */
#ls-confirm-toggle:checked ~ .ls-gate-overlay .ls-gate-form {
    display: none;
}

#ls-confirm-toggle:checked ~ .ls-gate-overlay .ls-success-msg {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-detail.disabled {
    display: none;
}

.title-accent-line {
    pointer-events: none;
}

/* About Page Styles */
.about-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 80px;
    align-items: center;
    padding-bottom: 100px;
}

.about-text {
    flex: 1;
    line-height: 1.8;
    color: #444;
    font-size: 1.1rem;
}

.about-text p {
    margin-bottom: 25px;
}

.about-image {
    flex: 0 0 400px;
}

.image-frame {
    position: relative;
    padding: 15px;
    background: #fff;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.image-frame img {
    width: 100%;
    height: auto;
    display: block;
}


@media (max-width: 900px) {
    .about-container {
        flex-direction: column-reverse;
        gap: 60px;
        text-align: center;
        padding: 0 20px 100px;
    }
    
    .about-image {
        flex: 0 0 auto;
        width: 100%;
        max-width: 450px;
        margin: 0 auto;
    }
}