/* Google Fonts Import - Editorial & Clean */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,400&family=Inter:wght@200;300;400;500;600&display=swap');

:root {
    /* Senior Study - Refined Palette */
    --color-bg: #FCFBFA;
    /* Warm editorial white */
    --color-surface: #FFFFFF;
    --color-surface-soft: #F5F4F0;

    /* Typography - Strict Grays */
    --color-text-main: #1A1A1A;
    --color-text-muted: #666666;
    --color-text-dim: #999999;

    /* Accents - Minimalist & Purposeful */
    --color-accent: #000000;
    /* High-end contrast */
    --color-border: #E5E5E5;
    --color-border-soft: #F0EFED;

    /* Dark Mode - Professional Midnight */
    --color-bg-dark: #0A0A0A;
    --color-surface-dark: #141414;
    --color-text-main-dark: #FFFFFF;
    --color-text-muted-dark: #A0A0A0;
    --color-border-dark: #262626;

    /* Spacing Scale - 8pt Grid */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-24: 6rem;
    --space-32: 8rem;

    /* Typography Scale */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-serif: 'Cormorant Garamond', serif;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3.5rem;
    --text-display: clamp(3.5rem, 8vw, 6rem);

    /* UI Tokens */
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --ease: cubic-bezier(0.2, 0, 0, 1);
}

body.dark-mode {
    --color-bg: var(--color-bg-dark);
    --color-surface: var(--color-surface-dark);
    --color-text-main: var(--color-text-main-dark);
    --color-text-muted: var(--color-text-muted-dark);
    --color-border: var(--color-border-dark);
    --color-accent: #FFFFFF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.5;
    font-weight: 400;
    transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

p {
    margin-bottom: var(--space-4);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* Typography Utilities */
.text-display {
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.03em;
}

.text-subtitle {
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    color: var(--color-text-secondary);
    font-weight: 300;
    letter-spacing: 0.01em;
    max-width: 60ch;
}

/* Buttons - Minimalist */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background: var(--color-accent);
    color: white;
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
    transition: all 0.4s var(--ease-out-expo);
    border: 1px solid transparent;
    cursor: pointer;
}

.btn:hover {
    background: var(--color-accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background: transparent;
    border: 1px solid currentColor;
    color: currentColor;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: white;
    transform: translateY(-2px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--space-6) 0;
    transition: all 0.4s var(--ease);
}

.navbar.scrolled {
    padding: var(--space-4) 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

body.dark-mode .navbar.scrolled {
    background: var(--color-surface-dark);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-serif);
    font-size: var(--text-2xl);
    text-decoration: none;
    color: white;
    transition: color 0.3s var(--ease);
}

.navbar.scrolled .logo {
    color: var(--color-text-main);
}

.nav-links {
    display: flex;
    gap: var(--space-8);
    list-style: none;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: white;
    font-size: var(--text-sm);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: opacity 0.3s var(--ease);
    opacity: 0.8;
}

.navbar.scrolled .nav-link {
    color: var(--color-text-main);
}

.nav-link:hover {
    opacity: 1;
}

.dark-mode-toggle {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s var(--ease);
}

.navbar.scrolled .dark-mode-toggle {
    color: var(--color-text-main);
    border-color: var(--color-border);
}

.dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.navbar.scrolled .dark-mode-toggle:hover {
    background: var(--color-surface-soft);
}

/* Common Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-8);
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.3s var(--ease);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-surface);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
}

.btn-outline:hover {
    background: var(--color-surface-soft);
    border-color: var(--color-text-main);
}

.section {
    padding: var(--space-24) 0;
}

@media (max-width: 768px) {
    .section {
        padding: var(--space-16) 0;
    }
}

/* Grid Utilities */
.grid {
    display: grid;
    gap: var(--space-8);
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-12 {
    grid-template-columns: repeat(12, 1fr);
}

/* Editorial Header */
.section-header {
    margin-bottom: var(--space-12);
    max-width: 600px;
}

.section-header h2 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-3);
}

.section-header p {
    font-size: var(--text-lg);
    color: var(--color-text-muted);
    font-family: var(--font-sans);
}

/* Hero Section - Cinematic */
.hero {
    height: 100vh;
    min-height: 800px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/hero_courchevel.png') center/cover no-repeat;
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin-bottom: var(--space-24);
}

.text-display {
    font-size: var(--text-display);
    margin-bottom: var(--space-6);
}

.hero-subtitle {
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: var(--space-4);
    opacity: 0.8;
}

.text-subtitle {
    font-size: var(--text-xl);
    max-width: 32ch;
    margin: 0 auto;
    opacity: 0.9;
}

/* Floating Booking Bar */
.booking-bar-wrapper {
    position: absolute;
    bottom: var(--space-12);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1000px;
    padding: 0 var(--space-6);
    z-index: 10;
}

.booking-bar {
    background: white;
    padding: var(--space-2);
    display: flex;
    align-items: center;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}

body.dark-mode .booking-bar {
    background: var(--color-surface-dark);
    border: 1px solid var(--color-border);
}

.booking-input-group {
    flex: 1;
    padding: var(--space-4) var(--space-8);
    border-right: 1px solid var(--color-border-soft);
}

.booking-input-group:last-child {
    border-right: none;
}

.booking-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-dim);
    margin-bottom: var(--space-1);
}

.booking-field input,
.booking-field select {
    border: none;
    background: transparent;
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    color: var(--color-text-main);
    width: 100%;
    padding: 0;
    cursor: pointer;
}

.booking-field input:focus {
    outline: none;
}

.btn-search {
    background: var(--color-accent);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s var(--ease);
}

.btn-search:hover {
    filter: brightness(1.1);
}

/* Section Common */
.section {
    padding: var(--spacing-2xl) 0;
}

.section-header {
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

/* Bento Grid Overrides */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.about-text h3 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-text);
}

.feature-grid {
    margin-top: var(--space-8);
}

.feature-pill {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    transition: all 0.3s var(--ease);
}

.feature-pill i {
    width: 18px;
    height: 18px;
    color: var(--color-text-main);
    stroke-width: 1.5;
}

.feature-pill:hover {
    border-color: var(--color-text-main);
    color: var(--color-text-main);
}

.section-alt {
    background-color: var(--color-surface-soft);
}

body.dark-mode .section-alt {
    background-color: var(--color-surface-dark);
}

/* Gallery - Strict Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 350px;
    gap: var(--space-4);
    margin-bottom: var(--space-12);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--color-border-soft);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s var(--ease);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:nth-child(1) {
    grid-column: span 8;
    grid-row: span 2;
}

.gallery-item:nth-child(2) {
    grid-column: span 4;
    grid-row: span 1;
}

.gallery-item:nth-child(3) {
    grid-column: span 4;
    grid-row: span 1;
}

.gallery-item:nth-child(4) {
    grid-column: span 12;
    grid-row: span 1.5;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }

    .gallery-item {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }
}

/* Amenities */
.amenities-section {
    padding: var(--space-12) 0;
    border-top: 1px solid var(--color-border);
}

.amenities-list {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-8);
}

.amenity-minimal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.amenity-minimal i {
    width: 24px;
    height: 24px;
    margin-bottom: var(--space-2);
    color: var(--color-text-dim);
    stroke-width: 1.25;
}

.amenity-minimal span {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
}

/* Footer */
footer {
    padding: var(--space-12) 0;
    background: var(--color-surface-soft);
    border-top: 1px solid var(--color-border);
    margin-top: var(--space-24);
}

body.dark-mode footer {
    background: var(--color-surface-dark);
}

.footer-contact {
    display: flex;
    justify-content: center;
    gap: var(--space-12);
    margin-bottom: var(--space-8);
}

.footer-link {
    color: var(--color-text-main);
    text-decoration: none;
    font-size: var(--text-sm);
    letter-spacing: 0.05em;
    font-weight: 500;
}

.footer-brand {
    text-align: center;
    color: var(--color-text-dim);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

/* Calendar */
.calendar-wrapper {
    background: var(--color-surface);
    padding: var(--space-8);
    border: 1px solid var(--color-border-soft);
    max-width: 480px;
    margin: 0 auto;
}

body.dark-mode .calendar-wrapper {
    background: var(--color-surface-dark);
    border-color: var(--color-border);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
}

.current-month {
    font-family: var(--font-serif);
    font-size: var(--text-xl);
}

.month-nav {
    background: transparent;
    border: 1px solid var(--color-border-soft);
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-main);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: var(--space-6);
}

.weekday {
    font-size: 10px;
    color: var(--color-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding-bottom: var(--space-4);
}

.day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: var(--text-sm);
    transition: all 0.2s var(--ease);
}

.day:hover:not(.empty):not(.booked) {
    background: var(--color-surface-soft);
}

.day.selected {
    background: var(--color-accent);
    color: var(--color-surface);
}

.day.in-range {
    background: var(--color-border-soft);
}

.day.booked {
    color: var(--color-text-dim);
    text-decoration: line-through;
    opacity: 0.5;
    pointer-events: none;
}

.booking-summary-bar {
    margin-top: var(--space-8);
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-border-soft);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.booking-dates-summary {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.summary-total {
    font-family: var(--font-serif);
    font-size: var(--text-4xl);
    color: var(--color-text-main);
}

.text-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-dim);
    margin-top: var(--space-1);
}

/* Modal - Refined Overlay */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
}

.modal-content {
    background: var(--color-surface);
    padding: var(--space-12);
    border-radius: var(--radius-sm);
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-md);
    animation: modalIn 0.5s var(--ease);
}

body.dark-mode .modal-content {
    background: var(--color-surface-dark);
    border: 1px solid var(--color-border);
}

.modal-icon {
    margin-bottom: var(--space-6);
}

.modal-content h3 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
}

.modal-content p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-8);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.location-list {
    margin-bottom: var(--space-8);
}

.location-item {
    margin-bottom: var(--space-6);
}

.location-item h4 {
    font-family: var(--font-sans);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-2);
}

.location-item p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-1);
    font-size: var(--text-base);
}

.map-wrapper {
    background: var(--color-border-soft);
    border-radius: var(--radius-sm);
    overflow: hidden;
    filter: grayscale(1);
    transition: filter 0.5s var(--ease);
}

.map-wrapper:hover {
    filter: grayscale(0);
}

.booking-field select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0 center;
    background-size: 1em;
    padding-right: 1.5em;
}

body.dark-mode .booking-field select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E8E6E3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}