/* ============================================
   Electromecánica Daniel — Styles
   Palette: Plum (#7B2D8E / #9B4DCA) + Amber (#D4891C / #F0B429)
   ============================================ */

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

:root {
    --plum-deep: #5A1D6E;
    --plum: #7B2D8E;
    --plum-light: #9B4DCA;
    --plum-pale: #F3E8F7;
    --plum-ghost: #FBF5FD;
    --amber: #D4891C;
    --amber-light: #F0B429;
    --amber-pale: #FFF3DC;
    --amber-ghost: #FFFBF5;
    --dark: #1A1020;
    --dark-soft: #2D1F36;
    --text: #2A1B33;
    --text-mid: #5C4A66;
    --text-light: #8A7A92;
    --white: #FFFFFF;
    --off-white: #FDF8FF;
    --bg-cream: #FDF6FF;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-xl: 32px;
    --shadow-sm: 0 2px 8px rgba(123, 45, 142, 0.06);
    --shadow-md: 0 4px 20px rgba(123, 45, 142, 0.10);
    --shadow-lg: 0 8px 40px rgba(123, 45, 142, 0.14);
    --shadow-xl: 0 16px 60px rgba(123, 45, 142, 0.18);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-body: 'Nunito', sans-serif;
    --font-display: 'Playfair Display', serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--off-white);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

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

/* ============================================
   Header
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(253, 248, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(123, 45, 142, 0.08);
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(253, 248, 255, 0.96);
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--plum);
    letter-spacing: -0.01em;
}

.logo strong {
    color: var(--amber);
}

.logo-icon {
    flex-shrink: 0;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav a {
    padding: 8px 16px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-mid);
    transition: var(--transition);
}

.nav a:hover {
    color: var(--plum);
    background: var(--plum-pale);
}

.nav-toggle,
.nav-close {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--plum);
    transition: var(--transition);
}

.nav-toggle:hover,
.nav-close:hover {
    background: var(--plum-pale);
}

/* Mobile nav */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        padding: 100px 32px 40px;
        gap: 4px;
        box-shadow: var(--shadow-xl);
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
    }

    .nav.open {
        transform: translateX(0);
    }

    .nav a {
        padding: 14px 16px;
        font-size: 1.05rem;
        border-radius: var(--radius-md);
    }

    .nav-close {
        display: flex;
        position: absolute;
        top: 20px;
        right: 20px;
    }

    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(26, 16, 32, 0.5);
        z-index: 998;
    }

    .nav-overlay.show {
        display: block;
    }
}

/* ============================================
   Hero
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(90, 29, 110, 0.88) 0%,
        rgba(123, 45, 142, 0.80) 40%,
        rgba(155, 77, 202, 0.65) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 120px 24px 80px;
    max-width: 720px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(212, 137, 28, 0.2);
    border: 1px solid rgba(212, 137, 28, 0.4);
    color: var(--amber-light);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 28px;
    backdrop-filter: blur(8px);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.text-amber {
    color: var(--amber-light);
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 560px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 56px;
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 600;
}

.trust-item svg {
    color: var(--amber-light);
    flex-shrink: 0;
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    color: rgba(255, 255, 255, 0.5);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(8px); }
    60% { transform: translateX(-50%) translateY(4px); }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--amber);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(212, 137, 28, 0.35);
}

.btn-primary:hover {
    background: var(--amber-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(212, 137, 28, 0.45);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
}

.btn-outline-light {
    background: transparent;
    color: var(--plum);
    border: 2px solid var(--plum);
}

.btn-outline-light:hover {
    background: var(--plum);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 16px 28px;
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1.05rem;
    border-radius: var(--radius-xl);
}

/* ============================================
   Section shared
   ============================================ */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 64px;
}

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--plum);
    background: var(--plum-pale);
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-desc {
    font-size: 1.08rem;
    color: var(--text-mid);
    line-height: 1.7;
}

/* ============================================
   Services
   ============================================ */
.services {
    background: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--off-white);
    border-radius: var(--radius-xl);
    padding: 36px 28px;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--plum), var(--amber));
    opacity: 0;
    transition: var(--transition);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(123, 45, 142, 0.1);
    background: var(--white);
}

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

.service-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--plum-pale), rgba(155, 77, 202, 0.15));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--plum);
    margin-bottom: 20px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--plum), var(--plum-light));
    color: var(--white);
    transform: scale(1.05);
}

.service-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.service-card p {
    font-size: 0.92rem;
    color: var(--text-mid);
    line-height: 1.7;
    margin-bottom: 20px;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--plum);
    transition: var(--transition);
}

.service-link:hover {
    color: var(--amber);
    gap: 10px;
}

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   About
   ============================================ */
.about {
    background: var(--bg-cream);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-images {
    position: relative;
}

.about-img-main {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-img-main img {
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.about-img-secondary {
    position: absolute;
    bottom: -32px;
    right: -24px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 5px solid var(--white);
}

.about-img-secondary img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.about-experience {
    position: absolute;
    top: -20px;
    right: -16px;
    background: linear-gradient(135deg, var(--plum), var(--plum-light));
    color: var(--white);
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.about-experience .exp-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    color: var(--amber-light);
}

.about-experience .exp-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    opacity: 0.9;
}

.about-content .section-tag {
    margin-bottom: 12px;
}

.about-content .section-title {
    text-align: left;
    margin-bottom: 20px;
}

.about-text {
    font-size: 1rem;
    color: var(--text-mid);
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-values {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 32px;
}

.value-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.value-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: var(--plum-pale);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--plum);
}

.value-item strong {
    display: block;
    font-size: 0.95rem;
    color: var(--dark);
    margin-bottom: 2px;
}

.value-item span {
    font-size: 0.88rem;
    color: var(--text-mid);
    line-height: 1.5;
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about-images {
        max-width: 480px;
    }

    .about-content .section-title {
        text-align: center;
    }

    .about-content .section-tag {
        display: block;
        text-align: center;
    }
}

/* ============================================
   Zone
   ============================================ */
.zone {
    background: var(--white);
}

.zone-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
    align-items: start;
}

.zone-text {
    font-size: 1.05rem;
    color: var(--text-mid);
    line-height: 1.8;
    margin-bottom: 36px;
}

.zone-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.zone-detail {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.zone-detail svg {
    color: var(--plum);
    flex-shrink: 0;
    margin-top: 2px;
}

.zone-detail strong {
    display: block;
    font-size: 0.95rem;
    color: var(--dark);
    margin-bottom: 4px;
}

.zone-detail span {
    font-size: 0.9rem;
    color: var(--text-mid);
    line-height: 1.6;
}

.zone-detail a {
    color: var(--plum);
    font-weight: 600;
    transition: var(--transition);
}

.zone-detail a:hover {
    color: var(--amber);
}

.zone-map {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.zone-map img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.map-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--plum);
    color: var(--white);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.88rem;
    transition: var(--transition);
}

.map-btn:hover {
    background: var(--plum-light);
    transform: translateY(-2px);
}

@media (max-width: 900px) {
    .zone-inner {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   CTA
   ============================================ */
.cta {
    background: linear-gradient(135deg, var(--plum-deep) 0%, var(--plum) 50%, var(--plum-light) 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 137, 28, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.cta::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(155, 77, 202, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.cta-text {
    flex: 1;
    min-width: 280px;
}

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 12px;
}

.cta-text p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.7;
}

.cta-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.cta .btn-primary {
    background: var(--amber);
}

.cta .btn-primary:hover {
    background: var(--amber-light);
}

.cta .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--white);
}

.cta .btn-outline-light:hover {
    background: var(--white);
    color: var(--plum);
    border-color: var(--white);
}

@media (max-width: 640px) {
    .cta-inner {
        flex-direction: column;
        text-align: center;
    }

    .cta-actions {
        justify-content: center;
    }
}

/* ============================================
   Contact
   ============================================ */
.contact {
    background: var(--bg-cream);
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 56px;
    align-items: start;
}

.contact-info .section-tag {
    margin-bottom: 12px;
}

.contact-info .section-title {
    text-align: left;
    margin-bottom: 16px;
}

.contact-desc {
    font-size: 1rem;
    color: var(--text-mid);
    line-height: 1.7;
    margin-bottom: 36px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-method {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    border: 1px solid transparent;
}

.contact-method:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(123, 45, 142, 0.1);
    transform: translateX(4px);
}

.contact-method-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--white);
}

.plum-bg {
    background: linear-gradient(135deg, var(--plum), var(--plum-light));
}

.amber-bg {
    background: linear-gradient(135deg, var(--amber), var(--amber-light));
}

.cm-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
    margin-bottom: 2px;
}

.cm-value {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
}

.contact-method:hover .cm-value {
    color: var(--plum);
}

/* Form */
.contact-form-wrap {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(123, 45, 142, 0.06);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
}

.form-group input,
.form-group textarea {
    padding: 14px 16px;
    border: 2px solid rgba(123, 45, 142, 0.12);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text);
    background: var(--off-white);
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--plum);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(123, 45, 142, 0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}

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

.form-note {
    font-size: 0.82rem;
    color: var(--text-light);
    text-align: center;
}

.form-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    gap: 16px;
}

.form-success.show {
    display: flex;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--plum-pale);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-success h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--dark);
}

.form-success p {
    color: var(--text-mid);
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-info .section-title {
        text-align: center;
    }

    .contact-info .section-tag {
        display: block;
        text-align: center;
    }

    .contact-desc {
        text-align: center;
    }

    .contact-form-wrap {
        padding: 28px;
    }
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 64px 0 0;
}

.logo-light {
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
    gap: 40px;
    padding-bottom: 48px;
}

.footer-desc {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.55);
}

.footer h4 {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--amber-light);
    margin-bottom: 20px;
}

.footer-links a {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    padding: 5px 0;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 6px;
}

.footer-contact p {
    font-size: 0.9rem;
    margin-bottom: 6px;
    line-height: 1.6;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--amber-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 500px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   Animations
   ============================================ */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}
