/* ============================================
   Casa M Retreat & Renewal Center
   Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

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

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF6F1;
}
::-webkit-scrollbar-thumb {
    background: #d4522a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c03e1e;
}

/* --- Geometric Background Shapes --- */
.geo-shapes {
    z-index: 0;
}

.geo-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.geo-circle--1 {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -200px;
    background: radial-gradient(circle, rgba(212, 82, 42, 0.06) 0%, transparent 70%);
    animation: geoFloat 20s ease-in-out infinite;
}

.geo-triangle {
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
}

.geo-triangle--1 {
    bottom: 15%;
    left: 5%;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 100px solid rgba(212, 82, 42, 0.05);
    animation: geoFloat 15s ease-in-out infinite reverse;
}

.geo-dots {
    position: absolute;
    pointer-events: none;
}

.geo-dots--1 {
    top: 40%;
    right: 10%;
    opacity: 0.15;
}

.geo-arc {
    position: absolute;
    border-radius: 50%;
    border: 3px solid rgba(212, 82, 42, 0.1);
    pointer-events: none;
}

.geo-arc--1 {
    width: 300px;
    height: 300px;
    bottom: 10%;
    left: -50px;
    animation: geoRotate 30s linear infinite;
}

@keyframes geoFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}

@keyframes geoRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Navigation --- */
.nav {
    background: rgba(250, 246, 241, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all duration-500;
}

.nav.scrolled {
    background: rgba(250, 246, 241, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.nav-inner {
    position: relative;
    z-index: 10;
}

.nav-logo:hover .nav-logo-mark {
    transform: rotate(12deg) scale(1.05);
}

.nav-link {
    position: relative;
}

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

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

.nav-link--cta {
    box-shadow: 0 2px 10px rgba(212, 82, 42, 0.2);
}

.nav-link--cta:hover {
    box-shadow: 0 4px 20px rgba(212, 82, 42, 0.35);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu-link {
    position: relative;
}

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

.mobile-menu-link:hover::after {
    width: 80%;
}

/* Hamburger Animation */
#bar1 {
    transform-origin: center;
}
#bar2 {
    transform-origin: center;
}
#bar3 {
    transform-origin: center;
}

.mobile-menu-btn.active #bar1 {
    transform: translateY(6px) rotate(45deg);
}
.mobile-menu-btn.active #bar2 {
    opacity: 0;
}
.mobile-menu-btn.active #bar3 {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.25rem;
}

/* --- Hero --- */
.hero {
    position: relative;
}

.clip-hero-right {
    clip-path: polygon(25% 0, 100% 0, 100% 100%, 0% 100%);
}

.hero-title {
    letter-spacing: -0.02em;
}

.hero-badge {
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.hero-cta-primary {
    box-shadow: 0 4px 15px rgba(212, 82, 42, 0.3);
}

.hero-cta-primary:hover {
    box-shadow: 0 8px 30px rgba(212, 82, 42, 0.4);
}

.hero-geo-square--1 {
    animation: geoSquareFloat 8s ease-in-out infinite;
}

@keyframes geoSquareFloat {
    0%, 100% { transform: rotate(12deg) translate(0, 0); }
    50% { transform: rotate(15deg) translate(10px, -10px); }
}

.hero-geo-circle--2 {
    animation: geoCircleFloat 6s ease-in-out infinite;
}

@keyframes geoCircleFloat {
    0%, 100% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.2); opacity: 0.35; }
}

.hero-scroll-line {
    background: linear-gradient(to bottom, rgba(120, 113, 108, 0.4), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* --- Section Labels & Titles --- */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title {
    letter-spacing: -0.02em;
}

/* --- About Section --- */
.clip-about-bg {
    clip-path: polygon(0 0, 100% 0, 70% 100%, 0% 100%);
}

.about-pill {
    transition: all 0.3s ease;
}

.about-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* --- Rooms Section --- */
.rooms-bg-block1 {
    clip-path: polygon(0 0, 100% 0, 95% 100%, 0% 100%);
}

.clip-rooms-bg {
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

.room-card {
    transition: all 0.4s ease;
}

.room-card:hover {
    transform: translateY(-8px);
}

.room-card:hover .room-card-img {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.room-card-tag {
    transition: all 0.3s ease;
}

.room-card:hover .room-card-tag {
    transform: scale(1.05);
}

/* --- Experience Section --- */
.experience-feature {
    transition: all 0.3s ease;
}

.experience-feature:hover {
    transform: translateX(8px);
}

.experience-feature:hover .experience-feature-icon {
    transform: scale(1.1);
}

/* --- Quote Banner --- */
.quote-banner {
    position: relative;
}

/* --- Location Section --- */
.location-map-wrapper {
    transition: all 0.3s ease;
}

.location-map-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.location-contact-item {
    transition: all 0.3s ease;
    border-radius: 0.75rem;
    padding: 0.5rem;
    margin: -0.5rem;
}

.location-contact-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

/* --- Contact Form --- */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    box-shadow: 0 0 0 4px rgba(212, 82, 42, 0.1);
}

.form-input:hover:not(:focus) {
    border-color: #d4522a;
}

.form-submit {
    position: relative;
    overflow: hidden;
}

.form-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.form-submit:hover::before {
    left: 100%;
}

.form-submit:hover {
    transform: translateY(-2px);
}

/* --- Footer --- */
.footer-social-link {
    transition: all 0.3s ease;
}

.footer-social-link:hover {
    transform: scale(1.1) rotate(10deg);
}

/* --- Back to Top --- */
.back-to-top {
    transition: all 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(212, 82, 42, 0.4);
}

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-title span.block {
        font-size: 2rem !important;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .about-float-badge {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
        display: inline-block;
    }
    
    .experience-images {
        margin-bottom: 2rem;
    }
}

@media (max-width: 640px) {
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-stats > div:not(:last-child) {
        display: none;
    }
}
