/*
Theme Name:   American Gothic Times
Theme URI:    https://americangothictimes.com
Description:  Editorial child theme for American Gothic Times. Dark magazine styling built on Blocksy.
Author:       Marin Brands LLC
Template:     blocksy
Version:      1.2.2
Text Domain:  agt-child
*/

/* ============================================================
   1. DESIGN TOKENS
   Converted from the Lovable prototype (OKLCH -> hex).
   Change a value here and it updates everywhere.
   ============================================================ */

:root {
	--agt-ink:              #020101;
	--agt-background:       #050403;
	--agt-card:             #0D0907;
	--agt-muted:            #13100D;
	--agt-secondary:        #171310;
	--agt-input:            #27221D;
	--agt-border:           #302A25;

	--agt-muted-foreground: #9B9288;
	--agt-paper-dim:        #C5B8A9;
	--agt-paper:            #EFE5D6;
	--agt-foreground:       #EFE5D6;

	--agt-primary:          #7F2425;
	--agt-primary-fg:       #F7EFE3;
	--agt-accent:           #A12F31;
	--agt-accent-fg:        #FBF4EB;

	--agt-font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
	--agt-font-sans:    "Manrope", "Helvetica Neue", Arial, sans-serif;

	--agt-radius-tight: 0.125rem;
	--agt-radius-base:  0.25rem;

	--agt-space-section: clamp(4rem, 8vw, 8rem);
	--agt-space-gutter:  clamp(1.25rem, 4vw, 4rem);
}

/* ============================================================
   2. BASE
   ============================================================ */

body {
	background: var(--agt-background);
	color: var(--agt-foreground);
	font-family: var(--agt-font-sans);
	-webkit-font-smoothing: antialiased;
}

a { color: inherit; }

h1, h2, h3, h4, h5, h6,
.entry-title,
.page-title {
	font-family: var(--agt-font-display);
	font-weight: 500;
	letter-spacing: 0;
}

h1, .page-title { line-height: 0.9; }
h2 { line-height: 0.95; }
h3 { line-height: 1; }

/* Article body: serif at a comfortable reading measure. */
.entry-content > p,
.entry-content > ul,
.entry-content > ol,
.entry-content > blockquote {
	max-width: 40rem;
	font-family: var(--agt-font-display);
	font-size: 1.25rem;
	line-height: 1.6;
	color: var(--agt-paper-dim);
}

.entry-content > p:first-of-type {
	font-size: 1.45rem;
	color: var(--agt-paper);
}

.entry-content a {
	color: var(--agt-paper);
	text-decoration: underline;
	text-decoration-color: var(--agt-accent);
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}

.entry-content a:hover {
	color: var(--agt-accent);
}

.entry-content blockquote {
	margin: 2.5rem 0;
	padding-left: 1.5rem;
	border-left: 1px solid var(--agt-accent);
	font-style: normal;
	font-size: 1.6rem;
	line-height: 1.35;
	color: var(--agt-paper);
}

.entry-content h2 {
	margin-top: 3rem;
	font-size: clamp(2rem, 3.5vw, 2.75rem);
}

.entry-content h3 {
	margin-top: 2.25rem;
	font-size: clamp(1.5rem, 2.5vw, 1.9rem);
}

.entry-content hr {
	border: 0;
	border-top: 1px solid var(--agt-border);
	margin: 3rem 0;
}

/* Visible keyboard focus. */
a:focus-visible,
button:focus-visible,
input:focus-visible {
	outline: 2px solid var(--agt-accent);
	outline-offset: 2px;
}

/* ============================================================
   3. BLOCKSY SURFACES
   ============================================================ */

.ct-container,
.ct-container-narrow,
.entry-card,
.ct-sidebar > * {
	border-color: var(--agt-border);
}

.entry-card {
	background: transparent;
	border-radius: var(--agt-radius-base);
}

.entry-card .entry-title {
	font-family: var(--agt-font-display);
	font-size: clamp(1.6rem, 2.4vw, 2.3rem);
	line-height: 1;
}

.entry-card .entry-excerpt {
	font-family: var(--agt-font-display);
	font-size: 1.05rem;
	line-height: 1.45;
	color: var(--agt-muted-foreground);
}

.entry-meta,
.entry-meta a {
	font-family: var(--agt-font-sans);
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--agt-muted-foreground);
}

.entry-meta .meta-categories a,
.entry-meta [class*="categories"] a {
	color: var(--agt-accent);
}

/* Buttons */
.wp-block-button__link,
.ct-button,
button[type="submit"],
input[type="submit"] {
	border-radius: var(--agt-radius-tight);
	font-family: var(--agt-font-sans);
	font-size: 0.67rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 0.9rem 1.4rem;
	background: var(--agt-paper);
	color: var(--agt-ink);
	border: 1px solid var(--agt-paper);
	transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.wp-block-button__link:hover,
.ct-button:hover,
button[type="submit"]:hover {
	background: var(--agt-primary);
	color: var(--agt-primary-fg);
	border-color: var(--agt-primary);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--agt-paper);
	border-color: var(--agt-paper);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--agt-paper);
	color: var(--agt-ink);
}

/* Form fields */
input[type="text"],
input[type="email"],
input[type="search"],
textarea {
	background: var(--agt-input);
	border: 1px solid var(--agt-border);
	border-radius: var(--agt-radius-tight);
	color: var(--agt-foreground);
	padding: 0.85rem 1rem;
}

input::placeholder,
textarea::placeholder {
	color: var(--agt-muted-foreground);
}

/* ============================================================
   4. EDITORIAL COMPONENTS
   Reusable classes for the block editor. Add the class name in
   Block settings -> Advanced -> Additional CSS class(es).
   ============================================================ */

/* Small uppercase label with a rule. Use on a Paragraph block. */
.agt-kicker {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	margin: 0 0 1rem;
	color: var(--agt-paper-dim);
	font-family: var(--agt-font-sans);
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.agt-kicker::before {
	content: "";
	width: 2rem;
	height: 1px;
	background: currentColor;
	flex: 0 0 auto;
}

/* Oversized display headline. Use on a Heading block. */
.agt-display {
	font-family: var(--agt-font-display);
	font-size: clamp(3rem, 8vw, 7rem);
	line-height: 0.78;
	font-weight: 500;
	margin: 0 0 1.25rem;
}

/* Deck / standfirst under a headline. Use on a Paragraph block. */
.agt-deck {
	max-width: 42rem;
	font-family: var(--agt-font-display);
	font-size: clamp(1.15rem, 2vw, 1.6rem);
	line-height: 1.3;
	color: var(--agt-paper-dim);
}

/* Hairline rule above a section. Use on a Group block. */
.agt-rule {
	border-top: 1px solid var(--agt-border);
	padding-top: var(--agt-space-section);
}

/* Inverted section: paper background, dark text. Use on a Group block.
   This is the treatment your Library section uses. */
.agt-inverted {
	background: var(--agt-paper);
	color: var(--agt-ink);
}

.agt-inverted h1,
.agt-inverted h2,
.agt-inverted h3,
.agt-inverted p {
	color: var(--agt-ink);
}

.agt-inverted .agt-kicker {
	color: var(--agt-primary);
}

/* Catalog reference number. Use on a Paragraph block. */
.agt-index {
	margin: 0 0 1.5rem;
	color: var(--agt-primary);
	font-family: var(--agt-font-sans);
	font-size: 0.58rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* Spec rows for library entries. Use on a Table block. */
.agt-specs table {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--agt-font-sans);
	font-size: 0.62rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.agt-specs td {
	padding: 0.55rem 0;
	border: 0;
	border-bottom: 1px solid var(--agt-border);
}

.agt-specs td:last-child {
	text-align: right;
	font-weight: 800;
}

.agt-inverted .agt-specs td {
	border-bottom-color: rgba(2, 1, 1, 0.18);
}

/* Full-bleed section that breaks the content container. */
.agt-bleed {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	padding-left: var(--agt-space-gutter);
	padding-right: var(--agt-space-gutter);
}

/* ============================================================
   5. MOTION
   ============================================================ */

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

/* ============================================================
   6. HOMEPAGE TEMPLATE
   Used by template-homepage.php only.
   ============================================================ */

.agt-home {
	--agt-gutter: clamp(1.5rem, 5vw, 5rem);
	--agt-section-y: clamp(4.5rem, 9vw, 9rem);
	--agt-max: 100rem;
}

/* Break out of any theme container. */
.agt-home,
.agt-home > * {
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

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

.agt-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: min(92vh, 60rem);
	padding: 0 var(--agt-gutter) clamp(3.5rem, 8vh, 7rem);
	background-color: var(--agt-ink);
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	isolation: isolate;
}

.agt-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(
			90deg,
			var(--agt-ink) 0%,
			rgba(2, 1, 1, 0.86) 30%,
			rgba(2, 1, 1, 0.15) 68%,
			rgba(2, 1, 1, 0) 85%
		),
		linear-gradient(
			0deg,
			rgba(2, 1, 1, 0.75) 0%,
			rgba(2, 1, 1, 0) 45%
		);
}

.agt-hero__inner {
	width: min(52rem, 100%);
}

.agt-hero__headline {
	margin: 1.1rem 0 1.2rem;
	font-family: var(--agt-font-display);
	font-size: clamp(3.4rem, 9vw, 8.5rem);
	line-height: 0.78;
	font-weight: 500;
	color: var(--agt-paper);
}

.agt-hero__deck {
	max-width: 40rem;
	margin: 0;
	font-family: var(--agt-font-display);
	font-size: clamp(1.15rem, 2vw, 1.65rem);
	line-height: 1.3;
	color: var(--agt-paper-dim);
}

.agt-hero__actions {
	margin: 2rem 0 0;
}

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

.agt-kicker {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	margin: 0;
	color: var(--agt-paper-dim);
	font-family: var(--agt-font-sans);
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	line-height: 1.4;
	text-transform: uppercase;
}

.agt-kicker::before {
	content: "";
	flex: 0 0 auto;
	width: 2rem;
	height: 1px;
	background: currentColor;
}

.agt-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3rem;
	padding: 0.85rem 1.4rem;
	border: 1px solid var(--agt-paper);
	border-radius: var(--agt-radius-tight);
	background: var(--agt-paper);
	color: var(--agt-ink);
	font-family: var(--agt-font-sans);
	font-size: 0.67rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.agt-button:hover,
.agt-button:focus-visible {
	background: var(--agt-primary);
	border-color: var(--agt-primary);
	color: var(--agt-primary-fg);
}

.agt-section {
	max-width: var(--agt-max);
	margin: 0 auto;
	padding: var(--agt-section-y) var(--agt-gutter);
}

.agt-section--rule {
	border-top: 1px solid var(--agt-border);
}

.agt-section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.75rem 2rem;
	margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.agt-section__head .agt-kicker {
	flex: 1 0 100%;
	color: var(--agt-accent);
}

.agt-section__title {
	margin: 0;
	font-family: var(--agt-font-display);
	font-size: clamp(2.6rem, 5vw, 4.6rem);
	line-height: 0.92;
	font-weight: 500;
	color: var(--agt-paper);
}

.agt-section__link {
	margin-left: auto;
	padding-bottom: 0.2rem;
	border-bottom: 1px solid var(--agt-border);
	color: var(--agt-muted-foreground);
	font-family: var(--agt-font-sans);
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	transition: color 0.25s ease, border-color 0.25s ease;
}

.agt-section__link:hover {
	color: var(--agt-paper);
	border-color: var(--agt-paper);
}

.agt-section__intro {
	width: min(38rem, 100%);
	margin: -1.5rem 0 3rem;
	font-family: var(--agt-font-display);
	font-size: 1.25rem;
	line-height: 1.4;
	color: var(--agt-muted-foreground);
}

.agt-empty {
	margin: 0;
	font-family: var(--agt-font-display);
	font-size: 1.2rem;
	color: var(--agt-muted-foreground);
}

/* ---- Grids ---- */

.agt-grid {
	display: grid;
	gap: clamp(2rem, 4vw, 3.5rem) clamp(1.25rem, 2.5vw, 2.25rem);
}

.agt-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.agt-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.agt-grid--hairline {
	gap: 1px;
	background: rgba(2, 1, 1, 0.2);
	border: 1px solid rgba(2, 1, 1, 0.2);
}

/* ---- Cards ---- */

.agt-card,
.agt-card__link {
	display: flex;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

.agt-card__media {
	display: block;
	width: 100%;
	aspect-ratio: 1.4;
	margin-bottom: 1rem;
	border-radius: var(--agt-radius-base);
	background-color: var(--agt-muted);
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
	transition: opacity 0.3s ease;
}

.agt-card:hover .agt-card__media,
.agt-card__link:hover .agt-card__media {
	opacity: 0.82;
}

.agt-card__media.is-empty {
	background-image: linear-gradient(135deg, var(--agt-card), var(--agt-secondary));
}

.agt-card__title {
	display: block;
	font-family: var(--agt-font-display);
	font-size: 1.75rem;
	line-height: 1.05;
	font-weight: 500;
	color: var(--agt-paper);
}

.agt-card__title--article {
	margin: 0.6rem 0;
	font-size: clamp(1.6rem, 2.2vw, 2.15rem);
	line-height: 1;
}

.agt-card__text {
	display: block;
	margin-top: 0.5rem;
	color: var(--agt-muted-foreground);
	font-size: 0.85rem;
	line-height: 1.55;
}

.agt-card--category .agt-card__body {
	display: block;
	padding-bottom: 1.1rem;
	border-bottom: 1px solid var(--agt-border);
	transition: border-color 0.25s ease;
}

.agt-card--category:hover .agt-card__body {
	border-color: var(--agt-accent);
}

.agt-card__meta,
.agt-card__byline {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	color: var(--agt-muted-foreground);
	font-family: var(--agt-font-sans);
	font-size: 0.6rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.agt-card__cat {
	color: var(--agt-accent);
}

.agt-card__excerpt {
	display: block;
	margin-bottom: 1.1rem;
	font-family: var(--agt-font-display);
	font-size: 1.05rem;
	line-height: 1.45;
	color: var(--agt-muted-foreground);
}

.agt-card__byline {
	padding-top: 0.9rem;
	margin-top: auto;
	border-top: 1px solid var(--agt-border);
}

.agt-card--guide {
	padding-top: 1.1rem;
	border-top: 1px solid var(--agt-border);
}

.agt-card--guide:hover .agt-card__title {
	color: var(--agt-accent);
}

/* ---- Inverted library section ---- */

.agt-inverted {
	max-width: none;
	background: var(--agt-paper);
	color: var(--agt-ink);
}

.agt-inverted .agt-section__title,
.agt-inverted .agt-section__intro {
	color: var(--agt-ink);
}

.agt-inverted .agt-section__head .agt-kicker {
	color: var(--agt-primary);
}

.agt-lib {
	display: flex;
	flex-direction: column;
	padding: 1.6rem;
	background: var(--agt-paper);
	color: var(--agt-ink);
	text-decoration: none;
	transition: background 0.25s ease;
}

.agt-lib:hover {
	background: #E6DBCA;
}

.agt-lib__index {
	margin-bottom: 1.6rem;
	color: var(--agt-primary);
	font-family: var(--agt-font-sans);
	font-size: 0.58rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.agt-lib__title {
	font-family: var(--agt-font-display);
	font-size: 2rem;
	line-height: 1;
	font-weight: 600;
}

.agt-lib__subtitle {
	min-height: 2.4rem;
	margin: 0.45rem 0 1.3rem;
	font-size: 0.78rem;
	line-height: 1.4;
	color: rgba(2, 1, 1, 0.62);
}

.agt-lib__specs {
	display: block;
	border-top: 1px solid rgba(2, 1, 1, 0.18);
}

.agt-lib__spec {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.55rem 0;
	border-bottom: 1px solid rgba(2, 1, 1, 0.18);
	font-family: var(--agt-font-sans);
	font-size: 0.61rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.agt-lib__spec > span:last-child {
	font-weight: 800;
}

.agt-lib__cta {
	margin-top: 1.4rem;
	font-family: var(--agt-font-sans);
	font-size: 0.63rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

/* ---- Newsletter ---- */

.agt-news {
	max-width: none;
	padding: clamp(4.5rem, 9vw, 9rem) var(--agt-gutter);
	background: var(--agt-primary);
	color: var(--agt-primary-fg);
	text-align: center;
}

.agt-news__inner {
	width: min(42rem, 100%);
	margin: 0 auto;
}

.agt-news .agt-kicker {
	justify-content: center;
	color: var(--agt-primary-fg);
}

.agt-news__title {
	margin: 1.3rem 0;
	font-family: var(--agt-font-display);
	font-size: clamp(3rem, 7vw, 6rem);
	line-height: 0.8;
	font-weight: 500;
	color: var(--agt-primary-fg);
}

.agt-news__body {
	max-width: 34rem;
	margin: 0 auto;
	font-family: var(--agt-font-display);
	font-size: 1.15rem;
	line-height: 1.45;
}

.agt-news__incentive {
	margin: 1.8rem 0 1rem;
	font-family: var(--agt-font-sans);
	font-size: 0.78rem;
}

.agt-news__form {
	display: flex;
	gap: 0.5rem;
	width: min(34rem, 100%);
	margin: 1rem auto;
}

.agt-news__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 3.3rem;
	padding: 0 1rem;
	border: 1px solid rgba(247, 239, 227, 0.55);
	border-radius: var(--agt-radius-tight);
	background: rgba(2, 1, 1, 0.16);
	color: var(--agt-primary-fg);
	font-family: var(--agt-font-sans);
}

.agt-news__input::placeholder {
	color: rgba(247, 239, 227, 0.62);
}

.agt-news__input:focus {
	outline: none;
	border-color: var(--agt-primary-fg);
}

.agt-button--invert {
	background: var(--agt-primary-fg);
	border-color: var(--agt-primary-fg);
	color: var(--agt-primary);
	cursor: pointer;
}

.agt-button--invert:hover {
	background: var(--agt-ink);
	border-color: var(--agt-ink);
	color: var(--agt-paper);
}

.agt-news__small {
	display: block;
	margin-top: 0.8rem;
	font-family: var(--agt-font-sans);
	font-size: 0.62rem;
	opacity: 0.78;
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
	.agt-grid--3,
	.agt-grid--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 700px) {
	.agt-grid--3,
	.agt-grid--4 {
		grid-template-columns: 1fr;
	}

	.agt-hero {
		min-height: 78vh;
		background-position: 68% center;
	}

	.agt-hero::before {
		background: linear-gradient(
			0deg,
			var(--agt-ink) 0%,
			rgba(2, 1, 1, 0.72) 42%,
			rgba(2, 1, 1, 0.18) 100%
		);
	}

	.agt-section__link {
		margin-left: 0;
	}

	.agt-news__form {
		flex-direction: column;
	}

	.agt-lib__subtitle {
		min-height: 0;
	}
}
.agt-hero--video {
	background-image: none !important;
}

.agt-hero__video {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;object-position: left center;
	pointer-events: none;
}

.agt-hero__sound {
	position: absolute;
	right: var(--agt-gutter);
	bottom: clamp(3.5rem, 8vh, 7rem);
	z-index: 2;
	padding: 0.6rem 1rem;
	border: 1px solid rgba(239, 229, 214, 0.4);
	border-radius: var(--agt-radius-tight);
	background: rgba(2, 1, 1, 0.4);
	color: var(--agt-paper);
	font-family: var(--agt-font-sans);
	font-size: 0.6rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.25s ease, border-color 0.25s ease;
}

.agt-hero__sound:hover {
	background: var(--agt-primary);
	border-color: var(--agt-primary);
}

@media (max-width: 700px) {
	.agt-hero__sound {
		bottom: auto;
		top: 1.5rem;
		right: 1.25rem;
	}
}

.agt-hero {
	aspect-ratio: 16 / 9;
	min-height: 0;
}

.agt-hero__video {
	object-position: center center;
}

.agt-hero::before {
	background:
		linear-gradient(
			90deg,
			rgba(2, 1, 1, 0.55) 0%,
			rgba(2, 1, 1, 0.35) 30%,
			rgba(2, 1, 1, 0.1) 68%,
			rgba(2, 1, 1, 0) 85%
		),
		linear-gradient(
			0deg,
			rgba(2, 1, 1, 0.8) 0%,
			rgba(2, 1, 1, 0) 45%
		);
}

.agt-hero__video {
	object-fit: contain;
}

.agt-hero {
	max-height: calc(100svh - 7rem);
}