/*
Theme Name: Marlow Table Notes
Author: Rowan Vale Studio
Description: A mobile-first classic WordPress theme with warm restaurant-inspired styling, dynamic menus, flexible post grids, and block-friendly article layouts.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: tpr-theme
Tags: blog, food-and-drink, custom-logo, custom-menu, featured-images, responsive-layout, translation-ready
*/

:root {
	--tpr-cream: #fff4de;
	--tpr-paper: #fffaf0;
	--tpr-surface: #ffffff;
	--tpr-ink: #211711;
	--tpr-muted: #6f6258;
	--tpr-line: rgba(33, 23, 17, 0.13);
	--tpr-red: #d9271f;
	--tpr-tomato: #ef5537;
	--tpr-mustard: #f8b631;
	--tpr-green: #247a53;
	--tpr-shadow: 0 24px 70px rgba(111, 59, 28, 0.16);
	--tpr-radius-sm: 12px;
	--tpr-radius-md: 22px;
	--tpr-radius-lg: 34px;
	--tpr-width: 1180px;
	--tpr-space: clamp(18px, 5vw, 64px);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	color: var(--tpr-ink);
	background:
		radial-gradient(circle at top left, rgba(248, 182, 49, 0.28), transparent 32rem),
		linear-gradient(180deg, var(--tpr-cream), var(--tpr-paper) 42%, #fff 100%);
	font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.6;
	text-rendering: optimizeLegibility;
}

body.tpr-body {
	min-width: 320px;
}

a {
	color: inherit;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
}

a:hover,
a:focus {
	color: var(--tpr-red);
}

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

button,
input,
textarea,
select {
	font: inherit;
}

.tpr-skip-link {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 1000;
	padding: 10px 14px;
	color: #fff;
	background: var(--tpr-red);
	border-radius: 999px;
	transform: translateY(-160%);
	transition: transform 160ms ease;
}

.tpr-skip-link:focus {
	transform: translateY(0);
}

.tpr-screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.tpr-shell {
	width: min(calc(100% - 32px), var(--tpr-width));
	margin: 0 auto;
}

.tpr-site-header {
	position: sticky;
	top: 12px;
	z-index: 50;
	padding: 12px 0;
}

.tpr-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	width: min(calc(100% - 24px), var(--tpr-width));
	margin: 0 auto;
	padding: 10px 12px;
	background: rgba(255, 250, 240, 0.92);
	border: 1px solid var(--tpr-line);
	border-radius: 999px;
	box-shadow: 0 12px 40px rgba(75, 45, 24, 0.11);
	backdrop-filter: blur(16px);
}

.tpr-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	color: var(--tpr-ink);
	font-size: clamp(1rem, 2vw, 1.18rem);
	font-weight: 800;
	letter-spacing: 0;
	text-decoration: none;
}

.tpr-brand:hover,
.tpr-brand:focus {
	color: var(--tpr-ink);
}

.tpr-brand-text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tpr-custom-logo {
	width: 42px;
	height: 42px;
	object-fit: contain;
	border-radius: 999px;
}

.tpr-brand-mark {
	display: inline-grid;
	flex: 0 0 auto;
	place-items: center;
	width: 42px;
	height: 42px;
	color: #fff;
	background: var(--tpr-red);
	border-radius: 999px;
	font-size: 0.9rem;
	font-weight: 900;
}

.tpr-menu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	color: var(--tpr-ink);
	background: var(--tpr-mustard);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	box-shadow: inset 0 -2px 0 rgba(33, 23, 17, 0.18);
}

.tpr-menu-toggle:focus-visible {
	outline: 3px solid rgba(217, 39, 31, 0.28);
	outline-offset: 3px;
}

.tpr-menu-icon,
.tpr-menu-icon::before,
.tpr-menu-icon::after {
	display: block;
	width: 18px;
	height: 2px;
	background: currentColor;
	border-radius: 999px;
	content: "";
	transition: transform 160ms ease, opacity 160ms ease;
}

.tpr-menu-icon {
	position: relative;
}

.tpr-menu-icon::before,
.tpr-menu-icon::after {
	position: absolute;
	left: 0;
}

.tpr-menu-icon::before {
	top: -6px;
}

.tpr-menu-icon::after {
	top: 6px;
}

.tpr-menu-toggle[aria-expanded="true"] .tpr-menu-icon {
	background: transparent;
}

.tpr-menu-toggle[aria-expanded="true"] .tpr-menu-icon::before {
	transform: translateY(6px) rotate(45deg);
}

.tpr-menu-toggle[aria-expanded="true"] .tpr-menu-icon::after {
	transform: translateY(-6px) rotate(-45deg);
}

.tpr-primary-nav {
	position: absolute;
	top: calc(100% + 8px);
	right: 12px;
	left: 12px;
	display: none;
	padding: 12px;
	background: var(--tpr-surface);
	border: 1px solid var(--tpr-line);
	border-radius: 24px;
	box-shadow: var(--tpr-shadow);
}

.tpr-primary-nav.tpr-is-open {
	display: block;
}

.tpr-menu {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tpr-menu-item {
	margin: 0;
}

.tpr-menu-link {
	display: flex;
	align-items: center;
	min-height: 42px;
	padding: 10px 14px;
	color: var(--tpr-ink);
	border-radius: 999px;
	font-weight: 700;
	text-decoration: none;
}

.tpr-menu-link:hover,
.tpr-menu-link:focus,
.tpr-menu-item-current > .tpr-menu-link {
	color: #fff;
	background: var(--tpr-red);
}

.tpr-main {
	padding: 18px 0 0;
}

.tpr-hero {
	position: relative;
	overflow: hidden;
	padding: clamp(36px, 8vw, 86px) 0 clamp(36px, 7vw, 76px);
}

.tpr-hero-grid {
	display: grid;
	gap: 28px;
	align-items: center;
}

.tpr-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: fit-content;
	margin: 0 0 14px;
	padding: 7px 12px;
	color: var(--tpr-red);
	background: rgba(217, 39, 31, 0.08);
	border: 1px solid rgba(217, 39, 31, 0.16);
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 900;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.tpr-eyebrow::before {
	width: 8px;
	height: 8px;
	background: var(--tpr-mustard);
	border-radius: 999px;
	content: "";
}

.tpr-hero-title {
	max-width: 12ch;
	margin: 0;
	font-size: clamp(3rem, 11vw, 7.25rem);
	font-weight: 950;
	line-height: 0.92;
	letter-spacing: 0;
}

.tpr-hero-copy {
	max-width: 650px;
	margin: 18px 0 0;
	color: var(--tpr-muted);
	font-size: clamp(1rem, 2vw, 1.18rem);
}

.tpr-hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 26px;
}

.tpr-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 18px;
	color: #fff;
	background: var(--tpr-red);
	border: 1px solid var(--tpr-red);
	border-radius: 999px;
	font-weight: 900;
	text-decoration: none;
	box-shadow: 0 14px 28px rgba(217, 39, 31, 0.22);
	transition: transform 160ms ease, box-shadow 160ms ease;
}

.tpr-button:hover,
.tpr-button:focus {
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 18px 34px rgba(217, 39, 31, 0.28);
}

.tpr-button-secondary {
	color: var(--tpr-ink);
	background: var(--tpr-surface);
	border-color: var(--tpr-line);
	box-shadow: none;
}

.tpr-button-secondary:hover,
.tpr-button-secondary:focus {
	color: var(--tpr-red);
	background: #fff;
	box-shadow: 0 12px 28px rgba(33, 23, 17, 0.1);
}

.tpr-hero-visual {
	position: relative;
	min-height: 340px;
}

.tpr-hero-frame {
	position: relative;
	overflow: hidden;
	min-height: 340px;
	background:
		linear-gradient(135deg, rgba(248, 182, 49, 0.92), rgba(239, 85, 55, 0.92)),
		var(--tpr-mustard);
	border: 10px solid #fff;
	border-radius: var(--tpr-radius-lg);
	box-shadow: var(--tpr-shadow);
	transform: rotate(1.2deg);
}

.tpr-hero-frame::after {
	position: absolute;
	inset: auto -20% -18% auto;
	width: 70%;
	aspect-ratio: 1;
	background: rgba(255, 255, 255, 0.23);
	border-radius: 999px;
	content: "";
}

.tpr-hero-image {
	width: 100%;
	height: 100%;
	min-height: 340px;
	object-fit: cover;
}

.tpr-hero-placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	min-height: 340px;
	padding: 26px;
	color: #fff;
	font-size: clamp(2.8rem, 14vw, 7rem);
	font-weight: 950;
	line-height: 1;
	text-align: center;
}

.tpr-hero-badge {
	position: absolute;
	right: 10px;
	bottom: 14px;
	max-width: 220px;
	padding: 14px 16px;
	color: var(--tpr-ink);
	background: #fff;
	border: 1px solid var(--tpr-line);
	border-radius: 20px;
	box-shadow: 0 18px 42px rgba(33, 23, 17, 0.18);
	font-size: 0.92rem;
	font-weight: 800;
}

.tpr-section {
	padding: clamp(38px, 8vw, 86px) 0;
}

.tpr-section-alt {
	background: #fff;
}

.tpr-section-head {
	display: grid;
	gap: 14px;
	align-items: end;
	margin-bottom: 24px;
}

.tpr-section-title {
	max-width: 720px;
	margin: 0;
	font-size: clamp(2rem, 6vw, 4rem);
	font-weight: 950;
	line-height: 1;
	letter-spacing: 0;
}

.tpr-section-copy {
	max-width: 620px;
	margin: 0;
	color: var(--tpr-muted);
}

.tpr-category-strip {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.tpr-category-chip {
	display: grid;
	align-content: space-between;
	min-height: 112px;
	padding: 16px;
	color: var(--tpr-ink);
	background: var(--tpr-surface);
	border: 1px solid var(--tpr-line);
	border-radius: var(--tpr-radius-md);
	text-decoration: none;
	box-shadow: 0 12px 34px rgba(33, 23, 17, 0.07);
	transition: transform 160ms ease, border-color 160ms ease;
}

.tpr-category-chip:hover,
.tpr-category-chip:focus {
	color: var(--tpr-ink);
	border-color: rgba(217, 39, 31, 0.4);
	transform: translateY(-2px);
}

.tpr-category-name {
	font-weight: 900;
	line-height: 1.15;
}

.tpr-category-count {
	color: var(--tpr-muted);
	font-size: 0.88rem;
}

.tpr-post-grid {
	display: grid;
	gap: 18px;
}

.tpr-post-card {
	overflow: hidden;
	background: var(--tpr-surface);
	border: 1px solid var(--tpr-line);
	border-radius: var(--tpr-radius-lg);
	box-shadow: 0 16px 46px rgba(33, 23, 17, 0.08);
}

.tpr-card-media {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 1.22 / 1;
	color: #fff;
	background: linear-gradient(135deg, var(--tpr-red), var(--tpr-mustard));
	text-decoration: none;
}

.tpr-card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 220ms ease;
}

.tpr-card-media:hover .tpr-card-image,
.tpr-card-media:focus .tpr-card-image {
	transform: scale(1.035);
}

.tpr-card-empty {
	display: grid;
	place-items: center;
	padding: 28px;
	font-size: clamp(2.4rem, 15vw, 5.25rem);
	font-weight: 950;
	line-height: 1;
	text-align: center;
}

.tpr-card-body {
	padding: clamp(18px, 4vw, 26px);
}

.tpr-card-date,
.tpr-single-date {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--tpr-red);
	font-size: 0.82rem;
	font-weight: 900;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.tpr-card-date::before,
.tpr-single-date::before {
	width: 8px;
	height: 8px;
	background: var(--tpr-mustard);
	border-radius: 999px;
	content: "";
}

.tpr-card-title {
	margin: 10px 0 10px;
	font-size: clamp(1.45rem, 4vw, 2rem);
	font-weight: 950;
	line-height: 1.04;
	letter-spacing: 0;
}

.tpr-card-title a {
	text-decoration: none;
}

.tpr-card-excerpt {
	margin: 0;
	color: var(--tpr-muted);
}

.tpr-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 18px;
}

.tpr-read-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--tpr-ink);
	font-weight: 900;
	text-decoration: none;
}

.tpr-read-link::after {
	content: "→";
}

.tpr-empty-state {
	padding: 28px;
	color: var(--tpr-muted);
	background: rgba(255, 255, 255, 0.7);
	border: 1px dashed var(--tpr-line);
	border-radius: var(--tpr-radius-md);
}

.tpr-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 28px;
}

.tpr-pagination a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 10px 16px;
	color: var(--tpr-ink);
	background: #fff;
	border: 1px solid var(--tpr-line);
	border-radius: 999px;
	font-weight: 800;
	text-decoration: none;
}

.tpr-pagination a:hover,
.tpr-pagination a:focus {
	color: #fff;
	background: var(--tpr-red);
}

.tpr-single-wrap {
	padding: clamp(36px, 8vw, 86px) 0;
}

.tpr-single-shell {
	width: min(80vw, 980px);
	min-width: min(100% - 32px, 320px);
	margin: 0 auto;
}

.tpr-single {
	overflow-wrap: break-word;
}

.tpr-single-head {
	margin-bottom: clamp(24px, 5vw, 42px);
	padding: clamp(24px, 6vw, 54px);
	background: rgba(255, 255, 255, 0.72);
	border: 1px solid var(--tpr-line);
	border-radius: var(--tpr-radius-lg);
	box-shadow: var(--tpr-shadow);
}

.tpr-single-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 12px;
}

.tpr-single-category {
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	padding: 5px 10px;
	color: var(--tpr-red);
	background: rgba(217, 39, 31, 0.08);
	border: 1px solid rgba(217, 39, 31, 0.14);
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 900;
	text-decoration: none;
}

.tpr-single-title {
	margin: 12px 0 0;
	font-size: clamp(2.5rem, 8vw, 5.8rem);
	font-weight: 950;
	line-height: 0.98;
	letter-spacing: 0;
}

.tpr-single-excerpt {
	max-width: 760px;
	margin: 18px 0 0;
	color: var(--tpr-muted);
	font-size: clamp(1rem, 2vw, 1.18rem);
}

.tpr-single-content {
	color: var(--tpr-ink);
	font-size: clamp(1.02rem, 2vw, 1.16rem);
}

.tpr-single-content > * {
	margin-top: 0;
	margin-bottom: 1.25em;
}

.tpr-single-content h1,
.tpr-single-content h2,
.tpr-single-content h3,
.tpr-single-content h4,
.tpr-single-content h5,
.tpr-single-content h6 {
	margin-top: 1.6em;
	margin-bottom: 0.55em;
	line-height: 1.08;
	letter-spacing: 0;
}

.tpr-single-content h2 {
	font-size: clamp(2rem, 5vw, 3.4rem);
}

.tpr-single-content h3 {
	font-size: clamp(1.55rem, 4vw, 2.25rem);
}

.tpr-single-content p,
.tpr-single-content ul,
.tpr-single-content ol {
	max-width: 760px;
}

.tpr-single-content a {
	color: var(--tpr-red);
	font-weight: 800;
}

.tpr-single-content blockquote {
	margin-right: 0;
	margin-left: 0;
	padding: 18px 22px;
	color: var(--tpr-ink);
	background: var(--tpr-cream);
	border-left: 5px solid var(--tpr-red);
	border-radius: 0 var(--tpr-radius-sm) var(--tpr-radius-sm) 0;
	font-size: 1.1em;
	font-weight: 700;
}

.tpr-single-content table {
	width: 100%;
	border-collapse: collapse;
}

.tpr-single-content th,
.tpr-single-content td {
	padding: 12px;
	border: 1px solid var(--tpr-line);
	text-align: left;
}

.tpr-single-content pre {
	overflow-x: auto;
	padding: 18px;
	color: #fff;
	background: #211711;
	border-radius: var(--tpr-radius-sm);
}

.tpr-single-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 32px;
	padding-top: 22px;
	border-top: 1px solid var(--tpr-line);
}

.tpr-tag-link {
	display: inline-flex;
	min-height: 34px;
	align-items: center;
	padding: 6px 11px;
	color: var(--tpr-ink);
	background: #fff;
	border: 1px solid var(--tpr-line);
	border-radius: 999px;
	font-size: 0.85rem;
	font-weight: 800;
	text-decoration: none;
}

.tpr-post-nav {
	display: grid;
	gap: 12px;
	margin-top: 38px;
}

.tpr-post-nav-link {
	display: block;
	padding: 18px;
	color: var(--tpr-ink);
	background: #fff;
	border: 1px solid var(--tpr-line);
	border-radius: var(--tpr-radius-md);
	text-decoration: none;
}

.tpr-post-nav-label {
	display: block;
	color: var(--tpr-red);
	font-size: 0.78rem;
	font-weight: 900;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.tpr-post-nav-title {
	display: block;
	margin-top: 4px;
	font-size: 1.12rem;
	font-weight: 900;
	line-height: 1.2;
}

.tpr-comments {
	margin-top: 42px;
}

.tpr-site-footer {
	margin-top: clamp(36px, 8vw, 90px);
	color: #fff;
	background: var(--tpr-ink);
}

.tpr-footer-cta {
	display: grid;
	gap: 18px;
	align-items: center;
	padding: clamp(34px, 7vw, 74px) 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.tpr-footer-title {
	margin: 0;
	font-size: clamp(2rem, 6vw, 4.5rem);
	font-weight: 950;
	line-height: 0.98;
	letter-spacing: 0;
}

.tpr-footer-copy {
	max-width: 620px;
	margin: 0;
	color: rgba(255, 255, 255, 0.72);
}

.tpr-footer-bottom {
	display: grid;
	gap: 18px;
	padding: 24px 0 30px;
}

.tpr-footer-menu {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tpr-footer-menu .tpr-menu-link {
	min-height: auto;
	padding: 0;
	color: rgba(255, 255, 255, 0.76);
	background: transparent;
	border-radius: 0;
}

.tpr-footer-menu .tpr-menu-link:hover,
.tpr-footer-menu .tpr-menu-link:focus {
	color: #fff;
	background: transparent;
}

.tpr-footer-credit {
	margin: 0;
	color: rgba(255, 255, 255, 0.68);
	font-size: 0.94rem;
}

@media (min-width: 640px) {
	.tpr-category-strip {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.tpr-post-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tpr-post-card:first-child {
		grid-column: span 2;
	}
}

@media (min-width: 900px) {
	.tpr-menu-toggle {
		display: none;
	}

	.tpr-primary-nav {
		position: static;
		display: block;
		padding: 0;
		background: transparent;
		border: 0;
		border-radius: 0;
		box-shadow: none;
	}

	.tpr-menu {
		flex-direction: row;
		align-items: center;
		gap: 4px;
	}

	.tpr-menu-link {
		min-height: 42px;
		padding: 9px 14px;
		font-size: 0.95rem;
	}

	.tpr-hero-grid {
		grid-template-columns: minmax(0, 1.03fr) minmax(320px, 0.78fr);
		gap: clamp(36px, 6vw, 72px);
	}

	.tpr-section-head {
		grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.75fr);
	}

	.tpr-category-strip {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.tpr-post-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.tpr-post-card:first-child {
		grid-column: span 2;
	}

	.tpr-post-card:nth-child(5n) {
		grid-column: span 2;
	}

	.tpr-post-nav {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tpr-footer-cta {
		grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.7fr);
	}

	.tpr-footer-bottom {
		grid-template-columns: 1fr auto;
		align-items: center;
	}
}

@media (min-width: 1180px) {
	.tpr-hero-visual {
		min-height: 470px;
	}

	.tpr-hero-frame,
	.tpr-hero-image,
	.tpr-hero-placeholder {
		min-height: 470px;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}
