/* Variables */
:root {
    --bg-color: #ffffff;
    --text-color: #1a1a1a;
    --accent-color: #333333;
    --front-color: #ce6857;
    --transition-speed: 0.5s;
    --font-main: 'Montserrat', sans-serif;
    --font-script: 'Caramel', cursive;
}

/* Font Faces */
@font-face {
    font-family: 'Montserrat';
    src: url('./Montserrat-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('./Montserrat-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('./Montserrat-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Caramel';
    src: url('./Caramel-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Disable fade-in for intro so logo is instant */
.homepage {
    animation: none;
    opacity: 1;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    opacity: 0; /* For fade-in effect */
    animation: fadeInPage 0.5s ease-in forwards;
}

@keyframes fadeInPage {
    to { opacity: 1; }
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: #666;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1002; /* Increased to be above body::after (1001) */
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none; /* Allow clicks to pass through empty header space */
}

.logo-container {
    position: fixed;
    top: 20px;
    left: 40px;
    /* Scales linearly: 70px at <=500px viewport, 150px at >=1000px viewport */
    width: clamp(70px, calc(70px + (100vw - 500px) * 0.16), 150px);
    transition: all 3s cubic-bezier(0.65, 0, 0.35, 1); /* Smooth ease-in-out */
    z-index: 1002; /* Above the white overlay */
    pointer-events: auto;
    transform-origin: top left;
}

.logo-svg {
    width: 100%;
    height: auto;
}

.logo-svg > circle {
    fill: var(--front-color);
}

/* Intro Animation State */
body.intro-active {
    overflow: hidden;
}

/* White Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 1001; /* Below logo, above everything else */
    opacity: 0;
    pointer-events: none;
    transition: opacity 3s ease;
}

body.intro-active::after {
    opacity: 1;
    pointer-events: auto;
}

/* Logo Position during Intro */
body.intro-active .logo-container {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vmin; /* Big size relative to viewport */
    max-width: 600px;
}

/* Hide other header elements during intro if needed, though overlay covers them */
body.intro-active .mobile-menu-btn,
body.intro-active nav {
    opacity: 0;
    transition: opacity 3s ease;
}

nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: right 0.3s ease;
    z-index: 1001;
    pointer-events: auto;
    color: var(--front-color);
}

nav.active {
    right: 0;
}

/* Homepage: keep slideshow visible behind the menu overlay */
body.homepage nav {
    background: rgba(255, 255, 255, 0.8);
}

nav ul {
    display: flex;
    flex-direction: column;
    gap: 40px;
    text-align: center;
}

nav ul li a {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.2rem; /* Slightly larger for full screen menu */
}

/* Slightly larger social icon in menu */
nav ul li a .fa-instagram {
    font-size: 1.35em;
    line-height: 1;
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--front-color);
    
    /* Fixed positioning and styling */
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 1002;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease;
    pointer-events: auto;
}

.mobile-menu-btn:hover {
    background-color: #f0f0f0;
}

/* Background Slideshow */
.hero-slideshow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
}

.slide-link {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    cursor: pointer;
}

/* Content Sections */
.content-section {
    padding-top: 100px;
    padding-bottom: 50px;
    min-height: 80vh;
    background: white;
    position: relative;
    z-index: 10;
}

.section-title {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 40px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Project Gallery */
.project-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.project-detail-header {
    margin-bottom: 40px;
    max-width: 1200px;
}

.project-meta {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 20px;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--text-color);
}

.back-link:hover {
    text-decoration: underline;
}

@media (min-width: 900px) {
    .project-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.project-gallery img {
    width: 100%;
    height: auto;
    display: block;
}

.project-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Services Page Styles */
.services-intro {
    margin-bottom: 30px;
    line-height: 1.6;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-item h3 {
    font-weight: 300;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--front-color);
    padding-bottom: 10px;
}

.service-item p {
    margin-bottom: 10px;
}

.services-cta {
    margin-top: 30px;
    padding: 30px 0;
    border-top: 1px solid #eee;
    text-align: center;
}

.services-cta p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.cta-button {
    display: inline-block;
    padding: 12px 30px;
    border: 1px solid var(--front-color);
    color: var(--front-color);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: var(--front-color);
    color: #fff;
}

/* Footer */
footer {
    padding: 10px 0;
    text-align: center;
    font-size: 0.9rem;
    color: #000000;
}

.social-icons a {
    font-size: 1.5rem;
    margin: 0 10px;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }
    
    body.intro-active .logo-container {
        width: 200px;
    }
}

/* Homepage specific styles */
body.homepage {
    overflow: hidden; /* No scrolling on homepage */
}

body.homepage footer {
    position: fixed;
    bottom: 0;
    right: 10px;
    z-index: 100;
}

body.homepage footer p {
    margin: 0;
    font-size: 0.8rem;
}

body.homepage .social-icons {
    margin-bottom: 5px;
}


/* Slideshow Controls */
.slideshow-controls {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 30px;
    padding: 5px 10px;
    display: flex;
    gap: 20px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    align-items: center;
}

.control-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #ce6857;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    text-decoration: none;
    padding: 0;
}

.control-btn:hover {
    background-color: #f0f0f0;
}

