/* ==========================================================================
   PortfolioTree — design tokens
   The palette is derived from the logo's own gradient stops so the mark,
   the chrome and the accents all sit in one hue family.
   ========================================================================== */

:root {
	/* Brand — taken verbatim from images/logo.svg */
	--brand-green: #46795d;                 /* gradient, light stop */
	--brand-deep:  #204039;                 /* gradient, dark stop  */

	/* Bark — the canvas. Same hue family, driven down in lightness. */
	--bark-900: hsl(167 30% 5%);            /* page background      */
	--bark-800: hsl(167 26% 8%);            /* surface              */
	--bark-700: hsl(163 22% 12%);           /* raised surface       */
	--bark-600: hsl(160 18% 18%);           /* hairline border      */
	--bark-500: hsl(155 16% 27%);           /* strong border        */

	/* Moss — the text ramp. A faint green cast keeps it organic, not grey. */
	--moss-400: hsl(150 10% 62%);           /* muted / meta         */
	--moss-200: hsl(150 14% 84%);           /* body copy            */
	--moss-050: hsl(150 20% 96%);           /* headings             */

	/* Leaf — accents, stepped up from --brand-green for dark-background contrast */
	--leaf-400: hsl(147 30% 50%);
	--leaf-300: hsl(147 38% 62%);           /* links                */
	--leaf-200: hsl(147 45% 74%);           /* bright accent        */

	--font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

	--radius-sm: .375rem;
	--radius:    .5rem;
	--radius-lg: .75rem;

	--measure: 68ch;
	--content-width: 72rem;
	--header-height: 4.25rem;

	color-scheme: dark;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

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

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.65;
	color: var(--moss-200);
	background: var(--bark-900);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* A single soft canopy of light behind the top of the page. */
body::before {
	content: '';
	position: fixed;
	inset: 0 0 auto 0;
	height: 40rem;
	pointer-events: none;
	z-index: 0;
	background:
		radial-gradient(60rem 26rem at 50% -6rem, hsl(147 40% 30% / .38), transparent 70%),
		radial-gradient(34rem 18rem at 88% 2rem, hsl(167 45% 22% / .30), transparent 70%);
}

body > * { position: relative; z-index: 1; }

h1, h2, h3, h4, h5, h6 {
	color: var(--moss-050);
	font-weight: 650;
	letter-spacing: -.03em;
	line-height: 1.15;
	margin: 0 0 .5em;
	text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.05rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.15rem; }

a {
	color: var(--leaf-300);
	text-decoration-color: hsl(147 38% 62% / .35);
	text-underline-offset: .18em;
	transition: color .15s ease, text-decoration-color .15s ease;
}

a:hover { color: var(--leaf-200); text-decoration-color: currentColor; }

:focus-visible {
	outline: 2px solid var(--leaf-300);
	outline-offset: 3px;
	border-radius: var(--radius-sm);
}

hr {
	border: 0;
	border-top: 1px solid var(--bark-600);
	margin: 3rem 0;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

/* Tracked-out monospace kicker — the signature small-label treatment. */
.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	font-family: var(--font-mono);
	font-size: .7rem;
	font-weight: 500;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--leaf-300);
	margin: 0 0 1.25rem;
}

.eyebrow::before {
	content: '';
	width: .4rem;
	height: .4rem;
	border-radius: 50%;
	background: var(--leaf-300);
	box-shadow: 0 0 0 .2rem hsl(147 38% 62% / .18);
}

.lede {
	font-size: 1.2rem;
	line-height: 1.6;
	color: var(--moss-200);
	max-width: var(--measure);
}

.muted { color: var(--moss-400); }

.mono {
	font-family: var(--font-mono);
	font-size: .95em;
	letter-spacing: -.01em;
}

/* ==========================================================================
   Site header
   ========================================================================== */

body > header {
	position: sticky;
	top: 0;
	z-index: 100;
	height: var(--header-height);
	border-bottom: 1px solid var(--bark-600);
	background: hsl(167 30% 5% / .72);
	backdrop-filter: blur(14px) saturate(140%);
	-webkit-backdrop-filter: blur(14px) saturate(140%);
}

body > header > nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	height: 100%;
	max-width: var(--content-width);
	margin: 0 auto;
	padding: 0 1.5rem;
}

body > header > nav > ul {
	display: flex;
	align-items: center;
	gap: 1.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

#site-name {
	display: inline-flex;
	align-items: center;
	gap: .7rem;
	font-size: 1.15rem;
	font-weight: 600;
	letter-spacing: -.02em;
	color: var(--moss-050);
	text-decoration: none;
	user-select: none;
}

#site-name img {
	display: block;
	width: 2rem;
	height: 2rem;
}

#site-name:hover { color: var(--leaf-200); }

/* The trademark rides as a proper superscript instead of a negative-margin hack. */
[data-trademark]::after {
	content: '™';
	font-size: .55em;
	font-weight: 500;
	vertical-align: super;
	margin-left: .1em;
	color: var(--moss-400);
}

/* ==========================================================================
   Layout
   ========================================================================== */

main {
	display: block;
	max-width: var(--content-width);
	margin: 0 auto;
	padding: 0 1.5rem;
}

main > article {
	padding: clamp(3rem, 8vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero { max-width: var(--measure); }

.hero h1 { margin-bottom: 1.25rem; }

.hero .lede { margin-bottom: 2rem; }

.hero .actions {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	margin: 2rem 0 0;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
	background: linear-gradient(180deg, var(--bark-700), var(--bark-800));
	border: 1px solid var(--bark-600);
	border-radius: var(--radius-lg);
	padding: clamp(1.5rem, 4vw, 2.25rem);
}

.card + .card { margin-top: 1rem; }

/* Signature block: name + role, set apart from the prose. */
.signature {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-top: 3rem;
	padding-top: 1.75rem;
	border-top: 1px solid var(--bark-600);
	list-style: none;
	padding-left: 0;
}

.signature .name {
	font-weight: 600;
	font-style: normal;
	color: var(--moss-050);
}

.signature .role {
	display: block;
	font-family: var(--font-mono);
	font-size: .75rem;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--moss-400);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.button {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .65rem 1.15rem;
	border: 1px solid transparent;
	border-radius: var(--radius);
	font-family: var(--font-sans);
	font-size: .9rem;
	font-weight: 550;
	letter-spacing: -.01em;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.button:active { transform: translateY(1px); }

.button-primary {
	/* The logo's own gradient, top stop to bottom stop, on the primary action. */
	background: linear-gradient(160deg, var(--brand-green), var(--brand-deep));
	border-color: var(--leaf-400);
	color: var(--moss-050);
	box-shadow: 0 1px 0 hsl(147 45% 74% / .18) inset;
}

.button-primary:hover {
	background: var(--leaf-400);
	color: var(--bark-900);
}

.button-ghost {
	background: transparent;
	border-color: var(--bark-500);
	color: var(--moss-200);
}

.button-ghost:hover {
	border-color: var(--leaf-400);
	color: var(--leaf-200);
	background: hsl(147 30% 50% / .08);
}

/* ==========================================================================
   Prose — wraps the rendered Markdown of the legal pages
   ========================================================================== */

.prose {
	max-width: var(--measure);
	color: var(--moss-200);
}

.prose > :first-child { margin-top: 0; }

.prose h1 {
	font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
	margin-bottom: 1.5rem;
}

/* The legal documents skip h2 and run h1 → h3 → h4, so major sections are
   matched by role rather than by level: h2 and h3 both get the rule above
   them, h4 and below are sub-headings. */
.prose h2,
.prose h3 {
	font-size: 1.35rem;
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--bark-600);
}

.prose h4,
.prose h5,
.prose h6 {
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: -.01em;
	margin-top: 2rem;
	color: var(--moss-050);
}

.prose ul, .prose ol { padding-left: 1.35rem; margin: 0 0 1.15rem; }
.prose li { margin-bottom: .45rem; }
.prose li::marker { color: var(--leaf-400); }

.prose strong { color: var(--moss-050); font-weight: 600; }

.prose code {
	font-family: var(--font-mono);
	font-size: .875em;
	padding: .15em .4em;
	border-radius: var(--radius-sm);
	background: var(--bark-700);
	border: 1px solid var(--bark-600);
	color: var(--leaf-200);
}

.prose blockquote {
	margin: 1.5rem 0;
	padding: .25rem 0 .25rem 1.25rem;
	border-left: 2px solid var(--brand-green);
	color: var(--moss-400);
}

.prose table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.5rem 0;
	font-size: .9rem;
}

.prose th, .prose td {
	padding: .65rem .85rem;
	text-align: left;
	border-bottom: 1px solid var(--bark-600);
}

.prose thead th {
	font-family: var(--font-mono);
	font-size: .72rem;
	font-weight: 500;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--moss-400);
	border-bottom-color: var(--bark-500);
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
	margin-top: 4rem;
	border-top: 1px solid var(--bark-600);
	background: var(--bark-800);
}

footer > article {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 2.5rem;
	max-width: var(--content-width);
	margin: 0 auto;
	padding: 3rem 1.5rem 1.5rem;
}

footer h3 {
	font-family: var(--font-mono);
	font-size: .72rem;
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--moss-400);
	margin-bottom: 1rem;
}

footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: .6rem;
}

footer ul ul { margin-top: .6rem; padding-left: 1rem; }

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

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

footer p { font-size: .875rem; color: var(--moss-400); }

#disclaimers li { font-size: .875rem; color: var(--moss-400); line-height: 1.55; }

#copyright-notice {
	grid-column: 1 / -1;
	margin: 0;
	padding-top: 1.5rem;
	border-top: 1px solid var(--bark-600);
	font-family: var(--font-mono);
	font-size: .75rem;
	letter-spacing: .04em;
	color: var(--moss-400);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 40rem) {
	body > header > nav { padding: 0 1rem; }
	main { padding: 0 1rem; }
	#site-name { font-size: 1rem; }
	.signature { flex-direction: column; align-items: flex-start; gap: .5rem; }
}

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