/*
Theme Name: Treehouse Commons
Theme URI: https://treehousecommons.co
Author: Treehouse Commons
Description: Single-page custom theme for Treehouse Commons, matched to the studio's mark and business card system.
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: treehouse-commons
*/

/* =========================================================
   1. Design tokens (sampled from the brand mark + card)
========================================================= */
:root {
	--tc-ink: #33473A;        /* headings, mark, primary text */
	--tc-ink-deep: #253D2C;   /* buttons, footer, high-contrast fills */
	--tc-sage: #889183;       /* secondary text */
	--tc-stone: #9CA395;      /* meta text, small labels */
	--tc-parchment: #EDE8DC; /* page background */
	--tc-card: #F5F1E7;       /* card / panel background */
	--tc-line: rgba(51, 71, 58, 0.16);

	--tc-font-display: 'Cormorant Garamond', Georgia, serif;
	--tc-font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;

	--tc-radius: 4px;
	--tc-radius-sm: 3px;
	--tc-max-width: 1120px;
	--tc-header-height: 84px;
}

/* =========================================================
   2. Reset
========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--tc-parchment);
	color: var(--tc-ink);
	font-family: var(--tc-font-body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--tc-ink-deep); }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 {
	font-family: var(--tc-font-display);
	color: var(--tc-ink);
	line-height: 1.2;
	margin: 0 0 0.45em;
	font-weight: 600;
}
p { margin: 0 0 1em; color: #45503f; }
button { font-family: inherit; }

.screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link {
	position: absolute; top: -100px; left: 1rem;
	background: var(--tc-ink-deep); color: #fff;
	padding: 0.75rem 1.25rem; border-radius: var(--tc-radius-sm);
	z-index: 200; transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; width: auto; height: auto; clip: auto; }
:focus-visible { outline: 2px solid var(--tc-ink-deep); outline-offset: 3px; }

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

/* =========================================================
   3. Layout helpers
========================================================= */
.wrap { max-width: var(--tc-max-width); margin: 0 auto; padding: 0 1.75rem; }
.site-main { display: block; }
.section { padding: 4.5rem 0; }

/* Anchor targets: offset for the sticky header so section content
   isn't hidden underneath it when jumping via #services / #contact. */
#services, #contact { scroll-margin-top: var(--tc-header-height); }

.eyebrow {
	font-family: var(--tc-font-body);
	font-size: 0.78rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--tc-stone);
	margin: 0 0 0.9rem;
}
.eyebrow--center { text-align: center; }
.section__title { font-size: clamp(1.6rem, 3vw, 2.1rem); max-width: 42ch; font-weight: 600; }
.section__title--center { text-align: center; margin-left: auto; margin-right: auto; }

/* =========================================================
   4. Rule / divider (matches card's thin horizontal line)
========================================================= */
.rule { border: none; border-top: 1px solid var(--tc-line); margin: 0; }

/* =========================================================
   5. Buttons
========================================================= */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
	padding: 0.8rem 1.6rem; border-radius: var(--tc-radius);
	font-weight: 600; text-decoration: none; font-size: 0.95rem;
	border: 1.5px solid var(--tc-ink-deep);
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	cursor: pointer;
}
.btn--primary { background: var(--tc-ink-deep); color: var(--tc-parchment); }
.btn--primary:hover { background: var(--tc-ink); border-color: var(--tc-ink); }
.btn--ghost { background: transparent; color: var(--tc-ink-deep); }
.btn--ghost:hover { background: var(--tc-ink-deep); color: var(--tc-parchment); }
.btn--large { padding: 0.95rem 2rem; font-size: 1rem; }
.btn--small { padding: 0.5rem 1.1rem; font-size: 0.85rem; }

/* =========================================================
   6. Header
========================================================= */
.site-header {
	position: sticky; top: 0; z-index: 100;
	height: var(--tc-header-height);
	display: flex;
	align-items: center;
	background: rgba(237, 232, 220, 0.94);
	backdrop-filter: blur(6px);
	border-bottom: 1px solid var(--tc-line);
}
.site-header__inner {
	width: 100%;
	display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.site-branding { display: flex; align-items: center; }
.site-title {
	display: inline-flex; align-items: center; gap: 0.65rem;
	text-decoration: none; font-family: var(--tc-font-display);
	font-weight: 600; font-size: 1.4rem; color: var(--tc-ink);
}
.site-title__mark { display: inline-flex; }
.site-title__mark img { height: 30px; width: auto; }
.custom-logo-link img { max-height: 46px; width: auto; }

@media (max-width: 560px) {
	.site-title__text { font-size: 1.15rem; }
	.nav-cta { padding: 0.6rem 1rem; font-size: 0.85rem; }
}

/* =========================================================
   7. Hero
========================================================= */
.hero { padding: 5.5rem 0 4rem; }
.hero__inner { max-width: 660px; }
.hero__headline { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 600; }
.hero__lede { font-size: 1.15rem; max-width: 48ch; }
.hero__actions { display: flex; gap: 1rem; margin-top: 1.75rem; flex-wrap: wrap; }

/* =========================================================
   8. Services ("What we do")
========================================================= */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.service-card {
	background: var(--tc-card); border: 1px solid var(--tc-line);
	border-radius: var(--tc-radius); padding: 1.9rem 1.7rem;
}
.service-card h3 { font-size: 1.15rem; }
.service-card p { font-size: 0.95rem; margin: 0; }
@media (max-width: 980px) { .service-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .service-grid { grid-template-columns: 1fr; } }

/* =========================================================
   9. Contact section
========================================================= */
.contact-section .section__title { margin-bottom: 2.75rem; }
.contact-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 3.25rem; }
.contact-info h3 {
	font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em;
	color: var(--tc-stone); margin-bottom: 0.75rem;
}
.contact-info__founder { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--tc-line); }
.contact-info__founder p { font-size: 0.94rem; margin: 0; }
.contact-form-wrap { background: var(--tc-card); border: 1px solid var(--tc-line); border-radius: var(--tc-radius); padding: 2.25rem; }
.form-row { margin-bottom: 1.3rem; display: flex; flex-direction: column; gap: 0.4rem; }
.form-row-group { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; margin-bottom: 1.3rem; }
.form-row-group .form-row { margin-bottom: 0; }
.form-row label { font-weight: 600; font-size: 0.9rem; }
.req { color: var(--tc-stone); margin-left: 0.2rem; }
.form-row input, .form-row textarea {
	font-family: var(--tc-font-body); font-size: 1rem; padding: 0.7rem 0.85rem;
	border: 1.5px solid var(--tc-line); border-radius: var(--tc-radius-sm);
	background: #fff; color: var(--tc-ink); resize: vertical;
}
.form-row input:focus, .form-row textarea:focus { border-color: var(--tc-ink-deep); outline: none; }
.form-honeypot { position: absolute; left: -9999px; }
.form-notice { padding: 1rem 1.25rem; border-radius: var(--tc-radius-sm); margin-bottom: 1.4rem; font-size: 0.93rem; }
.form-notice--success { background: rgba(136, 145, 131, 0.18); border: 1px solid var(--tc-sage); }
.form-notice--error { background: rgba(37, 61, 44, 0.1); border: 1px solid var(--tc-ink); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } .form-row-group { grid-template-columns: 1fr; } }

/* =========================================================
   10. Footer — simple, forest green, no overlap
   (normal document flow; no negative margins or absolute
   positioning, so it can never overlap the section above it)
========================================================= */
.site-footer {
	background: var(--tc-ink-deep);
	color: rgba(237, 232, 220, 0.82);
	padding: 2.5rem 0;
}
.site-footer__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.6rem;
}
.site-footer__brand {
	font-family: var(--tc-font-display);
	font-size: 1.15rem;
	font-weight: 600;
	color: #fff;
}
.site-footer__meta { font-size: 0.85rem; margin: 0; color: rgba(237, 232, 220, 0.75); }
.site-footer__meta a { color: #fff; text-decoration: none; }
.site-footer__meta a:hover { text-decoration: underline; }

/* =========================================================
   11. Generic content (fallback templates only)
========================================================= */
.entry-content { max-width: 70ch; }

/* =========================================================
   12. Scroll reveal
========================================================= */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
