/* Poco Diablo Resort Phoenix — Custom Styles */

/* Base resets and typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #faf5ff;
    background-color: #1e0038;
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1e0038;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7B2D8E, #a855f7);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a855f7, #F5A623);
}

/* Selection color */
::selection {
    background: rgba(245, 166, 35, 0.3);
    color: #faf5ff;
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #F5A623;
    outline-offset: 2px;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* Navbar height helper */
.navbar-height {
    height: 72px;
}

/* Geometric shape animations */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(-15px) rotate(45deg); }
}

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

.geo-shape.amber-diamond {
    animation: float 6s ease-in-out infinite;
}

.geo-shape.plum-circle {
    animation: floatCircle 8s ease-in-out infinite;
}

/* Stagger animations */
.geo-shape:nth-child(2) {
    animation-delay: -2s;
}
.geo-shape:nth-child(3) {
    animation-delay: -4s;
}
.geo-shape:nth-child(4) {
    animation-delay: -1s;
}

/* Responsive typography scale */
@media (max-width: 640px) {
    html {
        font-size: 15px;
    }
}

@media (min-width: 1921px) {
    html {
        font-size: 18px;
    }
}

/* Print styles */
@media print {
    .geo-shape,
    .reveal-up,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
    
    nav,
    footer {
        display: none;
    }
}

/* 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;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card-lift {
        border-width: 2px;
    }
    
    .testimonial-card {
        border-width: 2px;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    #hero {
        min-height: auto;
        padding: 6rem 0;
    }
    
    #hero h1 {
        font-size: 2.5rem;
    }
}

/* Touch device optimizations */
@media (hover: none) {
    .card-lift:hover {
        transform: none;
    }
    
    .card-lift:active {
        transform: translateY(-2px);
    }
    
    .btn-amber:hover,
    .btn-plum:hover {
        transform: none;
    }
    
    .btn-amber:active,
    .btn-plum:active {
        transform: translateY(-1px);
    }
}

/* Large screen optimizations */
@media (min-width: 1400px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}

/* Nav bar transition */
#navbar {
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
}

/* Mobile menu transitions */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
    width: 1.5rem;
}

/* Mobile link transition */
.mobile-link {
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Form focus ring for keyboard navigation */
input:focus,
textarea:focus,
select:focus,
button:focus {
    outline: none;
}

/* Loading state for buttons */
button:disabled,
input:disabled,
textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Error state for form inputs */
input.invalid,
textarea.invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Success state for form inputs */
input.valid,
textarea.valid {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

/* Image lazy loading placeholder */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Geometric pattern animation */
@keyframes patternShift {
    0% { background-position: 0 0, 0 20px, 20px -20px, -20px 0px; }
    100% { background-position: 40px 40px, 40px 60px, 60px 20px, 20px 40px; }
}

.geo-pattern {
    animation: patternShift 20s linear infinite;
}

/* Gradient text fallback for older browsers */
.text-transparent.bg-clip-text {
    background-attachment: scroll;
}

/* Ensure proper z-index stacking */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.sticky {
    position: sticky;
}

/* Overflow handling */
.overflow-hidden {
    overflow: hidden;
}

.overflow-x-hidden {
    overflow-x: hidden;
}

/* Container padding for safety */
@media (max-width: 640px) {
    .px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
