/* --- Google Fonts --- */
@import url("https://fonts.googleapis.com/css?family=Merriweather:300,700,300italic,700italic|Source+Sans+Pro:900|Montserrat:100,200,300,400,500,700");

/* --- CSS Variables --- */
:root {
    --background-color: #000811;
    --text-color: #F8F7F2;
    --accent-color-light: #59C0DB;
    --accent-color-dark: #258099;
    --accent-color-hover: #77cde2;
    --accent-color-active: #40a8c2;
    --placeholder-color: #aaa;
    --success-bg: #1a8f1a9d;
    --error-bg: #8f1a1a9d;

    --font-primary: 'Montserrat', sans-serif;
    --font-headings: 'Source Sans Pro', sans-serif;
    --font-serif: 'Merriweather', serif;
    /* Example if needed */

    --section-padding: 4rem 2rem;
    /* Top/Bottom Left/Right */
    --content-max-width: 80rem;
    --border-radius: 0.25rem;
}

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

html {
    scroll-behavior: smooth;
    font-family: var(--font-primary);
    font-size: 16px;
    /* Base font size */
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--text-color);
}

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

svg {
    display: inline-block;
    /* Ensure SVGs behave like other elements */
    vertical-align: middle;
}

/* --- Background Effects --- */
.background-effects {
    z-index: -1;
    position: fixed;
    /* Changed to fixed for consistent background */
    top: 0;
    left: 0;
    height: 100vh;
    /* Use vh for full viewport height */
    width: 100%;
    overflow: hidden;
    background: linear-gradient(rgba(0, 0, 0, 0.5), var(--background-color));
}

@keyframes rotate {
    from {
        rotate: 0deg;
    }

    50% {
        scale: 1 1.5;
    }

    to {
        rotate: 360deg;
    }
}

#blob {
    background-color: var(--text-color);
    /* Fallback */
    height: 34vmax;
    aspect-ratio: 1;
    position: absolute;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    border-radius: 50%;
    background: linear-gradient(to right, var(--accent-color-light), var(--accent-color-dark));
    animation: rotate 20s infinite linear;
    /* Added linear timing */
    opacity: 0.8;
}

#blur {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    backdrop-filter: blur(12vmax);
}

/* --- Hero Section (#hero / header) --- */
.hero-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100svh;
    /* Use min-height to accommodate content */
    color: var(--text-color);
    text-align: center;
    padding: 2rem;
    position: relative;
    /* Needed for z-index stacking */
    z-index: 5;
    /* Above background effects */
}

.hero-logo {
    width: clamp(8rem, 15vw, 12rem);
    /* Responsive logo size */
    height: auto;
    margin-bottom: 1rem;
}

.hero-content {
    margin-bottom: 2rem;
    /* Space between text and scroll arrow */
}

.hero-content h1 {
    font-family: var(--font-headings);
    font-size: clamp(4rem, 10vw, 12rem);
    /* Adjusted clamp for better scaling */
    margin: 0;
    line-height: 1;
    font-weight: 900;
}

.hero-content h2 {
    font-family: var(--font-primary);
    font-weight: 100;
    font-size: clamp(2rem, 5vw, 6rem);
    /* Adjusted clamp */
    margin: -1.5vw 0 0 0;
    /* Adjusted negative margin */
    line-height: 1;
}

.hero-scroll-down {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: 300;
    text-decoration: none;
    padding: 1rem;
    opacity: 0.5;
    color: var(--text-color);
    transition: opacity 0.25s ease;
    position: absolute;
    /* Position arrow at the bottom */
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.hero-scroll-down:hover {
    opacity: 0.85;
}

.hero-scroll-down svg {
    margin-top: 0.5rem;
    /* Space between text and SVG */
}

/* --- General Section Styling --- */
.section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    /* Consistent gap */
    padding: var(--section-padding);
    color: var(--text-color);
    position: relative;
    /* Needed for stacking context if background elements are added */
    z-index: 5;
    /* Keep content above background */
    background-color: var(--background-color);
    /* Ensure sections cover background */
}

.section-title {
    color: var(--text-color);
    font-family: var(--font-headings);
    font-size: clamp(2.5rem, 6vw, 4rem);
    /* Responsive title */
    text-align: center;
    text-transform: uppercase;
    margin: 0 0 1rem 0;
    /* Bottom margin */
    font-weight: 900;
}

/* --- Services Section --- */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    /* Align items vertically */
    gap: clamp(2rem, 4vw, 4rem);
    /* Responsive gap */
    max-width: var(--content-max-width);
}

.service-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Align content to top */
    align-items: center;
    gap: 1rem;
    flex-basis: 20rem;
    /* Base width, allows wrapping */
    flex-grow: 1;
    /* Allow items to grow */
    max-width: 22rem;
    /* Max width per item */
    padding: 1.5rem;
    color: var(--text-color);
    text-align: center;
    transition: transform 0.150s ease-in-out;
    border-radius: var(--border-radius);
    /* Optional subtle rounding */
    /* Optional subtle border */
    /* border: 1px solid rgba(248, 247, 242, 0.1); */
}

.service-item:hover {
    transform: scale(1.05);
    /* Lift effect */
    /* box-shadow: 0 10px 20px rgba(89, 192, 219, 0.15); */
    /* Subtle glow */
}

.service-item svg {
    width: 5rem;
    height: 5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    /* Color the icon */
}

.service-item h2 {
    font-family: var(--font-headings);
    font-size: 1.75rem;
    /* Slightly smaller */
    text-transform: uppercase;
    margin: 0;
    font-weight: 900;
}

.service-item p {
    font-family: var(--font-primary);
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

/* Call to Action Link */
.cta {
    font-size: 1.15rem;
    padding: 1rem 0;
    text-align: center;
    max-width: 600px;
    /* Constrain width */
    margin: 2rem auto 0 auto;
    /* Center and add top margin */
    line-height: 1.7;
}

.cta a {
    font-weight: 500;
    border-bottom: 1px solid var(--accent-color-light);
    padding-bottom: 2px;
}

.cta a:hover {
    color: var(--accent-color-hover);
    border-bottom-color: var(--accent-color-hover);
}


/* --- Gallery Section --- */
.gallery-section {
    padding-top: var(--section-padding);
    padding-bottom: var(--section-padding);
    padding-left: 0;
    /* Remove side padding for full-width feel */
    padding-right: 0;
}

.gallery-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    /* Hides scrollbar visually, keeps functionality */
}

.gallery {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;

    align-items: center;
    height: 80svh;
    max-height: 800px;
}

.gallery::-webkit-scrollbar {
    display: none;
}

.gallery-item {
    box-sizing: border-box;
    height: 100%;
    position: relative;
    text-align: center;
    scroll-snap-align: center;
    z-index: 1;

    display: flex;
    align-items: center;
}

.gallery-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    backdrop-filter: blur(20vmax);
    z-index: -1;
}

.gallery-item img {
    position: relative;
    box-sizing: border-box;
    display: block;
    max-width: min(calc(100vw - 4rem), 800px);
    z-index: 2;
    border-radius: 0.5rem;
    margin: 0 2rem;
    max-height: calc(100% - 4rem);
}

.gallery-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 8, 17, 0.7);
    /* Match background */
    color: var(--text-color);
    border: 1px solid rgba(248, 247, 242, 0.2);
    width: 44px;
    /* Slightly larger */
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.gallery-button:hover {
    background: rgba(248, 247, 242, 0.2);
}

.gallery-button:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-button.left {
    left: 15px;
}

.gallery-button.right {
    right: 15px;
}

.gallery-button svg {
    width: 24px;
    height: 24px;
}


/* --- Contact Section --- */
.contact-section {
    background-color: rgba(0, 0, 0, 0.2);
    /* Slightly different bg */
}

.social-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 2rem;
    /* Space before form */
}

.social-links a svg {
    transition: transform 0.2s ease, color 0.2s ease;
}

.social-links a:hover svg {
    transform: scale(1.1);
    color: var(--text-color);
}


.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    /* Increased gap */
    width: 100%;
    max-width: 40rem;
    color: var(--text-color);
    text-align: center;
}

.contact-form input,
.contact-form textarea,
.contact-form button {
    font-family: var(--font-primary);
    width: 100%;
    padding: 0.85rem 1rem;
    /* Adjusted padding */
    border: none;
    /* Remove default border */
    box-sizing: border-box;
    font-size: 1rem;
    border-radius: var(--border-radius);
    /* Add subtle rounding */
}

.contact-form input,
.contact-form textarea {
    background-color: rgba(255, 255, 255, 0.05);
    /* Subtle background */
    color: var(--text-color);
    outline: none;
    border: 1px solid rgba(248, 247, 242, 0.2);
    /* Subtle border */
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent-color-light);
    background-color: rgba(255, 255, 255, 0.08);
}


.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form button {
    font-weight: 500;
    text-transform: uppercase;
    background: var(--accent-color-light);
    color: var(--background-color);
    /* Dark text on light button */
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease;
    border: none;
    padding: 1rem;
    letter-spacing: 0.5px;
}

.contact-form button:hover {
    background: var(--accent-color-hover);
}

.contact-form button:active {
    background: var(--accent-color-active);
    transform: scale(0.98);
}

.contact-form button:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--placeholder-color);
    opacity: 1;
    /* Ensure placeholder is visible */
}

/* Alert Messages */
.alert {
    font-family: var(--font-primary);
    color: var(--text-color);
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 40rem;
    text-align: left;
}

.alert p {
    margin: 0;
}

.alert-success {
    background-color: var(--success-bg);
}

.alert-error {
    background-color: var(--error-bg);
}


/* --- Footer --- */
.site-footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    /* Space out logos and content */
    gap: 2rem;
    /* Adjusted gap */
    background-color: rgba(0, 0, 0, 0.3);
    /* Slightly darker footer */
    border-top: 1px solid rgba(248, 247, 242, 0.1);
    /* Subtle top border */
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.footer-content {
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.5;
    flex-grow: 1;
    /* Allow content to take available space */
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.footer-content strong {
    font-weight: 500;
}

.footer-contact-links a {
    margin: 0 0.3rem;
    white-space: nowrap;
    /* Prevent links breaking mid-word */
}

.footer-logo img {
    height: 3rem;
    /* Adjusted logo size */
    opacity: 0.8;
}

/* --- Media Queries --- */
@media screen and (max-width: 800px) {
    .site-footer {
        flex-direction: column;
        /* Stack elements vertically */
        justify-content: center;
        /* Center items when stacked */
        gap: 1.5rem;
    }

    .footer-logo-left {
        display: none;
        /* Hide the left logo on small screens */
    }

    .footer-logo-right {
        order: -1;
        /* Move the right logo to the top */
    }

    .footer-content {
        font-size: 0.85rem;
        /* Slightly smaller text */
    }


}

@media screen and (max-width: 600px) {
    html {
        font-size: 15px;
    }

    /* Adjust base font size */

    .hero-content h1 {
        font-size: clamp(3rem, 12vw, 8rem);
    }

    .hero-content h2 {
        font-size: clamp(1.5rem, 6vw, 4rem);
        margin-top: -2vw;
    }

    .section {
        padding: 3rem 1rem;
        gap: 2rem;
    }

    .section-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .service-item {
        flex-basis: 100%;
        max-width: none;
    }

    /* Full width on small screens */

    .gallery {
        height: auto;
        /* Adjust padding slightly for smaller screens if needed */
        /* padding-left: calc((100vw - min(calc(100vw - 2rem), 600px)) / 2); */
        /* padding-right: calc((100vw - min(calc(100vw - 2rem), 600px)) / 2); */
    }

    .gallery-item {
        width: min(calc(100vw - 2rem), 600px);
    }

    .gallery-item img {
        max-width: calc(100vw - 5rem);
    }

    .gallery-button {
        width: 40px;
        height: 40px;
    }

    .gallery-button.left {
        left: 10px;
    }

    .gallery-button.right {
        right: 10px;
    }

    .contact-form {
        gap: 1rem;
    }

    .footer-logo img {
        height: 2.5rem;
    }
}