/*
Theme Name:   Forgive Instantly
Theme URI:    https://forgiveinstantly.com
Description:  Astra child theme. All design lives here; page content is plain blocks
              tagged with fi-* classes so text can be edited without touching layout.
Author:       Matrix Software Inc.
Template:     astra
Version:      1.0.0
Text Domain:  fi
*/

:root {
	--fi-amber: #d97706;
	--fi-amber-dark: #b45309;
	--fi-amber-light: #fef3c7;
	--fi-night: #1c1917;
	--fi-night-deep: #0c0a09;
	--fi-night-soft: #292524;
	--fi-sand: #faf7f2;
	--fi-text: #1c1917;
	--fi-muted: #57534e;
	--fi-radius: 16px;
	--fi-shadow: 0 1px 3px rgba(28, 25, 23, 0.08), 0 1px 2px rgba(28, 25, 23, 0.05);
	--fi-shadow-hover: 0 14px 34px rgba(28, 25, 23, 0.14);
	--fi-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
	--fi-sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--fi-wrap: 1100px;
}

/* ---------- Base ---------- */

body,
button,
input,
select,
textarea {
	font-family: var(--fi-sans);
}

body,
.ast-separate-container,
.site-content {
	background: var(--fi-sand);
}

body {
	color: var(--fi-text);
	font-size: 18px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4 {
	font-family: var(--fi-serif);
	color: var(--fi-night);
	font-weight: 700;
	line-height: 1.15;
}
/* Card and list headings are the sans bold of the draft. */
.entry-content h3 { font-family: var(--fi-sans); font-size: 1.3rem; line-height: 1.3; }
.entry-content h1 { font-size: clamp(2.3rem, 5.5vw, 3.2rem); }
.entry-content h2 { font-size: clamp(2rem, 4.4vw, 3rem); }

a { color: var(--fi-amber-dark); }
a:hover, a:focus { color: var(--fi-night); }
:focus-visible { outline: 3px solid var(--fi-amber); outline-offset: 2px; }

/* Full-bleed page layout: sections carry their own padding. */
.ast-page-builder-template .entry-content > * { margin-top: 0; margin-bottom: 0; }
.ast-page-builder-template .site-content #primary { margin: 0; }
.ast-page-builder-template .entry-header { display: none; }

/* ---------- Header (dark bar, as in the draft) ---------- */

.site-header .ast-primary-header-bar,
.site-header .main-header-bar,
.ast-mobile-header-wrap .ast-primary-header-bar,
.ast-primary-header-bar {
	background: rgba(12, 10, 9, 0.96);
	border-bottom: 0;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}
.ast-primary-header-bar .site-primary-header-wrap { min-height: 64px; }

.site-header { position: sticky; top: 0; z-index: 99; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }

.fi-brand,
.site-header .site-title a.fi-brand {
	font-family: var(--fi-serif);
	font-size: 1.55rem;
	font-weight: 700;
	color: #fff;
	text-decoration: none;
	line-height: 1.15;
}
.fi-brand:hover,
.site-header .site-title a.fi-brand:hover { color: var(--fi-amber); }

.main-header-menu .menu-link,
.ast-builder-menu-1 .menu-item > .menu-link {
	color: #fff;
	font-family: var(--fi-sans);
	font-size: 0.95rem;
	font-weight: 600;
}
.main-header-menu .menu-item:hover > .menu-link,
.main-header-menu .current-menu-item > .menu-link,
.main-header-menu .current_page_item > .menu-link {
	color: var(--fi-amber) !important;
}
.main-header-menu .ast-header-navigation-arrow .ast-arrow-svg,
.main-header-menu .menu-link .ast-icon svg { fill: currentColor; }

/* Desktop dropdown ("Who It's For"). */
.main-header-menu .sub-menu {
	background: var(--fi-night-soft);
	border: 0;
	border-top: 3px solid var(--fi-amber);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
	width: 270px;
}
.main-header-menu .sub-menu .menu-item .menu-link { color: #fff; padding: 0.8em 1.2em; border: 0; }
.main-header-menu .sub-menu .menu-item:hover > .menu-link { background: rgba(255, 255, 255, 0.06); }

@media (min-width: 922px) {
	.main-header-menu .fi-nav-button { margin-left: 10px; display: flex; align-items: center; }
	.main-header-menu .fi-nav-button > .menu-link {
		height: auto;
		background: var(--fi-amber);
		color: var(--fi-night) !important;
		border-radius: 999px;
		padding: 0 22px;
		line-height: 42px;
		font-weight: 700;
		transition: filter 0.2s;
	}
	.main-header-menu .fi-nav-button > .menu-link:hover { filter: brightness(1.1); color: var(--fi-night) !important; }
}

/* Mobile menu: full-width rows, large tap targets, dark like the header. */
.ast-mobile-header-wrap .menu-toggle,
.ast-header-break-point .menu-toggle,
.menu-toggle .ast-mobile-svg { color: #fff; fill: #fff; background: transparent; }
.ast-mobile-header-content,
.ast-mobile-header-content .main-header-menu,
.ast-mobile-header-content .main-header-menu .menu-item,
.ast-mobile-header-content .main-header-menu .sub-menu { background: var(--fi-night-deep) !important; }
.ast-mobile-header-content .main-header-menu .menu-link {
	color: #fff !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
	padding: 15px 20px;
	font-size: 1.05rem;
}
.ast-mobile-header-content .main-header-menu .sub-menu .menu-link { padding-left: 36px; font-size: 1rem; }
.ast-mobile-header-content .main-header-menu .current-menu-item > .menu-link,
.ast-mobile-header-content .main-header-menu .menu-link:hover { color: var(--fi-amber) !important; }
.ast-mobile-header-content .fi-nav-button > .menu-link { color: var(--fi-amber) !important; font-weight: 700; }
.ast-mobile-header-content .ast-menu-toggle { color: #fff !important; }

/* ---------- Sections ---------- */

.fi-section { padding: clamp(64px, 8vw, 96px) 20px; }
.fi-section > * { max-width: var(--fi-wrap); margin-left: auto !important; margin-right: auto !important; }
.fi-section--narrow > * { max-width: 820px; }
.fi-section--dark { background: var(--fi-night); color: #fff; }
.fi-section--dark h2, .fi-section--dark h3 { color: #fff; }
.fi-section--dark p { color: rgba(255, 255, 255, 0.82); }
.fi-section--amber { background: var(--fi-amber); color: var(--fi-night); text-align: center; }
.fi-section--amber h2, .fi-section--amber p { color: var(--fi-night); }
.fi-section--white { background: #fff; }

.fi-kicker {
	color: var(--fi-amber);
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	font-size: 0.9rem;
	margin-bottom: 0.9em !important;
}
.fi-lead { font-size: clamp(1.1rem, 1.8vw, 1.28rem); line-height: 1.7; color: rgba(28, 25, 23, 0.9); }
.fi-section--dark .fi-lead { color: rgba(255, 255, 255, 0.8); }
.fi-intro { max-width: 680px; margin: 0.6em auto 2.6em !important; }
h2 + .fi-lead { margin-top: 0.6em; }

/* ---------- Buttons (pill-shaped, as in the draft) ---------- */

.wp-block-button .wp-block-button__link,
.wp-block-button__link,
.ast-button {
	background: var(--fi-amber);
	color: var(--fi-night);
	border: 2px solid var(--fi-amber);
	border-radius: 999px;
	font-family: var(--fi-sans);
	font-weight: 700;
	font-size: 1.08rem;
	line-height: 1.3;
	padding: 15px 32px;
	transition: filter 0.2s, background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.wp-block-button .wp-block-button__link:hover,
.wp-block-button__link:hover {
	color: var(--fi-night);
	filter: brightness(1.1);
	box-shadow: 0 8px 22px rgba(217, 119, 6, 0.35);
}
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent !important;
	color: var(--fi-night) !important;
	border: 2px solid var(--fi-night) !important;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--fi-night) !important;
	color: #fff !important;
	filter: none;
	box-shadow: none;
}
/* Dark buttons: "Order on Amazon →" on sand, "Go to Resources →" on amber. */
.wp-block-button.fi-btn-dark .wp-block-button__link {
	background: var(--fi-night);
	border-color: var(--fi-night);
	color: #fff;
}
.wp-block-button.fi-btn-dark .wp-block-button__link:hover { background: var(--fi-night-soft); border-color: var(--fi-night-soft); color: #fff; filter: none; box-shadow: none; }
/* Light outline on dark bands. */
.fi-hero .wp-block-button.is-style-outline .wp-block-button__link,
.fi-section--dark .wp-block-button.is-style-outline .wp-block-button__link {
	color: #fff !important;
	border-color: #fff !important;
}
.fi-hero .wp-block-button.is-style-outline .wp-block-button__link:hover,
.fi-section--dark .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: #fff !important;
	color: var(--fi-night) !important;
}
.fi-section--dark .wp-block-button.fi-btn-amber-outline .wp-block-button__link {
	background: transparent;
	color: var(--fi-amber);
	border-color: var(--fi-amber);
}
.fi-section--dark .wp-block-button.fi-btn-amber-outline .wp-block-button__link:hover { background: var(--fi-amber); color: var(--fi-night); }

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

.fi-hero.wp-block-cover {
	min-height: min(100vh, 900px);
	align-items: flex-end;
	padding: 128px 20px clamp(64px, 9vw, 96px);
}
.fi-hero .wp-block-cover__inner-container { max-width: 960px; text-align: center; }
.fi-hero .wp-block-cover__background {
	background: linear-gradient(to bottom, rgba(12, 10, 9, 0.4), rgba(12, 10, 9, 0.75)) !important;
	opacity: 1 !important;
}
.fi-hero .fi-kicker { margin-bottom: 1em !important; }
.fi-hero h1 {
	color: #fff;
	font-size: clamp(3rem, 9.5vw, 6rem);
	line-height: 1;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
	margin: 0;
}
/* Astra colours every cover paragraph with its body-text colour; dark bands need light text. */
.fi-hero p { color: #fff !important; }
.fi-hero .fi-hero-sub {
	font-family: var(--fi-serif);
	font-style: italic;
	font-weight: 500;
	font-size: clamp(1.25rem, 2.4vw, 1.55rem);
	max-width: 680px;
	margin: 1.1em auto 0 !important;
}
.fi-hero p.fi-hero-promise {
	color: var(--fi-amber) !important;
	font-weight: 600;
	font-size: clamp(1.1rem, 2vw, 1.3rem);
	max-width: 760px;
	margin: 1.1em auto 0 !important;
}
.fi-hero p.fi-kicker { color: var(--fi-amber) !important; }
.fi-hero .wp-block-buttons { margin-top: 2.4em; gap: 16px; }
.fi-hero .wp-block-button__link { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3); }

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

.fi-cards { gap: 28px !important; margin-top: 3em !important; margin-bottom: 0 !important; }
.fi-card {
	background: #fff;
	border-radius: var(--fi-radius);
	box-shadow: var(--fi-shadow);
	padding: 26px 26px 24px;
}
.fi-card h3 { margin: 0 0 0.4em; }
.fi-card p { margin: 0; }

/* Who This Book Is For: whole card is the link (stretched title link). */
.fi-aud-grid.wp-block-group {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	max-width: var(--fi-wrap);
}
.fi-aud-grid > * { margin: 0 !important; max-width: none !important; }
.fi-aud-card {
	position: relative;
	background: var(--fi-night-soft);
	border-radius: var(--fi-radius);
	padding: 26px;
	transition: background 0.2s, color 0.2s;
}
.fi-aud-card h3 { font-size: 1.5rem; margin: 0 0 0.35em; color: #fff; }
.fi-aud-card h3 a { color: inherit; text-decoration: none; }
.fi-aud-card h3 a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.fi-aud-card p { margin: 0; }
.fi-aud-card:hover,
.fi-aud-card:focus-within { background: var(--fi-amber); }
.fi-aud-card:hover h3, .fi-aud-card:hover p,
.fi-aud-card:focus-within h3, .fi-aud-card:focus-within p { color: var(--fi-night) !important; }
.fi-aud-card h3 a:focus-visible { outline: none; }
.fi-aud-card:focus-within { outline: 3px solid #fff; outline-offset: 2px; }

/* ---------- The book (cover + order) ---------- */

.fi-book { gap: clamp(36px, 6vw, 80px) !important; align-items: center !important; margin: 0 !important; }
.fi-cover { margin: 0 !important; text-align: center; }
.fi-cover img {
	max-width: 330px;
	width: 100%;
	border-radius: 4px;
	transform: rotate(-2deg);
	box-shadow: 0 26px 50px rgba(28, 25, 23, 0.3), 0 4px 10px rgba(28, 25, 23, 0.15);
}
.fi-book h2 { margin-bottom: 0.35em; }
.fi-book .fi-lead { margin-bottom: 1.6em; }
.fi-editions { color: var(--fi-muted); font-size: 0.95rem !important; margin-top: 1.1em !important; }

/* Watch the teaching */
.fi-watch h2 { margin-bottom: 0.3em; }
.fi-video {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: var(--fi-radius);
	overflow: hidden;
	box-shadow: var(--fi-shadow-hover);
	background: #000;
	margin-top: 2em;
}
.fi-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Audience pages ---------- */

.fi-banner.wp-block-cover { min-height: clamp(220px, 34vh, 360px); padding: 0; }
.fi-banner .wp-block-cover__background { background: linear-gradient(to bottom, rgba(12, 10, 9, 0.15), rgba(12, 10, 9, 0.55)) !important; opacity: 1 !important; }
.fi-page h1 { margin: 0 0 0.5em; }
.fi-page .fi-lead { margin-bottom: 1.8em; }
.fi-page .fi-card { margin-bottom: 2em !important; padding: 28px 30px; }
.fi-page .fi-card h2 { font-family: var(--fi-sans); font-size: 1.5rem; margin: 0 0 0.6em; }
.fi-list { list-style: none; padding: 0 !important; margin: 0 !important; font-size: 1.1rem; }
.fi-list li { position: relative; padding-left: 28px; margin-bottom: 0.6em; }
.fi-list li:last-child { margin-bottom: 0; }
.fi-list li::before {
	content: '';
	position: absolute;
	left: 2px;
	top: 0.5em;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--fi-amber);
}
.fi-page .wp-block-buttons { gap: 14px; }
.fi-page .wp-block-button__link { padding: 13px 26px; font-size: 1rem; }

/* Resources */
.fi-card--dark { background: var(--fi-night); color: #fff; }
.fi-card--dark h2 { color: #fff !important; }
.fi-card--dark p { color: rgba(255, 255, 255, 0.85); }
.fi-card--dark .wp-block-button .wp-block-button__link { background: transparent; color: var(--fi-amber); border-color: var(--fi-amber); }
.fi-card--dark .wp-block-button .wp-block-button__link:hover { background: var(--fi-amber); color: var(--fi-night); filter: none; }
.fi-note { color: var(--fi-muted); font-size: 0.92rem !important; margin-top: 0.8em !important; }

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

.fi-footer {
	background: var(--fi-night-deep);
	color: #fff;
	text-align: center;
	padding: 48px 20px 40px;
}
.fi-footer p { margin: 0; }
.fi-footer__title { font-family: var(--fi-serif); font-size: 1.6rem; font-weight: 700; }
.fi-footer__sub { color: rgba(255, 255, 255, 0.7); margin-top: 0.3em !important; }
.fi-footer__links {
	list-style: none;
	margin: 1.6em 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 26px;
	font-size: 0.95rem;
}
.fi-footer__links a { color: #fff; text-decoration: none; }
.fi-footer__links a:hover { color: var(--fi-amber); }
.fi-footer__copy { color: rgba(255, 255, 255, 0.5); font-size: 0.88rem; margin-top: 2em !important; }

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

@media (max-width: 921px) {
	.fi-aud-grid.wp-block-group { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.fi-aud-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 781px) {
	body { font-size: 17px; }
	.fi-hero.wp-block-cover { min-height: 85vh; min-height: 85svh; }
	.fi-hero .wp-block-buttons { flex-direction: column; align-items: stretch; }
	.fi-hero .wp-block-button__link { width: 100%; }
	.fi-book { text-align: center; }
	.fi-book .wp-block-column { flex-basis: 100% !important; }
	.fi-book .wp-block-buttons { justify-content: center; }
	.fi-cover img { max-width: 230px; }
	.fi-page .wp-block-buttons { flex-direction: column; align-items: stretch; }
	.fi-page .wp-block-button__link { width: 100%; }
}

@media (max-width: 600px) {
	.fi-aud-grid.wp-block-group { grid-template-columns: 1fr; gap: 16px; }
	.fi-aud-card { padding: 22px; }
	.fi-aud-card h3 { font-size: 1.3rem; }
	.fi-cards { gap: 16px !important; }
	.fi-brand, .site-header .site-title a.fi-brand { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
	.fi-aud-card, .wp-block-button__link { transition: none; }
}

/* Home intro: text column like the draft (max-w-4xl), cards a little wider. */
.fi-section--intro > .wp-block-heading,
.fi-section--intro > p { max-width: 820px; }
.fi-section--intro > .fi-cards { max-width: 1000px; }

/* Portrait photos in a short banner: keep the horizon in frame. */
.fi-banner .wp-block-cover__image-background { object-position: center 62%; }

/* "Who It's For" links to /#audiences, which WordPress marks current on the home page. */
.main-header-menu .menu-item-type-custom.current-menu-item:not(:hover) > .menu-link { color: #fff !important; }
.ast-mobile-header-content .main-header-menu .menu-item-type-custom.current-menu-item > .menu-link { color: #fff !important; }

.entry-content .fi-aud-card h3 a { text-decoration: none !important; }

/* Astra paints mobile menu links with a light palette colour; keep them on the dark menu. */
.ast-mobile-header-content .main-header-menu .menu-link,
.ast-mobile-header-content .main-header-menu .menu-item > .menu-link { background: transparent !important; }
.ast-mobile-header-content .main-header-menu .menu-item.current-menu-item:not(.menu-item-type-custom) > .menu-link { background: rgba(255, 255, 255, 0.06) !important; }
