/* ==========================================================================
   Gawain Cox — Executive Portfolio
   Dark / smoked-charcoal theme with brass accent
   ========================================================================== */

:root {
	--bg: #0c0c0b;
	--bg-alt: #151412;
	--surface: #1b1916;
	--surface-2: #211f1b;
	--border: rgba(217, 168, 108, 0.16);
	--border-strong: rgba(217, 168, 108, 0.32);
	--text: #ece7df;
	--text-dim: #a8a29a;
	--text-faint: #6f6a63;
	--brass: #b8874f;
	--brass-light: #d9a86c;
	--brass-dark: #8a6238;
	--radius: 2px;
	--maxw: 1180px;
	--font-display: 'Fraunces', 'Georgia', serif;
	--font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	color: var(--text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--brass-light); text-decoration: none; }
a:hover { color: var(--brass); }

.wrap {
	max-width: var(--maxw);
	margin: 0 auto;
	padding: 0 1.75rem;
}

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 600;
	color: var(--text);
	margin: 0 0 0.6em 0;
	line-height: 1.15;
}

.eyebrow {
	display: inline-block;
	font-family: var(--font-body);
	font-size: 0.72rem;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: var(--brass-light);
	margin-bottom: 1em;
}

.section-heading {
	font-size: clamp(1.8rem, 3.2vw, 2.6rem);
	max-width: 34ch;
}

.section-lede {
	color: var(--text-dim);
	max-width: 62ch;
	font-size: 1.08rem;
}

section {
	padding: clamp(4.5rem, 9vw, 8rem) 0;
	position: relative;
}

.section-divider {
	border: none;
	border-top: 1px solid var(--border);
	margin: 0;
}

/* ---------- Background cover image ----------
   A single fixed, full-bleed cover photo sits behind the whole page. A dark
   scrim (background-color, ~93% opaque) is layered on top of it so the photo
   reads as a faint, atmospheric backdrop rather than competing with content —
   adjust the scrim's opacity below to taste once the real image is in place.
   Swap assets/images/bg-cover.jpg for a high-quality, wide (2400px+) landscape
   image — brewery interior, hop yard, or similar atmospheric shot works best. */
body {
	background-color: var(--bg);
	background-image:
		linear-gradient(rgba(12,12,11,0.93), rgba(12,12,11,0.93)),
		url("../images/bg-cover.jpg");
	background-repeat: no-repeat, no-repeat;
	background-position: center, center;
	background-size: cover, cover;
	background-attachment: fixed, fixed;
}

/* ---------- Nav ---------- */
#site-nav {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 500;
	background: rgba(12,12,11,0);
	border-bottom: 1px solid transparent;
	transition: background 0.35s ease, border-color 0.35s ease, padding 0.35s ease;
	padding: 1.5rem 0;
}

#site-nav.scrolled {
	background: rgba(12,12,11,0.92);
	backdrop-filter: blur(10px);
	border-bottom-color: var(--border);
	padding: 0.9rem 0;
}

#site-nav .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.brand {
	font-family: var(--font-display);
	font-size: 1.15rem;
	letter-spacing: 0.06em;
	color: var(--text);
	display: flex;
	align-items: center;
	gap: 0.6em;
}

.brand .mono {
	width: 34px; height: 34px;
	border: 1px solid var(--border-strong);
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-size: 0.85rem;
	color: var(--brass-light);
	letter-spacing: 0;
}

.nav-links {
	display: flex;
	gap: 2.1rem;
	list-style: none;
	margin: 0; padding: 0;
}

.nav-links a {
	color: var(--text-dim);
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--brass-light); }

.nav-cta {
	border: 1px solid var(--border-strong);
	padding: 0.55em 1.3em;
	font-size: 0.74rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--text);
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.nav-cta:hover { background: var(--brass); border-color: var(--brass); color: #0c0c0b; }

.nav-toggle {
	display: none;
	background: none; border: none;
	color: var(--text);
	font-size: 1.5rem;
	cursor: pointer;
}

/* ---------- Hero ---------- */
#hero {
	min-height: 100svh;
	display: flex;
	align-items: center;
	padding-top: 7rem;
	padding-bottom: 4rem;
	overflow: hidden;
}

.hero-grid {
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	gap: 4rem;
	align-items: center;
}

.hero-eyebrow {
	color: var(--brass-light);
	font-size: 0.8rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	margin-bottom: 1.4rem;
	display: block;
}

.hero-title {
	font-size: clamp(2.6rem, 6vw, 4.6rem);
	line-height: 1.05;
	margin-bottom: 0.5em;
}

.hero-title em {
	font-style: italic;
	color: var(--brass-light);
}

.hero-sub {
	font-size: 1.15rem;
	color: var(--text-dim);
	max-width: 46ch;
	margin-bottom: 2.2rem;
}

.hero-actions {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 2.5rem;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.9em 1.9em;
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	border: 1px solid var(--border-strong);
	color: var(--text);
	transition: all 0.25s ease;
	cursor: pointer;
	background: transparent;
}

.btn.primary {
	background: linear-gradient(135deg, var(--brass-light), var(--brass-dark));
	border-color: transparent;
	color: #14110c;
	font-weight: 600;
}
.btn.primary:hover { filter: brightness(1.12); color: #14110c; }
.btn.ghost:hover { background: var(--surface); border-color: var(--brass); color: var(--brass-light); }

.hero-stats {
	display: flex;
	gap: 2.4rem;
	flex-wrap: wrap;
}

.hero-stat b {
	display: block;
	font-family: var(--font-display);
	font-size: 1.7rem;
	color: var(--brass-light);
}
.hero-stat span {
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text-faint);
}

.hero-portrait {
	position: relative;
}

.hero-portrait .frame {
	position: relative;
	aspect-ratio: 4 / 5;
	overflow: hidden;
	border: 1px solid var(--border-strong);
}

.hero-portrait img {
	width: 100%; height: 100%;
	object-fit: cover;
	filter: grayscale(0.35) contrast(1.08) brightness(0.92);
}

.hero-portrait .frame::after {
	content: '';
	position: absolute; inset: 0;
	background: linear-gradient(180deg, rgba(12,12,11,0) 55%, rgba(12,12,11,0.85) 100%),
		linear-gradient(90deg, rgba(184,135,79,0.12), transparent 40%);
	pointer-events: none;
}

.hero-portrait .caption {
	position: absolute;
	left: 1.4rem; bottom: 1.2rem;
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--text-dim);
}

.scroll-cue {
	position: absolute;
	bottom: 2rem; left: 50%;
	transform: translateX(-50%);
	display: flex; flex-direction: column; align-items: center;
	gap: 0.6rem;
	color: var(--text-faint);
	font-size: 0.68rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}
.scroll-cue .line {
	width: 1px; height: 34px;
	background: linear-gradient(var(--brass-light), transparent);
}

/* ---------- Stat band ---------- */
#stat-band {
	padding: 3rem 0;
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
	background: var(--bg-alt);
}
.stat-row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1.5rem;
	text-align: center;
}
.stat-row b {
	display: block;
	font-family: var(--font-display);
	font-size: clamp(1.6rem, 3vw, 2.2rem);
	color: var(--brass-light);
}
.stat-row span {
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-faint);
}

/* ---------- About ---------- */
.about-grid {
	display: grid;
	grid-template-columns: 0.9fr 1.1fr;
	gap: 4rem;
	align-items: center;
}
.about-media {
	position: relative;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	border: 1px solid var(--border);
}
.about-media img { width: 100%; height: 100%; object-fit: cover; }
.about-media .tag {
	position: absolute; top: 1rem; left: 1rem;
	background: rgba(12,12,11,0.7);
	border: 1px solid var(--border-strong);
	padding: 0.4em 0.8em;
	font-size: 0.65rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--brass-light);
}

.about-copy p { color: var(--text-dim); margin-bottom: 1.3em; }
.about-copy .pull {
	font-family: var(--font-display);
	font-style: italic;
	font-size: 1.4rem;
	color: var(--text);
	border-left: 2px solid var(--brass);
	padding-left: 1.2rem;
	margin: 1.8rem 0;
}

/* ---------- Cards ---------- */
.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1.6rem;
	margin-top: 2.5rem;
}

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	padding: 2.1rem 1.8rem;
	transition: border-color 0.25s ease, transform 0.25s ease;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-3px); }

.card .icon {
	width: 42px; height: 42px;
	margin-bottom: 1.2rem;
	color: var(--brass-light);
}
.card h3 { font-size: 1.15rem; margin-bottom: 0.5em; }
.card p { color: var(--text-dim); font-size: 0.94rem; margin: 0 0 0.8em 0; }
.card ul { margin: 0.8em 0 0 0; padding-left: 1.1em; color: var(--text-dim); font-size: 0.9rem; }
.card li { margin-bottom: 0.4em; }

/* ---------- Timeline ---------- */
.timeline {
	list-style: none;
	margin: 2.5rem 0 0 0;
	padding: 0;
	border-left: 1px solid var(--border-strong);
}
.timeline li {
	position: relative;
	padding: 0 0 2.6rem 2.2rem;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
	content: '';
	position: absolute;
	left: -5px; top: 0.4em;
	width: 9px; height: 9px;
	border-radius: 50%;
	background: var(--brass-light);
	box-shadow: 0 0 0 4px var(--bg);
}
.timeline .dates {
	display: block;
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--brass-light);
	margin-bottom: 0.3em;
}
.timeline .role {
	display: block;
	font-family: var(--font-display);
	font-size: 1.15rem;
	color: var(--text);
	margin-bottom: 0.4em;
}
.timeline p { color: var(--text-dim); font-size: 0.94rem; max-width: 64ch; }

/* ---------- Gallery ---------- */
.gallery {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.9rem;
	margin-top: 2.5rem;
}
.gallery figure {
	margin: 0;
	position: relative;
	aspect-ratio: 4/5;
	overflow: hidden;
	border: 1px solid var(--border);
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery figure:hover img { transform: scale(1.05); }
.gallery figcaption {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: 0.8rem 0.9rem;
	background: linear-gradient(0deg, rgba(12,12,11,0.9), transparent);
	font-size: 0.68rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--text-dim);
}

/* ---------- Press ---------- */
.press-list {
	margin-top: 2.5rem;
	border-top: 1px solid var(--border);
}
.press-item {
	display: grid;
	grid-template-columns: 140px 1fr auto;
	gap: 1.5rem;
	align-items: baseline;
	padding: 1.5rem 0;
	border-bottom: 1px solid var(--border);
}
.press-item .date { color: var(--text-faint); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.press-item h4 { margin: 0 0 0.3em 0; font-size: 1.05rem; }
.press-item p { margin: 0; color: var(--text-dim); font-size: 0.9rem; }
.press-item a { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }

/* ---------- CV callout ---------- */
.cv-callout {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	flex-wrap: wrap;
	background: var(--surface-2);
	border: 1px solid var(--border-strong);
	padding: 2.2rem 2.4rem;
	margin-top: 3rem;
}
.cv-callout p { margin: 0; color: var(--text-dim); max-width: 40ch; }

/* ---------- Contact ---------- */
.contact-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4rem;
}
.field { margin-bottom: 1.3rem; }
.field label {
	display: block;
	font-size: 0.72rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--text-faint);
	margin-bottom: 0.5em;
}
.field input, .field select, .field textarea {
	width: 100%;
	background: var(--surface);
	border: 1px solid var(--border);
	color: var(--text);
	padding: 0.85em 1em;
	font-family: var(--font-body);
	font-size: 0.95rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
	outline: none;
	border-color: var(--brass);
}
.field.full { grid-column: 1 / -1; }
.contact-form .fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }

.contact-info .item {
	display: flex;
	gap: 1rem;
	margin-bottom: 1.6rem;
}
.contact-info .item .icon {
	width: 20px; height: 20px;
	color: var(--brass-light);
	flex-shrink: 0;
}
.contact-info h4 { margin: 0 0 0.2em 0; font-size: 0.95rem; }
.contact-info p { margin: 0; color: var(--text-dim); font-size: 0.9rem; }

#form-status { margin-top: 1rem; font-size: 0.88rem; }

/* ---------- Footer ---------- */
#site-footer {
	border-top: 1px solid var(--border);
	padding: 3rem 0;
}
.footer-grid {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 1.5rem;
}
.footer-social {
	display: flex;
	gap: 1.2rem;
	list-style: none;
	margin: 0; padding: 0;
}
.footer-social a {
	width: 38px; height: 38px;
	border: 1px solid var(--border);
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	color: var(--text-dim);
	transition: border-color 0.2s ease, color 0.2s ease;
}
.footer-social a:hover { border-color: var(--brass); color: var(--brass-light); }
.footer-copy { color: var(--text-faint); font-size: 0.82rem; }

/* ---------- Reveal animation ----------
   Content is visible by default (opacity:1). Only when JS confirms it
   can run (html.js class) and IntersectionObserver is supported do we
   hide-then-reveal. This guarantees content is never permanently hidden
   if JS fails, is slow, or is disabled. */
.reveal {
	opacity: 1;
	transform: none;
	transition: opacity 0.7s ease, transform 0.7s ease;
}
html.js-reveal .reveal {
	opacity: 0;
	transform: translateY(20px);
}
html.js-reveal .reveal.in-view {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal { opacity: 1 !important; transform: none !important; transition: none; }
	.gallery img { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	.hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
	.hero-portrait { order: -1; max-width: 340px; margin: 0 auto 1rem; }
	.stat-row { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; }
	.gallery { grid-template-columns: repeat(2, 1fr); }
	.press-item { grid-template-columns: 1fr; gap: 0.4rem; }
}

@media (max-width: 760px) {
	.nav-links, .nav-cta { display: none; }
	.nav-toggle { display: block; }
	#site-nav.open .nav-links {
		display: flex;
		flex-direction: column;
		position: fixed;
		top: 0; right: 0; bottom: 0;
		width: 78%;
		max-width: 320px;
		background: var(--bg-alt);
		border-left: 1px solid var(--border);
		padding: 6rem 2rem 2rem;
		gap: 1.6rem;
		z-index: 400;
	}
	#site-nav.open .nav-cta { display: inline-flex; margin-top: 1rem; }
	.contact-form .fields-2 { grid-template-columns: 1fr; }
	.cv-callout { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
	.gallery { grid-template-columns: repeat(2, 1fr); }
	.hero-stats { gap: 1.4rem; }
}
