/*
Theme Name: Half Wedge
Theme URI: https://halfwedge.com
Description: Custom theme for Half Wedge — websites + content for golf.
Version: 1.0.2
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: halfwedge
*/

@font-face {
	font-family: "Archivo";
	src: url("assets/fonts/archivo.woff2") format("woff2");
	font-weight: 400 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "JetBrains Mono";
	src: url("assets/fonts/jetbrains-mono.woff2") format("woff2");
	font-weight: 100 800;
	font-style: normal;
	font-display: swap;
}

:root {
	--cream: #fbf8f1;
	--sand: #efeadf;
	--line: #d9d2c2;
	--green: #14301f;
	--green-2: #1c3d29;
	--orange: #e4572e;
	--ink: #14301f;
	--body: #3e4f43;
	--muted: #5b6b5f;
	--on-dark: #c9d1c7;
	--sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
	--mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
	--serif: Georgia, "Times New Roman", serif;
	--gutter: clamp(20px, 4vw, 40px);
	--radius: 10px;
	--section: clamp(72px, 10vw, 128px);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: var(--cream);
	color: var(--body);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); margin: 0; line-height: 1.05; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: calc(1200px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
	position: absolute; left: 16px; top: -60px; z-index: 100;
	background: var(--green); color: var(--cream); padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* ---------- Shared bits ---------- */

.eyebrow {
	font-family: var(--mono);
	font-size: 13px;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--orange);
	margin-bottom: 20px;
}
.num { font-family: var(--mono); font-size: 13px; color: var(--orange); margin-bottom: 14px; }

.section-title {
	font-weight: 900;
	font-size: clamp(38px, 5.4vw, 64px);
	letter-spacing: -.025em;
	line-height: 1.02;
}
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

.text-link {
	font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none;
	border-bottom: 3px solid var(--orange); padding-bottom: 2px; white-space: nowrap;
	transition: color .15s;
}
.text-link:hover { color: var(--orange); }

.btn {
	display: inline-flex; align-items: center; justify-content: center;
	font-family: var(--sans); font-weight: 700; font-size: 16px; line-height: 1;
	padding: 20px 32px; border-radius: 999px; text-decoration: none;
	border: 2px solid var(--green); transition: background .15s, color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--dark { background: var(--green); color: var(--cream); }
.btn--dark:hover { background: #0d2216; }
.btn--outline { background: transparent; color: var(--ink); }
.btn--outline:hover { background: var(--green); color: var(--cream); }
.btn--sm { font-size: 14px; padding: 14px 22px; }
.btn--lg { font-size: 17px; padding: 24px 36px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Header ---------- */

.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(251, 248, 241, .94);
	backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 88px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand .hw-mark { width: 62px; }
.brand__name { font-weight: 900; font-size: 20px; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }

.site-nav { display: flex; align-items: center; gap: 44px; }
.site-nav ul { display: flex; gap: 34px; }
.site-nav ul a { font-weight: 600; font-size: 16px; color: var(--ink); text-decoration: none; }
.site-nav ul a:hover { color: var(--orange); }

.nav-toggle { display: none; }

@media (max-width: 860px) {
	.site-header__inner { height: 72px; }
	.brand .hw-mark { width: 50px; }
	.brand__name { font-size: 17px; }

	.nav-toggle {
		display: grid; place-items: center; width: 46px; height: 46px; margin-right: -8px;
		background: none; border: 0; cursor: pointer; color: var(--ink);
	}
	.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
		display: block; width: 24px; height: 2.5px; background: currentColor; border-radius: 2px;
		transition: transform .2s, opacity .2s;
	}
	.nav-toggle__bars { position: relative; }
	.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
	.nav-toggle__bars::before { top: -7px; }
	.nav-toggle__bars::after { top: 7px; }
	.nav-open .nav-toggle__bars { background: transparent; }
	.nav-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
	.nav-open .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

	.site-nav {
		position: fixed; inset: 72px 0 auto 0; z-index: 49;
		flex-direction: column; align-items: stretch; gap: 24px;
		padding: 16px var(--gutter) 28px; background: var(--cream); border-bottom: 1px solid var(--line);
		box-shadow: 0 20px 40px -24px rgba(20, 48, 31, .35);
		visibility: hidden; opacity: 0; transform: translateY(-8px);
		transition: opacity .2s, transform .2s, visibility 0s .2s;
	}
	.nav-open .site-nav { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .2s; }
	.site-nav ul { flex-direction: column; gap: 0; }
	.site-nav ul a { display: block; font-size: 22px; font-weight: 800; padding: 12px 0; border-bottom: 1px solid var(--line); }
	.site-nav .btn { align-self: flex-start; }
}

/* ---------- Hero ---------- */

.hero { padding: clamp(64px, 9vw, 120px) 0 var(--section); }
.hero__title {
	font-weight: 900;
	font-size: clamp(44px, 10.4vw, 124px);
	line-height: .93;
	letter-spacing: -.045em;
	margin-bottom: 36px;
}
.hero__title span { display: block; }
.hero__lead { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.55; max-width: 33em; margin-bottom: 40px; }
.hero__media { margin: clamp(56px, 8vw, 96px) 0 0; border-radius: var(--radius); overflow: hidden; }
.hero__media img { width: 100%; aspect-ratio: 2.36; object-fit: cover; }

/* ---------- Services ---------- */

.services { background: var(--green); padding: var(--section) 0; }
.services .section-title { color: var(--cream); margin-bottom: clamp(40px, 6vw, 64px); }
.services__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 32px; }

.service-card { border: 1px solid #3e5a47; border-radius: var(--radius); overflow: hidden; background: var(--green); }
.service-card__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.service-card__body { padding: clamp(28px, 4vw, 56px); }
.service-card h3 { color: var(--cream); font-weight: 900; font-size: clamp(28px, 3vw, 34px); letter-spacing: -.01em; margin-bottom: 18px; }
.service-card p:not(.num) { color: var(--on-dark); font-size: 17px; line-height: 1.6; max-width: 26em; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.tags li { font-size: 14px; color: var(--cream); border: 1px solid #5b7a66; border-radius: 999px; padding: 7px 16px; }

/* ---------- Selected work ---------- */

.work { padding: var(--section) 0; }
.work .section-head { margin-bottom: clamp(36px, 5vw, 56px); }
.work__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px 40px; }
@media (min-width: 1000px) { .work__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.browser {
	border: 1px solid #e3ddcf; border-radius: var(--radius); overflow: hidden; background: #fff;
	box-shadow: 0 24px 50px -30px rgba(20, 48, 31, .35);
	transition: transform .25s ease, box-shadow .25s ease;
}
.project:hover .browser { transform: translateY(-4px); box-shadow: 0 32px 60px -30px rgba(20, 48, 31, .45); }
.browser__chrome { display: flex; align-items: center; gap: 20px; padding: 12px 18px; background: #f2eee5; border-bottom: 1px solid #e3ddcf; }
.browser__dots { display: flex; gap: 7px; }
.browser__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.browser__url { flex: 1; font-family: var(--mono); font-size: 11px; color: var(--muted); background: #fff; border-radius: 999px; padding: 6px 14px; }
.browser__nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 22px; color: var(--accent); }
.browser__club { font-family: var(--serif); font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser__links { display: flex; gap: 14px; font-size: 11px; font-weight: 700; }
.browser__hero { position: relative; aspect-ratio: 16 / 10; background: var(--green); }
.browser__hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.browser__hero::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, .15) 45%, rgba(0, 0, 0, 0) 70%);
}
.browser__copy { position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 1; color: #fff; }
.browser__copy p { font-family: var(--serif); font-size: clamp(18px, 2.4vw, 24px); line-height: 1.2; margin-bottom: 12px; }
.browser__btn { display: inline-block; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 8px 14px; border-radius: 4px; }

.project__meta { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 22px; }
.project__meta h3 { font-weight: 800; font-size: 21px; letter-spacing: -.01em; }
.project__type { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.project__summary { margin-top: 10px; font-size: 16px; }

/* ---------- How we work ---------- */

.process { background: var(--sand); padding: var(--section) 0; }
.process .section-title { max-width: 14ch; margin-bottom: clamp(40px, 6vw, 64px); }
.process__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 40px 48px; }
.step { border-top: 3px solid var(--green); padding-top: 28px; }
.step h3 { font-weight: 800; font-size: clamp(22px, 2.2vw, 26px); letter-spacing: -.01em; margin-bottom: 12px; }
.step p:not(.num) { font-size: 16.5px; max-width: 24em; }

/* ---------- Content channel ---------- */

.channel { padding: var(--section) 0; }
.channel .eyebrow { margin-bottom: 12px; }
.channel .section-head { margin-bottom: clamp(36px, 5vw, 56px); }
.channel__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 48px 32px; }

.content-card__media { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--sand); aspect-ratio: 16 / 9; }
.content-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.content-card:hover .content-card__media img { transform: scale(1.04); }
.play {
	position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
	display: grid; place-items: center; border-radius: 50%; background: rgba(251, 248, 241, .92);
}
.play svg { width: 28px; margin-left: 4px; fill: var(--green); }
.badge {
	position: absolute; right: 12px; bottom: 12px; font-family: var(--mono); font-size: 12px; text-transform: uppercase;
	letter-spacing: .04em; color: var(--cream); background: rgba(20, 48, 31, .85); padding: 5px 9px; border-radius: 5px;
}
.content-card__cat { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); margin: 22px 0 10px; }
.content-card__title { font-weight: 800; font-size: 20px; line-height: 1.25; letter-spacing: -.005em; }
.content-card__title a { text-decoration: none; }
.content-card__title a:hover { color: var(--orange); }

/* ---------- CTA ---------- */

.cta { background: var(--orange); padding: clamp(72px, 9vw, 120px) 0; }
.cta__title {
	color: #fff; font-weight: 900; font-size: clamp(38px, 5.6vw, 72px);
	line-height: 1; letter-spacing: -.035em; max-width: 19ch; margin-bottom: 40px;
}

/* ---------- Footer ---------- */

.site-footer { background: var(--green); color: var(--on-dark); font-size: 16px; }
.site-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-top: 88px; padding-bottom: 72px; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--cream); }
.site-footer li { margin-bottom: 8px; }
.footer-logo .hw-mark { width: 84px; }
.footer-wordmark { color: var(--cream); font-weight: 900; font-size: 16px; letter-spacing: .06em; text-transform: uppercase; margin: 16px 0 8px; }
.footer-heading { color: var(--cream); font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.site-footer__brand .footer-heading { margin-top: 36px; }
.site-footer__base { border-top: 1px solid #2e4a38; padding: 28px 0; font-family: var(--mono); font-size: 12px; }

@media (max-width: 720px) {
	.site-footer__grid { grid-template-columns: 1fr 1fr; padding-top: 64px; }
	.site-footer__brand { grid-column: 1 / -1; }
}

/* ---------- Posts & pages ---------- */

.page-shell { padding: clamp(56px, 8vw, 104px) 0 var(--section); }
.page-shell > .wrap > .section-title { margin-bottom: 48px; }
.entry { max-width: 760px; margin: 0 auto; }
.entry__title { font-weight: 900; font-size: clamp(38px, 5.4vw, 60px); letter-spacing: -.03em; margin-bottom: 32px; }
.entry__media { margin: 0 0 40px; border-radius: var(--radius); overflow: hidden; }
.entry__content { font-size: 18px; line-height: 1.7; }
.entry__content > * + * { margin-top: 1.2em; }
.entry__content h2 { font-size: 30px; font-weight: 800; margin-top: 1.8em; }
.entry__content h3 { font-size: 23px; font-weight: 800; margin-top: 1.6em; }
.entry__content a { color: var(--ink); text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.entry__content ul { list-style: disc; padding-left: 1.3em; }
.entry__content ol { list-style: decimal; padding-left: 1.3em; }
.entry__content img, .entry__content iframe { border-radius: var(--radius); }
.lead { font-size: 20px; }
.pager { margin-top: 56px; }
.pager .nav-links { display: flex; gap: 12px; }
.pager .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; }
.pager .current { background: var(--green); color: var(--cream); border-color: var(--green); }
