:root {
    --bg: #0d0d0d;
    --surface: #1a1a1a;
    --accent: #c9a962;
    --secondary: #2d2d2d;
    --text: #ffffff;
    --text-muted: #a0a0a0;
    --font-body: "DM Sans", sans-serif;
    --font-heading: "Playfair Display", serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "DM Sans", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

h1,
h2,
h3,
h4 {
    font-family: "Playfair Display", serif;
    font-weight: 500;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 24px 0;
    transition:
        background 0.3s,
        padding 0.3s;
}

header.scrolled {
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(10px);
    padding: 16px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: "Playfair Display", serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 2px;
}

nav a {
    color: var(--text);
    text-decoration: none;
    margin-left: 32px;
    font-size: 0.9rem;
    position: relative;
    transition: color 0.3s;
}

nav a::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, var(--bg) 0%, var(--surface) 100%);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at 70% 30%,
        rgba(201, 169, 98, 0.08) 0%,
        transparent 50%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 40px;
}

.btn {
    display: inline-block;
    padding: 16px 40px;
    background: var(--accent);
    color: var(--bg);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.btn:hover {
    background: #d4b56d;
    transform: translateY(-2px);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Portfolio / Map */
#portfolio {
    padding: 120px 0;
    background: var(--bg);
}

.map-container {
    margin-bottom: 48px;
}

.county-map {
    width: 100%;
    height:auto;
    max-width: 800px;
    margin: 0 auto;
    display: block;
}

.county-map path {
    transition: fill 0.3s ease;
}

.county-map path.active,
.county-map path.selected {
    fill: #c9a962 !important;
    filter: drop-shadow(0 0 12px rgba(201, 169, 98, 0.8));
    transform: scale(1.02);
    transform-origin: center;
}

.county-map path.active {
    fill: #c9a962;
    filter: drop-shadow(0 0 12px rgba(212, 181, 109, 0.8));
}

.map-controls {
    margin-top: 32px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--secondary);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--text);
}

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}

.selected-county {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.3s;
}

.selected-county.visible {
    opacity: 1;
}

.selected-county span {
    color: var(--accent);
    font-weight: 600;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
}

.loading-indicator {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 1rem;
}

.project-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
    opacity: 0;
    transform: translateY(20px);
}

a.project-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.project-card.visible {
    animation: cardFadeIn 0.5s ease forwards;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.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;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        transparent 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
}

.project-info h3 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.project-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.5;
}

.project-info > span {
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.project-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Services */
#services {
    padding: 120px 0;
    background: var(--surface);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-bottom: 80px;
}

.services-contact {
    margin-top: 80px;
    padding-top: 80px;
    border-top: 1px solid var(--secondary);
}

.services-contact .section-header {
    margin-bottom: 48px;
}

.service-card {
    padding: 40px;
    background: var(--bg);
    border: 1px solid var(--secondary);
    transition: all 0.3s;
}

.service-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.service-icon {
    width: 48px;
    height: 48px;
    color: var(--accent);
    margin-bottom: 24px;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.service-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* About */
.about-section {
    padding: 120px 0;
    background: var(--bg);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-content p {
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.8;
}

.about-image {
    width: 100%;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 40px;
}

.stat {
    text-align: center;
}

.stat h4 {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 8px;
    font-weight: 500;
}

.stat span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Contact */
#contact {
    padding: 120px 0;
    background: var(--surface);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--secondary);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

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

.file-upload {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-upload input[type="file"] {
    display: none;
}

.file-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--secondary);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
}

.file-label:hover {
    border-color: var(--accent);
    background: var(--secondary);
}

.file-label svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.file-name {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.contact-info h3 {
    margin-bottom: 32px;
}

.contact-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-item svg {
    width: 24px;
    height: 24px;
    color: var(--accent);
    flex-shrink: 0;
}

.contact-item p {
    color: var(--text-muted);
}

/* Footer */
footer {
    padding: 40px 0;
    background: var(--bg);
    border-top: 1px solid var(--secondary);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Press */
#press {
    padding: 120px 0;
    background: var(--surface);
}

.press-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.press-card {
    background: var(--bg);
    border: 1px solid var(--secondary);
    padding: 32px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.press-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.press-logo {
    font-family: "Playfair Display", serif;
    font-size: 1rem;
    color: var(--accent);
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.press-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.press-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    flex-grow: 1;
}

.press-year {
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--secondary);
    padding-top: 16px;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.zoom-in {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.zoom-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Mobile */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    nav a {
        margin-left: 16px;
    }

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

    .stats {
        gap: 16px;
    }
}

@media (max-width: 500px) {
    .project-card {
        aspect-ratio: unset;
        min-height: 200px;
    }
    .project-info {
        padding: 16px;
    }
    .project-info h3 {
        font-size: 1.1rem;
    }
    .project-description {
        font-size: 0.8rem;
    }
}
