/*
 * Interlomas Online - Grafito Bento
 * Modo noche = Propuesta C · Modo día = Propuesta D
 * El tema se controla con [data-theme="light" | "dark"] en <html>.
 */

/* ==========================================
   TOKENS
   ========================================== */
:root {
    /* Marca (iguales en ambos modos) */
    --accent: #F8AC15;
    --accent-hover: #FAC150;
    --ink: #161615;
    --ink-soft: #2A2410;
    --ink-eyebrow: #3A2C00;

    /* Tipografía */
    --font-display: 'Unbounded', sans-serif;
    --font-sans: 'DM Sans', sans-serif;

    /* Layout */
    --max-width: 1440px;
    --gutter: 48px;
    --header-height: 104px;
    --transition: 0.25s ease;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --reveal-duration: 0.7s;

    /* Modo día (Propuesta D) */
    --bg: #FFFFFF;
    --text: #161615;
    --heading: #161615;
    --surface: #F5F4F1;
    --surface-border: rgba(22,22,21,0.05);
    --field: #F0EFEB;
    --chip: #FFFFFF;
    --chip-text: #3E3D3A;
    --nav-text: #3E3D3A;
    --muted: #5F5D58;
    --body: #55534E;
    --num: #9A9892;
    --foot-muted: #6B6964;
    --accent-ink: #8A5A00;
    --accent-icon: #B87800;
    --danger: #D62D4B;
    --on-photo: #FFFFFF;
    --shadow-burst: rgba(0, 0, 0, 0.35);
    --scrim: rgba(0, 0, 0, 0.6);
    --scrim-strong: rgba(0, 0, 0, 0.7);
    --glass-bg: rgba(22,22,21,0.04);
    --glass-border: rgba(22,22,21,0.08);
    --ghost-bg: rgba(22,22,21,0.05);
    --ghost-border: rgba(22,22,21,0.1);
    --invert-bg: #161615;
    --invert-text: #FFFFFF;
    --svc-icon-bg: #161615;
    --divider: rgba(22,22,21,0.08);
    --menu-shadow: 0 20px 50px rgba(22,22,21,0.12);
    --lift-shadow: 0 12px 28px rgba(22,22,21,0.12);
    --card-lift-shadow: 0 22px 44px rgba(22,22,21,0.10);
    color-scheme: light;
}

/* Modo noche (Propuesta C) */
:root[data-theme="dark"] {
    --bg: #161615;
    --text: #F2F1EE;
    --heading: #FFFFFF;
    --surface: #222220;
    --surface-border: rgba(255,255,255,0.06);
    --field: #242422;
    --chip: #2C2C2A;
    --chip-text: #E2E0DB;
    --nav-text: #D8D6D1;
    --muted: #A9A7A1;
    --body: #B5B3AD;
    --num: #7C7A75;
    --foot-muted: #8E8C87;
    --accent-ink: #F8AC15;
    --accent-icon: #F8AC15;
    --danger: #FF6B81;
    --on-photo: #FFFFFF;
    --shadow-burst: rgba(0, 0, 0, 0.35);
    --scrim: rgba(0, 0, 0, 0.6);
    --scrim-strong: rgba(0, 0, 0, 0.7);
    --glass-bg: rgba(255,255,255,0.05);
    --glass-border: rgba(255,255,255,0.1);
    --ghost-bg: rgba(255,255,255,0.06);
    --ghost-border: rgba(255,255,255,0.12);
    --invert-bg: #FFFFFF;
    --invert-text: #161615;
    --svc-icon-bg: rgba(248,172,21,0.14);
    --divider: rgba(255,255,255,0.08);
    --menu-shadow: 0 20px 50px rgba(0,0,0,0.45);
    --lift-shadow: 0 12px 28px rgba(0,0,0,0.4);
    --card-lift-shadow: 0 22px 44px rgba(0,0,0,0.45);
    color-scheme: dark;
}

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

html {
    font-size: 16px;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
    min-height: 100vh;
    transition: background-color var(--transition), color var(--transition);
}

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

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

ul, ol { list-style: none; }

button, input, select, textarea {
    font-family: inherit;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--heading);
    word-wrap: break-word;
}

h1 { font-size: clamp(2rem, 4.2vw, 3.75rem); line-height: 1.06; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 3.1vw, 2.75rem); letter-spacing: -0.03em; }
h3 { font-size: 1.25rem; font-family: var(--font-sans); font-weight: 700; letter-spacing: 0; }
h4 { font-size: 1rem; font-family: var(--font-sans); font-weight: 700; letter-spacing: 0; }

p {
    color: var(--muted);
    word-wrap: break-word;
}

.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.text-uppercase { text-transform: uppercase; letter-spacing: 0.1em; }
.text-gold, .text-pink { color: var(--accent-ink); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

/* ==========================================
   LAYOUT
   ========================================== */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

main {
    min-height: calc(100vh - 300px);
}

.section {
    padding: 80px 0 40px;
}

.section-first {
    padding-top: 110px;
}

.section-sm {
    padding: 40px 0;
}

.section-cta {
    padding-bottom: 60px;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.tile {
    border-radius: 36px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
}

/* ==========================================
   MARCA (logo + wordmark)
   ========================================== */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.brand-mark {
    height: 50px;
    width: auto;
}

.brand-word {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-word-main {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.12em;
    color: var(--heading);
}

.brand-word-sub {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 10px;
    letter-spacing: 0.62em;
    color: var(--accent-ink);
    margin-top: 6px;
}

.brand-lg .brand-mark { height: 52px; }
.brand-lg .brand-word-main { font-size: 17px; }

/* ==========================================
   HEADER
   ========================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg);
    transition: box-shadow var(--transition), background-color var(--transition);
}

.header.scrolled {
    box-shadow: 0 1px 0 var(--divider);
}

.header-inner {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* Nav tipo píldora */
.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px;
    border-radius: 999px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 22px;
    border-radius: 999px;
    color: var(--nav-text);
    font-weight: 500;
    font-size: 15px;
    line-height: 1.2;
    white-space: nowrap;
    transition: color var(--transition), background-color var(--transition);
}

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

.nav-link.active {
    background: var(--accent);
    color: var(--ink);
    font-weight: 700;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown svg {
    transition: transform var(--transition);
}

.nav-dropdown:hover svg,
.nav-dropdown:focus-within svg {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    min-width: 200px;
    padding: 8px;
    margin-top: 12px;
    border-radius: 22px;
    background: var(--surface);
    border: 1px solid var(--glass-border);
    box-shadow: var(--menu-shadow);
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    z-index: 10;
}

/* Puente para que el hover no se pierda entre el enlace y el menú */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.nav-dropdown-menu a {
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 500;
    color: var(--nav-text);
    transition: background-color var(--transition), color var(--transition);
}

.nav-dropdown-menu a:hover {
    background: var(--field);
    color: var(--heading);
}

/* Acciones del header */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: var(--ghost-bg);
    border: 1px solid var(--ghost-border);
    color: var(--heading);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color var(--transition), border-color var(--transition);
}

.icon-btn:hover {
    border-color: var(--accent);
}

.header-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 18px;
    border-radius: 16px;
    background: var(--ghost-bg);
    border: 1px solid var(--ghost-border);
    color: var(--heading);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: border-color var(--transition);
}

.header-phone:hover {
    border-color: var(--accent);
}

.header-login {
    display: flex;
    align-items: center;
    height: 48px;
    padding: 0 22px;
    border-radius: 16px;
    background: var(--invert-bg);
    color: var(--invert-text);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    transition: opacity var(--transition);
}

.header-login:hover {
    opacity: 0.88;
}

/* Selector de tema: día / noche / automático */
.theme-switch {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 48px;
    padding: 4px;
    border-radius: 16px;
    background: var(--ghost-bg);
    border: 1px solid var(--ghost-border);
    flex-shrink: 0;
}

.theme-switch-btn {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--nav-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color var(--transition), color var(--transition);
}

.theme-switch-btn:hover {
    color: var(--heading);
}

.theme-switch-btn[aria-pressed="true"] {
    background: var(--accent);
    color: var(--ink);
}

.theme-switch-btn:focus-visible,
.icon-btn:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Botón de menú móvil */
.menu-toggle {
    display: none;
}

/* ==========================================
   MENÚ MÓVIL
   ========================================== */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 100%);
    background: var(--bg);
    border-left: 1px solid var(--divider);
    z-index: 1100;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.active {
    transform: translateX(0);
    visibility: visible;
}

.mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    border-radius: 28px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.mobile-nav > a,
.mobile-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-radius: 22px;
    color: var(--nav-text);
    font-size: 16px;
    font-weight: 500;
}

.mobile-nav > a.active,
.mobile-dropdown-toggle.active {
    background: var(--accent);
    color: var(--ink);
    font-weight: 700;
}

.mobile-dropdown-toggle svg {
    transition: transform var(--transition);
}

.mobile-dropdown.active .mobile-dropdown-toggle svg {
    transform: rotate(180deg);
}

.mobile-dropdown-menu {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 4px 8px 8px;
}

.mobile-dropdown.active .mobile-dropdown-menu {
    display: flex;
}

.mobile-dropdown-menu a {
    padding: 12px 16px;
    border-radius: 16px;
    background: var(--field);
    color: var(--nav-text);
    font-size: 15px;
    font-weight: 500;
}

.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.mobile-menu-actions .btn {
    width: 100%;
    justify-content: flex-start;
}

.mobile-menu-actions .btn-invert {
    justify-content: center;
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(22,22,21,0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================
   BOTONES
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 54px;
    padding: 0 26px;
    border-radius: 18px;
    border: 1px solid transparent;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--transition), border-color var(--transition), opacity var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn:disabled {
    cursor: not-allowed;
}

.btn .btn-arrow {
    transition: transform var(--transition);
}

@media (hover: hover) {
    .btn:not(:disabled):hover {
        transform: translateY(-2px);
        box-shadow: var(--lift-shadow);
    }

    .btn:hover .btn-arrow {
        transform: translateX(4px);
    }
}

.btn:not(:disabled):active {
    transform: translateY(0) scale(0.98);
    box-shadow: none;
}

.btn-sm { height: 44px; padding: 0 18px; border-radius: 14px; font-size: 14px; }
.btn-lg { height: 56px; }
.btn-xl { height: 60px; padding: 0 28px; border-radius: 20px; }
.btn-block { width: 100%; }

/* Acento */
.btn-primary,
.btn-gold {
    background: var(--accent);
    color: var(--ink);
}

.btn-primary:hover,
.btn-gold:hover {
    background: var(--accent-hover);
    color: var(--ink);
}

/* Fantasma (se adapta al tema) */
.btn-ghost,
.btn-outline,
.btn-outline-dark {
    background: var(--ghost-bg);
    border-color: var(--ghost-border);
    color: var(--heading);
    font-weight: 600;
    font-size: 15px;
}

.btn-ghost:hover,
.btn-outline:hover,
.btn-outline-dark:hover {
    border-color: var(--accent);
    color: var(--heading);
}

/* Invertido (blanco en noche, negro en día) */
.btn-invert {
    background: var(--invert-bg);
    color: var(--invert-text);
}

.btn-invert:hover {
    opacity: 0.88;
    color: var(--invert-text);
}

/* Grafito fijo */
.btn-ink {
    background: var(--ink);
    color: #FFFFFF;
}

.btn-ink:hover {
    background: #2C2C2A;
    color: #FFFFFF;
}

/* Vidrio sobre foto */
.btn-glass {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #FFFFFF;
    font-weight: 600;
}

.btn-glass:hover {
    background: rgba(255,255,255,0.2);
    color: #FFFFFF;
}

/* Vidrio sobre acento */
.btn-frost {
    background: rgba(255,255,255,0.35);
    border-color: rgba(255,255,255,0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--ink);
}

.btn-frost:hover {
    background: rgba(255,255,255,0.5);
    color: var(--ink);
}

/* ==========================================
   HERO BENTO
   ========================================== */
.hero-bento {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: 300px 300px 124px;
    gap: 16px;
}

.bento-hero {
    grid-column: span 2;
    grid-row: span 2;
    position: relative;
    border-radius: 36px;
    overflow: hidden;
    background: var(--ink);
    isolation: isolate;
}

.hero-slider,
.hero-slider .swiper,
.hero-slider .swiper-wrapper,
.hero-slider .swiper-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-slider .swiper-wrapper,
.hero-slider .swiper-slide {
    position: relative;
}

.hero-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 7s ease-out;
}

/* Ken Burns: la imagen activa (y la que sale) se acerca lentamente */
.hero-slider .swiper-slide-active img,
.hero-slider .swiper-slide-prev img {
    transform: scale(1.06);
}

.bento-hero-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(0deg, rgba(22,22,21,0.85) 0%, rgba(22,22,21,0.2) 60%, rgba(22,22,21,0.1) 100%);
}

.glass-pill {
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(22,22,21,0.4);
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #FFFFFF;
}

.bento-hero-eyebrow {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 2;
}

/* Paginación del slider como en la propuesta */
.hero-dots.swiper-pagination {
    position: absolute;
    top: 24px;
    right: 24px;
    left: auto;
    bottom: auto;
    width: auto;
    z-index: 2;
    display: flex;
    gap: 6px;
}

.hero-dots .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    margin: 0 !important;
    border-radius: 999px;
    background: rgba(255,255,255,0.5);
    opacity: 1;
    transition: width var(--transition), background-color var(--transition);
}

.hero-dots .swiper-pagination-bullet-active {
    width: 32px;
    background: var(--accent);
}

.bento-hero-content {
    position: absolute;
    left: 44px;
    right: 44px;
    bottom: 40px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.bento-hero-content h1 {
    color: #FFFFFF;
    max-width: 760px;
}

.bento-hero-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.bento-hero-row p {
    font-size: 19px;
    color: #E2E0DB;
}

.bento-hero-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Tile acento */
.bento-accent {
    position: relative;
    overflow: hidden;
    border-radius: 36px;
    background: var(--accent);
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
}

.bento-accent-orb {
    position: absolute;
    right: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255,255,255,0.28);
    border: 1px solid rgba(255,255,255,0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: io-float 11s ease-in-out infinite alternate;
}

.bento-accent-icon {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 20px;
    background: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bento-accent-text {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bento-accent-text h2 {
    font-size: 24px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.bento-accent-text p {
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink-soft);
}

/* Tile foto */
.bento-photo {
    position: relative;
    border-radius: 36px;
    overflow: hidden;
    min-height: 240px;
}

.bento-photo > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bento-photo-glass {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    padding: 20px 22px;
    border-radius: 26px;
    background: rgba(22,22,21,0.45);
    border: 1px solid rgba(255,255,255,0.16);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    display: flex;
    align-items: center;
    gap: 14px;
}

.bento-photo-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 16px;
    background: rgba(248,172,21,0.18);
    border: 1px solid rgba(248,172,21,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bento-photo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.35;
}

.bento-photo-text strong {
    font-weight: 700;
    font-size: 16px;
    color: #FFFFFF;
}

.bento-photo-text span {
    font-size: 14px;
    color: #D8D6D1;
}

/* Buscador */
.bento-search {
    grid-column: span 3;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) 200px;
    gap: 10px;
    padding: 12px;
    border-radius: 32px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.bento-field {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 0 24px;
    border-radius: 22px;
    background: var(--field);
    cursor: pointer;
    min-width: 0;
}

.bento-field > span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-ink);
    line-height: 1.2;
}

.bento-field select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    border: 0;
    color: var(--heading);
    font-size: 16px;
    font-weight: 500;
    padding: 0;
    outline: none;
    cursor: pointer;
    text-overflow: ellipsis;
}

.bento-field select option {
    background: var(--bg);
    color: var(--heading);
}

.bento-field:focus-within {
    box-shadow: inset 0 0 0 2px var(--accent);
}

.bento-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 22px;
    background: var(--invert-bg);
    color: var(--invert-text);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 17px;
    cursor: pointer;
    transition: opacity var(--transition), transform var(--transition);
}

.bento-search-btn svg {
    transition: transform 0.35s var(--ease-out);
}

.bento-search-btn:hover {
    opacity: 0.88;
}

.bento-search-btn:hover svg {
    transform: translate(-2px, -2px) rotate(-12deg) scale(1.1);
}

.bento-search-btn:active {
    transform: scale(0.98);
}

/* ==========================================
   ENCABEZADOS DE SECCIÓN
   ========================================== */
.eyebrow {
    display: block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-ink);
    line-height: 1.3;
}

.section-head {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 40px;
}

.section-head p {
    font-size: 18px;
    color: var(--muted);
}

.section-head-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 40px;
}

.section-head-row .section-head {
    margin-bottom: 0;
}

/* ==========================================
   TARJETA DE PROPIEDAD
   ========================================== */
.property-card {
    border-radius: 36px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    padding: 10px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

@media (hover: hover) {
    .property-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--card-lift-shadow);
    }
}

.property-card-image {
    position: relative;
    height: 290px;
    border-radius: 28px;
    overflow: hidden;
}

.property-card-image > a:first-child,
.property-card-image img {
    display: block;
    width: 100%;
    height: 100%;
}

.property-card-image img {
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-card:hover .property-card-image img {
    transform: scale(1.04);
}

.property-card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.property-card-badge.is-rent {
    background: var(--invert-bg);
    color: var(--invert-text);
}

.property-card-go {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(22,22,21,0.45);
    border: 1px solid rgba(255,255,255,0.22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition);
}

.property-card-go svg {
    transition: transform 0.35s var(--ease-out);
}

.property-card-go:hover {
    background: rgba(22,22,21,0.7);
}

.property-card:hover .property-card-go svg {
    transform: translate(2px, -2px);
}

.property-card-body {
    padding: 22px 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.property-card-price {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 22px;
    line-height: 1.3;
    color: var(--accent-ink);
}

.property-card-title {
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--heading);
}

.property-card-title a:hover {
    color: var(--accent-ink);
}

.property-card-location {
    font-size: 15px;
    color: var(--muted);
}

.property-card-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.property-card-features span {
    padding: 12px;
    border-radius: 16px;
    background: var(--chip);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--chip-text);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.property-card-features i {
    color: var(--accent-icon);
    margin-right: 4px;
}

.empty-state {
    text-align: center;
    padding: 64px 24px;
    border-radius: 36px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
}

.empty-state i {
    font-size: 3rem;
    color: var(--accent-icon);
    margin-bottom: 16px;
}

.empty-state h3 {
    margin-bottom: 8px;
}

.empty-state a {
    color: var(--accent-ink);
    font-weight: 600;
}

/* ==========================================
   QUIÉNES SOMOS
   ========================================== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.about-card {
    padding: 56px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-card h2 {
    font-size: clamp(1.625rem, 2.7vw, 2.375rem);
    line-height: 1.15;
}

.about-card p {
    font-size: 17px;
    line-height: 1.7;
    color: var(--body);
}

.about-card .btn {
    align-self: flex-start;
    margin-top: 8px;
}

.about-image {
    position: relative;
    border-radius: 36px;
    overflow: hidden;
    min-height: 520px;
}

.about-image > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-image-badge {
    position: absolute;
    left: 24px;
    top: 24px;
    padding: 18px;
    border-radius: 28px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.about-image-badge img {
    height: 72px;
    width: auto;
}

/* ==========================================
   SERVICIOS
   ========================================== */
.service-card {
    border-radius: 32px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.service-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.service-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: var(--svc-icon-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s var(--ease-out);
}

.service-card-num {
    font-family: var(--font-display);
    font-size: 15px;
    color: var(--num);
    transition: color var(--transition);
}

.service-card:hover .service-card-icon {
    transform: rotate(-8deg) scale(1.06);
}

.service-card:hover .service-card-num {
    color: var(--accent-icon);
}

.service-card-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-card-text p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--muted);
}

/* ==========================================
   CTA
   ========================================== */
.cta-box {
    position: relative;
    overflow: hidden;
    border-radius: 40px;
    background: var(--accent);
    padding: 72px 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

.cta-orb {
    position: absolute;
    border-radius: 50%;
    animation: io-float 12s ease-in-out infinite alternate;
}

.cta-orb-1 {
    right: 260px;
    top: -140px;
    width: 320px;
    height: 320px;
    background: rgba(255,255,255,0.22);
    border: 1px solid rgba(255,255,255,0.5);
}

.cta-orb-2 {
    right: -80px;
    bottom: -160px;
    width: 380px;
    height: 380px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.45);
    animation-duration: 14s;
    animation-delay: -5s;
}

.cta-text {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 760px;
}

.cta-eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-eyebrow);
}

.cta-text h2 {
    font-size: clamp(1.75rem, 3.2vw, 2.875rem);
    line-height: 1.1;
    color: var(--ink);
}

.cta-text p {
    font-size: 18px;
    line-height: 1.55;
    color: var(--ink-soft);
}

.cta-buttons {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 60px var(--gutter) 36px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* Modo día: footer en tarjeta (Propuesta D) */
:root[data-theme="light"] .footer {
    width: calc(100% - (var(--gutter) * 2));
    max-width: calc(var(--max-width) - (var(--gutter) * 2));
    margin: 40px auto 48px;
    padding: 56px 48px 32px;
    border-radius: 40px;
    background: var(--surface);
}

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

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
}

.footer-brand p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--muted);
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-social a {
    padding: 10px 16px;
    border-radius: 14px;
    background: var(--field);
    color: var(--chip-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    transition: background-color var(--transition), color var(--transition);
}

.footer-social a:hover {
    background: var(--accent);
    color: var(--ink);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: var(--heading);
}

.footer-links a,
.footer-links span {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--accent-ink);
}

.footer-contact .footer-phone {
    color: var(--chip-text);
    font-weight: 600;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--divider);
    font-size: 14px;
    color: var(--foot-muted);
}

.footer-bottom .text-accent {
    color: var(--accent-ink);
}

/* ==========================================
   SCROLL TOP
   ========================================== */
.scroll-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: var(--invert-bg);
    color: var(--invert-text);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    color: var(--invert-text);
    opacity: 0.88;
}

/* ==========================================
   COMPONENTES COMPARTIDOS (páginas internas)
   ========================================== */
.card {
    border-radius: 32px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    padding: 32px;
}

.card h4 {
    font-size: 18px;
}

/* Tarjeta destacada (acento) */
.card-dark {
    position: relative;
    overflow: hidden;
    background: var(--accent);
    border-color: transparent;
    color: var(--ink);
}

.card-dark h4 { color: var(--ink); }
.card-dark p { color: var(--ink-soft); }

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-ink);
}

.form-control {
    width: 100%;
    min-height: 54px;
    padding: 14px 20px;
    border-radius: 18px;
    border: 1px solid transparent;
    background: var(--field);
    color: var(--heading);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control::placeholder {
    color: var(--num);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(248,172,21,0.18);
}

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

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 48px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23B87800' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
}

select.form-control option {
    background: var(--bg);
    color: var(--heading);
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 20px;
    border-radius: 20px;
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.5;
    animation: io-alert-in 0.5s var(--ease-out) 0.15s both;
}

.alert i {
    font-size: 20px;
    margin-top: 1px;
}

.alert-success {
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.35);
    color: var(--heading);
}

.alert-success i { color: #16A34A; }

.alert-danger {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.35);
    color: var(--heading);
}

.alert-danger i { color: #DC2626; }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--chip);
    color: var(--chip-text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.badge-primary,
.badge-gold { background: var(--accent); color: var(--ink); }
.badge-success { background: #16A34A; color: #FFFFFF; }
.badge-warning { background: #F59E0B; color: var(--ink); }
.badge-info { background: #2563EB; color: #FFFFFF; }

.divider {
    border: 0;
    border-top: 1px solid var(--divider);
    margin: 24px 0;
}

.breadcrumb {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 16px;
}

.breadcrumb a {
    color: var(--muted);
}

.breadcrumb a:hover {
    color: var(--accent-ink);
}

.breadcrumb span {
    color: var(--heading);
}

/* Encabezado de páginas internas */
.page-header {
    padding: 24px 0 40px;
}

.page-header h1 {
    font-size: clamp(2rem, 3.4vw, 2.75rem);
    margin-bottom: 12px;
}

.page-header p {
    font-size: 18px;
}

/* ==========================================
   BÚSQUEDA
   ========================================== */
.search-header {
    padding-top: 24px;
    padding-bottom: 40px;
}

.search-header h1 {
    font-size: clamp(2rem, 3.4vw, 2.75rem);
    margin: 14px 0 12px;
}

.search-header p {
    font-size: 18px;
}

.search-layout {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.search-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 16px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-results-count {
    margin-bottom: 16px;
    font-size: 16px;
    color: var(--muted);
}

.search-results-count strong {
    color: var(--heading);
}

/* ==========================================
   DETALLE
   ========================================== */
.detail-gallery {
    position: relative;
    height: clamp(320px, 52vw, 620px);
    border-radius: 36px;
    overflow: hidden;
}

.detail-gallery > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-gallery::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(22,22,21,0.6) 0%, rgba(22,22,21,0) 45%);
    pointer-events: none;
}

.detail-price {
    position: absolute;
    left: 24px;
    bottom: 24px;
    z-index: 1;
    padding: 16px 24px;
    border-radius: 24px;
    background: rgba(22,22,21,0.45);
    border: 1px solid rgba(255,255,255,0.16);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.detail-price span {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.25rem, 2.4vw, 2rem);
    color: var(--accent);
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 48px;
    align-items: start;
}

.detail-head {
    margin-bottom: 32px;
}

.detail-head h1 {
    font-size: clamp(1.75rem, 3.2vw, 2.75rem);
    margin: 14px 0 10px;
}

.detail-location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
}

.detail-location i {
    color: var(--accent-icon);
}

.detail-features {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 40px;
}

.detail-feature {
    padding: 22px 16px;
    border-radius: 24px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.detail-feature i {
    font-size: 22px;
    color: var(--accent-icon);
    margin-bottom: 4px;
}

.detail-feature strong {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 22px;
    color: var(--heading);
    line-height: 1.2;
}

.detail-feature span {
    font-size: 14px;
    color: var(--muted);
}

.detail-block {
    margin-bottom: 40px;
}

.detail-block h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 22px;
    margin-bottom: 16px;
}

.detail-summary {
    font-size: 18px;
    color: var(--body);
    margin-bottom: 16px;
}

.detail-description {
    color: var(--muted);
    line-height: 1.8;
}

.detail-thumbs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.detail-thumbs a {
    display: block;
    aspect-ratio: 4 / 3;
    border-radius: 20px;
    overflow: hidden;
}

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

.detail-thumbs a:hover img {
    transform: scale(1.05);
}

.detail-map {
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    overflow: hidden;
    background: var(--surface);
}

.detail-map iframe {
    display: block;
}

.detail-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 16px);
}

.detail-sidebar .card h4 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 20px;
    margin-bottom: 24px;
}

.solicitud-como {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 16px;
}

.solicitud-como span {
    color: var(--muted);
    word-break: break-all;
}

.detail-sidebar [hidden] {
    display: none !important;
}

form + .solicitud-como {
    margin: 16px 0 0;
    text-align: center;
}

/* ==========================================
   CONTACTO / MI CASO
   ========================================== */
.contact-section {
    padding: 24px 0 80px;
}

.contact-card {
    max-width: 860px;
    margin: 0 auto;
    padding: 56px;
    border-radius: 36px;
    background: var(--surface);
    border: 1px solid var(--surface-border);
}

.contact-title {
    font-size: clamp(2rem, 3.4vw, 2.75rem);
    margin-bottom: 12px;
}

.contact-subtitle {
    font-size: 18px;
    margin-bottom: 32px;
}

.contact-foot {
    text-align: center;
    margin-top: 32px;
    color: var(--muted);
}

.contact-foot a {
    color: var(--accent-ink);
    font-weight: 600;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.tipo-selector {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.tipo-option {
    position: relative;
}

.tipo-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tipo-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 54px;
    padding: 0 16px;
    border-radius: 18px;
    background: var(--field);
    border: 1px solid transparent;
    color: var(--chip-text);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}

.tipo-option label i {
    color: var(--accent-icon);
}

.tipo-option label:hover {
    border-color: var(--accent);
}

.tipo-option input:checked + label {
    background: var(--accent);
    color: var(--ink);
}

.tipo-option input:checked + label i {
    color: var(--ink);
}

.tipo-option input:focus-visible + label {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Detalle de caso */
.case-box {
    padding: 28px;
    border-radius: 28px;
    background: var(--bg);
    border: 1px solid var(--divider);
    margin-bottom: 24px;
}

.case-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.case-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-ink);
    margin-bottom: 4px;
}

.case-value {
    color: var(--heading);
}

.case-number {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 20px;
    color: var(--heading);
}

.case-text {
    color: var(--muted);
    line-height: 1.6;
}

.case-history {
    border-left: 2px solid var(--divider);
    padding-left: 24px;
}

.case-history-item {
    position: relative;
    padding-bottom: 24px;
}

.case-history-item::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
}

.case-history-date {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 4px;
}

.case-search {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.case-search .form-control {
    flex: 1;
}

/* ==========================================
   SWIPER (genérico)
   ========================================== */
.swiper-pagination-bullet {
    background: rgba(255,255,255,0.5);
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: var(--accent);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1320px) {
    .header-phone span { display: none; }
    .header-phone { width: 48px; padding: 0; justify-content: center; }
}

@media (max-width: 1200px) {
    :root { --gutter: 32px; }

    .nav-link { padding: 12px 16px; }

    .bento-hero-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .bento-search {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-bento {
        grid-template-rows: 300px 300px auto;
    }

    .bento-field { min-height: 76px; }

    .bento-search-btn {
        grid-column: span 2;
        min-height: 60px;
    }

    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .cta-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .cta-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .detail-content { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; }
}

@media (max-width: 1080px) {
    .nav,
    .header-hide-md {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .search-layout,
    .detail-content {
        grid-template-columns: minmax(0, 1fr);
    }

    .search-sidebar,
    .detail-sidebar {
        position: static;
    }
}

@media (max-width: 900px) {
    :root {
        --gutter: 20px;
        --header-height: 84px;
    }

    .brand-mark { height: 44px; }

    .hero-bento {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
    }

    .bento-hero {
        grid-column: span 2;
        grid-row: auto;
        min-height: 540px;
    }

    .bento-accent,
    .bento-photo {
        min-height: 280px;
    }

    .bento-search {
        grid-column: span 2;
    }

    .section { padding: 64px 0 24px; }
    .section-first { padding-top: 80px; }

    .section-head-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .about-grid { grid-template-columns: minmax(0, 1fr); }
    .about-card { padding: 40px; }
    .about-image { min-height: 380px; }

    .cta-box { padding: 56px 40px; }

    .contact-card { padding: 40px; }

    .detail-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    :root {
        --gutter: 16px;
        --header-height: 76px;
    }

    .brand-mark { height: 40px; }
    .brand-word-main { font-size: 14px; }
    .brand-word-sub { font-size: 9px; }

    .header-actions { gap: 6px; }
    .theme-switch { height: 44px; }
    .theme-switch-btn { width: 34px; height: 34px; border-radius: 10px; }
    .icon-btn { width: 44px; height: 44px; border-radius: 14px; }

    .hero-bento {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .bento-hero,
    .bento-search {
        grid-column: auto;
    }

    .bento-hero {
        min-height: 520px;
        border-radius: 28px;
    }

    .bento-hero-content {
        left: 20px;
        right: 20px;
        bottom: 24px;
    }

    .bento-hero-eyebrow {
        top: 16px;
        left: 16px;
        font-size: 11px;
        padding: 8px 12px;
    }

    .hero-dots.swiper-pagination {
        top: 24px;
        right: 16px;
    }

    .bento-hero-row p { font-size: 17px; }

    .bento-hero-buttons {
        width: 100%;
        flex-wrap: wrap;
    }

    .bento-hero-buttons .btn {
        flex: 1 1 auto;
    }

    .bento-accent,
    .bento-photo,
    .property-card,
    .about-image,
    .tile,
    .empty-state {
        border-radius: 28px;
    }

    .bento-search {
        grid-template-columns: minmax(0, 1fr);
        border-radius: 28px;
    }

    .bento-search-btn { grid-column: auto; }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: minmax(0, 1fr);
    }

    .property-card-image { height: 240px; }

    .about-card { padding: 28px; }
    .about-image { min-height: 300px; }

    .service-card { padding: 28px; gap: 28px; }

    .cta-box {
        padding: 44px 24px;
        border-radius: 32px;
    }

    .cta-buttons,
    .cta-buttons .btn {
        width: 100%;
    }

    .cta-buttons .btn {
        white-space: normal;
        text-align: center;
    }

    .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }

    :root[data-theme="light"] .footer {
        padding: 40px 24px 28px;
        border-radius: 32px;
        margin: 24px auto 16px;
    }

    .contact-card { padding: 28px 20px; border-radius: 28px; }
    .form-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .tipo-selector { grid-template-columns: minmax(0, 1fr); }
    .case-grid { grid-template-columns: minmax(0, 1fr); }
    .case-search { flex-direction: column; }

    .detail-gallery { border-radius: 28px; }
    .detail-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .card { padding: 24px; border-radius: 28px; }

    .scroll-top { right: 16px; bottom: 16px; }
}

@media (max-width: 380px) {
    .brand-word { display: none; }
}

/* ==========================================
   LOADER DE PRECARGA
   Visible solo con html.is-loading (lo agrega el <head>); el script
   después del loader cambia a .is-loaded al cargar la página y lo retira.
   ========================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.page-loader {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.is-loading .page-loader,
.is-loaded .page-loader {
    display: flex;
}

/* Respaldo: si nada lo retira, se oculta solo a los 8 s */
.is-loading .page-loader {
    animation: io-loader-failsafe 0.4s ease 8s forwards;
}

.is-loaded .page-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.page-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    animation: io-loader-in 0.4s var(--ease-out) both;
    transition: transform 0.5s var(--ease-out);
}

.is-loaded .page-loader-inner {
    transform: scale(0.96) translateY(-8px);
}

.page-loader-stage {
    position: relative;
    width: 110px;
    height: 128px;
}

.page-loader-pin {
    position: absolute;
    left: 50%;
    bottom: 14px;
    width: auto;
    height: 92px;
    margin-left: -35px;
    transform-origin: 50% 100%;
    animation: io-pin-bounce 1.4s ease-in-out infinite;
}

/* Sombra bajo el pin: se encoge cuando sube */
.page-loader-shadow {
    position: absolute;
    left: 50%;
    bottom: 8px;
    width: 46px;
    height: 10px;
    margin-left: -23px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--heading) 22%, transparent);
    animation: io-pin-shadow 1.4s ease-in-out infinite;
}

/* Onda de "ubicación" cuando el pin aterriza */
.page-loader-ring {
    position: absolute;
    left: 50%;
    bottom: 3px;
    width: 72px;
    height: 20px;
    margin-left: -36px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    opacity: 0;
    animation: io-pin-ring 1.4s ease-out infinite;
}

.page-loader-word {
    align-items: center;
    text-align: center;
}

.page-loader-word .brand-word-main { padding-left: 0.12em; }
.page-loader-word .brand-word-sub  { padding-left: 0.62em; }

.page-loader-bar {
    position: relative;
    width: 140px;
    height: 3px;
    border-radius: 999px;
    background: var(--divider);
    overflow: hidden;
}

.page-loader-bar span {
    position: absolute;
    inset: 0 auto 0 0;
    width: 40%;
    border-radius: inherit;
    background: var(--accent);
    animation: io-loader-bar 1.2s ease-in-out infinite;
}

@keyframes io-loader-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

@keyframes io-loader-failsafe {
    to { opacity: 0; visibility: hidden; pointer-events: none; }
}

@keyframes io-pin-bounce {
    0%   { transform: translateY(0) scale(1.07, 0.93); }
    18%  { transform: translateY(-8px) scale(0.97, 1.04); }
    50%  { transform: translateY(-24px) scale(1, 1); }
    86%  { transform: translateY(0) scale(1, 1); }
    100% { transform: translateY(0) scale(1.07, 0.93); }
}

@keyframes io-pin-shadow {
    0%, 86%, 100% { transform: scale(1); opacity: 1; }
    50%           { transform: scale(0.55); opacity: 0.45; }
}

@keyframes io-pin-ring {
    0%   { transform: scale(0.35); opacity: 0.9; }
    60%  { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1.5); opacity: 0; }
}

@keyframes io-loader-bar {
    from { transform: translateX(-100%); }
    to   { transform: translateX(250%); }
}

/* ==========================================
   ANIMACIONES DE APARICIÓN
   Solo se ocultan si el header agregó .js-motion (hay JS y el usuario
   no pidió reducir movimiento). interlomas.js agrega .is-visible al
   entrar en pantalla y .reveal-done al terminar, para que el elemento
   recupere sus propias transiciones (hover, etc.).
   ========================================== */
[data-reveal="left"]  { --reveal-from: translateX(-32px); }
[data-reveal="right"] { --reveal-from: translateX(32px); }
[data-reveal-stagger="left"] > * { --reveal-from: translateX(-16px); }

.js-motion [data-reveal]:not(.reveal-done),
.js-motion [data-reveal-stagger] > :not(.reveal-done) {
    opacity: 0;
    transform: var(--reveal-from, translateY(24px));
    transition:
        opacity var(--reveal-duration) var(--ease-out) var(--reveal-delay, 0ms),
        transform var(--reveal-duration) var(--ease-out) var(--reveal-delay, 0ms);
}

.js-motion [data-reveal].is-visible:not(.reveal-done),
.js-motion [data-reveal-stagger] > .is-visible:not(.reveal-done) {
    opacity: 1;
    transform: none;
}

/* Brillo de la palabra en ámbar del hero */
.js-motion .bento-hero-content h1.is-visible .text-accent {
    animation: io-glow 1.8s ease 0.7s both;
}

@keyframes io-glow {
    0%, 100% { text-shadow: 0 0 0 transparent; }
    45% { text-shadow: 0 0 28px color-mix(in srgb, var(--accent) 65%, transparent); }
}

/* Orbes decorativos: flotan despacio unos pocos píxeles */
@keyframes io-float {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-14px, 12px) scale(1.04); }
}

/* Alertas de formularios (contacto, mi caso) */
@keyframes io-alert-in {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: none; }
}

/* Cambio de tema día/noche con fundido (View Transitions, ver interlomas.js) */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.35s;
    animation-timing-function: ease;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
