/*
Theme Name: Camelback Grill
Description: Custom mobile-first theme for Camelback Grill, a Mediterranean & East African restaurant in SeaTac, WA.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: camelback-grill
*/

/* ---------- Tokens ---------- */
:root {
	--cream: #f8f3ea;
	--cream-2: #efe6d6;
	--ink: #1c1814;
	--ink-2: #4a423a;
	--muted: #776b5f;
	--red: #b3141c;
	--red-dark: #8e0f15;
	--gold: #c99a3c;
	--line: #e2d7c4;
	--white: #fff;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(28, 24, 20, .06), 0 8px 24px rgba(28, 24, 20, .08);
	--font-display: "Fraunces", Georgia, "Times New Roman", serif;
	--font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--gutter: 16px;
	--header-h: 64px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 56px); }
body {
	margin: 0;
	background: var(--cream);
	color: var(--ink);
	font: 400 16px/1.6 var(--font-body);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
	padding-bottom: 72px; /* room for mobile call bar */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 8vw, 4rem); }
h2 { font-size: clamp(1.6rem, 5.5vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; margin-top: 32px; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
	font: 600 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--cream-2); color: var(--ink); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row .btn { flex: 1 1 auto; }

/* ---------- Topbar & header ---------- */
.topbar { display: none; background: var(--ink); color: #e9dfcf; font-size: .875rem; }
.topbar-inner { display: flex; justify-content: space-between; padding-top: 8px; padding-bottom: 8px; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }

.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(248, 243, 234, .94);
	backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-logo { width: 44px; height: 44px; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font: 700 1.15rem/1.1 var(--font-display); }
.brand-tag { font-size: .7rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav-toggle { width: 48px; height: 48px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; margin-right: -10px; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .25s; position: relative; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-open .nav-toggle-bar { background: transparent; }
.nav-open .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
	position: fixed; inset: var(--header-h) 0 auto 0;
	background: var(--cream); border-bottom: 1px solid var(--line);
	padding: 8px var(--gutter) 20px;
	display: none; flex-direction: column; gap: 8px;
	box-shadow: 0 16px 30px rgba(0, 0, 0, .12);
}
.nav-open .site-nav { display: flex; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.site-nav .nav-list a { display: block; padding: 14px 4px; font-size: 1.1rem; font-weight: 600; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.site-nav .current-menu-item > a { color: var(--red); }
.nav-cta { margin-top: 8px; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; color: #fff; min-height: min(88svh, 760px); display: flex; align-items: flex-end; background: var(--ink); overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20, 16, 12, .25) 0%, rgba(20, 16, 12, .55) 45%, rgba(20, 16, 12, .92) 100%); }
.hero-content { padding-top: 96px; padding-bottom: 40px; }
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero-lede { font-size: 1.1rem; max-width: 34em; color: #f1e8da; }
.hero-facts { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; }
.hero-facts li { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); padding: 6px 12px; border-radius: 999px; }

.eyebrow { font: 600 .78rem/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 12px; }
.eyebrow-light { color: var(--gold); }

/* ---------- Page hero ---------- */
.page-hero { background: var(--ink); color: #f1e8da; padding: 48px 0 40px; background-image: radial-gradient(circle at 85% 0%, rgba(179, 20, 28, .45), transparent 55%); }
.page-hero h1 { color: #fff; }
.page-hero p { max-width: 38em; margin: 0; }
.page-hero a { color: #fff; font-weight: 600; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--cream-2); }
.section-dark { background: var(--ink); color: #e9dfcf; }
.section-dark h2 { color: #fff; }
.section-head { margin-bottom: 28px; max-width: 40em; }
.section-head p:last-child { color: var(--muted); margin: 0; }

.split { display: grid; gap: 32px; align-items: center; }
.split-media img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split-form { align-items: start; }

/* ---------- Dish cards ---------- */
.dish-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.dish-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.dish-media { aspect-ratio: 4 / 3; background: var(--cream-2); overflow: hidden; }
.dish-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.dish-card:hover .dish-media img { transform: scale(1.04); }
.dish-body { padding: 16px 18px 18px; }
.dish-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dish-name { font: 700 1.12rem/1.25 var(--font-display); margin: 0; }
.dish-price { font-weight: 700; color: var(--red); white-space: nowrap; font-variant-numeric: tabular-nums; }
.dish-desc { color: var(--muted); font-size: .92rem; margin: 6px 0 0; }

/* ---------- Category cards ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cat-card { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; display: flex; align-items: flex-end; text-decoration: none; color: #fff; background: var(--ink); }
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.cat-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, .78)); }
.cat-card:hover img { transform: scale(1.05); }
.cat-card:hover { color: #fff; }
.cat-label { position: relative; z-index: 1; padding: 12px 14px; font: 700 1.05rem/1.2 var(--font-display); }
.cat-label small { display: block; font: 500 .75rem/1.4 var(--font-body); opacity: .85; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--red); color: #fff; padding: 44px 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #fde6e2; margin: 0; }
.cta-inner { display: grid; gap: 20px; }

/* ---------- Visit / map ---------- */
.info-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 14px; }
.info-list li { display: grid; gap: 2px; }
.info-label { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.info-list a { color: var(--ink); font-weight: 600; text-decoration: none; }
.visit-grid { display: grid; gap: 28px; }
.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--cream-2); aspect-ratio: 4 / 3; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Features ---------- */
.feature-grid { display: grid; gap: 16px; }
.feature { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); border-top: 4px solid var(--red); }
.feature h2 { font-size: 1.3rem; }
.feature p { color: var(--ink-2); margin: 0; }

/* ---------- Menu page ---------- */
.menu-tabs { position: sticky; top: var(--header-h); z-index: 40; background: var(--cream); border-bottom: 1px solid var(--line); }
.menu-tabs-inner { display: flex; gap: 8px; overflow-x: auto; padding-top: 10px; padding-bottom: 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.menu-tabs-inner::-webkit-scrollbar { display: none; }
.menu-tabs a { flex: 0 0 auto; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.menu-tabs a.is-active, .menu-tabs a:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.menu-wrap { padding-top: 32px; padding-bottom: 48px; }
.menu-section { padding: 16px 0 32px; }
.menu-section > h2 { display: flex; align-items: center; gap: 14px; }
.menu-section > h2::after { content: ""; flex: 1; height: 2px; background: var(--line); }
.menu-section-desc { color: var(--muted); }
.menu-list { list-style: none; padding: 18px; margin: 16px 0 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.menu-list li { display: flex; align-items: baseline; gap: 8px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.menu-list li:last-child { border-bottom: 0; }
.menu-list-name { font-weight: 600; }
.menu-list-name small { display: block; font-weight: 400; color: var(--muted); }
.menu-list-dots { flex: 1; }
.menu-note { color: var(--muted); font-size: .9rem; text-align: center; margin-top: 16px; }

/* ---------- Forms ---------- */
.card { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.cbg-form { display: grid; gap: 14px; }
.form-grid { display: grid; gap: 14px; }
.form-row { display: grid; gap: 6px; }
.form-row label { font-weight: 600; font-size: .92rem; }
.cbg-form input, .cbg-form textarea {
	width: 100%; font: inherit; font-size: 16px; /* prevents iOS zoom */
	padding: 12px 14px; border: 1px solid #d3c6b0; border-radius: 10px; background: #fffdf9; color: var(--ink);
}
.cbg-form input:focus, .cbg-form textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(179, 20, 28, .15); }
.form-notice { padding: 12px 14px; border-radius: 10px; margin: 0; font-weight: 500; }
.form-notice-ok { background: #e7f4ea; color: #1d5b2c; }
.form-notice-err { background: #fdeaea; color: #8e0f15; }

/* ---------- Prose ---------- */
.prose { max-width: 760px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cfc3b1; padding: 48px 0 0; font-size: .95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
.footer-logo { width: 72px; height: 72px; border-radius: 50%; margin-bottom: 12px; }
.footer-title { font: 600 .78rem/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.site-footer .nav-list li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 36px; padding-top: 18px; padding-bottom: 18px; font-size: .85rem; }
.footer-bottom p { margin: 0; }

/* ---------- Mobile call bar ---------- */
.mobile-call {
	position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 60;
	display: flex; align-items: center; justify-content: center; gap: 10px;
	min-height: 52px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 700; text-decoration: none;
	box-shadow: 0 10px 24px rgba(142, 15, 21, .35);
}
.mobile-call:hover { color: #fff; background: var(--red-dark); }

/* ---------- ≥ 640px (large phones / small tablets) ---------- */
@media (min-width: 640px) {
	:root { --gutter: 24px; }
	.dish-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
	.cat-grid { grid-template-columns: repeat(3, 1fr); }
	.form-grid { grid-template-columns: 1fr 1fr; }
	.feature-grid { grid-template-columns: repeat(3, 1fr); }
	.btn-row .btn { flex: 0 0 auto; }
	.card { padding: 28px; }
}

/* ---------- ≥ 900px (tablet landscape / desktop) ---------- */
@media (min-width: 900px) {
	:root { --header-h: 76px; }
	body { padding-bottom: 0; }
	.mobile-call { display: none; }
	.topbar { display: block; }
	.brand-logo { width: 54px; height: 54px; }
	.brand-name { font-size: 1.3rem; }
	.nav-toggle { display: none; }
	.site-nav { position: static; display: flex; flex-direction: row; align-items: center; gap: 28px; padding: 0; background: none; border: 0; box-shadow: none; }
	.nav-list { display: flex; gap: 26px; }
	.site-nav .nav-list a { padding: 6px 0; border: 0; font-size: 1rem; position: relative; }
	.site-nav .nav-list a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--red); transform: scaleX(0); transition: transform .25s; }
	.site-nav .nav-list a:hover::after, .site-nav .current-menu-item > a::after { transform: scaleX(1); }
	.nav-cta { margin: 0; min-height: 44px; padding: 10px 20px; }
	.hero { align-items: center; }
	.hero-content { padding-top: 120px; padding-bottom: 120px; }
	.hero::after { background: linear-gradient(90deg, rgba(20, 16, 12, .9) 0%, rgba(20, 16, 12, .6) 45%, rgba(20, 16, 12, .1) 100%); }
	.hero h1, .hero-lede { max-width: 13em; }
	.hero-lede { max-width: 30em; font-size: 1.2rem; }
	.page-hero { padding: 72px 0 60px; }
	.section { padding: 88px 0; }
	.split { grid-template-columns: 1fr 1fr; gap: 56px; }
	.split-form { grid-template-columns: 5fr 7fr; }
	.dish-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
	.cat-grid { grid-template-columns: repeat(5, 1fr); gap: 16px; }
	.cat-card { aspect-ratio: 3 / 4; }
	.cta-inner { grid-template-columns: 1fr auto; align-items: center; gap: 40px; }
	.visit-grid { grid-template-columns: 5fr 7fr; align-items: center; gap: 56px; }
	.map { aspect-ratio: 16 / 11; }
	.menu-list { columns: 2; column-gap: 40px; padding: 24px 28px; }
	.menu-list li { break-inside: avoid; }
	.footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
	.footer-brand { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; }
}
