/*
Theme Name: Easy Church Tech
Theme URI: https://easychurch.tech
Author: Sean McIntyre
Description: Bespoke classic theme for easychurch.tech. Carries the company front page, a web design portfolio, and a placeholder for the Easy Church Media plugin.
Version: 0.1.0
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: easy-church-tech
Tags: one-column, custom-menu, custom-logo, portfolio
*/

/* ==========================================================================
   Tokens
   Everything visual routes through these, so a restyle is a token edit.
   ========================================================================== */

:root {
	--ect-ink:            #16161d;
	--ect-ink-soft:       #43434f;
	--ect-muted:          #6b6b7b;
	--ect-line:           #e4e4ec;
	--ect-line-strong:    #cfcfdb;

	--ect-bg:             #ffffff;
	--ect-bg-alt:         #f7f7fb;
	--ect-bg-deep:        #14141c;

	--ect-accent:         #4f46e5;
	--ect-accent-dark:    #3f36d4;
	--ect-accent-soft:    #eeecfd;

	--ect-radius:         14px;
	--ect-radius-sm:      9px;
	--ect-radius-pill:    999px;

	--ect-shadow:         0 1px 2px rgba(20, 20, 28, .05), 0 8px 24px -12px rgba(20, 20, 28, .16);
	--ect-shadow-lift:    0 2px 4px rgba(20, 20, 28, .06), 0 20px 40px -18px rgba(20, 20, 28, .28);

	--ect-font:           ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
	                      "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--ect-font-mono:      ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--ect-measure:        68ch;
	--ect-wrap:           1160px;
	--ect-wrap-narrow:    760px;
	--ect-gutter:         clamp(1.25rem, 5vw, 3rem);

	--ect-step:           clamp(4rem, 9vw, 7.5rem);
}

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

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

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

body {
	margin: 0;
	background: var(--ect-bg);
	color: var(--ect-ink);
	font-family: var(--ect-font);
	font-size: clamp(1rem, .96rem + .2vw, 1.125rem);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--ect-accent); text-underline-offset: .2em; }
a:hover { color: var(--ect-accent-dark); }

h1, h2, h3, h4 {
	margin: 0 0 .5em;
	line-height: 1.1;
	letter-spacing: -.022em;
	font-weight: 660;
	color: var(--ect-ink);
	text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 1.6rem + 4vw, 4.5rem); }
h2 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.9rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + .7vw, 1.5rem); }

p { margin: 0 0 1.15em; max-width: var(--ect-measure); }

hr { border: 0; border-top: 1px solid var(--ect-line); margin: var(--ect-step) 0; }

:focus-visible {
	outline: 3px solid var(--ect-accent);
	outline-offset: 3px;
	border-radius: 4px;
}

.ect-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap; border: 0;
}

.ect-skip {
	position: absolute; left: -9999px; top: 0;
	background: var(--ect-ink); color: #fff;
	padding: .75rem 1.25rem; z-index: 200;
	border-radius: 0 0 var(--ect-radius-sm) 0;
}
.ect-skip:focus { left: 0; color: #fff; }

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

.ect-wrap {
	width: 100%;
	max-width: var(--ect-wrap);
	margin-inline: auto;
	padding-inline: var(--ect-gutter);
}

.ect-wrap--narrow { max-width: var(--ect-wrap-narrow); }

.ect-section { padding-block: var(--ect-step); }
.ect-section--alt { background: var(--ect-bg-alt); }
.ect-section--deep { background: var(--ect-bg-deep); color: #f2f2f7; }
.ect-section--deep h2,
.ect-section--deep h3 { color: #fff; }
.ect-section--deep p { color: #c7c7d4; }

.ect-eyebrow {
	display: inline-block;
	font-size: .78rem;
	font-weight: 640;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--ect-accent);
	margin-bottom: 1rem;
}
.ect-section--deep .ect-eyebrow { color: #a5a0f5; }

.ect-lede {
	font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem);
	line-height: 1.5;
	color: var(--ect-ink-soft);
}
.ect-section--deep .ect-lede { color: #c7c7d4; }

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

.ect-btn {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	padding: .8rem 1.5rem;
	border-radius: var(--ect-radius-pill);
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.2;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}

.ect-btn--primary { background: var(--ect-accent); color: #fff; }
.ect-btn--primary:hover { background: var(--ect-accent-dark); color: #fff; transform: translateY(-1px); }

.ect-btn--ghost {
	background: transparent;
	color: var(--ect-ink);
	border-color: var(--ect-line-strong);
}
.ect-btn--ghost:hover { border-color: var(--ect-ink); color: var(--ect-ink); }

.ect-section--deep .ect-btn--ghost { color: #fff; border-color: rgba(255,255,255,.32); }
.ect-section--deep .ect-btn--ghost:hover { border-color: #fff; color: #fff; }

.ect-btns { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* ==========================================================================
   Header
   ========================================================================== */

.ect-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, .86);
	backdrop-filter: saturate(1.6) blur(12px);
	border-bottom: 1px solid var(--ect-line);
}

.ect-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 72px;
}

.ect-brand {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	font-weight: 680;
	font-size: 1.05rem;
	letter-spacing: -.02em;
	color: var(--ect-ink);
	text-decoration: none;
}
.ect-brand:hover { color: var(--ect-ink); }
.ect-brand img { max-height: 34px; width: auto; }

.ect-brand__mark {
	width: 30px; height: 30px;
	border-radius: 8px;
	background: var(--ect-accent);
	display: grid; place-items: center;
	color: #fff; font-size: .95rem; font-weight: 700;
	letter-spacing: -.04em;
	flex: none;
}

.ect-nav ul {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 1.75rem;
	margin: 0; padding: 0;
}
.ect-nav a {
	color: var(--ect-ink-soft);
	text-decoration: none;
	font-size: .97rem;
	font-weight: 520;
}
.ect-nav a:hover,
.ect-nav .current-menu-item > a { color: var(--ect-ink); }

.ect-nav__toggle {
	display: none;
	background: none;
	border: 1px solid var(--ect-line-strong);
	border-radius: var(--ect-radius-sm);
	padding: .5rem .75rem;
	font: inherit; font-size: .9rem; font-weight: 600;
	color: var(--ect-ink);
	cursor: pointer;
}

@media (max-width: 780px) {
	.ect-nav__toggle { display: block; }
	.ect-nav {
		display: none;
		position: absolute;
		inset-inline: 0;
		top: 100%;
		background: #fff;
		border-bottom: 1px solid var(--ect-line);
		padding: 1rem var(--ect-gutter) 1.5rem;
	}
	.ect-nav.is-open { display: block; }
	.ect-nav ul { flex-direction: column; align-items: flex-start; gap: .25rem; }
	.ect-nav a { display: block; padding: .6rem 0; font-size: 1.05rem; }
}

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

.ect-hero {
	padding-block: clamp(3.5rem, 8vw, 7rem) var(--ect-step);
	position: relative;
	overflow: hidden;
}

.ect-hero::after {
	content: "";
	position: absolute;
	inset-inline-end: -16%;
	top: -30%;
	width: min(720px, 70vw);
	aspect-ratio: 1;
	background: radial-gradient(circle at center, var(--ect-accent-soft), transparent 68%);
	pointer-events: none;
	z-index: -1;
}

.ect-hero h1 { max-width: 16ch; }
.ect-hero .ect-lede { max-width: 52ch; }

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

.ect-grid {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.ect-card {
	background: #fff;
	border: 1px solid var(--ect-line);
	border-radius: var(--ect-radius);
	padding: 2rem;
	display: flex;
	flex-direction: column;
	box-shadow: var(--ect-shadow);
}

.ect-card h3 { margin-bottom: .6rem; }
.ect-card p { color: var(--ect-ink-soft); }
.ect-card > :last-child { margin-bottom: 0; }

.ect-card__foot { margin-top: auto; padding-top: 1.25rem; }

.ect-tag {
	display: inline-block;
	font-size: .72rem;
	font-weight: 650;
	letter-spacing: .08em;
	text-transform: uppercase;
	padding: .3rem .7rem;
	border-radius: var(--ect-radius-pill);
	background: var(--ect-accent-soft);
	color: var(--ect-accent-dark);
	margin-bottom: 1rem;
	align-self: flex-start;
}
.ect-tag--quiet { background: var(--ect-bg-alt); color: var(--ect-muted); }

/* ==========================================================================
   Portfolio
   ========================================================================== */

.ect-work {
	display: grid;
	gap: 2rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
}

.ect-project {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--ect-line);
	border-radius: var(--ect-radius);
	overflow: hidden;
	box-shadow: var(--ect-shadow);
	transition: transform .18s ease, box-shadow .18s ease;
}
.ect-project:hover { transform: translateY(-3px); box-shadow: var(--ect-shadow-lift); }

.ect-project__shot {
	aspect-ratio: 16 / 10;
	background: var(--ect-bg-alt);
	border-bottom: 1px solid var(--ect-line);
	overflow: hidden;
	position: relative;
}
.ect-project__shot img {
	width: 100%; height: 100%;
	object-fit: cover;
	object-position: top center;
}
.ect-project__shot--empty {
	display: grid; place-items: center;
	color: var(--ect-muted);
	font-size: .85rem;
	background: repeating-linear-gradient(
		135deg, var(--ect-bg-alt), var(--ect-bg-alt) 10px,
		#f1f1f6 10px, #f1f1f6 20px
	);
}

.ect-project__body { padding: 1.6rem 1.6rem 1.8rem; display: flex; flex-direction: column; flex: 1; }
.ect-project__body h3 { margin-bottom: .3rem; }
.ect-project__body h3 a { color: inherit; text-decoration: none; }
.ect-project__body h3 a:hover { color: var(--ect-accent); }

.ect-project__meta {
	font-size: .85rem;
	color: var(--ect-muted);
	margin-bottom: .9rem;
}

.ect-project__excerpt { font-size: .97rem; color: var(--ect-ink-soft); }
.ect-project__excerpt p:last-child { margin-bottom: 0; }

.ect-project__foot { margin-top: auto; padding-top: 1.2rem; display: flex; flex-wrap: wrap; gap: 1rem; }

.ect-services-list {
	list-style: none; margin: 0 0 1rem; padding: 0;
	display: flex; flex-wrap: wrap; gap: .4rem;
}
.ect-services-list li {
	font-size: .76rem;
	padding: .25rem .6rem;
	border-radius: var(--ect-radius-pill);
	background: var(--ect-bg-alt);
	color: var(--ect-muted);
	border: 1px solid var(--ect-line);
}

/* Single project */

.ect-project-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) 2rem; }
.ect-project-hero .ect-project__meta { font-size: .95rem; }

.ect-project-shot-full {
	border: 1px solid var(--ect-line);
	border-radius: var(--ect-radius);
	overflow: hidden;
	box-shadow: var(--ect-shadow-lift);
	margin-bottom: var(--ect-step);
}

.ect-facts {
	display: grid;
	gap: 1.5rem 2.5rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
	padding: 1.75rem 0;
	border-block: 1px solid var(--ect-line);
	margin-bottom: 2.5rem;
}
.ect-facts dt {
	font-size: .74rem; font-weight: 650; letter-spacing: .09em;
	text-transform: uppercase; color: var(--ect-muted); margin-bottom: .35rem;
}
.ect-facts dd { margin: 0; font-weight: 560; }

/* ==========================================================================
   Prose (pages, posts, case-study bodies)
   ========================================================================== */

.ect-prose h2 { margin-top: 2.2em; }
.ect-prose h3 { margin-top: 1.8em; }
.ect-prose > :first-child { margin-top: 0; }
.ect-prose ul, .ect-prose ol { max-width: var(--ect-measure); padding-left: 1.3em; }
.ect-prose li { margin-bottom: .4em; }
.ect-prose blockquote {
	margin: 2em 0;
	padding-left: 1.4em;
	border-left: 3px solid var(--ect-accent);
	font-size: 1.1rem;
	color: var(--ect-ink-soft);
}
.ect-prose img { border-radius: var(--ect-radius-sm); }
.ect-prose code { font-family: var(--ect-font-mono); font-size: .9em; background: var(--ect-bg-alt); padding: .15em .4em; border-radius: 4px; }

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

.ect-footer {
	background: var(--ect-bg-deep);
	color: #a9a9ba;
	padding-block: 3.5rem 2.5rem;
	font-size: .93rem;
}
.ect-footer a { color: #d9d9e4; text-decoration: none; }
.ect-footer a:hover { color: #fff; text-decoration: underline; }

.ect-footer__top {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	justify-content: space-between;
	padding-bottom: 2rem;
	border-bottom: 1px solid rgba(255,255,255,.1);
}
.ect-footer__brand { color: #fff; font-weight: 660; font-size: 1.05rem; }
.ect-footer nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.5rem; }
/* #8b8b9e clears WCAG AA on --ect-bg-deep at 5.48:1. Do not darken it. */
.ect-footer__legal { padding-top: 1.75rem; font-size: .85rem; color: #8b8b9e; }
.ect-footer__legal p { max-width: none; margin: 0 0 .4em; }

/* ==========================================================================
   Utility
   ========================================================================== */

.ect-mt-0 { margin-top: 0; }
.ect-center { text-align: center; }
.ect-center p { margin-inline: auto; }

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