/* ========================================
   VILLAS KAU KAN 201 - STYLES
   ======================================== */

/* CSS Variables */
:root {
    --bg-primary: #F4F6FA;
    --bg-secondary: #0B1C3B;
    --accent-gold: #C7A24D;
    --text-primary: #0B1C3B;
    --text-secondary: #6B7A99;
    --text-light: rgba(255, 255, 255, 0.7);
    --card-bg: rgba(244, 246, 250, 0.92);
    
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;
    
    --radius: 28px;
    --radius-mobile: 18px;
    --shadow: 0 18px 50px rgba(11, 28, 59, 0.14);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Grain Overlay */
.grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    mix-blend-mode: multiply;
    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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ========================================
   NAVIGATION
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all 0.4s ease;
}

.nav.scrolled {
    background: rgba(244, 246, 250, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(11, 28, 59, 0.08);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.nav-links a:hover {
    opacity: 1;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform 0.4s ease;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu a {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

/* ========================================
   SECTIONS - PINNED
   ======================================== */
.section-pinned {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.bg-image-container {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bg-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.4), transparent 60%);
}

/* Text Card */
.text-card {
    position: relative;
    z-index: 10;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(11, 28, 59, 0.1);
    border-radius: var(--radius);
    padding: 2.5rem;
    max-width: 520px;
    margin-left: 6vw;
    box-shadow: var(--shadow);
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 1rem;
}

.headline {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 600;
    line-height: 1.05;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.gold-rule {
    width: 72px;
    height: 2px;
    background: var(--accent-gold);
    margin-bottom: 1.5rem;
}

.body-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.body-text .link {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}

.body-text .link:hover {
    color: var(--accent-gold);
}

/* Buttons */
.btn-gold {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-gold);
    color: white;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-gold:hover {
    background: #b08d3f;
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.text-link:hover {
    color: var(--accent-gold);
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    padding: 0.375rem 0.875rem;
    background: rgba(11, 28, 59, 0.05);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Feature List */
.feature-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.dot {
    width: 6px;
    height: 6px;
    background: var(--accent-gold);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Tip Box */
.tip-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(11, 28, 59, 0.05);
    border-radius: 12px;
    margin-top: 1rem;
}

.tip-icon {
    width: 40px;
    height: 40px;
    background: rgba(199, 162, 77, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--accent-gold);
    flex-shrink: 0;
}

.tip-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tip-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Location Badges */
.location-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
}

.location-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge-number {
    width: 32px;
    height: 32px;
    background: rgba(199, 162, 77, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.badge-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ========================================
   SECTIONS - FLOWING
   ======================================== */
.section-flowing {
    position: relative;
    background: var(--bg-primary);
    padding: 6rem 0;
}

.details-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.details-block {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 4rem;
}

.details-block-reverse {
    flex-direction: row-reverse;
}

.details-image {
    flex: 1.2;
    height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.details-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.details-text {
    flex: 1;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.amenities-list {
    list-style: none;
    space-y: 0.75rem;
}

.amenities-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.check {
    color: var(--accent-gold);
    font-weight: 700;
    flex-shrink: 0;
}

.booking-info {
    margin: 1.5rem 0;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.note {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.section-contact {
    background: var(--bg-secondary);
    padding: 5rem 0 0;
}

.contact-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 3rem;
}

.contact-image {
    flex: 1;
    height: 500px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
}

.contact-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-form-wrapper {
    flex: 1;
    padding: 2rem 0;
}

.contact-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
}

.contact-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.contact-form {
    space-y: 1.25rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 0.9375rem;
    transition: border-color 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.contact-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-item {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   MODAL
   ======================================== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: var(--radius);
    max-width: 400px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-content h3 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.modal-content p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .text-card {
        margin-left: 4vw;
        max-width: 460px;
        padding: 2rem;
    }
    
    .details-block {
        gap: 2rem;
    }
    
    .details-image {
        height: 350px;
    }
    
    .contact-container {
        gap: 2rem;
    }
    
    .contact-image {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .section-pinned {
        align-items: flex-end;
        padding-bottom: 6vh;
    }
    
    .text-card {
        margin: 0 4vw;
        max-width: none;
        width: 92vw;
        padding: 1.75rem;
        border-radius: var(--radius-mobile);
    }
    
    .headline {
        font-size: 2rem;
    }
    
    .bg-gradient {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent 60%);
    }
    
    .details-block,
    .details-block-reverse {
        flex-direction: column;
    }
    
    .details-image {
        width: 100%;
        height: 280px;
    }
    
    .contact-container {
        flex-direction: column;
    }
    
    .contact-image {
        width: 100%;
        height: 280px;
    }
    
    .contact-form-wrapper {
        width: 100%;
        padding: 1rem 0;
    }
    
    .footer {
        flex-direction: column;
        text-align: center;
    }
    
    .feature-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1.5rem;
    }
    
    .text-card {
        padding: 1.5rem;
    }
    
    .headline {
        font-size: 1.75rem;
    }
    
    .body-text {
        font-size: 0.9375rem;
    }
    
    .details-container {
        padding: 0 1.5rem;
    }
    
    .contact-container {
        padding: 0 1.5rem;
    }
    
    .modal-content {
        margin: 1rem;
        padding: 2rem;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
