/* --- Premium Typography & Variables --- */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap");

:root {
	--color-bg-base: #0a0a0a;
	--color-bg-surface: #141414;
	--color-text-primary: #f5f5f5;
	--color-text-secondary: #999999;
	--color-accent: #c4a163; /* Champagne Gold */
	--color-accent-hover: #e0c188;

	--font-heading: "Playfair Display", serif;
	--font-body: "Inter", sans-serif;

	--transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Global Reset & Basics --- */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-body);
	background-color: var(--color-bg-base);
	color: var(--color-text-primary);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

a {
	text-decoration: none;
	color: inherit;
	transition: var(--transition-smooth);
}

/* --- Layout Utilities --- */
.container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 5%;
}

.container-fluid {
	width: 100%;
	padding: 0 4%;
}

.section-padding {
	padding: 120px 0;
}

.text-center {
	text-align: center;
}
.text-light {
	color: #fff;
}
.ml-4 {
	margin-left: 1rem;
}
.mt-4 {
	margin-top: 1.5rem;
}
.relative-z {
	position: relative;
	z-index: 2;
}

/* ADD THESE TWO LINES FOR VISIBILITY CONTROL */
.mobile-only {
	display: none;
}
.desktop-only {
	display: inline-flex;
}

/* --- Typography Hierarchy --- */
.title {
	font-family: var(--font-heading);
	font-size: clamp(3.5rem, 8vw, 6.5rem);
	line-height: 1.1;
	font-weight: 400;
	margin-bottom: 20px;
	letter-spacing: -0.02em;
}

.section-title {
	font-family: var(--font-heading);
	font-size: clamp(2.5rem, 5vw, 4rem);
	font-weight: 400;
	line-height: 1.2;
	margin-bottom: 30px;
}

.subtitle {
	font-family: var(--font-body);
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.2em;
	color: var(--color-accent);
	margin-bottom: 15px;
	font-weight: 500;
}

/* --- Buttons --- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 32px;
	font-family: var(--font-body);
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-weight: 500;
	cursor: pointer;
	border: 1px solid transparent;
}

.btn-solid {
	background-color: var(--color-accent);
	color: var(--color-bg-base);
}

.btn-solid:hover {
	background-color: var(--color-accent-hover);
}

.btn-outline {
	border-color: rgba(255, 255, 255, 0.3);
	color: var(--color-text-primary);
}

.btn-outline:hover {
	border-color: var(--color-accent);
	color: var(--color-accent);
}

.btn-text {
	padding: 14px 0;
	margin-left: 30px;
	color: var(--color-text-primary);
	border-bottom: 1px solid transparent;
}

.btn-text:hover {
	color: var(--color-accent);
	border-color: var(--color-accent);
}

.btn-order {
	background-color: transparent;
	border: 1px solid var(--color-accent);
	color: var(--color-accent);
	padding: 10px 24px;
	font-size: 0.8rem;
	border-radius: 2px;
}

.btn-order:hover {
	background-color: var(--color-accent);
	color: var(--color-bg-base);
}

/* --- Header / Navigation --- */
header {
	position: fixed;
	top: 0;
	width: 100%;
	z-index: 1000;
	transition:
		background-color 0.4s ease,
		padding 0.4s ease;
	padding: 25px 0;
}

header.scrolled {
	background-color: rgba(10, 10, 10, 0.95);
	backdrop-filter: blur(10px);
	padding: 15px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.logo-text {
	font-family: var(--font-heading);
	font-size: 1.8rem;
	font-weight: 600;
	letter-spacing: 0.15em;
	color: #fff;
	position: relative;
	z-index: 1001;
}

.nav-center {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

.nav-links {
	list-style: none;
	display: flex;
	gap: 40px;
}

.nav-item {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--color-text-primary);
	position: relative;
}

.nav-item::after {
	content: "";
	position: absolute;
	bottom: -5px;
	left: 0;
	width: 0;
	height: 1px;
	background-color: var(--color-accent);
	transition: width 0.3s ease;
}

.nav-item:hover::after {
	width: 100%;
}

/* --- Navigation Right Side --- */
.nav-right {
	display: flex;
	align-items: center;
	gap: 30px;
	position: relative; /* Essential for z-index to work */
	z-index: 1005; /* Keeps the hamburger button above the mobile menu overlay */
}

/* Hamburger Setup */
.hamburger {
	display: none;
	cursor: pointer;
	flex-direction: column;
	gap: 6px;
}

.hamburger .bar {
	display: block;
	width: 25px;
	height: 2px;
	background-color: #fff;
	transition: all 0.3s ease-in-out;
}

/* --- Hero Section with Slider --- */
.hero-section {
	height: 100vh;
	min-height: 700px;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.hero-slider {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
}

.hero-slider .slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	opacity: 0;
	transition:
		opacity 1.5s ease-in-out,
		transform 8s linear;
	transform: scale(1.05);
}

.hero-slider .slide.active {
	opacity: 1;
	transform: scale(1);
}

.slider-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.65);
	z-index: 2;
}

.hero-content {
	position: relative;
	z-index: 3;
	text-align: center;
	max-width: 800px;
	padding: 0 20px;
}

.hero-content .description {
	font-size: 1.2rem;
	color: #f5f5f5;
	margin: 0 auto 40px;
	max-width: 500px;
}

.hero-actions {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px; /* Use gap instead of margins for perfectly balanced spacing */
}

/* --- Philosophy Section --- */
.philosophy-container {
	display: flex;
	align-items: center;
	gap: 8%;
}

.philosophy-image {
	flex: 1;
	position: relative;
}

.philosophy-image::before {
	content: "";
	position: absolute;
	top: -20px;
	left: -20px;
	width: 100%;
	height: 100%;
	border: 1px solid rgba(196, 161, 99, 0.3);
	z-index: -1;
}

.philosophy-image img {
	width: 100%;
	height: auto;
	object-fit: cover;
	filter: brightness(0.8);
}

.philosophy-text {
	flex: 1;
	padding: 40px 0;
}

.philosophy-text .divider {
	width: 40px;
	height: 2px;
	background-color: var(--color-accent);
	margin-bottom: 30px;
}

.philosophy-text p {
	color: var(--color-text-secondary);
	margin-bottom: 20px;
	font-size: 1.05rem;
}

/* --- Menu Teaser Section with Parallax Background --- */
.menu-parallax {
	position: relative;
	background-image: url("https://images.unsplash.com/photo-1611143669185-af224c5e3252?q=80&w=1932&auto=format&fit=crop");
	background-attachment: fixed;
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	/* Removed the border-top and border-bottom to fix the bright line issue */
}

.menu-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(15, 15, 15, 0.85);
	z-index: 1;
}

.menu-desc {
	max-width: 600px;
	margin: 0 auto 50px;
	color: #e0e0e0;
}

.menu-actions {
	display: flex;
	justify-content: center;
	align-items: center;
}

.gallery-header {
	margin-bottom: 60px;
	text-align: center;
}

.masonry-gallery {
	display: grid;
	/* Create exactly 4 columns */
	grid-template-columns: repeat(4, 1fr);
	grid-auto-rows: 250px;
	gap: 15px;
	/* 'dense' ensures the browser strictly fills any holes to form a solid block */
	grid-auto-flow: row dense;
}

.gallery-item {
	overflow: hidden;
	position: relative;
	cursor: pointer;
	border-radius: 2px; /* Very subtle rounding for a premium feel */
}

.gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.8s ease;
	filter: grayscale(15%) brightness(0.85); /* Slightly less aggressive grayscale */
}

.gallery-item:hover img {
	transform: scale(1.08);
	filter: grayscale(0%) brightness(1);
}

/* Mathematical Spans for a perfect rectangle */
.item-large {
	grid-column: span 2;
	grid-row: span 2;
}
.item-wide {
	grid-column: span 2;
	grid-row: span 1;
}
.item-tall {
	grid-column: span 1;
	grid-row: span 2;
}
/* Standard items default to 1x1, no class needed */

/* Responsive logic for the gallery to maintain the "perfect block" look on mobile */
@media (max-width: 992px) {
	.masonry-gallery {
		grid-template-columns: repeat(
			2,
			1fr
		); /* Drop to 2 columns on tablets/small screens */
		grid-auto-rows: 200px;
	}
}

@media (max-width: 480px) {
	.masonry-gallery {
		grid-template-columns: 1fr; /* 1 column on very small phones */
		grid-auto-rows: 250px;
	}
	/* Reset all spans so it stacks neatly */
	.item-large,
	.item-wide,
	.item-tall {
		grid-column: span 1;
		grid-row: span 1;
	}
}
/* --- Premium Footer --- */
.premium-footer {
	background-color: #050505;
	padding-top: 100px;
}

.footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 60px;
	padding-bottom: 80px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-logo {
	font-family: var(--font-heading);
	font-size: 2rem;
	color: #fff;
	letter-spacing: 0.1em;
	margin-bottom: 15px;
}

.brand-tagline {
	color: var(--color-text-secondary);
	font-style: italic;
	font-family: var(--font-heading);
}

.block-title {
	font-family: var(--font-body);
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.15em;
	color: #fff;
	margin-bottom: 25px;
}

.footer-block p {
	color: var(--color-text-secondary);
	font-size: 0.95rem;
	margin-bottom: 8px;
}

.link-hover {
	color: var(--color-accent);
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	display: inline-block;
	margin-top: 15px;
	position: relative;
}

.phone-link {
	font-size: 1.2rem;
	color: #fff;
}

.phone-link:hover {
	color: var(--color-accent);
}

.hours-container {
	margin-top: 20px;
}

.hours-row {
	display: flex;
	justify-content: space-between;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	padding: 12px 0;
	color: var(--color-text-secondary);
	font-size: 0.9rem;
}

.hours-row span:first-child {
	color: #fff;
}

.closed {
	color: #cc4444;
}

.footer-bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 30px 0;
}

.socials a {
	color: var(--color-text-secondary);
	font-size: 1.2rem;
	margin-right: 20px;
}

.socials a:hover {
	color: var(--color-accent);
}

.copyright {
	color: #666;
	font-size: 0.85rem;
}

/* --- Back to Top --- */
#back-to-top {
	position: fixed;
	bottom: 40px;
	right: 40px;
	width: 50px;
	height: 50px;
	background-color: var(--color-bg-surface);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: var(--color-text-primary);
	border-radius: 50%;
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transition: var(--transition-smooth);
	z-index: 99;
}

#back-to-top.visible {
	opacity: 1;
	visibility: visible;
}

#back-to-top:hover {
	border-color: var(--color-accent);
	color: var(--color-accent);
}

/* --- Responsive & Mobile Menu --- */
@media (max-width: 1024px) {
	/* ADD THESE TWO LINES TO SWAP BUTTONS ON MOBILE */
	.desktop-only {
		display: none !important;
	}
	.mobile-only {
		display: block !important;
	}

	/* Fixed mobile menu state */
	.nav-center {
		position: fixed;
		top: 0;
		left: -100%; /* Changed from right:-100% to fully reset desktop's left:50% */
		transform: none; /* Crucial: removes the translateX(-50%) from desktop */
		width: 100vw;
		height: 100vh;
		background-color: rgba(10, 10, 10, 0.98);
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		transition: left 0.4s ease-in-out;
		z-index: 1000;
	}

	/* Fixed active state */
	.nav-center.active {
		left: 0; /* Changed from right: 0 */
	}

	.nav-links {
		flex-direction: column;
		text-align: center;
		gap: 40px;
	}

	.nav-item {
		font-size: 1.5rem;
	}

	.hamburger {
		display: flex;
	}

	/* Hamburger Animation to 'X' */
	.hamburger.active .bar:nth-child(1) {
		transform: translateY(8px) rotate(45deg);
	}
	.hamburger.active .bar:nth-child(2) {
		opacity: 0;
	}
	.hamburger.active .bar:nth-child(3) {
		transform: translateY(-8px) rotate(-45deg);
	}

	.philosophy-container {
		flex-direction: column;
		gap: 50px;
	}
	.philosophy-image::before {
		display: none;
	}
	.footer-grid {
		grid-template-columns: 1fr;
		gap: 40px;
	}
}

/* --- Logo Images Styling --- */

/* --- Logo Images Styling --- */
.logo-wrapper {
	display: flex;
	align-items: center;
	gap: 12px;
	position: relative; /* Essential for z-index to work */
	z-index: 1005; /* Keeps the entire logo area above the mobile menu overlay */
}

.nav-logo-img {
	height: 40px; /* 导航栏图片高度，可根据您的实际 Logo 比例调整 */
	width: auto;
	object-fit: contain;
}

/* Footer Logo 布局 */
.footer-logo-link {
	display: block; /* 确保图片独占一行 */
	margin-bottom: 15px; /* 控制图片和下方 NAMI 文字之间的距离 */
}

.footer-logo-img {
	height: 60px; /* Footer 图片可以稍微大一点 */
	width: auto;
	object-fit: contain;
}

@media (max-width: 768px) {
	.title {
		font-size: 3rem;
	}
	.menu-actions {
		flex-direction: column;
		gap: 20px;
	}
	.btn-text {
		margin-left: 0;
		margin-top: 15px;
	}
	.hero-actions {
		flex-direction: column;
	}
	.ml-4 {
		margin-left: 0;
	}
	.masonry-gallery {
		grid-template-columns: 1fr;
		grid-auto-rows: 250px;
	}
	.item-tall,
	.item-wide {
		grid-row: auto;
		grid-column: auto;
	}
}
