/* ===== Reset & base ===== */
*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 300;
    color: #2d2d2d;
    background: #0a0a0a;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4,h5 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 400;
    color: #2d2d2d;
    margin: 0 0 0.6em;
    line-height: 1.2;
}
h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 400; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1.15rem; font-weight: 400; line-height: 1.5; margin-bottom: 1em; }
p { margin: 0 0 1em; }

.container {
    width: 92%;
    max-width: 1140px;
    margin: 0 auto;
}

/* ===== Header / Nav ===== */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
    background: rgba(10, 10, 10, 0.92);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.nav-inner {
    width: 92%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
}
.logo-link { display: inline-block; padding: 4px 0; }
.logo {
    height: 90px;
    width: auto;
    margin: 6px 0;
    transition: height 0.25s ease;
}
.site-header.scrolled .logo { height: 64px; }

.main-nav ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: 2rem;
}
.main-nav a {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}
.main-nav a:hover,
.main-nav a.active { border-bottom-color: #2186C4; }

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    width: 42px;
    height: 38px;
    padding: 0;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    height: 2px;
    background: #fff;
    margin: 7px auto;
    width: 26px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: rgba(10, 10, 10, 0.96);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .main-nav.open { max-height: 400px; }
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }
    .main-nav li { text-align: center; }
    .main-nav a {
        display: block;
        padding: 14px 20px;
        border-bottom: 0;
    }
    .logo { height: 64px; }
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
    padding: 180px 5% 230px;
}
.hero-bg {
    position: absolute; inset: 0;
    background-image: url('assets/9-2000x1125.jpg');
    background-size: cover;
    background-position: center;
    transition: opacity 1s ease;
    z-index: 0;
}
.hero-bg.alt {
    background-image: url('assets/5.jpg');
}
.hero-overlay {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, 0.54);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 950px;
    width: 95%;
}
.hero h1 {
    color: #fff;
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    margin: 0 0 1.2rem;
    line-height: 1.1;
}
.hero-subtitle {
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(1rem, 1.4vw, 1.15rem);
    font-weight: 300;
    line-height: 1.7;
    margin: 0 auto 1.2rem;
    max-width: 800px;
}

.hero-curve {
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    width: 100%;
    height: 90px;
    z-index: 3;
    display: block;
}
.hero-curve path { fill: #fff; }

/* ===== Features (3 columns under hero) ===== */
.features {
    background: #fff;
    padding: 0 0 4rem;
    margin-top: -200px;
    position: relative;
    z-index: 5;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: center;
    padding-top: 1rem;
}
.feature {
    padding: 2rem 1.4rem;
}
.feature-icon {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: #2186C4;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.4rem;
    font-size: 2.2rem;
}
.feature h4 {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.7em;
}
.feature p {
    color: #6b6b6b;
    font-size: 0.98rem;
    margin-bottom: 1.4rem;
}
.feature-link {
    display: inline-block;
    color: #2186C4;
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    border-bottom: 2px solid #2186C4;
    padding-bottom: 4px;
    transition: opacity 0.2s ease;
}
.feature-link:hover { opacity: 0.7; }

@media (max-width: 760px) {
    .features { margin-top: -120px; }
    .features-grid { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* ===== About ===== */
.about {
    background: #f6f6f6;
    padding: 5rem 0 4rem;
}
.about h2 { text-align: center; margin-bottom: 1rem; }
.about h5 { text-align: center; max-width: 820px; margin: 0 auto 2rem; color: #555; }
.about p { font-size: 1rem; color: #555; }
.about-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 3rem;
}
.about-images img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}
@media (max-width: 760px) {
    .about-images { grid-template-columns: 1fr; }
}

/* ===== Split sections (Services, Town Planning) ===== */
.split { background: #fff; padding: 5rem 0; }
.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.split-text h2 { margin-bottom: 0.4em; }
.split-text h3 {
    font-style: italic;
    color: #555;
    margin-bottom: 1.2em;
}
.split-image img {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
}
.bullet-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 1.05rem;
    line-height: 2;
    color: #444;
    columns: 1;
}
.bullet-list li::before {
    content: "– ";
    color: #2186C4;
    font-weight: 700;
}
.townplanning .bullet-list { columns: 2; column-gap: 2rem; }

@media (max-width: 860px) {
    .split-grid { grid-template-columns: 1fr; gap: 2rem; }
    .image-left .split-image { order: -1; }
    .townplanning .bullet-list { columns: 1; }
}

/* ===== Portfolio ===== */
.portfolio {
    background: #2186C4;
    padding: 5rem 0;
}
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.6rem;
}
.project-card {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: #fff;
    text-align: left;
    font: inherit;
}
.project-img {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.project-hover {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0);
    font-size: 2rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.project-card:hover .project-hover,
.project-card:focus-visible .project-hover {
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
}
.project-name {
    margin-top: 0.9rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    color: #fff;
}

@media (max-width: 900px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .portfolio-grid { grid-template-columns: 1fr; } }

/* ===== Footer ===== */
.site-footer {
    background: #1a1a1a;
    color: #cfcfcf;
    padding: 4rem 0 1.5rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: center;
}
.footer-col i {
    color: #2186C4;
    font-size: 1.7rem;
    margin-bottom: 0.8rem;
    display: block;
}
.footer-col p { margin: 0; line-height: 1.7; }
.footer-col a { color: #cfcfcf; transition: color 0.2s ease; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #2a2a2a;
    text-align: center;
    font-size: 0.85rem;
    color: #888;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

/* ===== Modal ===== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 8vh 1rem 2rem;
    overflow-y: auto;
}
.modal[hidden] { display: none; }
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(30, 115, 190, 0.72);
    cursor: pointer;
}
.modal-dialog {
    position: relative;
    background: #fff;
    border: 14px solid #31a453;
    border-radius: 60px;
    padding: 2rem 2.4rem;
    max-width: 760px;
    width: 100%;
    z-index: 1;
    color: #2d2d2d;
}
.modal-dialog h3 {
    font-family: 'Montserrat', 'Playfair Display', sans-serif;
    font-weight: 700;
    font-size: 1.9rem;
    color: #2d2d2d;
    margin: 0 0 1rem;
}
.modal-body p { color: #2d2d2d; }
.modal-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.7rem;
    margin-top: 1rem;
}
.modal-images img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}
.modal-close {
    position: absolute;
    top: -22px;
    right: -22px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 0;
    background: #fff;
    color: #2d2d2d;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    transition: transform 0.15s ease;
}
.modal-close:hover { transform: scale(1.05); }

@media (max-width: 600px) {
    .modal-dialog { border-radius: 30px; padding: 1.4rem 1.2rem; border-width: 8px; }
    .modal-close { top: -16px; right: -10px; width: 40px; height: 40px; font-size: 1.5rem; }
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-bg, .site-header, .logo, .main-nav { transition: none; }
}
