/*
Theme Name: Obstinate Altadena
Theme URI: https://github.com/mobilhomme/obstinatealtadena
Author: Jason Swihart
Description: A one-screen theme. The homepage is a large background image with the content of a page of your choosing floating on top of it — no header, no footer. If the background image is taller than the viewport, the page scrolls for its full height.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: obstinatealtadena
Tags: one-column, custom-background, full-width-template, editor-style
*/

/* ---------------------------------------------------------------- reset-ish */

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

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

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 18px;
	line-height: 1.6;
	color: #1a1a1a;
	background: #111;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
}

/* ------------------------------------------------------------------- hero */

/*
 * The hero is a one-cell grid. Both the spacer and the content occupy that
 * cell, so the row is as tall as whichever is taller — and the spacer's
 * height is the background image's natural height at the current page width
 * (via aspect-ratio, set inline from the attachment's real dimensions).
 * That is what makes the page scroll for the full height of a tall image
 * while a short/wide image just fills the viewport.
 */
.oa-hero {
	position: relative;
	display: grid;
	grid-template-areas: "stack";
	min-height: 100vh;
	min-height: 100svh;
	isolation: isolate;
	overflow: hidden;
	background-color: var(--oa-bg-color, #111);
}

.oa-hero > * {
	grid-area: stack;
}

.oa-hero__spacer {
	width: 100%;
	pointer-events: none;
	/* aspect-ratio comes from the inline style; no image = no reserved height */
}

.oa-hero__bg,
.oa-hero__bg img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: var(--oa-bg-position, center center);
	z-index: -2;
}

.oa-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(0, 0, 0, var(--oa-overlay, 0.3));
	pointer-events: none;
}

.oa-hero__inner {
	display: flex;
	width: 100%;
	padding: clamp(1.5rem, 5vw, 4rem);
	justify-content: center;
}

.oa-hero.is-top .oa-hero__inner {
	align-items: flex-start;
}

.oa-hero.is-center .oa-hero__inner {
	align-items: center;
}

.oa-hero.is-bottom .oa-hero__inner {
	align-items: flex-end;
}

.oa-hero__content {
	width: 100%;
	max-width: var(--oa-content-width, 720px);
	color: var(--oa-text-color, #fff);
	text-shadow: 0 1px 24px rgba(0, 0, 0, 0.45);
}

.oa-hero__content > *:first-child {
	margin-top: 0;
}

.oa-hero__content > *:last-child {
	margin-bottom: 0;
}

.oa-hero__content h1,
.oa-hero__content h2,
.oa-hero__content h3 {
	line-height: 1.1;
	margin: 0 0 0.5em;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.oa-hero__content h1 {
	font-size: clamp(2.25rem, 7vw, 4.5rem);
}

.oa-hero__content h2 {
	font-size: clamp(1.75rem, 4.5vw, 2.75rem);
}

.oa-hero__content p {
	font-size: clamp(1.0625rem, 1.6vw, 1.375rem);
	margin: 0 0 1.25em;
}

.oa-hero__content a {
	color: inherit;
	text-underline-offset: 0.2em;
}

.oa-hero__content .wp-block-button__link {
	text-shadow: none;
}

.oa-hero__notice {
	max-width: 40rem;
	padding: 1.5rem;
	border: 1px dashed currentColor;
	border-radius: 4px;
	font-size: 1rem;
}

/* --------------------------------------------------------- everything else */

/*
 * Interior pages get minimal chrome so the rest of the site is usable.
 * The homepage never loads any of this.
 */
.oa-page {
	background: #fff;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.oa-page__header,
.oa-page__footer {
	padding: 1.25rem clamp(1rem, 4vw, 2.5rem);
	font-size: 0.9375rem;
}

.oa-page__header {
	border-bottom: 1px solid #e5e5e5;
}

.oa-page__footer {
	border-top: 1px solid #e5e5e5;
	margin-top: auto;
	color: #666;
}

.oa-page__header a {
	font-weight: 600;
	text-decoration: none;
}

.oa-page__main {
	width: 100%;
	max-width: 46rem;
	margin: 0 auto;
	padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 2.5rem);
}

.oa-page__main h1 {
	font-size: clamp(1.875rem, 4vw, 2.75rem);
	line-height: 1.15;
	margin: 0 0 1rem;
}

.oa-entry + .oa-entry {
	margin-top: 3rem;
	padding-top: 3rem;
	border-top: 1px solid #e5e5e5;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}

.alignleft {
	float: left;
	margin: 0 1.5rem 1rem 0;
}

.alignright {
	float: right;
	margin: 0 0 1rem 1.5rem;
}

.aligncenter {
	display: block;
	margin: 0 auto 1rem;
}
