/*
  Lightroom workshop page — bright editorial theme, distinct from the
  photobasic (camera) sub-site's dark theme. No build step: plain CSS.
*/

* {
	box-sizing: border-box;
}

:root {
	--bg: #fffdf9;
	--surface: #ffffff;
	--border: #eae6df;
	--fg: #17181c;
	--muted: #5b5f6b;
	--accent: #2d6cdf;
	--accent-soft: #eaf1ff;
	--radius: 14px;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: "Noto Sans Thai", -apple-system, BlinkMacSystemFont,
		"Segoe UI", system-ui, sans-serif;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

a {
	color: inherit;
}

/* ─── Top bar ─── */
.topbar {
	position: sticky;
	top: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.9rem clamp(1.25rem, 4vw, 2rem);
	background: rgba(255, 253, 249, 0.92);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--border);
}

.topbar-back {
	font-size: 0.85rem;
	color: var(--muted);
	text-decoration: none;
	white-space: nowrap;
}

.topbar-back:hover {
	color: var(--accent);
}

.topbar-title {
	display: none;
	font-size: 0.85rem;
	font-weight: 600;
}

@media (min-width: 900px) {
	.topbar-title {
		display: block;
	}
}

.menu-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem 0.85rem;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface);
	color: var(--fg);
	font-size: 0.8rem;
	cursor: pointer;
}

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

/* ─── Layout ─── */
.layout {
	display: grid;
	grid-template-columns: 1fr;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 clamp(1.25rem, 4vw, 2rem);
}

@media (min-width: 900px) {
	.layout {
		grid-template-columns: 240px minmax(0, 1fr);
		gap: 2.5rem;
		align-items: start;
	}
}

/* ─── Sidebar ─── */
.sidebar {
	display: none;
}

@media (min-width: 900px) {
	.sidebar {
		display: block;
		position: sticky;
		top: 4.5rem;
		max-height: calc(100vh - 5.5rem);
		overflow-y: auto;
		padding: 2rem 0;
	}
}

.sidebar-group {
	margin-bottom: 1.5rem;
}

.sidebar-group-title {
	margin: 0 0 0.5rem;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.sidebar-link {
	display: block;
	padding: 0.35rem 0;
	font-size: 0.85rem;
	color: var(--muted);
	text-decoration: none;
	border-left: 2px solid transparent;
	padding-left: 0.75rem;
	margin-left: -0.75rem;
}

.sidebar-link:hover {
	color: var(--fg);
}

.sidebar-link.is-active {
	color: var(--accent);
	border-left-color: var(--accent);
	font-weight: 600;
}

/* Mobile nav sheet */
.mobile-nav {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 50;
	background: rgba(23, 24, 28, 0.4);
}

.mobile-nav.is-open {
	display: block;
}

.mobile-nav-panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(85vw, 320px);
	background: var(--bg);
	padding: 1.5rem;
	overflow-y: auto;
	box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
}

.mobile-nav-close {
	display: block;
	margin-left: auto;
	margin-bottom: 1rem;
	padding: 0.4rem 0.9rem;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface);
	font-size: 0.8rem;
	cursor: pointer;
}

/* ─── Main content ─── */
.content {
	min-width: 0;
	padding: 2.5rem 0 6rem;
}

.hero {
	margin-bottom: 3rem;
}

.hero .kicker {
	margin: 0 0 0.75rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--accent);
}

.hero h1 {
	margin: 0 0 1rem;
	font-size: clamp(2rem, 5.5vw, 3rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.15;
}

.hero p {
	max-width: 40rem;
	margin: 0;
	color: var(--muted);
	font-size: 1rem;
}

.hero .rule-callout {
	margin-top: 1.75rem;
	padding: 1rem 1.25rem;
	background: var(--accent-soft);
	border-radius: var(--radius);
	font-size: 0.9rem;
	color: #1a3a7a;
}

/* ─── Section groups ─── */
.workflow-group {
	margin-bottom: 4rem;
	padding-top: 1rem;
	scroll-margin-top: 4.5rem;
}

.workflow-group-header {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	margin-bottom: 0.5rem;
}

.workflow-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 700;
	flex: none;
}

.workflow-group-header h2 {
	margin: 0;
	font-size: clamp(1.35rem, 3vw, 1.75rem);
	font-weight: 800;
	letter-spacing: -0.01em;
}

.workflow-group-desc {
	margin: 0 0 2rem;
	max-width: 42rem;
	color: var(--muted);
	font-size: 0.92rem;
}

/* ─── Topic card (one Lightroom tool/concept) ─── */
.topic {
	margin-bottom: 2rem;
	padding: 1.5rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	scroll-margin-top: 4.5rem;
}

.topic h3 {
	margin: 0 0 0.6rem;
	font-size: 1.05rem;
	font-weight: 700;
}

.topic > p {
	margin: 0 0 0.9rem;
	font-size: 0.92rem;
	color: var(--fg);
}

.topic > p:last-child {
	margin-bottom: 0;
}

.topic-diagram {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 1rem;
	padding: 0.6rem 0.9rem;
	background: var(--accent-soft);
	border-radius: 999px;
	font-size: 0.82rem;
	font-weight: 600;
	color: #1a3a7a;
	flex-wrap: wrap;
}

.topic-diagram .arrow {
	color: var(--accent);
	font-weight: 400;
}

.topic-block {
	margin-top: 1rem;
}

.topic-block h4 {
	margin: 0 0 0.4rem;
	font-size: 0.85rem;
	font-weight: 700;
}

.topic-block p,
.topic-block ul {
	margin: 0;
	font-size: 0.88rem;
	color: var(--muted);
}

.topic-block ul {
	padding-left: 1.1rem;
}

.topic-block li {
	margin-bottom: 0.3rem;
}

.topic-example {
	margin-top: 0.9rem;
	padding: 0.75rem 1rem;
	background: #f6f4ef;
	border-radius: 10px;
	font-size: 0.85rem;
}

.topic-example strong {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--muted);
}

.topic-warning {
	margin-top: 0.9rem;
	padding: 0.75rem 1rem;
	background: #fff4e8;
	border-left: 3px solid #d98a2b;
	border-radius: 0 10px 10px 0;
	font-size: 0.85rem;
	color: #6b4a12;
}

.topic-warning strong {
	color: #a15f16;
}

.topic-compare {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
	margin-top: 1rem;
}

@media (min-width: 560px) {
	.topic-compare {
		grid-template-columns: 1fr 1fr;
	}
}

.topic-compare > div {
	padding: 0.85rem 1rem;
	border-radius: 10px;
	font-size: 0.85rem;
}

.topic-compare .is-plus {
	background: #eaf7ee;
}

.topic-compare .is-minus {
	background: #fdeeee;
}

.topic-compare strong {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.8rem;
}

/* ─── Tables ─── */
.table-wrap {
	overflow-x: auto;
	margin: 1rem 0;
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.85rem;
}

th,
td {
	padding: 0.6rem 0.9rem;
	text-align: left;
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
}

@media (min-width: 700px) {
	th,
	td {
		white-space: normal;
	}
}

th {
	background: #faf9f5;
	font-weight: 700;
	font-size: 0.78rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--muted);
}

tr:last-child td {
	border-bottom: none;
}

td code,
th code {
	font-family: ui-monospace, SFMono-Regular, monospace;
	font-size: 0.85em;
}

/* ─── Workshop steps ─── */
.workshop-steps {
	counter-reset: step;
	display: grid;
	gap: 1rem;
}

.workshop-step {
	position: relative;
	padding: 1.1rem 1.25rem 1.1rem 3.25rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}

.workshop-step::before {
	counter-increment: step;
	content: counter(step);
	position: absolute;
	left: 1rem;
	top: 1.1rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.6rem;
	height: 1.6rem;
	border-radius: 999px;
	background: var(--accent-soft);
	color: var(--accent);
	font-size: 0.8rem;
	font-weight: 700;
}

.workshop-step h4 {
	margin: 0 0 0.4rem;
	font-size: 0.95rem;
	font-weight: 700;
}

.workshop-step p,
.workshop-step ul {
	margin: 0;
	font-size: 0.88rem;
	color: var(--muted);
}

.workshop-step ul {
	padding-left: 1.1rem;
}

.workshop-step li {
	margin-bottom: 0.3rem;
}

.workshop-step .arrow-flow {
	margin-top: 0.4rem;
	font-size: 0.85rem;
	color: var(--fg);
}

/* ─── Closing principle ─── */
.principle-box {
	margin-top: 2.5rem;
	padding: 1.75rem;
	background: #17181c;
	color: #fffdf9;
	border-radius: var(--radius);
}

.principle-box p {
	margin: 0 0 0.75rem;
	font-size: 0.92rem;
	color: #d7d5cf;
}

.principle-box p:last-child {
	margin-bottom: 0;
}

.principle-box strong {
	color: #fff;
}

.principle-box .quote {
	font-size: 1.05rem;
	font-weight: 700;
	color: #fff;
}

/* ─── Shortcut table chips ─── */
.kbd {
	display: inline-block;
	padding: 0.1rem 0.45rem;
	border: 1px solid var(--border);
	border-radius: 5px;
	background: #faf9f5;
	font-family: ui-monospace, SFMono-Regular, monospace;
	font-size: 0.82em;
}

/* ─── Footer ─── */
footer {
	border-top: 1px solid var(--border);
	padding: 1.75rem clamp(1.25rem, 4vw, 2rem);
	color: var(--muted);
	font-size: 0.75rem;
}

footer .footer-inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1rem;
	max-width: 1180px;
	margin: 0 auto;
}

footer a {
	text-decoration: none;
	color: var(--muted);
}

footer a:hover {
	color: var(--accent);
}
