/* ===== RESET AND BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: #000000;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(248, 248, 248, 0.3) 100%), url('./victorian-homes.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center bottom;
    font-size: 1rem;
    overflow-x: hidden;
}

/* ===== ANIMATION KEYFRAMES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ===== ANIMATION UTILITY CLASSES ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.delay-1 {
    transition-delay: 0.1s;
}

.animate-on-scroll.delay-2 {
    transition-delay: 0.2s;
}

.animate-on-scroll.delay-3 {
    transition-delay: 0.3s;
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.scale-in {
    animation: scaleIn 0.6s ease-out;
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* ===== STAGGERED ANIMATIONS ===== */
.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-item.animated {
    opacity: 1;
    transform: translateY(0);
}

.stagger-item:nth-child(1) { transition-delay: 0.1s; }
.stagger-item:nth-child(2) { transition-delay: 0.2s; }
.stagger-item:nth-child(3) { transition-delay: 0.3s; }
.stagger-item:nth-child(4) { transition-delay: 0.4s; }
.stagger-item:nth-child(5) { transition-delay: 0.5s; }
.stagger-item:nth-child(6) { transition-delay: 0.6s; }
.stagger-item:nth-child(7) { transition-delay: 0.7s; }
.stagger-item:nth-child(8) { transition-delay: 0.8s; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #000000;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.9);
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: #333333;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

a {
    color: #000000;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #666666;
}

/* ===== LAYOUT CONTAINERS ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== NAVIGATION ===== */
.navbar {
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    background-color: rgba(0, 0, 0, 0.98);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

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

.nav-brand a {
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.nav-brand a:hover {
    transform: translateY(-2px);
    text-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    color: #ffffff;
    font-weight: 400;
    padding: 0.75rem 0;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.05rem;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
    transform: translateY(-2px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    margin: 3px 0;
    transition: 0.3s;
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 140px 0 100px;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(250, 250, 250, 0.4) 100%),
                url('./victorian-homes.jpg');
    background-size: cover;
    background-position: center bottom;
    background-attachment: fixed;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(0, 0, 0, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(0, 0, 0, 0.08) 0%, transparent 50%),
                linear-gradient(45deg, rgba(0, 0, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

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

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: #000000;
    letter-spacing: -0.03em;
    text-shadow: 0 3px 6px rgba(255, 255, 255, 0.95);
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-slogan {
    font-size: 1.6rem;
    color: #333333;
    margin-bottom: 2rem;
    font-style: italic;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.9);
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-tagline {
    font-size: 1.2rem;
    color: #333333;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.9);
    animation: fadeInUp 1s ease-out 0.6s both;
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
    padding: 80px 0;
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(250, 250, 250, 0.35) 100%);
}

.content-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.05) 100%);
    pointer-events: none;
    z-index: 1;
}

.content-section .container {
    position: relative;
    z-index: 2;
}

.content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #000000, transparent);
    opacity: 0.3;
}

.content-section h2 {
    margin-bottom: 2rem;
    text-align: center;
}

.mission-summary {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
    color: #333333;
}

.cta-container {
    text-align: center;
    margin-top: 3rem;
}

.cta-button {
    display: inline-block;
    padding: 1.2rem 3rem;
    background-color: #ffffff;
    color: #000000;
    border: 2px solid #000000;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    background-color: #000000;
    color: #ffffff;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ===== PAGE HEADERS ===== */
.page-header {
    padding: 120px 0 60px;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, rgba(250, 250, 250, 0.3) 100%);
    border-bottom: 1px solid #e0e0e0;
}

.page-header h1 {
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.1rem;
    color: #666666;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== WELCOME PAGE ===== */
.welcome-content h2 {
    text-align: left;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.welcome-content h2:first-child {
    margin-top: 0;
}

.welcome-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: #333333;
}

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

.value-item {
    padding: 2.5rem;
    border: 1px solid #e0e0e0;
    background-color: #fafafa;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.value-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #000000, #666666, #000000);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.value-item:hover::before {
    transform: scaleX(1);
}

.value-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
}

.value-item h3 {
    color: #000000;
    margin-bottom: 1rem;
}

.value-item p {
    color: #666666;
    margin-bottom: 0;
}

/* ===== MISSION PAGE ===== */
.mission-intro {
    text-align: center;
    margin-bottom: 4rem;
}

.mission-tagline {
    font-size: 1.3rem;
    color: #666666;
    font-style: italic;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

.mission-details h2 {
    text-align: left;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.mission-details h2:first-child {
    margin-top: 0;
}

.mission-details p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: #333333;
}

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

.service-item {
    padding: 2rem;
    border: 1px solid #e0e0e0;
    background-color: #fafafa;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.service-item h3 {
    color: #000000;
    margin-bottom: 1rem;
}

.service-item p {
    color: #666666;
    margin-bottom: 0;
}

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

.approach-item {
    text-align: center;
    padding: 2rem;
    border: 1px solid #e0e0e0;
    background-color: #fafafa;
}

.approach-item h3 {
    color: #000000;
    margin-bottom: 1rem;
}

.approach-item p {
    color: #666666;
    margin-bottom: 0;
}

/* ===== GALLERY ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-item {
    border: 1px solid #e0e0e0;
    background-color: #ffffff;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

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

.gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.gallery-image {
    position: relative;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    filter: grayscale(100%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1.05);
}

.gallery-item:hover .gallery-image img {
    filter: grayscale(0%);
    transform: scale(1.1);
}

.gallery-caption {
    padding: 1.5rem;
}

.gallery-caption h3 {
    color: #000000;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.gallery-caption p {
    color: #666666;
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* ===== CONTACT FORM ===== */
.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-intro h2 {
    margin-bottom: 1rem;
}

.contact-intro p {
    font-size: 1.1rem;
    color: #666666;
    line-height: 1.7;
}

.contact-form {
    margin-bottom: 4rem;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #000000;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    background-color: #ffffff;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1rem;
    color: #000000;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

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

.error-message {
    color: #cc0000;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: block;
}

.submit-button {
    background-color: #000000;
    color: #ffffff;
    border: 2px solid #000000;
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Georgia', 'Times New Roman', serif;
    position: relative;
    overflow: hidden;
}

.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.submit-button:hover::before {
    left: 100%;
}

.submit-button:hover {
    background-color: #ffffff;
    color: #000000;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.submit-button:active {
    transform: translateY(-2px);
}

.contact-info {
    border-top: 1px solid #e0e0e0;
    padding-top: 3rem;
}

.contact-info h3 {
    text-align: center;
    margin-bottom: 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.info-item {
    text-align: center;
    padding: 2rem;
    border: 1px solid #e0e0e0;
    background-color: #fafafa;
}

.info-item h4 {
    color: #000000;
    margin-bottom: 1rem;
}

.info-item p {
    color: #666666;
    margin-bottom: 0;
    line-height: 1.7;
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(135deg, rgba(245, 245, 245, 0.4) 0%, rgba(240, 240, 240, 0.4) 100%);
    border-top: 1px solid #e0e0e0;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    color: #000000;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: #666666;
    margin-bottom: 0;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.footer-social a {
    display: inline-block;
    width: 45px;
    height: 45px;
    background-color: #000000;
    color: #ffffff;
    text-align: center;
    line-height: 45px;
    border-radius: 50%;
    font-size: 1.3rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.footer-social a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.3s ease;
}

.footer-social a:hover::before {
    transform: scale(1);
}

.footer-social a:hover {
    background-color: #666666;
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.footer-bottom p {
    color: #666666;
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: rgba(0, 0, 0, 0.98);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 2rem 0;
        gap: 1.5rem;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
        transform: translateX(-20px);
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-slogan {
        font-size: 1.4rem;
    }

    .container {
        padding: 0 1rem;
    }

    .content-section {
        padding: 60px 0;
    }

    .values-grid,
    .services-grid,
    .approach-list,
    .gallery-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .mission-summary {
        font-size: 1rem;
    }

    .cta-button {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-slogan {
        font-size: 1.1rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

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

    .gallery-image img {
        height: 220px;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for better accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .gallery-image img {
        filter: contrast(150%);
    }
    
    .value-item,
    .service-item,
    .approach-item,
    .info-item {
        border-width: 2px;
    }
}
