/* ─────────────────────────────────────────────────────────────────────────────
   THE MUNGSENG VILLA — main.css
   Aesthetic: Refined natural luxury. Earthy tones, editorial typography,
   generous whitespace. Cormorant Garamond for display, Jost for UI.
───────────────────────────────────────────────────────────────────────────── */

/* ─── Custom Properties ──────────────────────────────────────────────────── */
:root {
    /* Colors */
    --clr-earth:      #2C2416;   /* deep warm black — primary text */
    --clr-bark:       #5C4A32;   /* mid brown — secondary text */
    --clr-clay:       #A0836A;   /* muted terracotta — accents */
    --clr-sand:       #E8DDD0;   /* warm off-white — surfaces */
    --clr-linen:      #F5F0E8;   /* page background */
    --clr-moss:       #4A5E44;   /* forest green — CTAs, highlights */
    --clr-moss-dark:  #354433;   /* darker moss for hover */
    --clr-gold:       #C9A96E;   /* warm gold — decorative */
    --clr-white:      #FDFAF5;   /* warm white */

    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body:    'Jost', 'Helvetica Neue', Arial, sans-serif;

    /* Spacing */
    --space-xs:   0.5rem;
    --space-sm:   1rem;
    --space-md:   2rem;
    --space-lg:   4rem;
    --space-xl:   7rem;

    /* Layout */
    --max-width:  1280px;
    --nav-height: 80px;

    /* Transitions */
    --ease:       cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --dur-fast:   0.2s;
    --dur-mid:    0.4s;
    --dur-slow:   0.7s;
}

/* ─── Reset & Base ───────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--clr-earth);
    background-color: var(--clr-linen);
    line-height: 1.75;
    overflow-x: hidden;
}

img, video {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease);
}

ul { list-style: none; }

/* ─── Typography Scale ───────────────────────────────────────────────────── */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 300;
    line-height: 1.15;
    color: var(--clr-earth);
}

h1 { font-size: clamp(3rem, 7vw, 6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: 1.1rem; font-weight: 400; }

p {
    font-size: 1rem;
    font-weight: 300;
    color: var(--clr-bark);
    line-height: 1.8;
    max-width: 65ch;
}

.italic { font-style: italic; }
.gold   { color: var(--clr-gold); }
.muted  { color: var(--clr-clay); }

/* ─── Layout Utilities ───────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: clamp(1.5rem, 5vw, 4rem);
}

.section {
    padding-block: var(--space-xl);
}

.section-sm {
    padding-block: var(--space-lg);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-center { text-align: center; }

/* ─── Section Label (e.g. "— Our Story —") ──────────────────────────────── */
.section-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--clr-clay);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: var(--space-sm);
}

.section-label::before,
.section-label::after {
    content: '';
    display: block;
    height: 1px;
    width: 2rem;
    background: var(--clr-clay);
    opacity: 0.5;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 1rem 2.5rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--dur-mid) var(--ease);
    text-decoration: none;
}

.btn-primary {
    background: var(--clr-moss);
    color: var(--clr-white);
    border-color: var(--clr-moss);
}

.btn-primary:hover {
    background: var(--clr-moss-dark);
    border-color: var(--clr-moss-dark);
}

.btn-outline {
    background: transparent;
    color: var(--clr-earth);
    border-color: var(--clr-earth);
}

.btn-outline:hover {
    background: var(--clr-earth);
    color: var(--clr-white);
}

.btn-outline-light {
    background: transparent;
    color: var(--clr-white);
    border-color: rgba(255,255,255,0.6);
}

.btn-outline-light:hover {
    background: var(--clr-white);
    color: var(--clr-earth);
}

/* ─── Navigation ─────────────────────────────────────────────────────────── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    transition: background var(--dur-mid) var(--ease),
                box-shadow var(--dur-mid) var(--ease);
}

.site-header.scrolled {
    background: rgba(245, 240, 232, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(44, 36, 22, 0.08);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: clamp(1.5rem, 5vw, 4rem);
}

/* Logo */
.nav-logo,
.footer-logo {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-decoration: none;
}

.logo-main {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 400;
    color: var(--clr-white);
    letter-spacing: 0.02em;
    transition: color var(--dur-fast) var(--ease);
}

.logo-sub {
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
    transition: color var(--dur-fast) var(--ease);
}

.scrolled .logo-main { color: var(--clr-earth); }
.scrolled .logo-sub  { color: var(--clr-clay); }

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.nav-link {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    position: relative;
    padding-bottom: 2px;
    transition: color var(--dur-fast) var(--ease);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--clr-gold);
    transition: width var(--dur-mid) var(--ease);
}

.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

.scrolled .nav-link { color: var(--clr-bark); }
.scrolled .nav-link:hover { color: var(--clr-earth); }

/* Dropdown */
.nav-dropdown { position: relative; }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 1.5rem);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    min-width: 180px;
    background: var(--clr-white);
    border: 1px solid var(--clr-sand);
    box-shadow: 0 12px 40px rgba(44, 36, 22, 0.12);
    opacity: 0;
    pointer-events: none;
    transition: all var(--dur-mid) var(--ease);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 0.75rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--clr-bark);
    border-bottom: 1px solid var(--clr-sand);
    transition: all var(--dur-fast) var(--ease);
}

.dropdown-menu li:last-child a { border-bottom: none; }
.dropdown-menu li a:hover {
    background: var(--clr-linen);
    color: var(--clr-earth);
    padding-left: 1.75rem;
}

/* Book button */
.btn-book {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--clr-white);
    background: var(--clr-moss);
    padding: 0.65rem 1.5rem;
    border: 1px solid var(--clr-moss);
    transition: all var(--dur-fast) var(--ease);
}

.btn-book:hover {
    background: var(--clr-moss-dark);
    border-color: var(--clr-moss-dark);
}

/* Nav actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--clr-white);
    transition: all var(--dur-mid) var(--ease);
    transform-origin: center;
}

.scrolled .nav-hamburger span { background: var(--clr-earth); }

.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav */
.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: var(--clr-earth);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-mid) var(--ease);
}

.mobile-nav.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-links {
    text-align: center;
}

.mobile-nav-links li {
    overflow: hidden;
}

.mobile-nav-links a {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 300;
    color: var(--clr-sand);
    padding: 0.4rem 0;
    letter-spacing: 0.02em;
    transition: color var(--dur-fast) var(--ease);
}

.mobile-nav-links a:hover { color: var(--clr-gold); }

.mobile-book-btn {
    font-family: var(--font-body) !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.2em !important;
    text-transform: uppercase;
    color: var(--clr-moss) !important;
    border: 1px solid var(--clr-moss);
    padding: 0.75rem 2.5rem !important;
    margin-top: 1rem;
    display: inline-block !important;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--clr-earth);
    color: var(--clr-sand);
    padding-top: var(--space-xl);
}

.footer-container {
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: clamp(1.5rem, 5vw, 4rem);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(232,221,208,0.12);
}

.footer-tagline {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1rem;
    color: var(--clr-clay);
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
    max-width: 28ch;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(232,221,208,0.2);
    color: var(--clr-sand);
    transition: all var(--dur-fast) var(--ease);
}

.footer-social a:hover {
    border-color: var(--clr-gold);
    color: var(--clr-gold);
}

.footer-logo .logo-main { color: var(--clr-sand); }
.footer-logo .logo-sub  { color: var(--clr-clay); }

.footer-heading {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--clr-clay);
    margin-bottom: 1.25rem;
}

.footer-links li {
    margin-bottom: 0.65rem;
}

.footer-links a {
    font-size: 0.9rem;
    font-weight: 300;
    color: rgba(232,221,208,0.7);
    transition: color var(--dur-fast) var(--ease);
}

.footer-links a:hover { color: var(--clr-sand); }

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: rgba(232,221,208,0.7);
}

.footer-contact svg {
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--clr-clay);
}

.footer-contact a { color: rgba(232,221,208,0.7); }
.footer-contact a:hover { color: var(--clr-sand); }

.footer-bottom {
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: clamp(1.5rem, 5vw, 4rem);
    padding-block: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: rgba(232,221,208,0.4);
    max-width: none;
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    font-size: 0.8rem;
    color: rgba(232,221,208,0.4);
    transition: color var(--dur-fast) var(--ease);
}

.footer-legal a:hover { color: var(--clr-sand); }

/* ─── Hero (shared across pages) ────────────────────────────────────────── */
.page-hero {
    position: relative;
    height: 60vh;
    min-height: 420px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    transition: transform 6s var(--ease);
}

.page-hero:hover .page-hero-bg { transform: scale(1); }

.page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(44,36,22,0.7) 0%, rgba(44,36,22,0.1) 60%);
}

.page-hero-content {
    position: relative;
    z-index: 2;
    padding: var(--space-lg) clamp(1.5rem, 5vw, 4rem);
    max-width: var(--max-width);
    margin-inline: auto;
    width: 100%;
}

.page-hero h1 { color: var(--clr-white); }

/* ─── Cards ──────────────────────────────────────────────────────────────── */
.card {
    background: var(--clr-white);
    overflow: hidden;
    transition: transform var(--dur-mid) var(--ease),
                box-shadow var(--dur-mid) var(--ease);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(44, 36, 22, 0.1);
}

.card-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform var(--dur-slow) var(--ease);
}

.card:hover .card-img { transform: scale(1.04); }

.card-img-wrap { overflow: hidden; }

.card-body {
    padding: 1.5rem;
}

.card-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--clr-clay);
    margin-bottom: 0.5rem;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--clr-earth);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.card-text {
    font-size: 0.9rem;
    color: var(--clr-bark);
    line-height: 1.7;
}

/* ─── Divider ────────────────────────────────────────────────────────────── */
.divider {
    width: 60px;
    height: 1px;
    background: var(--clr-gold);
    margin-block: var(--space-sm);
}

.divider-center { margin-inline: auto; }

/* ─── Fade-in on scroll ──────────────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--dur-slow) var(--ease),
                transform var(--dur-slow) var(--ease);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-md);
    }
}

@media (max-width: 768px) {
    .nav-links    { display: none; }
    .nav-hamburger { display: flex; }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    :root { --nav-height: 64px; }
    h1 { font-size: 2.5rem; }
}

/* ─── WhatsApp floating button ───────────────────────────────────────────── */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 900;
    width: 52px;
    height: 52px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
    transition: transform var(--dur-fast) var(--ease),
                box-shadow var(--dur-fast) var(--ease);
    color: white;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}