/* ===================================
   Tinsel & Tide Decorating Company
   Seasonal beauty, coastal soul
   Color Theme: Driftwood, Black, Gold, Seafoam, White
   =================================== */

:root {
    /* Brand Colors - Driftwood, Black, Gold, Seafoam, White */
    --driftwood: #8B7355;
    --driftwood-light: #A68B6D;
    --driftwood-dark: #6B5A45;
    --black: #1C1C1C;
    --black-soft: #2C2C2C;
    --gold: #C9A962;
    --gold-light: #D4BA7A;
    --gold-dark: #B08D45;
    --seafoam: #9CB4A5;
    --seafoam-light: #B8CCC0;
    --seafoam-dark: #7A9A8A;
    --white: #FFFFFF;
    --cream: #FDFBF7;
    --cream-dark: #F5F1E8;
    
    /* Semantic Colors */
    --text-primary: var(--black);
    --text-secondary: var(--driftwood);
    --text-light: #5A5A5A;
    --accent: var(--gold);

    /* Typography */
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --section-padding: 6rem;
    --container-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--cream);
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 500;
    line-height: 1.2;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    color: var(--black);
}

h3 {
    font-size: 1.5rem;
    color: var(--black);
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1.25rem;
}

a {
    color: var(--driftwood);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(201, 169, 98, 0.3);
    display: flex;
    align-items: center;
    padding: 0.75rem 2rem;
}

.nav-logo {
    position: absolute;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo-img {
    height: 36px;
    width: auto;
    transition: transform 0.3s ease;
}

.nav-logo:hover .nav-logo-img {
    transform: scale(1.05);
}

.nav-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nav-logo-title {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--black);
}

.nav-logo-sub {
    font-family: var(--font-sans);
    font-size: 0.55rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: var(--driftwood);
}

.nav-logo:hover .nav-logo-title,
.nav-logo:hover .nav-logo-sub {
    color: var(--gold);
}

.nav {
    display: flex;
    justify-content: center;
    gap: 3rem;
    padding: 0.5rem 2rem;
    width: 100%;
}

.nav-link {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--black);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--gold);
}

/* Hamburger Menu Toggle */
.nav-toggle {
    display: none;
    position: absolute;
    right: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--black);
    margin: 5px 0;
    transition: all 0.3s ease;
}

.nav-toggle:hover span {
    background: var(--gold);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .header {
        padding: 0.75rem 1.5rem;
    }

    .nav-logo {
        position: relative;
        left: 0;
    }

    .nav-toggle {
        display: block;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--cream);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        padding: 2rem;
        transition: right 0.3s ease;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    }

    .nav.active {
        right: 0;
    }

    .nav-link {
        font-size: 1rem;
    }

    /* Hamburger animation when active */
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

@media (max-width: 480px) {
    .nav-logo-title {
        font-size: 0.75rem;
    }

    .nav-logo-sub {
        font-size: 0.45rem;
    }

    .nav-logo-img {
        height: 30px;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(180deg, rgba(253, 251, 247, 0.65) 0%, rgba(245, 241, 232, 0.65) 100%),
                url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 2rem;
}

.hero-content {
    max-width: 600px;
}

.logo {
    margin-bottom: 2rem;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 500;
    letter-spacing: 0.15em;
    color: var(--black);
    margin-bottom: 0.25rem;
    white-space: nowrap;
}

.logo-sub {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5em;
    color: var(--black);
    margin-top: 0.5rem;
}

.wave-divider {
    width: 80px;
    margin: 1.5rem auto;
    color: var(--gold);
}

.wave-svg {
    width: 100%;
    height: auto;
}

.tagline {
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-style: italic;
    color: var(--black);
    letter-spacing: 0.05em;
}

/* Section Styling */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--gold);
    margin: 1rem auto 0;
}

/* About Section */
.about {
    padding: var(--section-padding) 0;
    background: var(--white);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.lead {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--black);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Gallery Section */
.gallery {
    padding: var(--section-padding) 0;
    background: var(--cream-dark);
}

.gallery .section-title {
    color: var(--black);
}

.gallery-intro {
    text-align: center;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--driftwood);
    margin-bottom: 3rem;
    margin-top: -1.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--cream);
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Lightbox overlay effect */
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(28, 28, 28, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Allow clicks to pass through */
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Services Section */
.services {
    padding: var(--section-padding) 0;
    background: var(--black);
}

.services .section-title {
    color: var(--white);
}

.services .section-title::after {
    background: var(--gold);
}

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

.service-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    text-align: center;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 3px solid var(--gold);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.service-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1.5rem;
    color: var(--seafoam);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    color: var(--black);
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 0;
}

/* Contact Section */
.contact {
    padding: var(--section-padding) 0;
    background: var(--seafoam);
}

.contact .section-title {
    color: var(--black);
}

.contact .section-title::after {
    background: var(--gold);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-intro {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--black);
    margin-bottom: 2.5rem;
}

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

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-label {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--driftwood-dark);
}

.contact-item a,
.contact-item span:not(.contact-label) {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--black);
}

.contact-item a:hover {
    color: var(--gold-dark);
}

/* Footer */
.footer {
    padding: 3rem 0;
    background: var(--black);
    text-align: center;
    color: var(--cream);
}

.footer-logo {
    margin-bottom: 0.75rem;
}

.logo-text-small {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--white);
}

.logo-sub-small {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.4em;
    color: var(--gold);
    margin-top: 0.25rem;
}

.footer-tagline {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-style: italic;
    color: var(--seafoam-light);
    margin-bottom: 1.5rem;
}

.copyright {
    font-size: 0.75rem;
    color: var(--driftwood-light);
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --section-padding: 4rem;
    }

    .nav {
        gap: 1.5rem;
        padding: 1rem;
    }

    .nav-link {
        font-size: 0.7rem;
        letter-spacing: 0.1em;
    }

    .hero {
        padding-top: 5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .contact-info {
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .nav {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .logo-text {
        letter-spacing: 0.1em;
    }

    .logo-sub {
        letter-spacing: 0.3em;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(28, 28, 28, 0.95);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    padding: 2rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    cursor: default;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--cream);
    font-size: 2rem;
    line-height: 1;
    transition: color 0.3s ease, transform 0.3s ease;
}

.lightbox-close:hover {
    color: var(--gold);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(201, 169, 98, 0.3);
    color: var(--cream);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(201, 169, 98, 0.2);
    border-color: var(--gold);
    color: var(--gold);
}

.lightbox-prev {
    left: -70px;
}

.lightbox-next {
    right: -70px;
}

@media (max-width: 768px) {
    .lightbox {
        padding: 1rem;
    }

    .lightbox-content {
        max-width: 100vw;
        max-height: 100vh;
    }

    .lightbox-content img {
        max-height: 80vh;
    }

    .lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
        background: rgba(0, 0, 0, 0.5);
        border: none;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: -50px;
        right: 50%;
        transform: translateX(50%);
        width: 44px;
        height: 44px;
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .lightbox-content {
        max-width: 100vw;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .lightbox-prev {
        left: 5px;
    }

    .lightbox-next {
        right: 5px;
    }
}

/* Animations */
@media (prefers-reduced-motion: no-preference) {
    .service-card {
        opacity: 0;
        transform: translateY(20px);
        animation: fadeInUp 0.6s ease forwards;
    }

    .service-card:nth-child(1) { animation-delay: 0.1s; }
    .service-card:nth-child(2) { animation-delay: 0.2s; }
    .service-card:nth-child(3) { animation-delay: 0.3s; }

    .gallery-item {
        opacity: 0;
        transform: translateY(20px);
        animation: fadeInUp 0.6s ease forwards;
    }

    .gallery-item:nth-child(1) { animation-delay: 0.05s; }
    .gallery-item:nth-child(2) { animation-delay: 0.1s; }
    .gallery-item:nth-child(3) { animation-delay: 0.15s; }
    .gallery-item:nth-child(4) { animation-delay: 0.2s; }
    .gallery-item:nth-child(5) { animation-delay: 0.25s; }
    .gallery-item:nth-child(6) { animation-delay: 0.3s; }
    .gallery-item:nth-child(7) { animation-delay: 0.35s; }
    .gallery-item:nth-child(8) { animation-delay: 0.4s; }
    .gallery-item:nth-child(9) { animation-delay: 0.45s; }

    @keyframes fadeInUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
