/* =========================================================
   1. Reset & Variables
   ========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --cream:      #f7f6f1;
    --navy:       #243441;
    --sage:       #677f72;
    --dark-bg:    #1a2530;

    --gray-100:   #f3f4f6;
    --gray-300:   #d1d5db;
    --gray-400:   #9ca3af;
    --gray-500:   #6b7280;
    --gray-600:   #4b5563;
    --gray-700:   #374151;
    --gray-800:   #1f2937;

    --font-sans:  'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background-color: var(--cream);
    color: var(--navy);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* =========================================================
   2. Layout — container
   ========================================================= */
.container {
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}
@media (min-width: 1024px) {
    .container { padding-left: 3rem; padding-right: 3rem; }
}

/* =========================================================
   3. Botones
   ========================================================= */
.btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
}
.btn-primary {
    background-color: var(--sage);
    color: var(--cream);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.btn-primary:hover {
    background-color: rgba(103, 127, 114, 0.9);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-lg {
    display: block;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
}
@media (min-width: 640px) {
    .btn-lg { display: inline-block; }
}
.btn-lg-primary {
    background-color: var(--sage);
    color: var(--cream);
    box-shadow: 0 10px 15px -3px rgba(103, 127, 114, 0.3);
}
.btn-lg-primary:hover {
    background-color: rgba(103, 127, 114, 0.9);
    transform: translateY(-4px);
}
.btn-lg-outline {
    background-color: #fff;
    border: 2px solid rgba(36, 52, 65, 0.1);
    color: var(--navy);
}
.btn-lg-outline:hover {
    border-color: var(--sage);
    color: var(--sage);
}

/* =========================================================
   4. Header
   ========================================================= */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    background-color: rgba(247, 246, 241, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 50;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}
.site-header.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    transition: padding 0.3s ease;
}
.site-header.scrolled .header-inner { padding: 0.5rem 0; }

.nav-desktop {
    display: none;
    gap: 2rem;
    align-items: center;
    font-weight: 500;
}
@media (min-width: 768px) {
    .nav-desktop { display: flex; }
}

.nav-link {
    color: var(--navy);
    transition: color 0.2s ease;
}
.nav-link:hover { color: var(--sage); }

.nav-mobile-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--navy);
    font-size: 1.5rem;
    padding: 0.5rem;
}
@media (min-width: 768px) {
    .nav-mobile-toggle { display: none; }
}

.nav-mobile {
    display: none;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0 1.5rem;
    border-top: 1px solid rgba(36, 52, 65, 0.1);
    font-weight: 500;
}
.nav-mobile.open { display: flex; }
@media (min-width: 768px) {
    .nav-mobile { display: none !important; }
}

.logo-light-bg,
.logo-dark-bg {
    display: block;
    background-repeat: no-repeat;
    background-position: center;      /* centrado real, sin recortes */
    background-size: contain;         /* el logo entero cabe, nunca se recorta */

    /* Tamaño controlado por variables → fácil de ajustar */
    width: var(--logo-w, 180px);
    height: var(--logo-h, 50px);
}

/* ---------- Navbar (fondo claro → logo oscuro) ---------- */
.logo-light-bg {
    background-image: url('../img/dimora_logo_dark.webp');
    --logo-w: 200px;   /* ← cambia aquí el ancho del logo del navbar */
    --logo-h: 50px;    /* ← cambia aquí el alto del logo del navbar */
}

/* ---------- Footer (fondo oscuro → logo claro) ---------- */
.logo-dark-bg {
    background-image: url('../img/dimora.png');
    --logo-w: 200px;   /* ← cambia aquí el ancho del logo del footer */
    --logo-h: 50px;    /* ← cambia aquí el alto del logo del footer */
}

/* ---------- Responsive: reducir en móvil ---------- */
@media (max-width: 480px) {
    .logo-light-bg {
        --logo-w: 150px;
        --logo-h: 40px;
    }
    /* el logo del footer puede quedar igual o también reducir */
}

/* =========================================================
   5. Hero
   ========================================================= */
.hero {
    position: relative;
    padding: 8rem 0 5rem;
    overflow: hidden;
}
@media (min-width: 1024px) {
    .hero { padding: 12rem 0 8rem; }
}

.hero-container {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 3rem;
    position: relative;
    z-index: 10;
}
@media (min-width: 1024px) {
    .hero-container { flex-direction: row; }
}

.hero-text  { width: 100%; }
.hero-image { width: 100%; }
@media (min-width: 1024px) {
    .hero-text, .hero-image { width: 50%; }
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.badge-sage {
    background-color: rgba(103, 127, 114, 0.1);
    color: var(--sage);
    border: 1px solid rgba(103, 127, 114, 0.2);
}
.badge-light {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--cream);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.15;
    margin-bottom: 1.5rem;
}
@media (min-width: 768px)  { .hero-title { font-size: 3rem; } }
@media (min-width: 1024px) { .hero-title { font-size: 3.75rem; } }

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(36, 52, 65, 0.8);
    margin-bottom: 2rem;
    max-width: 36rem;
    line-height: 1.625;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
@media (min-width: 640px) {
    .hero-buttons { flex-direction: row; }
}

/* Hero image */
.hero-image-inner {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(36, 52, 65, 0.2);
    border: 4px solid #fff;
}
.hero-image-inner > img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.7s ease;
}
.hero-image-inner:hover > img { transform: scale(1.05); }

/* Floating badge */
.floating-badge {
    display: none;
    position: absolute;
    bottom: -1.5rem;
    left: -1.5rem;
    background: #fff;
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--cream);
    z-index: 20;
    animation: bounce 3s infinite;
}
@media (min-width: 768px) {
    .floating-badge { display: flex; }
}

.floating-badge-icon {
    background-color: #dcfce7;
    color: #16a34a;
    padding: 0.75rem;
    border-radius: 50%;
}
.floating-badge-icon i { font-size: 1.25rem; }

.floating-badge-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--navy);
}
.floating-badge-sub {
    font-size: 0.75rem;
    color: var(--gray-500);
}

@keyframes bounce {
    0%, 100% { transform: translateY(-15%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
    50%      { transform: translateY(0);   animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}

/* Hero decorative blobs */
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(64px);
    z-index: 0;
    pointer-events: none;
}
.hero-blob-1 {
    top: 5rem;
    right: 0;
    width: 24rem;
    height: 24rem;
    background-color: rgba(103, 127, 114, 0.1);
}
.hero-blob-2 {
    bottom: 0;
    left: 2.5rem;
    width: 18rem;
    height: 18rem;
    background-color: rgba(36, 52, 65, 0.05);
}

/* =========================================================
   6. Sección Características (con imagen de fondo)
   ========================================================= */
.features-section {
    position: relative;
    padding: 6rem 0;
    background-color: var(--cream);
    background-image: url('../img/dimora/fondo_1.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Overlay para legibilidad del texto */
.features-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(247, 246, 241, 0.7);
    z-index: 0;
}

.features-section > .container {
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    max-width: 48rem;
    margin: 0 auto 4rem;
}
.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1rem;
    line-height: 1.2;
}
@media (min-width: 768px) {
    .section-title { font-size: 2.25rem; }
}
.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 768px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .features-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature-card {
    background-color: var(--cream);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--gray-100);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.feature-card:hover .icon-wrapper {
    background-color: var(--sage);
    color: var(--cream);
}

.icon-wrapper {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    background-color: #fff;
    color: var(--sage);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.75rem;
}
.feature-card p {
    color: var(--gray-600);
    line-height: 1.6;
}

/* Tarjeta oscura destacada (IA) */
.feature-card-dark {
    background: linear-gradient(135deg, var(--navy) 0%, var(--gray-800) 100%);
    color: #fff;
    border-color: var(--navy);
    position: relative;
    overflow: hidden;
}
@media (min-width: 1024px) {
    .feature-card-dark { grid-column: span 2; }
}
.feature-card-dark::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 16rem;
    height: 16rem;
    background-color: rgba(103, 127, 114, 0.2);
    border-radius: 50%;
    filter: blur(64px);
    transform: translate(50%, -50%);
    z-index: 0;
    pointer-events: none;
}
.feature-card-dark-inner {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}
@media (min-width: 768px) {
    .feature-card-dark-inner { flex-direction: row; }
}
.feature-card-dark-text { flex: 1; }
.feature-card-dark .icon-wrapper {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--sage);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.feature-card-dark:hover .icon-wrapper {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--sage);
}
.feature-card-dark h3 {
    color: var(--cream);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}
.feature-card-dark p {
    color: var(--gray-300);
}
.feature-card-dark-icon {
    display: none;
    width: 8rem;
    height: 8rem;
    opacity: 0.2;
}
@media (min-width: 768px) {
    .feature-card-dark-icon { display: block; }
}
.feature-card-dark-icon i {
    font-size: 8rem;
    color: var(--sage);
}

/* =========================================================
   7. VettaIO
   ========================================================= */
.vetta-section {
    position: relative;
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--navy) 100%);
    color: #fff;
    overflow: hidden;
    border-top: 1px solid var(--gray-800);
}
.vetta-section::before {
    content: "";
    position: absolute;
    top: -8rem;
    right: -8rem;
    width: 24rem;
    height: 24rem;
    border-radius: 50%;
    background-color: rgba(103, 127, 114, 0.2);
    filter: blur(64px);
    pointer-events: none;
}

.vetta-card {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    position: relative;
    z-index: 10;
}
@media (min-width: 768px) {
    .vetta-card { padding: 3rem; }
}
@media (min-width: 1024px) {
    .vetta-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.vetta-text { width: 100%; }
.vetta-visual { width: 100%; display: flex; justify-content: center; }
@media (min-width: 1024px) {
    .vetta-text   { width: 60%; }
    .vetta-visual { width: 40%; }
}

.vetta-title {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}
@media (min-width: 768px) {
    .vetta-title { font-size: 2.25rem; }
}
.vetta-brand {
    background: linear-gradient(90deg, var(--sage) 0%, #4ade80 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
    letter-spacing: 0.025em;
}
.vetta-description {
    font-size: 1.125rem;
    color: var(--gray-300);
    line-height: 1.625;
    margin-bottom: 1.5rem;
}
.vetta-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--sage);
    font-weight: 700;
    transition: color 0.2s ease;
}
.vetta-link:hover { color: #fff; }
.vetta-link i { transition: transform 0.2s ease; }
.vetta-link:hover i { transform: translateX(4px); }

.vetta-illustration {
    position: relative;
    width: 16rem;
    height: 16rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vetta-ping {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-color: rgba(103, 127, 114, 0.2);
    animation: ping 3s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ping {
    0% { transform: scale(1); opacity: 1; }
    75%, 100% { transform: scale(2); opacity: 0; }
}
.vetta-chip {
    position: relative;
    width: 8rem;
    height: 8rem;
    background-color: var(--dark-bg);
    border-radius: 1rem;
    border: 2px solid var(--sage);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 10;
    transform: rotate(12deg);
    transition: transform 0.5s ease;
}
.vetta-chip:hover { transform: rotate(0deg); }
.vetta-chip i { font-size: 3.75rem; color: var(--sage); }

.vetta-ornament {
    position: absolute;
    background-color: rgba(36, 52, 65, 0.9);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    z-index: 20;
}
.vetta-ornament-1 {
    bottom: -1rem;
    left: -1rem;
    width: 5rem;
    height: 5rem;
    border-radius: 0.75rem;
}
.vetta-ornament-1 i { font-size: 1.875rem; color: var(--gray-300); }
.vetta-ornament-2 {
    top: -1rem;
    right: -1rem;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background-color: rgba(247, 246, 241, 0.1);
}
.vetta-ornament-2 i { font-size: 1.5rem; color: var(--cream); }

/* =========================================================
   8. CTA
   ========================================================= */
.cta-section {
    position: relative;
    padding: 6rem 1.5rem;
    background-color: var(--navy);
    text-align: center;
    overflow: hidden;
}
.cta-section::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.1;
    background-image: radial-gradient(var(--sage) 2px, transparent 2px);
    background-size: 30px 30px;
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 10;
    max-width: 56rem;
    margin: 0 auto;
}
.cta-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--cream);
    margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
    .cta-title { font-size: 3rem; }
}
.cta-description {
    font-size: 1.25rem;
    color: var(--gray-300);
    margin-bottom: 2.5rem;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}
.cta-buttons {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}
@media (min-width: 640px) {
    .cta-buttons { flex-direction: row; }
}
.cta-btn {
    padding: 1rem 2.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    border: none;
}
.cta-btn-primary {
    background-color: var(--sage);
    color: var(--cream);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}
.cta-btn-primary:hover {
    background-color: #fff;
    color: var(--sage);
    transform: scale(1.05);
}
.cta-btn-outline {
    background-color: transparent;
    border: 1px solid rgba(247, 246, 241, 0.3);
    color: var(--cream);
}
.cta-btn-outline:hover {
    background-color: rgba(247, 246, 241, 0.1);
}

/* =========================================================
   9. Footer
   ========================================================= */
.site-footer {
    background-color: var(--dark-bg);
    padding: 4rem 0 2rem;
    color: var(--gray-400);
    font-size: 0.875rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--gray-700);
    margin-bottom: 2rem;
}
@media (min-width: 768px) {
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

.footer-brand .logo-dark-bg { margin-bottom: 1.5rem; }
.footer-text {
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 24rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}
.social-link {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: var(--gray-800);
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.social-link:hover {
    background-color: var(--sage);
    color: #fff;
}

.footer-col h4 {
    color: var(--cream);
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}
.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.footer-col a {
    color: inherit;
    transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--sage); }

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.875rem;
}

/* =========================================================
   10. Animaciones de scroll (reveal)
   ========================================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* Accesibilidad: respeta reduce-motion */
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .floating-badge, .vetta-ping { animation: none; }
}