:root {
	color-scheme: dark;
	--gold: #dfc36f;
	--gold-light: #f1dda0;
	--gold-dark: #91763a;
	--cream: #fffefa;
	--ink: #f7f6f2;
	--muted: #dedbd2;
	--serif: Georgia, "Times New Roman", serif;
	--sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 142px; }
body { margin: 0; min-width: 320px; background: linear-gradient(145deg, #050505 0%, #111111 52%, #080808 100%); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }

/* =========================================
   MOBILE FIRST (Base Styles)
   ========================================= */

.site-header, .page { width: min(100% - 24px, 520px); margin: 0 auto; }
.site-header { padding: 17px 0 12px; color: var(--cream); }

/* Header Frame - Mobile Base */
.brand-row { 
	display: flex; 
	flex-direction: column; 
	gap: 15px; 
	padding-bottom: 20px; 
	border-bottom: 1px solid #ffffff42; 
	align-items: center; 
	text-align: center;
}

.brand-frame {
	display: flex;
	flex-direction: column; 
	align-items: center;
	gap: 10px;
}

.brand-logo {
	width: 150px;
	height: 121px;
	object-fit: contain;
}

.brand-text {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.brand-name { 
	font-weight: 800; 
	font-size: 30px;
	letter-spacing: .05em; 
	text-transform: uppercase; 
	color: var(--cream);
}

.brand-kicker { 
	color: var(--gold); 
	font-size: 15px; 
	letter-spacing: .1em; 
	text-transform: uppercase;
	margin-top: 4px;
}

.contact-frame {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: center; 
}

.contact-item {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--muted);
	font-size: 14px;
}

.contact-item svg {
	color: var(--gold);
	flex-shrink: 0;
}

.contact-item a {
	color: var(--muted);
	text-decoration: none;
	font-weight: 600;
}

.contact-item a:hover {
	color: var(--gold);
}

/* Hero */
.hero { display: grid; grid-template-columns: 1fr; gap: 15px; padding: 20px 0 5px; }
.hero-copy { padding: 3px 0; }
.eyebrow { margin: 0 0 8px; color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
h1 { margin: 0; color: var(--cream); font: 700 38px/1.06 var(--serif); letter-spacing: 0; }
.hero-copy p:last-child { max-width: 470px; margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

/* Photo Strip */
.photo-viewport { width: 100%; height: 112px; overflow: hidden; position: relative; }
.photo-strip { display: flex; width: max-content; height: 100%; gap: 6px; animation: scroll-carousel 60s linear infinite !important; will-change: transform; }
.photo-viewport:hover .photo-strip, .photo-viewport:active .photo-strip { animation-play-state: paused; }
.photo-card { position: relative; flex: 0 0 35vw; min-width: 0; overflow: hidden; border: 1px solid #dfc36f88; border-radius: 6px; background: #111; }
.photo-card img { width: 100%; height: 100%; object-fit: cover; display: block; object-position: center; -webkit-user-drag: none; user-select: none; }
.photo-label { position: absolute; inset: auto 0 0; padding: 18px 6px 6px; background: linear-gradient(transparent, #170907e8); color: white; font-size: 9px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@keyframes scroll-carousel { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Menu Controls (Mobile Dropdowns) */
.menu-controls { position: relative; margin: 0 -1px; padding: 8px; display: grid; grid-template-columns: 1fr; align-items: center; gap: 7px; border: 1px solid var(--gold-dark); border-radius: 11px 11px 0 0; background: linear-gradient(160deg, #171717, #0c0c0c 65%, #141414); box-shadow: 0 9px 24px #0009; z-index: 10; }
.search { min-width: 0; height: 37px; display: flex; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid #dfc36f80; border-radius: 5px; background: #101010; }
.search svg { flex: 0 0 auto; color: var(--gold); }
.search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.search input::placeholder { color: #c9c5bb; }

/* Mobile Hamburger Menu */
.mobile-nav-row { display: flex; gap: 6px; margin-top: 5px; width: 100%; }
.mobile-menu-toggle { display: flex; align-items: center; justify-content: center; background: var(--gold); color: #111; border: none; border-radius: 5px; padding: 8px 12px; cursor: pointer; margin-top: 0; flex-shrink: 0; }
.mobile-kaikki-btn { flex: 1; background: transparent; color: var(--gold); border: 1px solid var(--gold); border-radius: 5px; padding: 8px 12px; font-weight: 700; cursor: pointer; }

.categories { display: none; flex-direction: column; width: 100%; background: #171717; border: 1px solid var(--gold-dark); border-radius: 5px; padding: 10px; margin-top: 5px; position: absolute; top: 100%; left: 0; z-index: 20; box-shadow: 0 10px 20px rgba(0,0,0,0.5); }
.categories.open { display: flex; }
.category-button { width: 100%; text-align: left; padding: 12px; border-bottom: 1px solid #ffffff10; border-radius: 0; background: transparent; color: var(--cream); font-size: 13px; font-weight: 700; cursor: pointer; transition: background .18s ease, color .18s ease; }
.category-button:last-child { border-bottom: none; }
.category-button:hover { background: #ffffff18; }
.category-button[aria-pressed="true"] { background: var(--gold); color: #111; }

/* Menu Grid */
.menu-grid { padding: 10px 0 18px; display: grid; grid-template-columns: 1fr; gap: 10px; align-items: start; }
.category-panel { min-width: 0; overflow: hidden; border: 1px solid var(--gold-dark); border-radius: 10px; background: linear-gradient(160deg, #161616 0%, #0b0b0b 70%, #121212 100%); box-shadow: 0 14px 25px -12px #000c, inset 0 1px 2px #ffffff12; scroll-margin-top: 120px; }
.category-panel[hidden], .menu-item[hidden] { display: none !important; }

.panel-heading { min-height: 52px; padding: 11px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--gold-dark); background: linear-gradient(90deg, #050505, #1b1b1b 25%, #080808 50%, #1b1b1b 75%, #050505); background-size: 300% 100%; animation: header-flow 9s linear infinite; color: var(--gold-light); list-style: none; cursor: pointer; }
.panel-heading::-webkit-details-marker { display: none; }
.panel-heading::marker { content: ""; }
.panel-meta { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.panel-chevron { flex: 0 0 auto; width: 9px; height: 9px; border-right: 2px solid var(--gold-light); border-bottom: 2px solid var(--gold-light); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease; display: inline-block; }
.category-panel[open] > .panel-heading .panel-chevron { transform: rotate(-135deg) translate(-2px, -2px); }
.panel-heading h2 { margin: 0; font: 800 16px/1.2 var(--sans); }
.panel-count { flex: 0 0 auto; padding: 4px 8px; border: 1px solid #dfc36f80; border-radius: 30px; background: #ffffff0c; color: var(--cream); font-size: 10px; font-weight: 700; white-space: nowrap; }

.panel-body { padding: 8px 12px 11px; }
.category-panel .panel-heading { animation: none; }
.category-panel:not([open]) > .panel-body { display: none; }
.category-panel[data-category="pizzat"] .panel-body { display: block; }
.panel-note { margin: 0 0 7px; padding: 0 0 9px; border-bottom: 1px solid #dfc36f50; color: var(--muted); font-size: 11px; line-height: 1.5; white-space: pre-line; }

.menu-item { padding: 8px 1px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; border-bottom: 1px dashed #dfc36f45; }
.menu-item:last-child { border-bottom: 0; }
.item-name { margin: 0; color: var(--gold); font: 700 13px/1.3 var(--sans); }
.item-description { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.item-price { max-width: 155px; color: var(--gold-light); font-size: 11px; font-weight: 800; line-height: 1.4; text-align: right; white-space: pre-line; }

.empty-state { display: none; margin: 14px 0 26px; padding: 28px 15px; border: 1px dashed var(--gold-dark); border-radius: 10px; background: #121212; color: var(--cream); text-align: center; }
.empty-state.visible { display: block; }
.footer { margin: 3px 0 20px; padding: 14px 4px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.footer strong { color: var(--gold); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@keyframes header-flow { from { background-position: 0 50%; } to { background-position: 100% 50%; } }


/* =========================================
   TABLET & DESKTOP (Min-Width)
   ========================================= */

@media (min-width: 651px) {
	html { scroll-padding-top: 132px; }
	.site-header, .page { width: min(100% - 40px, 1200px); }
	.site-header { padding: 25px 0 18px; }
	
	/* Header Frame - Desktop Override */
	.brand-row { 
		flex-direction: row; 
		justify-content: space-between; 
		align-items: flex-end; 
		text-align: left;
	}
	
	.brand-frame {
		flex-direction: row; 
		align-items: center;
		gap: 20px;
	}
	
	.brand-text {
		align-items: flex-start;
	}
	
	.brand-logo {
		width: 150px; 
		height: 121px;
	}

	.brand-name { 
		font-size: 50px; 
	}
	
	.brand-kicker { 
		font-size: 15px; 
	}
	
	.contact-frame {
		align-items: flex-end; 
	}
	
	/* Hero becomes side-by-side */
	.hero { grid-template-columns: 1fr 1.8fr; gap: 38px; padding: 25px 0 7px; }

	h1 { font-size: clamp(34px, 4vw, 52px); }
	.hero-copy p:last-child { margin-top: 12px; font-size: 13px; }
	
	/* Photo Strip */
	.photo-viewport { height: 155px; }
	.photo-strip { gap: 8px; }
	.photo-card { flex: 0 0 200px; border-radius: 9px; }
	.photo-label { padding: 22px 9px 8px; font-size: 10px; }

	/* Controls / Categories (Desktop View) */
	.menu-controls { margin: 0; padding: 10px; gap: 10px; }
	.mobile-nav-row { display: none; }
	
	.categories { 
		display: flex; 
		flex-direction: row; 
		position: static; 
		width: auto; 
		background: transparent; 
		border: none; 
		padding: 0; 
		box-shadow: none; 
		overflow-x: auto; 
		gap: 5px; 
		margin-top: 0;
	}
	
	.category-button { 
		width: auto; 
		text-align: center; 
		padding: 7px 11px; 
		border: 1px solid transparent; 
		border-radius: 5px; 
		font-size: 11px; 
		min-height: 35px;
	}
	.category-button[aria-pressed="true"] { border-color: var(--gold); background: var(--gold); color: #111; }
	.category-button:hover { background: #ffffff18; }

	/* Menu Grid */
	.menu-grid { display: grid; gap: 12px; padding-top: 10px; }
	.menu-item { padding: 9px 2px; }
	.item-name { font-size: 13px; }
	.item-description { font-size: 10px; }

	/* Panel Headings (Open by default) */
	.panel-heading { min-height: 58px; animation: header-flow 9s linear infinite; pointer-events: none; }
	.panel-heading h2 { font-size: 17px; }
	.panel-chevron { display: none; }
	.category-panel:not([open]) > .panel-body { display: block; }
	
	.footer { flex-direction: row; justify-content: space-between; gap: 18px; }
}

/* Tablet specifically (2 columns) */
@media (min-width: 651px) and (max-width: 950px) {
	.menu-controls { grid-template-columns: 1fr; }
	.menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.category-panel[data-category="pizzat"] .panel-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
	.category-panel[data-category="pizzat"] .panel-note { grid-column: 1 / -1; }
}

/* Desktop specifically (3 columns + boxed) */
@media (min-width: 951px) {
	.menu-controls { grid-template-columns: minmax(220px, 270px) minmax(0, 1fr); }
	.menu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	
	.category-panel[data-category="pizzat"] { grid-column: 1 / -1; }
	.category-panel[data-category="pizzat"] .panel-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 18px; }
	.category-panel[data-category="pizzat"] .panel-note { grid-column: 1 / -1; }

	/* The 3 images sit side-by-side at the bottom of Pizzat */
	.category-panel[data-category="pizzat"] .menu-item {
		grid-column: span 1;
	}
	.category-panel[data-category="pizzat"] .panel-decor {
		grid-column: span 1;
		height: 140px;
		margin-top: 12px;
		margin-left: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* --- Category Decoration Image --- */
.panel-decor {
	width: 100%;
	height: 140px;
	object-fit: cover;
	border-radius: 6px;
	margin-top: 12px;
	border: 1px solid var(--gold-dark);
	opacity: 0.8;
}

@media (max-width: 650px) {
	.panel-decor { 
		display: block; 
		height: 120px;
		margin-top: 8px;
	}
	
	/* Stack Pizzat images vertically on mobile */
	.category-panel[data-category="pizzat"] .panel-body {
		display: flex;
		flex-direction: column;
	}

	/* Hide the 2nd and 3rd pizza images on mobile */
	.category-panel[data-category="pizzat"] .panel-decor:nth-of-type(n+2) {
		display: none;
	}
}

/* --- Active Menu Highlighting (Dark Metallic Gold) --- */

/* 1. When a menu is OPEN, turn the bar into a dark gold gradient */
.category-panel[open] > .panel-heading {
	background: linear-gradient(90deg, #5c4515 0%, #b8963e 50%, #5c4515 100%) !important;
	background-size: 100% 100% !important;
	color: #111 !important;
	border-bottom: 1px solid #3a2a0a !important;
}

/* 2. Make the title and count text dark so it contrasts with the gold */
.category-panel[open] > .panel-heading h2,
.category-panel[open] > .panel-heading .panel-count {
	color: #111 !important;
	border-color: #111 !important;
	background: transparent !important;
}

/* 3. Make the chevron (arrow) dark */
.category-panel[open] > .panel-heading .panel-chevron {
	border-color: #111 !important;
}