@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Base transitions ─────────────────────────────────── */
*, *::before, *::after {
    transition-property: color, background-color, border-color, box-shadow, opacity, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
[x-transition] *, .animate-spin, [x-transition] {
    transition-property: all !important;
}

/* ── Selection ────────────────────────────────────────── */
::selection {
    background: rgba(200, 169, 106, 0.3);
    color: #1A1A1A;
}

/* ── Custom scrollbar ─────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D4CFC5; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #C8A96A; }

/* ── Keyframes ────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes parallaxFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
@keyframes shimmerSweep {
    from { left: -100%; }
    to   { left: 200%; }
}
@keyframes scrollHint {
    0%, 100% { opacity: 0.4; transform: translateY(0); }
    50%      { opacity: 1;   transform: translateY(6px); }
}

.animate-fade-in {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ── Stagger cascade ──────────────────────────────────── */
.stagger > * {
    opacity: 0;
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.stagger > *:nth-child(1) { animation-delay: 0.04s; }
.stagger > *:nth-child(2) { animation-delay: 0.08s; }
.stagger > *:nth-child(3) { animation-delay: 0.12s; }
.stagger > *:nth-child(4) { animation-delay: 0.16s; }
.stagger > *:nth-child(5) { animation-delay: 0.20s; }
.stagger > *:nth-child(6) { animation-delay: 0.24s; }
.stagger > *:nth-child(7) { animation-delay: 0.28s; }
.stagger > *:nth-child(8) { animation-delay: 0.32s; }
.stagger > *:nth-child(n+9) { animation-delay: 0.36s; }

/* ── Scroll-reveal (IntersectionObserver driven) ──────── */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
.reveal-scale {
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-32px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}
.reveal-right {
    opacity: 0;
    transform: translateX(32px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* ── Section bands ────────────────────────────────────── */
.section-dark {
    background-color: #1A1A1A;
    color: #FAFAF7;
}
.section-moody {
    background-color: #2A2A2A;
    color: #FAFAF7;
}
.section-light {
    background-color: #FAFAF7;
    color: #2D2D2D;
}
.section-cream {
    background-color: #F5F3EE;
    color: #2D2D2D;
}

/* ── Editorial typography ─────────────────────────────── */
.text-editorial {
    font-family: 'Cormorant Garamond', Georgia, serif;
    letter-spacing: 0.04em;
    line-height: 1.1;
}
.text-editorial-sm {
    font-family: 'Cormorant Garamond', Georgia, serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 500;
}
.text-display {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    letter-spacing: 0.02em;
    line-height: 1.05;
}

/* Fluid headline sizes (clamp) */
.text-hero {
    font-size: clamp(2.5rem, 6vw, 6rem);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    letter-spacing: 0.03em;
    line-height: 1.05;
}
.text-section {
    font-size: clamp(1.75rem, 3.5vw, 3.25rem);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1.15;
}
.text-sub {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 300;
    letter-spacing: 0.01em;
    line-height: 1.6;
}

/* ── Parallax hero ────────────────────────────────────── */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}
@supports (-webkit-touch-callout: none) {
    /* iOS doesn't support background-attachment: fixed */
    .parallax-bg {
        background-attachment: scroll;
    }
}

/* ── Cards ────────────────────────────────────────────── */
.card-luxury {
    position: relative;
    overflow: hidden;
}
.card-luxury::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.35s ease;
    box-shadow: 0 0 0 1px rgba(200, 169, 106, 0.25), 0 8px 30px -5px rgba(200, 169, 106, 0.12);
    pointer-events: none;
    z-index: 1;
}
.card-luxury:hover::before {
    opacity: 1;
}

.card-editorial {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    background: transparent;
}
.card-editorial img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-editorial:hover img {
    transform: scale(1.03);
}
.card-editorial .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 60%);
    opacity: 0.8;
    transition: opacity 0.4s ease;
}
.card-editorial:hover .card-overlay {
    opacity: 1;
}

/* ── Shimmer ──────────────────────────────────────────── */
.shimmer {
    position: relative;
    overflow: hidden;
}
.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(200, 169, 106, 0.07), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}
.shimmer:hover::after {
    left: 120%;
}

/* ── Image blur-up (lazy loading placeholder) ─────────── */
.img-blur-up {
    filter: blur(12px);
    transition: filter 0.5s ease;
}
.img-blur-up.loaded {
    filter: blur(0);
}

/* ── Form inputs ──────────────────────────────────────── */
input:focus, textarea:focus, select:focus {
    box-shadow: 0 0 0 3px rgba(200, 169, 106, 0.18) !important;
    border-color: #C8A96A !important;
}
input[type="checkbox"] {
    accent-color: #C8A96A;
}

/* ── Dividers ─────────────────────────────────────────── */
.divider-gold {
    height: 1px;
    background: linear-gradient(90deg, transparent, #C8A96A, transparent);
    border: none;
}
.divider-thin {
    height: 1px;
    background: rgba(200, 169, 106, 0.25);
    border: none;
}

/* ── Nav link underline ───────────────────────────────── */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #C8A96A;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* ── Public nav (transparent → solid) ─────────────────── */
.nav-public {
    transition: background-color 0.35s ease, backdrop-filter 0.35s ease, box-shadow 0.35s ease;
}
.nav-public.nav-scrolled {
    background-color: rgba(26, 26, 26, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(200, 169, 106, 0.1);
}

/* ── Scroll indicator ─────────────────────────────────── */
.scroll-indicator {
    animation: scrollHint 2s ease-in-out infinite;
}

/* ── Hero overlay gradient ────────────────────────────── */
.hero-gradient {
    background: linear-gradient(
        to bottom,
        rgba(26, 26, 26, 0.3) 0%,
        rgba(26, 26, 26, 0.1) 30%,
        rgba(26, 26, 26, 0.15) 70%,
        rgba(26, 26, 26, 0.7) 100%
    );
}

/* ── Newsletter input ─────────────────────────────────── */
.newsletter-input {
    background: transparent;
    border: 1px solid rgba(200, 169, 106, 0.3);
    color: #FAFAF7;
    padding: 0.75rem 1.25rem;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.875rem;
    transition: border-color 0.3s ease;
    outline: none;
}
.newsletter-input:focus {
    border-color: #C8A96A !important;
    box-shadow: none !important;
}
.newsletter-input::placeholder {
    color: rgba(250, 250, 247, 0.4);
}

/* ── Prose (markdown content) ─────────────────────────── */
.prose h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; font-family: 'Playfair Display', Georgia, serif; }
.prose h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; font-family: 'Playfair Display', Georgia, serif; }
.prose h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.25rem; }
.prose ul { list-style-type: disc; padding-left: 1.5rem; margin-bottom: 0.75rem; }
.prose ol { list-style-type: decimal; padding-left: 1.5rem; margin-bottom: 0.75rem; }
.prose li { margin-bottom: 0.25rem; }
.prose p { margin-bottom: 0.5rem; line-height: 1.7; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.prose th, .prose td { border: 1px solid #E8E4DD; padding: 0.5rem; text-align: left; }
.prose th { background-color: #FAF7F0; font-weight: 600; }

/* Dark prose variant */
.prose-dark h1, .prose-dark h2, .prose-dark h3 { color: #FAFAF7; }
.prose-dark p, .prose-dark li { color: rgba(250, 250, 247, 0.8); }
.prose-dark th { background-color: #2A2A2A; color: #FAFAF7; }
.prose-dark th, .prose-dark td { border-color: #3A3A3A; }

/* ── EasyMDE overrides ────────────────────────────────── */
.EasyMDEContainer .CodeMirror {
    border-color: #E8E4DD !important;
    border-radius: 0.75rem !important;
    font-family: 'Inter', system-ui, sans-serif !important;
}
.EasyMDEContainer .CodeMirror-focused {
    border-color: #C8A96A !important;
    box-shadow: 0 0 0 3px rgba(200, 169, 106, 0.18) !important;
}
.EasyMDEContainer .editor-toolbar {
    border-color: #E8E4DD !important;
    border-radius: 0.75rem 0.75rem 0 0 !important;
}
.EasyMDEContainer .editor-toolbar button:hover {
    background: #FAF7F0 !important;
}
.EasyMDEContainer .editor-toolbar button.active {
    background: #F5EFE0 !important;
}

/* ── Mobile full-screen menu ──────────────────────────── */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 26, 0.97);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}
.mobile-menu-overlay a {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 400;
    color: #FAFAF7;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: color 0.3s ease;
}
.mobile-menu-overlay a:hover {
    color: #C8A96A;
}

/* ── Masonry / photo grid ─────────────────────────────── */
.photo-grid {
    columns: 3;
    column-gap: 1rem;
}
.photo-grid > * {
    break-inside: avoid;
    margin-bottom: 1rem;
}
@media (max-width: 768px) {
    .photo-grid {
        columns: 2;
    }
}
@media (max-width: 480px) {
    .photo-grid {
        columns: 1;
    }
}

/* ── Language toggle ──────────────────────────────────── */
.lang-toggle {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.5rem;
    border: 1px solid rgba(200, 169, 106, 0.3);
    transition: all 0.3s ease;
}
.lang-toggle:hover {
    border-color: #C8A96A;
    color: #C8A96A;
}
.lang-toggle.active {
    background: #C8A96A;
    color: #1A1A1A;
    border-color: #C8A96A;
}
