/* ========================================================================
   SABINO WEB — SHARED THEME STYLES
   Design tokens, reset, typography, nav, footer, CTA, reveal, chip, button.
   Lifted directly from sabino-redeisgn/*.html. Page-specific styles live
   in css/page-{name}.css. Single-project styles in css/single-project.css.
   ======================================================================== */

:root {
	/* Tucson desert palette */
	--paper:        #F4EEE3;
	--paper-2:      #EBE2D2;
	--paper-3:      #E0D4BE;
	--ink:          #1F1A14;
	--ink-2:        #3A332A;
	--ink-3:        #6B6256;
	--ink-4:        #9A9080;
	--rule:         #C8BBA1;
	--terracotta:   #B14A2A;
	--terracotta-2: #8E3A1F;
	--terracotta-3: #E89B6E;
	--saguaro:      #4A5A3A;
	--sky:          #C9D4D9;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
html { scroll-behavior: smooth; }

body {
	background: var(--paper);
	color: var(--ink);
	font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 17px;
	line-height: 1.55;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--terracotta); color: var(--paper); }

/* Default emphasis treatment for serif content — italic + terracotta everywhere
   the editor types <em>. Specific contexts (e.g. dark CTA, dark project hero
   "ai-block") override the color in their own stylesheets. */
h1 em,
h2 em,
h3 em,
h4 em,
.serif em,
.lede em,
.blurb em,
.hero-title em,
.story-prose em,
.about-prose em,
.portrait-prose em,
.case-quote em,
.story-pull em,
.pull em,
.about-side .since em {
	font-style: italic;
	color: var(--terracotta);
	font-weight: inherit;
}

/* ---------- TYPOGRAPHY UTILITIES ---------- */
.serif { font-family: 'Newsreader', Georgia, serif; font-weight: 400; letter-spacing: -0.01em; }
.mono  { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.78em; letter-spacing: 0.02em; }
.eyebrow {
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-3);
	font-weight: 500;
}

/* ---------- LAYOUT ---------- */
.container { max-width: 1240px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 720px) {
	.container { padding: 0 22px; }
}

section { padding: 110px 0; }
@media (max-width: 720px) { section { padding: 80px 0; } }

.section-head {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 48px;
	margin-bottom: 56px;
	align-items: baseline;
}
@media (max-width: 720px) {
	.section-head { grid-template-columns: 1fr; gap: 16px; }
}
.section-head .num {
	font-family: 'JetBrains Mono', monospace;
	font-size: 11px;
	letter-spacing: 0.14em;
	color: var(--ink-3);
	text-transform: uppercase;
}
.section-head h2 {
	font-family: 'Newsreader', serif;
	font-weight: 400;
	font-size: clamp(34px, 4.4vw, 56px);
	line-height: 1.04;
	letter-spacing: -0.02em;
	text-wrap: balance;
	max-width: 800px;
}
.section-head h2 em {
	font-style: italic;
	color: var(--terracotta);
}

/* ---------- NAV ---------- */
nav.top {
	position: sticky; top: 0; z-index: 50;
	background: rgba(244, 238, 227, 0.85);
	backdrop-filter: saturate(140%) blur(10px);
	-webkit-backdrop-filter: saturate(140%) blur(10px);
	border-bottom: 1px solid transparent;
	transition: border-color .2s ease;
}
nav.top.scrolled { border-bottom-color: var(--rule); }
nav.top .inner {
	display: flex; align-items: center; justify-content: space-between;
	height: 64px;
}
.brand {
	display: flex; align-items: center; gap: 10px;
	font-family: 'Newsreader', serif;
	font-size: 19px;
	font-weight: 500;
	letter-spacing: -0.01em;
	/* Collapse the line-height strut so the text flex-item's height is the
	   glyph extent, not the inherited 1.55 line-height. Without this the
	   text is taller than the logo and align-items:center centers them on
	   different cross-axis values. */
	line-height: 1;
}
.brand-mark {
	width: 22px; height: 22px;
	display: inline-block;
}
.brand-mark svg { width: 100%; height: 100%; display: block; }

/* Custom logo (Customizer → Site Identity → Logo) drops into the brand
   slot next to the "Sabino Web" wordmark. The brand sets line-height: 1
   so this can be honestly centered against the text's glyph extent. */
.brand-mark-logo {
	width: auto;
	height: 28px;
	display: inline-block;
}
.brand-mark-logo img {
	height: 100%;
	width: auto;
	display: block;
	object-fit: contain;
}
.nav-links {
	display: flex; gap: 32px; align-items: center;
	font-size: 15px;
}
.nav-links a {
	color: var(--ink-2);
	transition: color .15s ease;
}
.nav-links a:hover,
.nav-links a.is-active { color: var(--terracotta); }
.nav-cta {
	padding: 8px 16px;
	border: 1px solid var(--ink);
	border-radius: 999px;
	font-size: 14px;
	color: var(--ink) !important;
	transition: background .15s ease, color .15s ease;
}
.nav-cta:hover { background: var(--ink); color: var(--paper) !important; }
.nav-cta.is-active { background: var(--ink); color: var(--paper) !important; }
@media (max-width: 720px) {
	.nav-links { gap: 18px; }
	.nav-links a:not(.nav-cta) { display: none; }
}

/* ---------- BUTTONS ---------- */
.btn {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 14px 22px;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 500;
	transition: transform .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
	cursor: pointer;
	border: 1px solid transparent;
	text-decoration: none;
}
.btn-primary {
	background: var(--ink);
	color: var(--paper);
}
.btn-primary:hover { background: var(--terracotta); color: var(--paper); }
.btn-ghost {
	border: 1px solid var(--rule);
	color: var(--ink);
	background: transparent;
}
.btn-ghost:hover { border-color: var(--ink); }
.btn .arrow { display: inline-block; transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- IMAGE PLACEHOLDER ---------- */
.placeholder {
	background: linear-gradient(135deg, var(--paper-2), var(--paper-3));
	border: 1px solid var(--rule);
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--ink-3);
	font-family: 'JetBrains Mono', monospace;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	min-height: 200px;
	overflow: hidden;
}
.placeholder .pill {
	padding: 6px 12px;
	background: rgba(244, 238, 227, 0.8);
	border: 1px solid var(--rule);
	border-radius: 999px;
}

/* ---------- CTA SECTIONS ---------- */
.cta {
	background: var(--ink);
	color: var(--paper);
	padding: 120px 0;
	position: relative;
	overflow: hidden;
}
.cta::after {
	content: '';
	position: absolute;
	bottom: -40%;
	right: -10%;
	width: 60%;
	aspect-ratio: 1;
	background: radial-gradient(circle, var(--terracotta) 0%, transparent 60%);
	opacity: 0.35;
	pointer-events: none;
}
.cta-inner {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: 80px;
	align-items: end;
	position: relative;
	z-index: 1;
}
@media (max-width: 900px) {
	.cta-inner { grid-template-columns: 1fr; gap: 48px; }
}
.cta h2 {
	font-family: 'Newsreader', serif;
	font-weight: 400;
	font-size: clamp(40px, 5.4vw, 76px);
	line-height: 1.02;
	letter-spacing: -0.025em;
	color: var(--paper);
	text-wrap: balance;
}
.cta h2 em { font-style: italic; color: var(--terracotta-3); }
.cta-sub {
	margin-top: 20px;
	font-size: 18px;
	color: rgba(244, 238, 227, 0.7);
	max-width: 460px;
}
.cta-side { display: flex; flex-direction: column; gap: 0; }
.cta-side .row {
	display: flex; justify-content: space-between; align-items: baseline;
	padding: 18px 0;
	border-top: 1px solid rgba(244, 238, 227, 0.18);
	font-family: 'JetBrains Mono', monospace;
	font-size: 12px;
	letter-spacing: 0.06em;
}
.cta-side .row:last-child { border-bottom: 1px solid rgba(244, 238, 227, 0.18); }
.cta-side .row .k { color: rgba(244, 238, 227, 0.5); text-transform: uppercase; }
.cta-side .row .v { color: var(--paper); }
.cta .btn-primary {
	background: var(--paper);
	color: var(--ink);
	margin-top: 36px;
	align-self: flex-start;
}
.cta .btn-primary:hover { background: var(--terracotta-3); color: var(--ink); }

/* ---------- FOOTER ---------- */
footer.foot {
	background: var(--paper);
	padding: 56px 0 40px;
}
.foot-inner {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 32px;
	flex-wrap: wrap;
}
.foot-brand {
	font-family: 'Newsreader', serif;
	font-style: italic;
	font-size: 17px;
	color: var(--ink-3);
}
.foot-links {
	display: flex; gap: 28px;
	font-size: 14px;
	color: var(--ink-3);
}
.foot-links a:hover { color: var(--terracotta); }
.foot-bottom {
	margin-top: 40px;
	padding-top: 20px;
	border-top: 1px solid var(--rule);
	display: flex;
	justify-content: space-between;
	font-family: 'JetBrains Mono', monospace;
	font-size: 11px;
	letter-spacing: 0.08em;
	color: var(--ink-4);
	text-transform: uppercase;
	flex-wrap: wrap;
	gap: 12px;
}

/* ---------- REVEAL ANIMATION ---------- */
.reveal {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity .7s ease, transform .7s ease;
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- CHIPS (used in contact form, work tags) ---------- */
.chip {
	display: inline-flex;
	align-items: center;
	font-family: 'JetBrains Mono', monospace;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ink-3);
	padding: 8px 14px;
	border: 1px solid var(--rule);
	border-radius: 999px;
	background: transparent;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
	cursor: pointer;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.on,
.chip.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- BREADCRUMB ---------- */
.crumb {
	font-family: 'JetBrains Mono', monospace;
	font-size: 11px;
	letter-spacing: 0.1em;
	color: var(--ink-3);
	text-transform: uppercase;
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}
.crumb a { color: var(--ink-3); transition: color .15s ease; }
.crumb a:hover { color: var(--terracotta); }
.crumb .sep { color: var(--ink-4); }

/* ---------- SKIP LINK ---------- */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--ink);
	color: var(--paper);
	padding: 8px 12px;
	z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ---------- DEFAULT PAGE / FALLBACK ---------- */
.page-default { padding: 90px 0 110px; }
.page-default-header { margin-bottom: 32px; max-width: 720px; }
.page-default-header h1 {
	font-family: 'Newsreader', serif;
	font-weight: 400;
	font-size: clamp(40px, 5.4vw, 72px);
	line-height: 1.02;
	letter-spacing: -0.025em;
}
.page-default-header h1 em { font-style: italic; color: var(--terracotta); }
.page-default-header p {
	margin-top: 16px;
	font-size: 18px;
	line-height: 1.5;
	color: var(--ink-2);
}
.page-default-header a { color: var(--terracotta); border-bottom: 1px solid var(--terracotta); padding-bottom: 1px; }
.page-default-body p { margin-bottom: 1em; max-width: 65ch; color: var(--ink-2); line-height: 1.6; }
.page-default-body h2 { font-family: 'Newsreader', serif; font-weight: 400; font-size: 32px; margin-top: 32px; margin-bottom: 12px; letter-spacing: -0.02em; }

.error-404 .num {
	font-family: 'JetBrains Mono', monospace;
	font-size: 72px;
	color: var(--terracotta);
	letter-spacing: -0.04em;
	line-height: 1;
	margin-bottom: 16px;
}

.post-list { list-style: none; padding: 0; }
.post-list li {
	border-top: 1px solid var(--rule);
	padding: 28px 0;
}
.post-list li:last-child { border-bottom: 1px solid var(--rule); }
.post-list li a { display: block; transition: color .15s ease; }
.post-list li a:hover { color: var(--terracotta); }
.post-list li h2 {
	font-family: 'Newsreader', serif;
	font-weight: 400;
	font-size: 28px;
	letter-spacing: -0.01em;
	margin-bottom: 6px;
}
.post-list li .excerpt { color: var(--ink-3); font-size: 15px; line-height: 1.5; }

/* Hidden helper for screen readers / honeypots. */
.sr-only,
.visually-hidden {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0,0,0,0);
	white-space: nowrap;
	border: 0;
}
