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

html {
    scroll-behavior: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', sans-serif;
    color: #111;
    background-color: #e8dcc8;
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================
   Slideshow (GLOBAL BACKGROUND)
========================= */
.hero-slideshow {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background-color: #e8dcc8;
    will-change: transform;
}

.hero-slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.8s ease-in-out;
    will-change: opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.hero-slideshow .slide.active {
    opacity: 1;
}

/* =========================
   Header
========================= */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 0 30px 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1a1a1a;
    z-index: 100;
    transform: translateZ(0);
    backface-visibility: hidden;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    height: 70px;
}

.logo-mark {
    width: 70px;
    height: 70px;
    object-fit: cover;
    object-position: center;
    display: block;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
}

.logo-text {
    font-size: 18px;
    letter-spacing: 3px;
    margin-top: 0;
    margin-left: 0;
    color: #b0bec5;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
}

.hamburger {
    display: none;
}

.main-nav {
    display: flex;
    min-width: 600px;
    justify-content: flex-end;
}

.main-nav a {
    margin-left: 40px;
    text-decoration: none;
    color: #b0bec5;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: #fff;
}

/* =========================
   Sections
========================= */
.section {
    min-height: 100vh;
    padding: 120px 60px 60px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
    transform: translateZ(0);
    backface-visibility: hidden;
}

#contact.section {
    padding: 140px 60px 60px;
}

/* Light brown panels over slideshow */
.section,
.section.muted {
    background: rgba(232, 220, 200, 0.92);
}

.section.muted {
    background: rgba(220, 205, 180, 0.95);
}

.container {
    max-width: 1000px;
}

#projects .container {
    max-width: 1400px;
}

/* =========================
   Hero Content
========================= */
.hero {
    display: flex;
    align-items: bottom;
    background: transparent;
    padding-top: 30px;
    min-height: 100vh;
    box-sizing: border-box;
}

.hero-content h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 50px;
    margin-bottom: 450px;
    color: #fff;
    min-height: 60px;
}

.hero-content p {
    font-size: 20px;
    max-width: 500px;
    color: #fff;
    min-height: 10px;
}

/* =========================
   Typography
========================= */
h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 23px;
    font-weight: 400;
    letter-spacing: 1px;
    margin-bottom: 30px;
    text-transform: uppercase;
}

#contact h2 {
    font-size: 19px;
}

p {
    max-width: 700px;
    font-size: 16px;
}

/* White text for specific sections */
#about .container,
#philosophy .container,
#services .container {
    color: #fff;
}

#about h2,
#philosophy h2,
#services h2 {
    color: #fff;
}

#projects h2 {
    color: #fff;
}

/* =========================
   Lists
========================= */
.philosophy-list,
.services-list {
    list-style: none;
}

.philosophy-list li,
.services-list li {
    margin-bottom: 12px;
    font-size: 16px;
}

/* =========================
   Projects
========================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.project-card {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    width: 100%;
    height: 180px;
    background: #e8dcc8;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    position: relative;
}

.project-image img {
    transition: opacity 0.2s ease-in;
}


.project-card h3 {
    margin-top: 15px;
    font-size: 18px;
    color: #fff;
}

.project-card span {
    font-size: 14px;
    color: #fff;
}

/* =========================
   Project Gallery Modal
========================= */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 180px;
    box-sizing: border-box;
}

.modal-image {
    width: 100%;
    max-width: 1200px;
    height: 100%;
    max-height: calc(100vh - 280px);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

.modal-image:active {
    cursor: grabbing;
}

.modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #ccc;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: none;
    font-size: 24px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    border-radius: 4px;
    backdrop-filter: blur(5px);
}

.modal-nav:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.05);
}

.modal-nav:active {
    transform: translateY(-50%) scale(0.98);
}

.modal-nav:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.modal-nav.prev {
    left: calc(50% - 620px);
}

.modal-nav.next {
    right: calc(50% - 620px);
}

.modal-info {
    position: absolute;
    bottom: 185px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #fff;
    z-index: 1001;
}

.modal-info h3 {
    font-size: 18px;
    margin-bottom: 0;
    font-family: 'Merriweather', serif;
    font-weight: 400;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    transition: opacity 0.3s ease;
}

.modal-info span {
    font-size: 16px;
    color: #ccc;
}

/* =========================
   Thumbnail Carousel
========================= */
.thumbnail-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1400px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1002;
}

.thumbnail-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 15px 0;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: center;
}

.thumbnail-slider::-webkit-scrollbar {
    display: none;
}

.thumbnail-item {
    min-width: 160px;
    height: 120px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 6px;
    transition: all 0.3s ease;
    opacity: 0.6;
    flex-shrink: 0;
}

.thumbnail-item:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.thumbnail-item.active {
    border-color: #fff;
    opacity: 1;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.thumbnail-nav {
    display: none;
}

/* =========================
   Footer
========================= */
.site-footer {
    padding: 40px 60px;
    text-align: center;
    font-size: 14px;
    color: #666;
    background: rgba(232, 220, 200, 0.95);
}


/* =========================
   Contact Section
========================= */
.contact-container {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    max-width: 1200px;
    margin-top: 80px;
}

.contact-info {
    flex: 1;
}

.contact-info h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.contact-info p {
    margin-bottom: 20px;
}

.contact-info a {
    color: #111;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* =========================
   Contact Form
========================= */
.contact-form {
    flex: 1;
    max-width: 500px;
    margin-left: 250px;
    margin-top: 40px;
}

.form-group {
    margin-bottom: 18px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    border: 1px solid #ccc;
    background: #f0e8d8;
    font-family: 'Inter', sans-serif;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #111;
}

.contact-form button {
    padding: 12px 28px;
    border: 1px solid #111;
    background: transparent;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s ease;
    float: right;
}

.contact-form button:hover {
    background: #111;
    color: #fff;
}

.form-status {
    margin-top: 12px;
    font-size: 14px;
    color: #333;
}

/* =========================
   MOBILE RESPONSIVE STYLES
========================= */

/* Tablets and smaller (max-width: 768px) */
@media (max-width: 768px) {
    .site-header {
        padding: 15px 20px;
        flex-wrap: wrap;
    }

    .logo {
        gap: 0;
    }

    .logo-mark {
        width: 60px;
        height: 42px;
        font-size: 20px;
    }

    .logo-text {
        font-size: 16px;
        margin-top: 0;
        margin-left: 0;
        letter-spacing: 2px;
    }
    
    .hamburger {
        display: block;
        width: 30px;
        height: 24px;
        position: relative;
        cursor: pointer;
        z-index: 101;
    }
    
    .hamburger span {
        display: block;
        position: absolute;
        height: 2.5px;
        width: 100%;
        background: #fff;
        border-radius: 2px;
        opacity: 1;
        left: 0;
        transition: 0.25s ease-in-out;
    }
    
    .hamburger span:nth-child(1) {
        top: 0;
    }
    
    .hamburger span:nth-child(2) {
        top: 10px;
    }
    
    .hamburger span:nth-child(3) {
        top: 20px;
    }
    
    .hamburger.active span:nth-child(1) {
        top: 10px;
        transform: rotate(135deg);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        top: 10px;
        transform: rotate(-135deg);
    }

    .main-nav {
        display: none;
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: #1b2845;
        flex-direction: column;
        padding: 30px 40px;
        margin-top: 0;
        min-width: auto;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        z-index: 99;
        align-items: flex-start;
    }
    
    .main-nav.active {
        display: flex;
    }

    .main-nav a {
        margin: 8px 0;
        font-size: 16px;
        display: block;
        text-align: left;
        padding: 8px 0;
        width: 100%;
    }

    .hero-slideshow {
        top: 70px;
    }
    
    .hero-slideshow .slide {
        background-size: contain;
        background-position: center center;
    }
    
    .section {
        min-height: 100vh;
        padding: 120px 30px 60px;
    }

    .hero {
        min-height: 100vh;
        padding: 140px 30px 60px;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .hero-content p {
        font-size: 16px;
    }

    h2 {
        font-size: 32px;
        margin-bottom: 20px;
    }

    p {
        font-size: 15px;
    }

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

    #projects .container {
        max-width: 100%;
    }

    .contact-container {
        flex-direction: column;
        gap: 30px;
    }

    .contact-form {
        margin-left: 0;
        margin-top: 20px;
    }

    .site-footer {
        padding: 30px 20px;
    }

    .modal-close {
        top: 15px;
        right: 20px;
        font-size: 40px;
    }

    .modal-nav {
        font-size: 20px;
        padding: 10px 14px;
    }

    .modal-nav.prev {
        left: 10px;
    }

    .modal-nav.next {
        right: 10px;
    }
    
    .thumbnail-item {
        min-width: 140px;
        height: 105px;
    }
    
    .modal-info {
        bottom: 150px;
    }

    .modal-content {
        padding: 80px 10px 140px;
    }
    
    .modal-image {
        max-height: calc(100vh - 220px);
    }
    
    .modal-info {
        bottom: 130px;
    }

    .modal-info h3 {
        font-size: 14px;
    }

    .modal-info span {
        font-size: 12px;
    }
    
    .thumbnail-container {
        width: 98%;
        gap: 8px;
        bottom: 10px;
    }
    
    .thumbnail-item {
        min-width: 120px;
        height: 90px;
    }
    
    .modal-close {
        top: 15px;
        right: 15px;
        font-size: 40px;
    }
    
    .modal-nav {
        font-size: 18px;
        padding: 8px 12px;
    }
    
    .modal-nav.prev {
        left: 5px;
    }

    .modal-nav.next {
        right: 5px;
    }
}

/* Mobile phones (max-width: 480px) */
@media (max-width: 480px) {
    .site-header {
        padding: 12px 15px;
    }

    .logo {
        gap: 0;
    }

    .logo-mark {
        width: 48px;
        height: 34px;
        font-size: 16px;
        #border: 1px solid #111;
    }

    .logo-text {
        font-size: 13px;
        letter-spacing: 2px;
        margin-top: 0;
        margin-left: 0;
    }
    
    .hamburger {
        display: block;
        width: 28px;
        height: 22px;
        position: relative;
        cursor: pointer;
        z-index: 101;
    }
    
    .hamburger span {
        display: block;
        position: absolute;
        height: 2px;
        width: 100%;
        background: #fff;
        border-radius: 2px;
        opacity: 1;
        left: 0;
        transition: 0.25s ease-in-out;
    }
    
    .hamburger span:nth-child(1) {
        top: 0;
    }
    
    .hamburger span:nth-child(2) {
        top: 9px;
    }
    
    .hamburger span:nth-child(3) {
        top: 18px;
    }
    
    .hamburger.active span:nth-child(1) {
        top: 9px;
        transform: rotate(135deg);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        top: 9px;
        transform: rotate(-135deg);
    }

    .main-nav {
        display: none;
        position: fixed;
        top: 58px;
        left: 0;
        right: 0;
        background: #1b2845;
        flex-direction: column;
        padding: 25px 30px;
        margin-top: 0;
        min-width: auto;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        z-index: 99;
        align-items: flex-start;
    }
    
    .main-nav.active {
        display: flex;
    }

    .main-nav a {
        margin: 6px 0;
        font-size: 15px;
        display: block;
        text-align: left;
        padding: 6px 0;
        width: 100%;
    }

    .hero-slideshow {
        top: 70px;
        height: 45vh;
        bottom: auto;
    }
    
    .hero-slideshow .slide {
        background-size: contain;
        background-position: top center;
    }
    
    .section {
        min-height: 100vh;
        padding: 100px 20px 40px;
    }

    .hero {
        min-height: 100vh;
        padding-top: 60px;
        padding-bottom: 40px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .hero-content {
        margin-top: calc(45vh + 10px);
        position: relative;
        z-index: 2;
    }

    .hero-content h1 {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .hero-content p {
        font-size: 14px;
    }

    h2 {
        font-size: 26px;
        margin-bottom: 15px;
    }

    p {
        font-size: 14px;
    }

    .philosophy-list li,
    .services-list li {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .project-image {
        height: 200px;
    }

    .contact-container {
        flex-direction: column;
        gap: 40px;
        margin-top: 40px;
    }

    .contact-form {
        max-width: 100%;
        margin-left: 0;
        margin-top: 20px;
    }

    .contact-form button {
        float: none;
        width: 100%;
    }

    .contact-form input,
    .contact-form textarea {
        font-size: 16px;
    }

    .site-footer {
        padding: 25px 15px;
        font-size: 13px;
    }
}

/* Very small devices (max-width: 360px) */
@media (max-width: 360px) {
    .hero-content h1 {
        font-size: 24px;
    }

    .hero-content p {
        font-size: 13px;
    }

    h2 {
        font-size: 22px;
    }

    .main-nav a {
        margin: 4px 8px;
        font-size: 12px;
    }
}
