/* ========================================
   Fernando's Upholstery — Custom Styles
   ======================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* ========================================
   Navigation
   ======================================== */
.nav {
    background: rgba(10, 15, 30, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: all duration-300;
}

.nav.scrolled {
    background: rgba(10, 15, 30, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: #4ade80;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Mobile Menu */
.mobile-menu {
    z-index: 100;
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    position: relative;
}

/* Menu Button */
.menu-line {
    display: block;
    transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    width: 20px;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ========================================
   Hero Section
   ======================================== */
.hero-line {
    position: absolute;
    background: linear-gradient(180deg, transparent, rgba(74, 222, 128, 0.08), transparent);
}

.line-1 {
    top: 0;
    left: 15%;
    width: 1px;
    height: 100%;
    animation: lineGrow 1.5s ease-out forwards;
}

.line-2 {
    top: 0;
    left: 85%;
    width: 1px;
    height: 100%;
    animation: lineGrow 1.5s 0.2s ease-out forwards;
}

.line-3 {
    top: 20%;
    left: 0;
    width: 100%;
    height: 1px;
    animation: lineGrowH 1.5s 0.4s ease-out forwards;
}

.line-4 {
    top: 80%;
    left: 0;
    width: 100%;
    height: 1px;
    animation: lineGrowH 1.5s 0.6s ease-out forwards;
}

@keyframes lineGrow {
    from { opacity: 0; height: 0; }
    to { opacity: 1; height: 100%; }
}

@keyframes lineGrowH {
    from { opacity: 0; width: 0; }
    to { opacity: 1; width: 100%; }
}

/* Hero Animations */
.hero-eyebrow {
    opacity: 0;
    animation: fadeUp 0.8s 0.3s ease forwards;
}

.hero-title {
    opacity: 0;
    animation: fadeUp 0.8s 0.5s ease forwards;
}

.hero-subtitle {
    opacity: 0;
    animation: fadeUp 0.8s 0.7s ease forwards;
}

.hero-ctas {
    opacity: 0;
    animation: fadeUp 0.8s 0.9s ease forwards;
}

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

/* Scroll Indicator */
.scroll-indicator {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.scroll-dot {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 12px;
    background: #4ade80;
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { top: -12px; }
    100% { top: 40px; }
}

/* CTA Buttons */
.cta-primary {
    box-shadow: 0 4px 20px rgba(74, 222, 128, 0.15);
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(74, 222, 128, 0.25);
}

.cta-secondary:hover {
    transform: translateY(-2px);
}

/* ========================================
   Section Shared Styles
   ======================================== */
.section-eyebrow {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.6s ease;
}

.section-title {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s 0.1s ease;
}

.section-desc {
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.6s 0.2s ease;
}

.section-header.visible .section-eyebrow,
.section-header.visible .section-title,
.section-header.visible .section-desc {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Services Section
   ======================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}

.service-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 2.5rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.03), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    border-color: rgba(74, 222, 128, 0.2);
    transform: translateY(-4px);
}

.service-card-icon {
    color: #4ade80;
    transition: all 0.3s ease;
}

.service-card:hover .service-card-icon {
    transform: scale(1.1);
}

.service-card-title {
    position: relative;
    z-index: 1;
}

.service-card-desc {
    position: relative;
    z-index: 1;
}

.service-card-line {
    position: relative;
    z-index: 1;
}

/* Service card reveal animation */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.4s ease;
}

.service-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.service-card:nth-child(1) { transition-delay: 0s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.2s; }
.service-card:nth-child(4) { transition-delay: 0.3s; }
.service-card:nth-child(5) { transition-delay: 0.4s; }
.service-card:nth-child(6) { transition-delay: 0.5s; }

/* ========================================
   Divider
   ======================================== */
.divider {
    max-width: 7rem;
    margin: 0 auto;
}

.divider-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(74, 222, 128, 0.3), transparent);
}

/* ========================================
   About Section
   ======================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    height: 600px;
}

.about-image {
    border-radius: 2px;
}

.about-image-accent {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 120px;
    height: 120px;
    border-top: 1px solid rgba(74, 222, 128, 0.3);
    border-left: 1px solid rgba(74, 222, 128, 0.3);
    z-index: 0;
}

.about-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 15, 30, 0.2), transparent);
    border-radius: 2px;
}

.about-badge {
    position: absolute;
    bottom: -30px;
    right: -30px;
    background: #0d1628;
    border: 1px solid rgba(74, 222, 128, 0.2);
    padding: 1.5rem 2rem;
    z-index: 2;
}

.about-title {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease;
}

.about-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-content-col p {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.about-content-col p.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-content-col p:nth-child(1) { transition-delay: 0.1s; }
.about-content-col p:nth-child(2) { transition-delay: 0.2s; }
.about-content-col p:nth-child(3) { transition-delay: 0.3s; }

.about-values {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s 0.4s ease;
}

.about-values.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-value-icon {
    color: #4ade80;
}

/* ========================================
   Gallery Section
   ======================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(2, 250px);
    gap: 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 2px;
    cursor: pointer;
}

.gallery-item-1 {
    grid-column: 1 / 6;
    grid-row: 1 / 2;
}

.gallery-item-2 {
    grid-column: 5 / 9;
    grid-row: 1 / 3;
}

.gallery-item-3 {
    grid-column: 9 / 13;
    grid-row: 1 / 2;
}

.gallery-item-4 {
    grid-column: 1 / 5;
    grid-row: 2 / 3;
}

.gallery-img {
    transition: transform 0.6s ease;
}

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

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 15, 30, 0.8), transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.gallery-item-label {
    transform: translateY(10px);
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-item-label {
    transform: translateY(0);
}

/* Gallery item reveal */
.gallery-item {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-item.revealed {
    opacity: 1;
    transform: scale(1);
}

.gallery-item:nth-child(1) { transition-delay: 0s; }
.gallery-item:nth-child(2) { transition-delay: 0.15s; }
.gallery-item:nth-child(3) { transition-delay: 0.3s; }
.gallery-item:nth-child(4) { transition-delay: 0.45s; }

/* ========================================
   Contact Section
   ======================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

.contact-title {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease;
}

.contact-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-info-col p {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.contact-info-col p.visible {
    opacity: 1;
    transform: translateY(0);
}

.contact-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.5s ease;
}

.contact-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.contact-item:nth-child(1) { transition-delay: 0.1s; }
.contact-item:nth-child(2) { transition-delay: 0.2s; }
.contact-item:nth-child(3) { transition-delay: 0.3s; }

.contact-item-icon {
    color: #4ade80;
    margin-top: 3px;
}

.contact-item-label {
    letter-spacing: 0.15em;
}

/* Form */
.contact-form {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease;
}

.contact-form.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    padding: 0.875rem 1rem;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.form-input:focus {
    border-color: rgba(74, 222, 128, 0.5);
    background: rgba(74, 222, 128, 0.04);
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.08);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234ade80' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-select option {
    background: #0d1628;
    color: #fff;
}

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

.form-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: #4ade80;
    color: #0a0f1e;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.9375rem;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}

.form-submit:hover {
    background: #22c55e;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(74, 222, 128, 0.25);
}

.form-submit-icon {
    transition: transform 0.3s ease;
}

.form-submit:hover .form-submit-icon {
    transform: translateX(4px);
}

/* Form Success */
.form-success {
    text-align: center;
    padding: 3rem 2rem;
}

.form-success-icon {
    opacity: 0;
    animation: successPop 0.5s 0.2s ease forwards;
}

.form-success-title {
    opacity: 0;
    animation: fadeUp 0.5s 0.4s ease forwards;
}

.form-success-text {
    opacity: 0;
    animation: fadeUp 0.5s 0.5s ease forwards;
}

@keyframes successPop {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   Map Section
   ======================================== */
.map-section {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.map-section iframe {
    filter: grayscale(0.8) brightness(0.7) contrast(1.1);
    transition: filter 0.4s ease;
}

.map-section:hover iframe {
    filter: grayscale(0.5) brightness(0.8) contrast(1.1);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: rgba(0, 0, 0, 0.3);
}

.footer-logo {
    transition: all 0.3s ease;
}

.footer-logo:hover {
    transform: translateY(-2px);
}

.footer-desc {
    line-height: 1.8;
}

.footer-links-title {
    letter-spacing: 0.15em;
}

.footer-link {
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #4ade80;
    transition: width 0.3s ease;
}

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

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-grid {
        gap: 3rem;
    }
    
    .contact-grid {
        gap: 3rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }
    
    .gallery-item-1,
    .gallery-item-2,
    .gallery-item-3,
    .gallery-item-4 {
        grid-column: auto;
        grid-row: auto;
    }
    
    .gallery-item {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-image-wrapper {
        height: 400px;
    }
    
    .about-badge {
        bottom: -20px;
        right: 0;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .hero-title span:last-child {
        font-size: 2.5rem !important;
    }
    
    .section-title {
        font-size: 2rem !important;
    }
    
    .contact-title {
        font-size: 2rem !important;
    }
    
    .about-title {
        font-size: 2rem !important;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem !important;
    }
    
    .hero-title span:last-child {
        font-size: 2rem !important;
    }
    
    .nav .px-6 {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
}

/* ========================================
   Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .hero-eyebrow,
    .hero-title,
    .hero-subtitle,
    .hero-ctas {
        opacity: 1;
        animation: none;
    }
    
    .scroll-dot {
        animation: none;
    }
    
    .hero-line {
        animation: none;
        opacity: 1;
    }
    
    .line-1, .line-2 {
        height: 100%;
    }
    
    .line-3, .line-4 {
        width: 100%;
    }
}

/* ========================================
   Utility
   ======================================== */
.hidden {
    display: none !important;
}
