/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #000000;
    --white: #ffffff;
    --gray: #888888;
    --light-gray: #f5f5f5;
    --font-primary: 'Cinzel', serif;
    --font-secondary: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-secondary);
    color: var(--black);
    background-color: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 2rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background-color: rgba(0,0,0,0.3);
}

.nav-container {
    max-width: 90vw;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 150px;
    width: auto;
    transition: var(--transition);
}

.navbar.scrolled .logo {
    height: 90px;
}

/* Menu Toggle */
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
    position: relative;
    z-index: 1003; /* Keep button above the menu and overlay */
}

.menu-toggle span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--white);
    transition: var(--transition);
    transform-origin: center;
}

.menu-toggle span:last-child {
    width: 18px;
}

.menu-toggle:hover span:last-child {
    width: 25px;
}

.menu-toggle.active span {
    background-color: var(--white); /* Ensure X is white when menu is open */
}

.menu-toggle.active span:first-child {
    transform: translateY(2.5px) rotate(45deg);
}

.menu-toggle.active span:last-child {
    width: 25px;
    transform: translateY(-2.5px) rotate(-45deg);
}

/* Sidebar Menu */
.sidebar-menu {
    position: fixed;
    top: 0;
    right: -420px; /* Initially hidden off-screen */
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background-color: var(--black);
    z-index: 1002;
    transition: right 0.6s cubic-bezier(0.77, 0, 0.175, 1);
    overflow-y: auto;
}

.sidebar-menu.active {
    right: 0; /* Slide in */
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Close Button */
.menu-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2.5rem;
    font-weight: 200;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1004;
    line-height: 1;
}

.menu-close:hover {
    transform: rotate(90deg);
    opacity: 0.7;
}

.menu-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    height: 100%;
    padding: 3rem 2.5rem;
}

.sidebar-image {
    width: 100%;
    height: auto;
    aspect-ratio: 3.5 / 3;
    object-fit: cover;
    background-color: #1a1a1a;
    margin-top: 4rem; /* Space below close button */
    margin-bottom: 2rem;
}

.sidebar-description {
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-secondary);
    font-weight: 300;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.sidebar-description p {
    margin-bottom: 1em;
}

.sidebar-description p:last-child {
    margin-bottom: 0;
}

.menu-nav ul {
    list-style: none;
    text-align: left;
}

.menu-nav li {
    margin: 1.2rem 0;
    overflow: hidden;
}

.menu-nav a {
    font-family: var(--font-primary);
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 300;
    color: var(--white);
    text-decoration: none;
    position: relative;
    display: inline-block;
    transition: var(--transition);
}

.menu-nav a::after {
    content: attr(data-text);
    position: absolute;
    top: 100%;
    left: 0;
    color: var(--white);
    opacity: 0.3;
}

.menu-nav a:hover {
    transform: translateY(-100%);
}

/* Menu Contact */
.menu-contact {
    text-align: left;
    margin-top: auto; /* Pushes to the bottom */
    padding-top: 2rem;
}

.menu-contact p {
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 300;
    margin: 0.3rem 0;
    opacity: 0.7;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    will-change: transform;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    will-change: opacity;
}

.hero-image.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(38, 23, 19, 0.733) 25%, rgba(100, 72, 58, 0.769) 50%, rgba(0,0,0,0.5) 100%);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
}

.hero-title {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 8vw, 6rem);
    font-weight: 300;
    color: var(--white);
    line-height: 1;
    letter-spacing: -0.02em;
}

.hero-title .line {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
}

.hero-title .line:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 60px;
    background-color: rgba(255,255,255,0.2);
}

.scroll-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: var(--white);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0%, 100% {
        height: 0;
        top: 0;
    }
    50% {
        height: 100%;
        top: 0;
    }
    51% {
        height: 0;
        top: 100%;
    }
}

/* Footer */
.footer {
    background-color: var(--black);
    color: var(--white);
    padding: 4rem 0 2rem 0;
}

.footer-container {
    max-width: 90vw;
    margin: 0 auto;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 00rem;
    margin-bottom: 0rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo img {
    height: 50px;
    width: auto;
    opacity: 0.9;
}

.footer-info {
    text-align: right;
}

.contact-info {
    margin-bottom: 1.5rem;
}

.contact-info a {
    display: block;
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.contact-info a:hover {
    opacity: 0.7;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
}

.social-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 300;
    transition: var(--transition);
    position: relative;
}

.social-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--white);
    transition: width 0.3s ease;
}

.social-links a:hover::after {
    width: 100%;
}

/* Footer Powered By */
.footer-powered-by {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    padding-top: 2rem;
}

.footer-powered-by a {
    text-decoration: none;
    transition: var(--transition);
}

.footer-powered-by a:hover {
    opacity: 0.7;
}

.footer-powered-by-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-powered-by-group p {
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 300;
    opacity: 0.6;
}

.footer-powered-by-group img {
    height: 12px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        max-width: 85vw;
    }
    
    .logo {
        height: 100px;
    }
    
    .navbar.scrolled .logo {
        height: 50px;
    }

    .sidebar-menu {
        right: -100%;
        max-width: 100%;
    }
    
    .menu-close {
        right: 7.5vw;
    }
        
    .hero-title {
        font-size: clamp(3rem, 12vw, 5rem);
    }
    
    .footer-main {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-info {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-powered-by {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Page Loader */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--black);
    z-index: 10000;
    animation: pageLoad 0.8s ease-out forwards;
    animation-delay: 0.5s;
    pointer-events: none;
}

@keyframes pageLoad {
    to {
        transform: translateY(-100%);
    }
}


/* --- STYLES FOR DESIGN PAGE --- */

/* Page Header */
.page-header {
    position: relative;
    height: 45vh;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    background-image: url('https://newsouthhomes.com.au/wp-content/uploads/2022/10/Opal-38-scaled.jpg');
    background-size: cover;
    background-position: center;
}

.page-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.page-header-content {
    position: relative;
    z-index: 2;
}

.page-title {
    font-family: var(--font-primary);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Page Content Wrapper */
.page-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.content-section {
    margin-bottom: 5rem;
}

.content-section:last-child {
    margin-bottom: 0;
}

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

.section-title {
    font-family: var(--font-primary);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--black);
}

.section-subtitle {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--gray);
    max-width: 800px;
    margin: 0 auto 1rem auto;
}

.cta-button {
    display: inline-block;
    background-color: var(--black);
    color: var(--white);
    font-family: var(--font-secondary);
    text-decoration: none;
    padding: 1rem 2.5rem;
    font-size: 0.9rem;
    font-weight: 400;
    margin-top: 2rem;
    transition: var(--transition);
    border: 1px solid var(--black);
    cursor: pointer;
}

.cta-button:hover {
    background-color: var(--white);
    color: var(--black);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(520px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background-color: var(--light-gray);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid #eee;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--black);
    margin-bottom: 1.5rem;
}

.service-title {
    font-family: var(--font-primary);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.service-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--gray);
}

@media (max-width: 768px) {
    .page-content-wrapper {
        padding: 4rem 1rem;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* --- STYLES FOR PROCESS PAGE --- */
.process-timeline {
    display: flex;
    flex-direction: column;
    gap: 6rem;
}

.process-step {
    display: flex;
    gap: 3rem;
    align-items: center;
}

.process-step:nth-child(even) {
    flex-direction: row-reverse;
}

.process-image {
    flex: 1;
    min-width: 40%;
}

.process-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.process-content {
    flex: 1;
}

.process-number {
    font-family: var(--font-primary);
    font-size: 4rem;
    font-weight: 700;
    color: var(--light-gray);
    line-height: 1;
}

.process-title {
    font-family: var(--font-primary);
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 400;
    margin-top: -1rem; /* Overlap the number slightly */
    margin-bottom: 1rem;
    color: var(--black);
}

.process-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--gray);
    font-weight: 300;
}

@media (max-width: 992px) {
    .process-step,
    .process-step:nth-child(even) {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .process-title {
        margin-top: -0.5rem;
    }
}

/* --- STYLES FOR CONNECT PAGE --- */

.contact-form-wrapper {
    max-width: 800px;
    margin: 3rem auto 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--black);
    background-color: var(--light-gray);
    border: 1px solid #e0e0e0;
    border-radius: 0;
    transition: var(--transition);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder,
textarea::placeholder {
    color: var(--gray);
    opacity: 1;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--black);
    background-color: var(--white);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    background-size: 1em;
}

select:invalid {
color: var(--gray);
}

textarea {
    resize: vertical;
    min-height: 150px;
}

/* --- NEW STYLES FOR PORTFOLIO PAGE --- */
 /* In-line styles for perfect padding and spacing as requested, complementing styles.css */
.portfolio-detailed-view {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}
.portfolio-entry {
    margin-bottom: 6rem; /* Generous space between projects */
    text-align: center;
}
.design-brief {
    margin-bottom: 1.5rem;
}
.design-brief h3 {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #333;
}
.design-brief p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    line-height: 1.6;
    color: #555;
    max-width: 700px;
    margin: 0 auto;
}
.portfolio-image-container {
    margin-bottom: 1.5rem;
}
.portfolio-image-container .portfolio-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.portfolio-image-container img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.4s ease;
}
.portfolio-item:hover img {
    transform: scale(1.05);
}
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    font-size: 2.5rem;
}
.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}
.customer-review {
    border-left: 3px solid #d3c1a8;
    padding-left: 2rem;
    margin: 0 auto;
    max-width: 700px;
    text-align: left;
}
.customer-review blockquote {
    margin: 0;
    padding: 0;
}
.customer-review p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-style: italic;
    font-weight: 500;
    line-height: 1.7;
    color: #444;
    margin-bottom: 0.5rem;
}
.customer-review footer {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: #666;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

/* Lightbox Styles */
#lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.9);
    z-index: 2000;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

#lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    display: block;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

#lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--white);
    font-size: 3rem;
    font-weight: 200;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

#lightbox-close:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    padding: 1.5rem 1rem;
    transition: background-color 0.2s ease;
    user-select: none;
}

.lightbox-nav:hover {
    background: rgba(0,0,0,0.6);
}

#lightbox-prev {
    left: 1rem;
}

#lightbox-next {
    right: 1rem;
}

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