:root {
    --primary-color: #a1af8d;
    --primary-dark: #8b9979;
    --secondary-color: #a4a4a4;
    --bg-color: #ffffff;
    --bg-alt: #f0f0f4;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --border-radius: 24px;
    --border-radius-sm: 14px;
    --transition: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-color);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.015em;
    transition: background-color 0.2s ease, color 0.1s ease;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 600;
    letter-spacing: -0.03em;
}

p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header & Glassmorphism */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #a1af8d;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid #8b9979;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.02);
}

.logo-icon {
    height: 50px;
    width: auto;
    object-fit: contain;
    transform: scale(5.25);
    transform-origin: left center;
}

.logo-pf {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.04em;
    line-height: 1;
}

.logo-text {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.05em;
    margin-left: -5px;
    line-height: 1;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

nav li {
    position: relative;
    padding: 1rem 0;
}

nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: color 0.3s ease;
    opacity: 0.8;
}

nav a:hover {
    color: var(--primary-color);
    opacity: 1;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    pointer-events: none;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.dropdown-menu li {
    padding: 0;
    width: 100%;
}

.dropdown-menu a {
    padding: 0.75rem 1.5rem;
    display: block;
    width: 100%;
    text-align: center;
}

.dropdown-menu a:hover {
    background: rgba(161, 175, 141, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    outline: none;
}

.primary-btn {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 14px rgba(161, 175, 141, 0.4);
}

.primary-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(161, 175, 141, 0.5);
}

/* Layout Utilities */
.section {
    padding: 8rem 2rem;
}

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

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

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 0.25rem;
}

/* Services section needs more breathing room above the cards */
#services .section-header {
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

/* Hero Carousel */
.hero-section {
    padding-top: calc(50px + 2rem);
    height: 100vh;
    min-height: 800px;
    display: flex;
    align-items: center;
    background-color: var(--bg-color);
    overflow: hidden;
    position: relative;
}

.carousel-container {
    width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.8s var(--transition);
    width: 100%;
}

.carousel-slide {
    min-width: 100%;
    flex: 0 0 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 2rem;
}

.slide-content {
    width: 100%;
    max-width: 1200px;
    text-align: center;
}

.single-image-container h2 {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    margin: 0;
    color: #ffffff;
    z-index: 10;
    pointer-events: none;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.6);
    width: 90%;
}

.single-image-container {
    position: relative;
    width: 100%;
    max-width: 960px;
    margin: 0 auto 3rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.single-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Dark gradient at the top (for title) and bottom (for button), transparent in the middle */
    background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.1) 40%, rgba(0,0,0,0.1) 70%, rgba(0,0,0,0.5) 100%);
    z-index: 5;
    pointer-events: none;
}

.temp-image.full-width {
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    transition: transform 0.4s var(--transition);
}

.single-image-container:hover .temp-image.full-width {
    transform: scale(1.03);
}

.overlay-btn {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.overlay-btn:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.carousel-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    opacity: 0.3;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    opacity: 1;
    transform: scale(1.2);
    background-color: var(--primary-color);
}

/* Services */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.service-card {
    background: rgba(0, 0, 0, 0.04);
    border-radius: var(--border-radius);
    padding: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-info {
    max-width: 800px;
    text-align: center;
}

.service-info h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.service-info p {
    margin-bottom: 2.5rem;
    font-size: 1.25rem;
}

/* Canvas Scroll Animation Showcase */
.scroll-showcase {
    /* 200vh = animation plays over 100vh of scroll, then site continues */
    height: 200vh;
    width: 100%;
    position: relative;
    background-color: #1a1a1a;
    margin: 5rem 0;
}

/* White → transparent gradient overlays ONLY at the extreme top and bottom edges */
.scroll-showcase::before,
.scroll-showcase::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 120px;  /* small fixed fade, never encroaches sticky animation area */
    pointer-events: none;
    z-index: 2;     /* above sticky container */
}

.scroll-showcase::before {
    top: 0;
    background: linear-gradient(to bottom, #ffffff 0%, transparent 100%);
}

.scroll-showcase::after {
    bottom: 0;
    background: linear-gradient(to top, #ffffff 0%, transparent 100%);
}

.sticky-container {
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #1a1a1a;
    padding: 0;
}

#animationCanvas {
    width: 100vw;
    max-height: 80vh;
    object-fit: cover;
    /* Only top/bottom fade — full width */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
}

.reveal-text {
    position: absolute;
    top: 66%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(300px, 60vw, 750px);
    height: auto;
    z-index: 5;
    pointer-events: none;
    opacity: 0.95;

    /* Colorize logo to exactly #a1af8d — hsl(85°, 17%, 62%) */
    filter: brightness(0) saturate(100%) invert(75%) sepia(16%) saturate(380%) hue-rotate(55deg) brightness(96%) contrast(88%);

    /* Initially hidden gradient mask. We sweep --reveal-progress from 0% to 100% via JS */
    --reveal-progress: 0%;
    -webkit-mask-image: linear-gradient(to right, black 0%, black calc(var(--reveal-progress) - 15%), transparent calc(var(--reveal-progress) + 15%), transparent 100%);
    mask-image: linear-gradient(to right, black 0%, black calc(var(--reveal-progress) - 15%), transparent calc(var(--reveal-progress) + 15%), transparent 100%);
}

/* Portfolio */
/* Portfolio Carousel */
.portfolio-carousel-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 1rem 0 3rem;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.portfolio-carousel {
    display: flex;
    gap: 2rem;
    animation: portfolioScroll 30s linear infinite;
    width: max-content;
}

.portfolio-carousel:hover {
    animation-play-state: paused;
}

@keyframes portfolioScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.portfolio-card {
    flex-shrink: 0;
    width: 260px;
    transition: transform 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-6px);
}

.portfolio-img {
    width: 260px;
    height: 260px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.portfolio-img.temp-image {
    background-color: var(--primary-color);
}

.portfolio-review {
    background: var(--bg-color);
    border-radius: 14px;
    padding: 1rem 1.2rem;
    margin-top: 0.75rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.review-stars {
    color: #f5a623;
    font-size: 1.1rem;
    letter-spacing: 2px;
    margin-bottom: 0.4rem;
}

.review-text {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.4rem;
    font-style: italic;
}

.review-author {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Contact Form */
.contact-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 4rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 100%;
}

.forms-wrapper {
    width: 100%;
}

.toggle-switch {
    display: flex;
    position: relative;
    background-color: rgba(0, 0, 0, 0.04);
    border-radius: 14px;
    padding: 6px;
    margin-bottom: 2.5rem;
}

.toggle-bg {
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    background-color: var(--secondary-color);
    border-radius: 10px;
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.toggle-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
    border-radius: 10px;
}

.toggle-btn.active {
    color: #fff;
}

/* Fancy Form Elements */
.input-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .input-row {
        grid-template-columns: 1fr 1fr;
    }
}

.form-view {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.form-view.active-view {
    display: flex;
}

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

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1.5px solid transparent;
    background-color: rgba(0, 0, 0, 0.03);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.form-group textarea {
    resize: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 6px 20px rgba(161, 175, 141, 0.15);
}

/* Custom File Upload */
.custom-file-upload {
    display: inline-block;
    padding: 1.5rem;
    border: 2px dashed rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    background-color: rgba(0, 0, 0, 0.02);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    font-weight: 500;
}

.custom-file-upload:hover {
    border-color: var(--primary-color);
    background-color: rgba(161, 175, 141, 0.05);
    color: var(--primary-color);
}

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

.submit-btn {
    margin-top: 1rem;
    width: fit-content;
}

.contact-info {
    padding: 2rem;
    background: var(--bg-alt);
    border-radius: var(--border-radius-sm);
    height: fit-content;
}

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

/* Footer */
footer {
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        gap: 1.5rem;
    }

    .slide-content h2 {
        font-size: 2.5rem;
    }

    .service-card {
        padding: 2rem;
    }

    .contact-container {
        padding: 2rem;
    }
}