:root {
    --color-white: #FFFFFF;
    --color-gray-warm: #F4F7F6;
    /* Cool light gray/white */
    --color-black: #000000;

    /* Navy Blue Palette */
    --color-blue-petrol: #0a192f;
    /* Deep Navy (Primary Dark) */
    --color-terracotta: #3EA6FF;
    /* Electric Blue (Accent - replaced terracotta) */
    --color-terracotta-dark: #0056b3;
    /* Darker Blue for hover */
    --color-navy-light: #112240;
    /* Secondary Navy */

    --font-heading: 'Inter', sans-serif;
    --font-body: 'Merriweather', serif;

    /* Updated Shadows for cooler theme */
    --shadow-light: 8px 8px 16px #d9dce0, -8px -8px 16px #ffffff;
    --shadow-hover: 12px 12px 20px #c0c4c9, -12px -12px 20px #ffffff;
    --shadow-inset: inset 4px 4px 8px #d9dce0, inset -4px -4px 8px #ffffff;

    --transition: all 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-gray-warm);
    color: var(--color-blue-petrol);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-blue-petrol);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 5rem 0;
}

.text-white {
    color: var(--color-white);
}

.bg-light {
    background-color: var(--color-gray-warm);
}

.bg-dark {
    background-color: var(--color-blue-petrol);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.grid-2-sm {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.full-width {
    width: 100%;
}

.center-btn {
    display: flex;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--color-terracotta);
    color: var(--color-white);
    box-shadow: 4px 4px 10px rgba(224, 122, 95, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-terracotta-dark);
    transform: translateY(-2px);
    box-shadow: 6px 6px 14px rgba(224, 122, 95, 0.4);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--color-terracotta);
    color: var(--color-terracotta);
}

.btn-secondary:hover {
    background-color: var(--color-terracotta);
    color: var(--color-white);
}

.btn.sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Neumorphism */
.neumorphic {
    background: var(--color-gray-warm);
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.card {
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.icon-box {
    color: var(--color-terracotta);
    margin-bottom: 1rem;
}

/* Logo Styling */
.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--color-blue-petrol);
}

.logo-icon {
    height: 48px;
    /* Slightly larger for better visibility */
    width: auto;
}

.footer-logo .logo-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.logo-icon-footer {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
    /* White logo for footer */
}

@media (min-width: 768px) {
    .footer-logo .logo-wrapper {
        justify-content: flex-start;
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(245, 245, 245, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--color-blue-petrol);
}

.nav-links {
    display: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
}

.nav-socials {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin: 0 0.5rem;
    padding-right: 0.5rem;
    border-right: 1px solid #ddd;
    /* Separator */
}

.nav-socials a {
    color: #999;
    /* Subtle gray */
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.nav-socials a:hover {
    color: var(--color-terracotta);
    /* Pop on hover */
}

.mobile-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--color-blue-petrol);
    transition: var(--transition);
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }

    .mobile-toggle {
        display: none;
    }
}

/* Hero */
.hero {
    padding-top: 8rem;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    /* Ensure it sits above background */
    z-index: 10;
}

@media (min-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
    }
}

.hero-text h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-text h2 {
    font-size: 1.1rem;
    font-family: var(--font-body);
    font-weight: 400;
    color: #555;
    margin-bottom: 2rem;
}

.microcopy {
    display: block;
    font-size: 0.8rem;
    color: #777;
    margin-top: 0.5rem;
    margin-left: 0.5rem;
}

.hero-image img {
    border-radius: 20px;
    box-shadow: var(--shadow-light);
}

.img-placeholder {
    width: 100%;
    min-height: 400px;
    /* Placeholder height */
    background-color: #ddd;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Projects */
.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: none;
    font-family: var(--font-heading);
    font-weight: 600;
    color: #777;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--color-white);
    box-shadow: var(--shadow-light);
    color: var(--color-terracotta);
}

.project-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-light);
}

.project-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-item:hover .project-img-wrapper img {
    transform: scale(1.05);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(43, 75, 75, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-item:hover .overlay {
    opacity: 1;
}

.btn-icon {
    background: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-terracotta);
    transform: scale(0.8);
    transition: var(--transition);
}

.project-item:hover .btn-icon {
    transform: scale(1);
}

.project-info {
    padding: 1rem;
    text-align: center;
}

.project-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

/* Contact Form */
.neumorphic-dark {
    background: #335555;
    /* Slightly lighter than bg-dark for contrast */
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #ddd;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.8rem;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: var(--font-body);
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--color-terracotta);
    background: rgba(255, 255, 255, 0.15);
}

/* Testimonials */
.testimonial-card {
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.quote {
    font-style: italic;
    color: #555;
    margin-bottom: 1.5rem;
}

.author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 50px;
    height: 50px;
    background: var(--color-terracotta);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Footer */
footer {
    background: #1a3030;
    color: white;
    padding: 3rem 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transition: opacity 1s ease-out;
}

.slide-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy */
}

.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.delay-1 {
    transition-delay: 0.15s;
}

.delay-2 {
    transition-delay: 0.3s;
}

.delay-3 {
    transition-delay: 0.45s;
}

/* --- GLOBAL: Custom Cursor --- */
body {
    cursor: none;
    /* Hide default cursor */
}

a,
button,
.card,
input,
select,
textarea {
    cursor: none;
    /* Ensure it stays hidden on interactables */
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-terracotta);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: width 0.3s, height 0.3s, background-color 0.3s;
    mix-blend-mode: difference;
    /* Cool effect over images */
}

.custom-cursor.hovered {
    width: 50px;
    height: 50px;
    background-color: rgba(224, 122, 95, 0.2);
    border-color: transparent;
}

/* --- HERO: Geometric Background (Architectural Grid) --- */
.hero {
    /* Subtle dot grid pattern */
    background-color: var(--color-gray-warm);
    /* Updated to variable */
    background-image:
        radial-gradient(#cfd8dc 2px, transparent 2px),
        radial-gradient(#cfd8dc 2px, transparent 2px);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    position: relative;
    overflow: hidden;
}

/* Dynamic floating shapes (Architectural vibe) */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    border: 2px solid rgba(10, 25, 47, 0.05);
    /* Navy transparent */
    border-radius: 50%;
    animation: pulse-rotate 20s linear infinite;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 40vw;
    height: 40vw;
    border: 40px solid rgba(62, 166, 255, 0.03);
    /* Electric Blue transparent */
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
}

/* Floating Animation for Hero Image */
@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    33% {
        transform: translateY(-10px) rotate(1deg);
    }

    66% {
        transform: translateY(5px) rotate(-1deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

.animate-float {
    animation: float 8s ease-in-out infinite;
}

/* Organic Hero Image Styling */
.hero-img-container {
    position: relative;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    /* Organic Blob Shape */
    overflow: hidden;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.1), -20px -20px 60px rgba(255, 255, 255, 0.5);
    transition: border-radius 1s ease;
}

.hero-img-container:hover {
    border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%;
    /* Morphs to circle on hover */
}

.organic-hero-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    /* Blend with background using mask */
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    filter: contrast(1.05) saturate(1.1);
    /* Slight pop */
}

@keyframes pulse-rotate {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.1);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* --- HERO TEXT: Staggered Reveal --- */
.word-wrap {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}

.word-span {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
    animation: reveal-text 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes reveal-text {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Delays generated by JS logic */
.word-span:nth-child(1) {
    animation-delay: 0.1s;
}

/* 3D Tilt Effect Utilities */
.tilt-card {
    transition: transform 0.1s;
    /* Very fast transition for mouse movement, will be handled by JS */
    transform-style: preserve-3d;
    perspective: 1000px;
}

.tilt-content {
    transform: translateZ(20px);
    /* Pop out effect */
}

/* Enhanced Button Hover */
.btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn:hover::after {
    width: 100%;
}

/* Image Reveal Effect */
.reveal-img {
    position: relative;
    overflow: hidden;
}

.reveal-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-gray-warm);
    transform: translateX(0);
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 2;
}

.reveal-img.visible::after {
    transform: translateX(100%);
}

/* --- Commune Success Board --- */
/* --- Commune Success Board (Clean White Style) --- */
.project-custom-content.commune-board {
    background: white;
    padding: 1.5rem;
    height: 100%;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 4px solid var(--color-terracotta);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Notebook/Paper pattern */
.commune-board::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(#f0f0f0 1px, transparent 1px);
    background-size: 100% 1.5rem;
    opacity: 0.5;
    pointer-events: none;
    z-index: -1;
}

/* Ensure no hover effects hide the content */
.project-custom-content.commune-board:hover::before {
    opacity: 0.5;
}

.project-custom-content.commune-board:hover .board-header,
.project-custom-content.commune-board:hover .commune-list {
    opacity: 1;
}

.board-header {
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    text-align: center;
    opacity: 1;
    /* Always visible */
}

.board-title {
    font-size: 1.2rem;
    color: var(--color-blue-petrol);
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: none;
    text-align: center;
}

.status-badge {
    background: var(--color-blue-petrol);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.commune-list {
    list-style: none;
    position: relative;
    z-index: 1;
    transition: none;
    opacity: 1;
    /* Always visible */
}

.commune-list li {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: #888;
    /* Dark gray */
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Subtle divider */
    padding-bottom: 0.2rem;
}

.commune-list li.checked {
    color: var(--color-blue-petrol);
    /* Dark Navy for white background */
    font-weight: 500;
    text-decoration: line-through;
    text-decoration-color: var(--color-terracotta);
    filter: opacity(0.7);
}

/* Remove checkmark icon if strikethrough is used, or keep it subtle */
.commune-list li .check {
    display: none;
    /* Hide checkmark, rely on strikethrough */
}