/* ==========================================================================
   AMRAI LUXURY THEME - DESIGN SYSTEM TOKENS & STYLES (DESIGN.md)
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&display=swap");

@font-face {
	font-family: 'Avenir';
	src: url('../fonts/Avenir-Book.woff2') format('woff2'),
		url('../fonts/Avenir-Book.woff') format('woff');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

:root {
    /* Colors */
    --color-cream: #ece1d9;
    --color-cream-light: #f8f4f0;
    --color-sand: #e9e1da;
    --color-cream-tint: #e0d6ce;
    --color-forest: #2d5234;
    --color-forest-dark: #1e3b24;
    --color-terracotta: #8d321e;
    --color-dark: #1e1e1e;
    --color-black: #000000;
    --color-white: #ffffff;
    --color-slate-muted: #656565;
    --preloader-green: #294931;

    /* Typography */
    --font-serif: "Cormorant", Georgia, serif;
    --font-sans: "Avenir", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: "Avenir", sans-serif;

    /* Container Widths */
    --max-width-desktop: 1512px;
    --max-width-content: 1432px;
    --max-width-grid: 1280px;
    --max-width-mobile: 393px;
}

/* Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: var(--font-sans);
    background-color: var(--color-cream);
    color: var(--color-dark);
    -webkit-font-smoothing: antialiased;
    scroll-behavior: auto !important;
}

body {
    background-color: var(--color-cream);
    color: var(--color-dark);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-serif {
    font-family: var(--font-serif);
    font-weight: 500;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Lenis Resets */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

/* Layout Utilities */
.container-custom {
    max-width: var(--max-width-content);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

@media (min-width: 640px) {
    .container-custom {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

/* ==========================================================================
   LUXURY EMBOSSED PRELOADER COMPONENT
   ========================================================================== */

.luxury-preloader {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--color-cream);
    opacity: 0;
    will-change: opacity, transform;
    pointer-events: all;
    user-select: none;
}

/* Base Layer Setup */
.preloader-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Layer 1: Base Background */
.preloader-bg {
    z-index: 1;
    background-color: var(--preloader-green);
}

.preloader-bg .bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Layer 2: Centered Logo */
.preloader-crest-wrapper {
    position: relative;
    z-index: 2;
    width: min(190px, 40vw);
    max-width: 250px;
    aspect-ratio: 135 / 152;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateZ(0);
}

.preloader-crest {
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(0.96);
    will-change: transform, opacity, filter;
    mix-blend-mode: multiply;
    filter: contrast(1.75) brightness(0.94);
}

.preloader-crest .crest-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    opacity: 0.24;
    filter: drop-shadow(-1.5px -1.5px 0.5px rgba(220, 255, 220, 0.42)) drop-shadow(2px 2.5px 1px rgba(0, 0, 0, 0.88)) drop-shadow(3.5px 5px 5px rgba(8, 22, 12, 0.55));
}

/* Layer 3: Distinct Paper Grain Overlay */
.preloader-texture {
    z-index: 3;
    mix-blend-mode: multiply;
    pointer-events: none;
}

.preloader-texture .texture-img {
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    max-width: none;
    object-fit: cover;
    transform: translate(-10px, -10px);
    will-change: transform;
    animation: grainShimmer 0.75s steps(4) infinite;
}

/* Organic Paper Grain Shimmer (12-14 fps micro jitter) */
@keyframes grainShimmer {
    0%   { transform: translate(-10px, -10px); }
    25%  { transform: translate(-8px, -12px); }
    50%  { transform: translate(-12px, -9px); }
    75%  { transform: translate(-9px, -11px); }
    100% { transform: translate(-10px, -10px); }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .preloader-crest-wrapper {
        width: min(180px, 48vw);
    }
}

/* ==========================================================================
   HERO BANNER & KINETIC TYPOGRAPHY STYLES
   ========================================================================== */

/* Fixed Header Navigation */
.header-nav {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 1000;
	padding: 2.25rem 3rem;
	pointer-events: all;
	/* Initial state before Phase 5 */
	opacity: 0;
	transform: translateY(-20px);
	will-change: transform, opacity;
}

.nav-container {
	max-width: 1512px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.nav-link {
	font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #FFFFFF;
	text-decoration: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.5rem 0;
	transition: opacity 0.3s ease;
}

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

.nav-logo {
	font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
	font-size: 2.5rem;
	font-weight: 400;
	letter-spacing: 0.08em;
	color: #FFFFFF;
	text-decoration: none;
	transform: translateY(-2px);
}

/* Fullscreen Hero Section */
.hero-banner {
	position: relative;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--color-cream, #ECE1D9);
}

/* Background Image Container */
.banner-image-wrapper {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
	overflow: hidden;
	pointer-events: none;
}

.banner-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 38%;
	display: block;
	/* Initial state before Phase 2 */
	opacity: 0;
	transform: scale(1.05);
	filter: contrast(1.2) brightness(0.7);
	will-change: transform, opacity;
}

/* Subtle cinematic depth gradient */
.banner-overlay {
	position: absolute;
	inset: 0;
	/*background: radial-gradient(
		ellipse at center,
		rgba(0, 0, 0, 0.05) 0%,
		rgba(0, 0, 0, 0.35) 100%
	);*/
	pointer-events: none;
}

/* Centered Display Content */
.banner-content {
	position: relative;
	z-index: 10;
	text-align: center;
	padding: 0 1.5rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.banner-title {
	font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
	font-size: clamp(2.4rem, 4.4vw, 4.25rem);
	font-weight: 400;
	line-height: 1.28;
	letter-spacing: -0.02em;
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.title-line {
	display: block;
	white-space: nowrap;
}

/* Kinetic Word Tokens */
.word-token {
	display: inline-block;
	/* Initial state before Phase 1 */
	color: #1A1A1A;
	opacity: 0;
	transform: translateX(-24px);
	margin: 0em;
	will-change: transform, opacity, color;
}

/* Latitude & Longitude Coordinates */
.banner-coords {
	font-family: var(--font-mono, 'Inter', monospace);
	font-size: 0.8125rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: #FFFFFF;
	margin-top: 2.25rem;
	/* Initial state before Phase 4 */
	opacity: 0;
	transform: translateY(8px);
	will-change: transform, opacity;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
	.header-nav {
		padding: 1.5rem 1.5rem;
	}

	.nav-logo {
		font-size: 2rem;
	}

	.title-line {
		white-space: normal;
	}

	.word-token {
		margin: 0 0.16em;
	}

	.banner-coords {
		font-size: 0.6875rem;
		margin-top: 1.75rem;
	}
}

/* ==========================================================================
   HEADER NAV & FULLSCREEN OVERLAY INTEGRATION
   ========================================================================== */

/* Ensure #header-nav sits above the curtain overlay */
.header-nav {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 1000;
	padding: 2.25rem 3rem;
	pointer-events: none; /* Allows clicking through empty header areas */
}

.header-nav .nav-container {
	max-width: 1512px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.header-nav .nav-logo {
	pointer-events: all;
	user-select: none;
	text-decoration: none;
}

/* Kinetic Trigger Flip Button */
.nav-toggle-btn {
	background: none;
	border: none;
	padding: 0.5rem 0;
	cursor: pointer;
	pointer-events: all;
	perspective: 300px;
}

.nav-trigger-flip {
	position: relative;
	display: block;
	height: 1.125rem;
	overflow: hidden;
}

.label-state {
	display: block;
	font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: #ECE1D9;
	transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
	will-change: transform, opacity;
}

.label-state.label-active {
	position: absolute;
	top: 0;
	left: 0;
	opacity: 0;
	transform: translateY(100%) rotateX(-60deg);
}

/* Active State: Label Swaps to 'CLOSE' */
.is-nav-open .label-state.label-default {
	opacity: 0;
	transform: translateY(-100%) rotateX(60deg);
}

.is-nav-open .label-state.label-active {
	opacity: 1;
	transform: translateY(0%) rotateX(0deg);
}

/* Fullscreen Overlay Container (z-index: 900) */
.fullscreen-nav {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	z-index: 900;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	user-select: none;
	visibility: hidden;
}

.fullscreen-nav.is-active {
	pointer-events: all;
	visibility: visible;
}

/* Phase 1: Canvas Curtain Unfurl */
.nav-curtain {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background-color: var(--color-terracotta, #8D321E);
	/* Clip-path starts hidden from bottom-up (0% revealed) */
	clip-path: inset(0 0 100% 0);
	will-change: clip-path;
}

.nav-curtain .curtain-bg-img,
.nav-curtain img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	pointer-events: none;
}

/* Centered Navigation Content */
.nav-content {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 1200px;
	padding: 6rem 2rem 1rem;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

/* Staggered Links List */
.nav-links-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.15rem;
	text-align: center;
	margin-top: auto;
}

.nav-link-item {
	opacity: 0;
	transform: translateY(-28px);
	will-change: transform, opacity;
}

.menu-link {
	font-family: var(--font-serif, 'Cormorant Garamond', Georgia, serif);
	font-size: clamp(1.8rem, 4.2vw, 3.4rem);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: 0.02em;
	color: #ECE1D9;
	text-decoration: none;
	display: inline-block;
	transition: color 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-link:hover {
	color: #FFFFFF;
	transform: scale(1.035);
}

/* Bottom Palm Crest & Tagline */
.nav-footer-meta {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
	padding-bottom: 1rem;
}

.palm-crest {
	width: 130px;
}

.nav-tagline {
	font-family: var(--font-mono, 'Inter', monospace);
	font-size: 0.75rem;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	color: #ECE1D9;
	opacity: 0.7;
	text-align: center;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
	.header-nav {
		padding: 1.5rem 1.5rem;
	}

	.nav-links-list {
		gap: 0.85rem;
	}

	.nav-tagline {
		font-size: 0.625rem;
		letter-spacing: 0.18em;
	}
}