/* =========================================================
   Hot Sak's - Thai recipes
   Palette taken from Header.jpg: chilli red, lime, galangal,
   garlic cream and the dark background, plus temple gold.
   ========================================================= */

:root {
	--ink: #1f1410;
	--ink-2: #2e1e17;
	--chilli: #c62a1e;
	--chilli-deep: #8c1a14;
	--gold: #d9a63a;
	--gold-soft: #f0d38a;
	--lime: #9cbf2b;
	--lime-deep: #5f7d12;
	--galangal: #d9bb8c;
	--paper: #f7efdf;
	--paper-2: #efe2c8;
	--card: #fffaf0;
	--text: #2b1d16;
	--muted: #6d5646;
	--radius: 10px;
	--shadow: 0 6px 18px rgba(48, 22, 10, .14);
	--display: "Chonburi", Georgia, "Times New Roman", serif;
	--body: "Sarabun", "Segoe UI", Tahoma, Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: var(--body);
	font-size: 1.0625rem;
	line-height: 1.65;
	color: var(--text);
	background-color: var(--paper);
	/* faint woven-silk diamonds */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M14 2 L26 14 L14 26 L2 14 Z' fill='none' stroke='%23c9a465' stroke-opacity='.16' stroke-width='1'/%3E%3Ccircle cx='14' cy='14' r='1.4' fill='%23c62a1e' fill-opacity='.10'/%3E%3C/svg%3E");
}

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

a { color: var(--chilli-deep); text-underline-offset: 2px; }
a:hover { color: var(--chilli); }

h1, h2, h3 {
	font-family: var(--display);
	font-weight: 400;
	line-height: 1.2;
	color: var(--chilli-deep);
	margin: 0 0 .5em;
}
h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

.skip {
	position: absolute; left: -999px; top: 0;
	background: var(--gold); color: var(--ink); padding: 8px 14px; z-index: 10;
}
.skip:focus { left: 8px; }

/* ---------- Temple-eave band (lai thai) ---------- */
.band {
	height: 22px;
	background-color: var(--chilli-deep);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='22' viewBox='0 0 28 22'%3E%3Crect y='20' width='28' height='2' fill='%23d9a63a'/%3E%3Cpath d='M1 20 C6 18 9 13 14 2 C19 13 22 18 27 20 Z' fill='%23d9a63a'/%3E%3Cpath d='M6 20 C9.5 18.5 12 15.5 14 9.5 C16 15.5 18.5 18.5 22 20 Z' fill='%238c1a14'/%3E%3Ccircle cx='14' cy='16.6' r='1.6' fill='%23f0d38a'/%3E%3Ccircle cx='0' cy='4' r='1.3' fill='%23d9a63a'/%3E%3Ccircle cx='28' cy='4' r='1.3' fill='%23d9a63a'/%3E%3C/svg%3E");
	background-repeat: repeat-x;
	background-position: center bottom;
	border-top: 2px solid var(--gold);
}
.band.flip { transform: scaleY(-1); }

/* ---------- Header ---------- */
.site-head {
	position: relative;
	background-color: var(--ink);
	background-image:
		linear-gradient(90deg, rgba(20, 11, 8, .92) 0%, rgba(20, 11, 8, .55) 38%, rgba(20, 11, 8, .05) 75%),
		url("Header.jpg");
	background-size: cover;
	background-position: center;
	color: #fff6e3;
}
.site-head .inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 26px 20px 24px;
	min-height: 168px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.kicker {
	font-size: .78rem;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--gold-soft);
	margin: 0 0 4px;
	font-weight: 600;
}
.brand {
	font-family: var(--display);
	font-size: clamp(2.3rem, 7vw, 4rem);
	line-height: 1.05;
	color: #fff6e3;
	text-decoration: none;
	text-shadow: 0 3px 0 var(--chilli-deep), 0 6px 18px rgba(0, 0, 0, .55);
	align-self: flex-start;
}
.brand:hover { color: #fff; }
.tagline {
	margin: 8px 0 0;
	font-size: 1.02rem;
	color: #f3e6cc;
	max-width: 30em;
	text-shadow: 0 1px 6px rgba(0, 0, 0, .7);
}

/* ---------- Page layout ---------- */
.layout {
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 16px 40px;
	display: grid;
	gap: 24px;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "nav" "main" "side";
}
.nav-col { grid-area: nav; }
.main-col { grid-area: main; min-width: 0; }
.side-col { grid-area: side; min-width: 0; }

@media (min-width: 760px) {
	.layout {
		grid-template-columns: 230px minmax(0, 1fr);
		grid-template-areas: "nav main" "nav side";
		padding: 30px 20px 48px;
	}
}
@media (min-width: 1100px) {
	.layout {
		grid-template-columns: 240px minmax(0, 1fr) 270px;
		grid-template-areas: "nav main side";
	}
	.layout.wide {
		grid-template-columns: 240px minmax(0, 1fr);
		grid-template-areas: "nav main" "nav side";
	}
}

/* ---------- Recipe menu ---------- */
.recipe-nav {
	background: var(--ink);
	color: #f6ead2;
	border-radius: var(--radius);
	border-top: 4px solid var(--gold);
	box-shadow: var(--shadow);
	overflow: hidden;
}
.recipe-nav h2 {
	color: var(--gold-soft);
	font-size: 1.3rem;
	margin: 0;
	padding: 16px 18px 10px;
}
.nav-toggle {
	display: none;
	width: 100%;
	border: 0;
	background: transparent;
	color: var(--gold-soft);
	font: inherit;
	font-family: var(--display);
	font-size: 1.15rem;
	text-align: left;
	padding: 14px 18px;
	cursor: pointer;
}
.nav-toggle::after {
	content: "+";
	float: right;
	font-family: var(--body);
	font-weight: 700;
	font-size: 1.4rem;
	line-height: 1;
}
.recipe-nav.open .nav-toggle::after { content: "\2013"; }

.recipe-nav ul { list-style: none; margin: 0; padding: 0 0 10px; }
.recipe-nav li a {
	display: block;
	position: relative;
	padding: 9px 16px 9px 34px;
	text-decoration: none;
	color: #fbf1dc;
	border-top: 1px solid rgba(217, 166, 58, .16);
	line-height: 1.3;
}
.recipe-nav li a::before {
	content: "";
	position: absolute;
	left: 15px; top: 15px;
	width: 8px; height: 8px;
	background: var(--chilli);
	transform: rotate(45deg);
	transition: background .15s;
}
.recipe-nav .th { display: block; font-weight: 600; }
.recipe-nav .en { display: block; font-size: .82rem; color: var(--galangal); }
.recipe-nav li a:hover, .recipe-nav li a:focus { background: var(--ink-2); color: #fff; }
.recipe-nav li a:hover::before { background: var(--lime); }
.recipe-nav li a.current { background: var(--chilli-deep); }
.recipe-nav li a.current::before { background: var(--gold); }
.recipe-nav li a.current .en { color: var(--gold-soft); }
.recipe-nav .home-link a::before { background: var(--gold); }

.nav-ad { margin-top: 20px; }

@media (max-width: 759px) {
	.js .nav-toggle { display: block; }
	.js .recipe-nav h2 { display: none; }
	.js .recipe-nav ul { display: none; }
	.js .recipe-nav.open ul { display: block; }
	/* on phones the sidebar and footer ads still show; this one would push the recipe down */
	.nav-ad { display: none; }
}

/* ---------- Generic panels ---------- */
.panel {
	background: var(--card);
	border: 1px solid #e6d5b3;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 22px 22px 8px;
	margin-bottom: 24px;
}
.panel-title {
	display: flex;
	align-items: center;
	gap: 10px;
}
.panel-title::before {
	content: "";
	flex: 0 0 34px;
	height: 18px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='18' viewBox='0 0 34 18'%3E%3Cpath d='M17 1 C21.5 6 21.5 12 17 17 C12.5 12 12.5 6 17 1 Z' fill='%23c62a1e'/%3E%3Cpath d='M17 17 C11 16 6 11.5 4 6 C10 6.5 14.5 11 17 17 Z' fill='%23d9a63a'/%3E%3Cpath d='M17 17 C23 16 28 11.5 30 6 C24 6.5 19.5 11 17 17 Z' fill='%23d9a63a'/%3E%3Cpath d='M1 17 H33' stroke='%239cbf2b' stroke-width='2'/%3E%3C/svg%3E") no-repeat center;
}

/* ---------- Home page ---------- */
.welcome {
	display: grid;
	gap: 22px;
	grid-template-columns: minmax(0, 1fr);
	align-items: start;
}
@media (min-width: 600px) {
	.welcome { grid-template-columns: 190px minmax(0, 1fr); }
}
.arch {
	margin: 0 auto;
	width: 190px;
	padding: 6px;
	background: var(--gold);
	border-radius: 999px 999px 14px 14px;
	box-shadow: var(--shadow);
}
.arch img {
	display: block;
	width: 100%;
	height: 260px;
	object-fit: cover;
	object-position: 50% 30%;
	border-radius: 999px 999px 10px 10px;
	border: 3px solid var(--card);
}
.arch figcaption {
	text-align: center;
	font-family: var(--display);
	color: var(--ink);
	font-size: .95rem;
	padding: 6px 0 2px;
}
.chokdee {
	display: inline-block;
	background: var(--lime-deep);
	color: #fff;
	padding: 6px 14px;
	border-radius: 999px;
	font-weight: 600;
}

.cards {
	list-style: none;
	margin: 0 0 24px;
	padding: 0;
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
.card a {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--card);
	border-radius: var(--radius);
	overflow: hidden;
	text-decoration: none;
	color: var(--text);
	box-shadow: var(--shadow);
	border-bottom: 4px solid var(--chilli);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s;
}
.card a:hover, .card a:focus {
	transform: translateY(-4px);
	box-shadow: 0 12px 26px rgba(48, 22, 10, .22);
	border-color: var(--lime);
}
.card .pic, .card .txt { display: block; }
.card .pic {
	aspect-ratio: 4 / 3;
	background: var(--paper-2);
	overflow: hidden;
}
.card .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .txt { padding: 12px 14px 14px; }
.card .th {
	display: block;
	font-family: var(--display);
	color: var(--chilli-deep);
	font-size: 1.08rem;
	line-height: 1.25;
}
.card .en { display: block; font-size: .9rem; color: var(--muted); margin-top: 3px; }

/* ---------- Glossary ---------- */
.glossary dl {
	margin: 0 0 14px;
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0;
}
.glossary dt, .glossary dd {
	margin: 0;
	padding: 7px 0;
	border-bottom: 1px dashed #dcc69c;
}
.glossary dt { font-weight: 700; color: var(--chilli-deep); padding-right: 14px; }
.glossary dd { color: var(--text); }
.side-ad { margin-top: 8px; }

/* ---------- Recipe page ---------- */
.crumbs { font-size: .9rem; margin: 0 0 10px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.recipe-title {
	border-bottom: 3px double var(--gold);
	padding-bottom: 12px;
	margin-bottom: 22px;
}
.recipe-title h1 { margin-bottom: 4px; }
.recipe-title .en {
	margin: 0;
	font-size: 1.15rem;
	font-style: italic;
	color: var(--muted);
}

.recipe {
	display: grid;
	gap: 24px;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "ing" "method";
}
.ingredients { grid-area: ing; }
.method { grid-area: method; min-width: 0; }
@media (min-width: 1000px) {
	.recipe {
		grid-template-columns: minmax(0, 1fr) 280px;
		grid-template-areas: "method ing";
		align-items: start;
	}
	.ingredients { position: sticky; top: 16px; }
}

.ingredients .panel { border-top: 5px solid var(--lime); }
.ing-list { list-style: none; margin: 0 0 14px; padding: 0; }
.ing-list li {
	position: relative;
	padding: 7px 4px 7px 30px;
	border-bottom: 1px dashed #dcc69c;
	cursor: pointer;
	line-height: 1.35;
	user-select: none;
}
.ing-list li::before {
	content: "";
	position: absolute;
	left: 3px; top: 9px;
	width: 16px; height: 16px;
	border: 2px solid var(--lime-deep);
	border-radius: 4px;
	background: #fff;
}
.ing-list li.got { color: var(--muted); text-decoration: line-through; }
.ing-list li.got::before {
	background: var(--lime-deep) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5 L6.5 12 L13 4.5' fill='none' stroke='%23fff' stroke-width='2.4'/%3E%3C/svg%3E") no-repeat center / 12px;
}
.ing-hint { font-size: .85rem; color: var(--muted); }

.method .panel { padding-bottom: 14px; }
.method p { margin-bottom: 1.1em; }
.method img {
	border: 0 !important;
	border-radius: 8px;
	padding: 5px;
	background: #fff;
	box-shadow: var(--shadow);
	margin: 4px 0;
}
/* Old left/right aligned photos sit side by side instead of squeezing the text */
.method img[align="left"], .method img[align="right"] {
	float: none !important;
	display: inline-block;
	vertical-align: top;
	max-width: calc(50% - 12px);
	margin: 4px 4px 12px;
}
.method p[align="center"], .method div[align="center"] { text-align: center; }
.method::after, .method .panel::after { content: ""; display: block; clear: both; }

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 6px 0 24px;
}
.btn {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 999px;
	background: var(--chilli);
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	border: 0;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 3px 0 var(--chilli-deep);
}
.btn:hover, .btn:focus { background: var(--chilli-deep); color: #fff; }
.btn.alt { background: var(--ink); box-shadow: 0 3px 0 #000; }
.btn.alt:hover { background: var(--ink-2); }

/* ---------- Footer ---------- */
.site-foot { background: var(--ink); color: #eadcc0; margin-top: 10px; }
.ad-wide {
	max-width: 100%;
	overflow-x: auto;
	text-align: center;
	padding: 24px 10px;
	background: var(--paper-2);
}
.site-foot .inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 26px 20px 34px;
	text-align: center;
}
.site-foot a { color: var(--gold-soft); }
.site-foot a:hover { color: #fff; }
.foot-brand { font-family: var(--display); font-size: 1.6rem; color: #fff6e3; margin: 0 0 6px; }
.foot-links { margin: 0 0 12px; }
.foot-links a { margin: 0 8px; }
.contact { margin: 0 0 12px; }
.share { padding: 10px 0 0; }
.copy { font-size: .9rem; color: var(--galangal); margin: 0; }
.copy a { text-decoration: none; }

/* ---------- Print ---------- */
@media print {
	body { background: #fff; font-size: 11pt; }
	.site-head, .band, .nav-col, .side-col, .site-foot, .actions, .crumbs, .ing-hint, .side-ad { display: none !important; }
	.layout { display: block; padding: 0; }
	.panel { box-shadow: none; border: 1px solid #ccc; }
	.recipe { display: block; }
	.ingredients { position: static; }
}
