/* ═══════════════════════════════════════════════════════════
   BASE — Reset, Typography & Shared Elements
   Modern design system: clean sans-serif, generous spacing,
   grain texture, glass effects.
   ═══════════════════════════════════════════════════════════ */

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

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

body {
    font-family: var(--font-body);
    color: var(--earth-600);
    background: var(--earth-0);
    overflow-x: hidden;
    line-height: 1.7;
    font-weight: 400;
}

/* ── Animations ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

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

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

.fade-up {
    animation: fadeUp 0.9s var(--ease-out-expo) both;
}

/* ── Grain Texture Overlay (modern depth) ── */
.un-section-dark::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.3;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* ── Shared Typography ── */
.un-tag {
    font-family: var(--font-body);
    font-size: 11px;
    letter-spacing: 3px;
    color: #FFFFFF;
    text-transform: uppercase;
    display: inline-block;
    padding: 6px 16px;
    background: rgba(90, 122, 78, 0.08);
    border-radius: var(--radius-full);
    border: 1px solid rgba(90, 122, 78, 0.12);
    font-weight: 500;
}

.un-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 600;
    color: var(--gold-100);
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.un-title em {
    font-weight: 700;
    color: var(--gold-300);
    font-style: normal;
    background: linear-gradient(135deg, var(--gold-300), var(--gold-200));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* On light sections, use darker gradient for em */
.un-section-alt .un-title em {
    background: linear-gradient(135deg, var(--gold-600), var(--gold-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.un-desc {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--earth-300);
    max-width: 580px;
    line-height: 1.8;
    font-weight: 300;
}

.un-divider {
    width: 48px;
    height: 3px;
    background: var(--gold-500);
    border-radius: 3px;
}

/* ── Section Layouts ── */
.un-section {
    padding: 120px 32px;
    max-width: 1320px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.un-section-dark {
    background: var(--earth-800);
    position: relative;
}

.un-section-alt {
    background: var(--earth-0);
    position: relative;
}

/* Fix text colors on light sections */
.un-section-alt .un-desc {
    color: var(--earth-400);
}

.un-section-alt .un-tag {
    background: var(--earth-900);
    border-color: var(--earth-900);
    color: #FFFFFF;
}

/* ── Buttons ── */
.un-btn {
    background: var(--gold-500);
    color: #FFF;
    border: none;
    padding: 16px 40px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
    box-shadow: 0 4px 24px rgba(90, 122, 78, 0.2);
    position: relative;
    overflow: hidden;
}

.un-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(90, 122, 78, 0.3);
    background: var(--gold-400);
}

.un-btn:active {
    transform: translateY(0);
}

/* ── Button Shimmer Effect ── */
.un-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    transition: none;
    pointer-events: none;
}

.un-btn:hover::after {
    animation: btnShimmer 0.6s ease forwards;
}

@keyframes btnShimmer {
    from { left: -100%; }
    to   { left: 120%; }
}

.un-btn-outline {
    background: transparent;
    color: var(--gold-400);
    border: 1.5px solid rgba(90, 122, 78, 0.3);
    padding: 15px 36px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
}

.un-btn-outline:hover {
    background: rgba(90, 122, 78, 0.08);
    border-color: var(--gold-400);
    color: var(--gold-100);
    transform: translateY(-2px);
}

/* ── Scroll Reveal ── */
.un-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.un-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Staggered Reveal Delays ── */
.un-reveal-d1 { transition-delay: 0.05s; }
.un-reveal-d2 { transition-delay: 0.1s; }
.un-reveal-d3 { transition-delay: 0.15s; }
.un-reveal-d4 { transition-delay: 0.2s; }
.un-reveal-d5 { transition-delay: 0.25s; }
.un-reveal-d6 { transition-delay: 0.3s; }
.un-reveal-d7 { transition-delay: 0.35s; }
.un-reveal-d8 { transition-delay: 0.4s; }

/* ── Skip to Content Link ── */
.un-skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 100000;
    padding: 12px 24px;
    background: var(--gold-500);
    color: #FFF;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: top 0.2s ease;
}

.un-skip-link:focus {
    top: 12px;
}

/* ── Screen Reader Only ── */
.un-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Global Focus Styles ── */
:focus-visible {
    outline: 2px solid var(--gold-500);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* ── Toast Notifications ── */
.un-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100001;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.un-toast {
    pointer-events: auto;
    padding: 16px 22px;
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    max-width: 380px;
    animation: slideUp 0.4s var(--ease-out-expo);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.un-toast-error {
    background: rgba(70, 20, 20, 0.9);
    color: #F5B8B8;
    border: 1px solid rgba(192, 57, 43, 0.25);
}

.un-toast-success {
    background: rgba(20, 50, 20, 0.9);
    color: #B8F5B8;
    border: 1px solid rgba(107, 143, 94, 0.25);
}

/* ── SVG Icon Spin ── */
@keyframes iconSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.un-icon-spin {
    display: inline-block;
    animation: iconSpin 1s linear infinite;
}

/* ═══════════════════════════════════════════════════════════
   SKELETON LOADING STATES
   ═══════════════════════════════════════════════════════════ */

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.un-skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

.un-skeleton-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-xl);
    padding: 28px 24px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.un-skeleton-iso {
    height: 108px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
}

.un-skeleton-badge {
    height: 20px;
    width: 80px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.un-skeleton-title {
    height: 22px;
    width: 60%;
    border-radius: 4px;
    margin-bottom: 8px;
}

.un-skeleton-meta {
    height: 14px;
    width: 40%;
    border-radius: 4px;
    margin-bottom: 20px;
}

.un-skeleton-price {
    height: 30px;
    width: 50%;
    border-radius: 4px;
}

/* Light section skeletons */
.un-section-alt .un-skeleton {
    background: linear-gradient(90deg, rgba(0,0,0,0.04) 25%, rgba(0,0,0,0.07) 50%, rgba(0,0,0,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.un-section-alt .un-skeleton-card {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
}


/* ═══════════════════════════════════════════════════════════
   ENHANCED SCROLL ANIMATIONS
   ═══════════════════════════════════════════════════════════ */

.un-reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.un-reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

.un-reveal-slide-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.un-reveal-slide-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.un-reveal-slide-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.un-reveal-slide-right.visible {
    opacity: 1;
    transform: translateX(0);
}


/* ═══════════════════════════════════════════════════════════
   EXIT-INTENT POPUP
   ═══════════════════════════════════════════════════════════ */

.un-exit-popup {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.3s ease;
}

.un-exit-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.un-exit-popup-card {
    position: relative;
    z-index: 2;
    background: var(--earth-800);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-2xl);
    max-width: 440px;
    width: 100%;
    box-shadow: 0 48px 120px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.5s var(--ease-out-expo);
}

.un-exit-popup-content {
    padding: 48px 40px;
    text-align: center;
}

.un-exit-popup-icon {
    font-size: 40px;
    color: #FFD700;
    margin-bottom: 16px;
}

.un-exit-popup-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: #FFF;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.un-exit-popup-desc {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--earth-300);
    line-height: 1.7;
    margin-bottom: 24px;
    font-weight: 300;
}

.un-exit-popup-dismiss {
    background: none;
    border: none;
    color: var(--earth-500);
    font-family: var(--font-body);
    font-size: 12px;
    cursor: pointer;
    margin-top: 16px;
    padding: 8px;
    transition: color 0.2s;
}

.un-exit-popup-dismiss:hover {
    color: var(--earth-300);
}


/* ═══════════════════════════════════════════════════════════
   STICKY TOUR CTA BAR
   ═══════════════════════════════════════════════════════════ */

.un-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: rgba(42, 51, 38, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(90, 122, 78, 0.15);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s var(--ease-out-expo);
}

.un-sticky-bar-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.un-sticky-bar-text {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--earth-200);
    font-weight: 400;
}

.un-sticky-bar-btn {
    padding: 10px 28px;
    font-size: 12px;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .un-sticky-bar-text { display: none; }
    .un-sticky-bar-btn { width: 100%; }
}


/* ═══════════════════════════════════════════════════════════
   INLINE FORM VALIDATION
   ═══════════════════════════════════════════════════════════ */

.un-field-error {
    font-family: var(--font-body);
    font-size: 12px;
    color: #e74c3c;
    margin-top: 4px;
    animation: slideUp 0.3s var(--ease-out-expo);
}

.un-input-valid {
    border-color: var(--sage-400) !important;
}

.un-input-invalid {
    border-color: #c0392b !important;
}


/* ── Print Styles ── */
@media print {
    .un-nav, .un-hamburger, .un-mobile-menu, .un-hero-buttons,
    .un-filter-row, .un-toast-container, #quoteModal,
    .un-map-container iframe { display: none !important; }

    body { background: #FFF; color: #000; }

    .un-section-dark, .un-section-alt {
        background: #FFF !important;
    }

    .un-title, .un-card-name, .un-contact-val {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
    }

    .un-desc, .un-card-meta, .un-contact-label {
        color: #444 !important;
    }

    .un-card {
        background: #FFF !important;
        border: 1px solid #CCC !important;
        break-inside: avoid;
    }

    .un-hero-fp {
        min-height: auto;
        background: #FFF !important;
        padding: 24px !important;
    }
}
