/* =========================================================================
   clean.css — davidthomas.com.au design system
   Built from brandguide.md — "Warm studio (light)" direction.
   Token-first; replaces the legacy 56KB extracted style.css.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@100..900&family=Inter:wght@300..700&display=swap');

/* -------------------------------------------------------------------------
   Design tokens
   ------------------------------------------------------------------------- */
:root {
	/* Brand palette */
	--dt-paper:   #FAF7F2;   /* warm background   */
	--dt-ink:     #1A1815;   /* near-black text   */
	--dt-accent:  #E8612C;   /* burnt orange      */
	--dt-accent-soft: #FBE7DD;
	--dt-accent-ink: #B84A1C;
	--dt-muted:   #6B655C;   /* secondary text    */
	--dt-surface: #FFFFFF;   /* raised surfaces   */
	--dt-line:    #E7E0D4;   /* hairlines/borders */

	/* Semantic aliases */
	--color-bg:     var(--dt-paper);
	--color-text:   var(--dt-ink);
	--color-muted:  var(--dt-muted);
	--color-primary:var(--dt-accent);
	--color-cta:    var(--dt-accent);
	--color-surface:var(--dt-surface);
	--color-line:   var(--dt-line);

	/* Typography */
	--font-display: "Roboto Slab", Georgia, serif;
	--font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

	--fs-display: clamp(2.6rem, 6vw, 3.75rem);   /* 42–60px */
	--fs-h1:      clamp(2.1rem, 4.5vw, 3rem);    /* 34–48px */
	--fs-h2:      clamp(1.6rem, 3vw, 2.1rem);    /* 26–34px */
	--fs-h3:      1.35rem;
	--fs-h4:      1.12rem;
	--fs-body:    1.06rem;
	--fs-lead:    1.22rem;
	--fs-small:   0.9rem;
	--fs-caption: 0.8rem;
	--lh-tight:   1.15;
	--lh-body:    1.65;

	/* Spacing scale (4px base) */
	--sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
	--sp-5: 20px;  --sp-6: 24px;  --sp-8: 32px;  --sp-10: 40px;
	--sp-12: 48px; --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;

	/* Radius */
	--radius-sm: 6px;
	--radius-md: 10px;
	--radius-lg: 16px;
	--radius-full: 999px;

	/* Shadow */
	--shadow-sm: 0 1px 2px rgba(26, 24, 21, 0.06);
	--shadow-md: 0 6px 18px rgba(26, 24, 21, 0.08);
	--shadow-lg: 0 18px 40px rgba(26, 24, 21, 0.12);

	/* Layout */
	--container-max: 1100px;
	--container-narrow: 760px;
	--section-pad: clamp(3rem, 7vw, 6rem);
	--header-h: 72px;
}

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

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

body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	font-weight: 400;
	line-height: var(--lh-body);
	-webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	font-weight: 400;
	line-height: var(--lh-tight);
	letter-spacing: -0.01em;
	color: var(--color-text);
	margin: 0 0 var(--sp-4);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { margin: 0 0 var(--sp-4); }

a {
	color: var(--color-accent-ink, var(--dt-accent-ink));
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }

::selection { background: var(--dt-accent); color: #fff; }

/* -------------------------------------------------------------------------
   Layout primitives
   ------------------------------------------------------------------------- */
.container {
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: clamp(1.25rem, 4vw, 2rem);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-pad); }
.section--sm { padding-block: 2.5rem; }

.grid-2 { display: grid; gap: var(--sp-6); grid-template-columns: 1fr; }
@media (min-width: 720px) {
	.grid-2 { grid-template-columns: repeat(2, 1fr); }
}

/* -------------------------------------------------------------------------
   Buttons — all ≥44px tall for touch
   ------------------------------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 44px;
	padding: 0.65rem 1.4rem;
	border-radius: var(--radius-md);
	font-family: var(--font-body);
	font-size: 0.98rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background-color .18s ease, color .18s ease, transform .12s ease, border-color .18s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
	background: var(--color-primary);
	color: #fff;
}
.btn-primary:hover { background: var(--dt-accent-ink); color: #fff; }

.btn-outline {
	background: transparent;
	color: var(--color-text);
	border-color: var(--dt-line);
}
.btn-outline:hover { border-color: var(--color-text); }

/* -------------------------------------------------------------------------
   Header / navigation
   ------------------------------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--color-bg) 88%, transparent);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--dt-line);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-4);
	min-height: var(--header-h);
}

.site-brand {
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--color-text);
	text-decoration: none;
	letter-spacing: -0.01em;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}
.site-brand:hover { color: var(--dt-accent); text-decoration: none; }

.main-navigation {}
.main-navigation__list {
	display: flex;
	align-items: center;
	gap: var(--sp-3);
	list-style: none;
	margin: 0;
	padding: 0;
}
.main-navigation__list a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 0.5rem;
	color: var(--color-text);
	text-decoration: none;
	font-weight: 500;
	font-size: 0.98rem;
	border-radius: var(--radius-sm);
}
.main-navigation__list a:hover { color: var(--dt-accent); background: var(--dt-line); text-decoration: none; }

.main-navigation__list a.nav-cta {
	background: var(--color-primary);
	color: #fff;
	padding: 0.55rem 1.2rem;
	border-radius: var(--radius-md);
	min-height: 44px;
}
.main-navigation__list a.nav-cta:hover { background: var(--dt-accent-ink); color: #fff; }

/* Mobile drawer toggle */
.menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	min-width: 44px;
	background: transparent;
	border: 1px solid var(--dt-line);
	border-radius: var(--radius-sm);
	color: var(--color-text);
	font-size: 1rem;
	cursor: pointer;
}
.menu-toggle:hover { border-color: var(--color-text); }

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */
.hero {
	padding-block: clamp(3.5rem, 9vw, 7rem) var(--section-pad);
	display: grid;
	gap: var(--sp-8);
	align-items: center;
}
.hero__inner {
	display: grid;
	gap: var(--sp-8);
	grid-template-columns: 1fr;
	align-items: center;
}
@media (min-width: 880px) {
	.hero__inner { grid-template-columns: 1.35fr 1fr; }
	/* No portrait image → single centered column, comfortable reading width */
	.hero__inner--solo { grid-template-columns: 1fr; max-width: 54rem; }
	.hero__inner--solo .hero__title { max-width: 20ch; }
}

.hero__eyebrow {
	display: inline-block;
	font-size: var(--fs-caption);
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--dt-accent-ink);
	background: var(--dt-accent-soft);
	padding: 0.35rem 0.8rem;
	border-radius: var(--radius-full);
	margin-bottom: var(--sp-4);
}
.hero__title {
	font-size: var(--fs-display);
	margin-bottom: var(--sp-5);
}
.hero__subtitle {
	font-size: var(--fs-lead);
	color: var(--color-muted);
	max-width: 34ch;
	margin-bottom: var(--sp-6);
}
.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sp-3);
	align-items: center;
}
.hero__image {
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
	overflow: hidden;
}
.hero__image img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* -------------------------------------------------------------------------
   Content / prose
   ------------------------------------------------------------------------- */
.content-section { padding-block: var(--section-pad); }

.prose {
	max-width: var(--container-narrow);
}
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { max-width: 65ch; }
.prose ul, .prose ol { margin: 0 0 var(--sp-4); padding-left: 1.4rem; }
.prose li { margin-bottom: var(--sp-2); }
.prose blockquote {
	margin: var(--sp-6) 0;
	padding: var(--sp-4) var(--sp-6);
	border-left: 3px solid var(--dt-accent);
	background: var(--dt-surface);
	color: var(--color-muted);
	font-size: var(--fs-lead);
}
.prose table { border-collapse: collapse; width: 100%; margin: var(--sp-4) 0; }
.prose th, .prose td { border: 1px solid var(--dt-line); padding: var(--sp-2) var(--sp-3); text-align: left; }
.prose th { background: var(--dt-surface); font-weight: 600; }
.prose code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.9em;
	background: var(--dt-surface);
	border: 1px solid var(--dt-line);
	border-radius: var(--radius-sm);
	padding: 0.1em 0.35em;
}
.prose pre {
	background: var(--dt-ink);
	color: var(--dt-paper);
	padding: var(--sp-4);
	border-radius: var(--radius-md);
	overflow-x: auto;
	margin: var(--sp-4) 0;
}
.prose pre code { background: none; border: none; padding: 0; }
.prose hr { border: none; border-top: 1px solid var(--dt-line); margin: var(--sp-8) 0; }

/* -------------------------------------------------------------------------
   CTA section
   ------------------------------------------------------------------------- */
.cta-section {
	background: var(--dt-ink);
	color: var(--dt-paper);
	border-radius: var(--radius-lg);
	padding: clamp(2.5rem, 6vw, 4.5rem);
	text-align: center;
	margin-block: var(--section-pad);
}
.cta-section__title {
	color: var(--dt-paper);
	font-size: var(--fs-h2);
	margin-bottom: var(--sp-2);
}
.cta-section__text {
	color: color-mix(in srgb, var(--dt-paper) 82%, transparent);
	max-width: 46ch;
	margin-inline: auto;
	margin-bottom: var(--sp-6);
}
.cta-section__email {
	color: var(--dt-paper);
	font-family: var(--font-display);
	font-size: var(--fs-h3);
	font-weight: 500;
	letter-spacing: 0.01em;
	margin: 0;
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.site-footer {
	border-top: 1px solid var(--dt-line);
	padding-block: var(--sp-12) var(--sp-8);
	margin-top: var(--sp-8);
	background: var(--dt-surface);
}
.site-footer__inner {
	display: grid;
	gap: var(--sp-8);
	grid-template-columns: 1fr;
}
@media (min-width: 720px) {
	.site-footer__inner { grid-template-columns: 2fr 1fr; }
}
.site-footer__brand h2 {
	font-size: var(--fs-h3);
	margin-bottom: var(--sp-2);
}
.site-footer__brand p { color: var(--color-muted); max-width: 40ch; font-size: var(--fs-small); }
.site-footer__nav h3 {
	font-size: var(--fs-h4);
	margin-bottom: var(--sp-3);
}
.site-footer__nav ul { list-style: none; margin: 0; padding: 0; }
.site-footer__nav li { margin-bottom: var(--sp-2); }
.site-footer__nav a {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	color: var(--color-muted);
	text-decoration: none;
	font-weight: 500;
}
.site-footer__nav a:hover { color: var(--dt-accent); }
.site-footer__bottom {
	border-top: 1px solid var(--dt-line);
	margin-top: var(--sp-8);
	padding-top: var(--sp-4);
	display: flex;
	justify-content: space-between;
	gap: var(--sp-4);
	flex-wrap: wrap;
	color: var(--color-muted);
	font-size: var(--fs-small);
}

/* -------------------------------------------------------------------------
   Scroll animation
   ------------------------------------------------------------------------- */
.fl-animation { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.fl-animated { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	.fl-animation { opacity: 1; transform: none; transition: none; }
	html { scroll-behavior: auto; }
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 880px) {
	.menu-toggle { display: inline-flex; }
	.main-navigation {
		display: none;
		position: absolute;
		top: var(--header-h);
		left: 0;
		right: 0;
		background: var(--color-bg);
		border-bottom: 1px solid var(--dt-line);
		box-shadow: var(--shadow-md);
		padding: var(--sp-4);
	}
	.main-navigation.is-open { display: block; }
	.main-navigation__list {
		flex-direction: column;
		align-items: stretch;
		gap: var(--sp-2);
	}
	.main-navigation__list a { width: 100%; min-height: 44px; }
	.main-navigation__list a.nav-cta { justify-content: center; }
	.hero__inner { grid-template-columns: 1fr; }
}
