/* =========================================================
   Journey — footer.css
   Uses only variables from global.css. No hardcoded colors.
   ========================================================= */

.site-footer {
	background: #FAF8F2;
	padding: 80px 0 0;
}

/* ---------- Top: brand (left) + right block ---------- */
.footer-top {
	display: flex;
	justify-content: space-between;
	gap: 56px;
	/* NOWRAP is deliberate: the side-by-side layout's natural content width is
	   ~1030px (measured), but `justify-content: space-between` only switches to
	   `center` at the breakpoint below. If this row were allowed to wrap on its
	   own (content-driven), it could wrap at any width ABOVE that breakpoint
	   too — landing on its own row while still under space-between, which
	   left-aligns a lone wrapped item. That produced the "left-justified
	   footer" bug at in-between widths (~860-1090px) that plain device-size
	   testing kept catching. Nowrap makes the layout state binary: this exact
	   side-by-side row, or the @media column layout below — nothing ambiguous
	   in between. */
	flex-wrap: nowrap;
}

/* Space below the columns / Contact button before the copyright line.
   Higher specificity than .wrap so it can't be overridden, and padding
   (not margin) so it can't be collapsed away. */
.site-footer .footer-top {
	padding-bottom: 64px;
}

/* Brand: logo + social, sized to the logo so social centers under its middle */
.footer-brand {
	flex: 0 0 auto;
	width: -moz-fit-content;
	width: fit-content;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.footer-logo {
	display: inline-flex;
}
.footer-logo img {
	height: 144px;
	width: auto;
	display: block;
}

/* Social icons — plain glyphs (no circle), centered under the logo */
.footer-social {
	margin-top: 30px;
	display: flex;
	gap: 22px;
}
.footer-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--ink);
	transition: color 0.15s ease, transform 0.15s ease;
}
.footer-social a:hover {
	color: var(--olive);
	transform: translateY(-2px);
}
.footer-social svg {
	width: 22px;
	height: 22px;
	display: block;
	fill: currentColor;
}

/* ---------- Right: columns, then Contact button below ---------- */
.footer-right {
	flex: 0 1 auto;
	display: flex;
	flex-direction: column;
	gap: 44px;
}
/* Grid so the Contact button (now a sibling of the columns) can be placed
   per-breakpoint without ever orphaning a column. Product & Company span both
   rows on desktop so the button tucks directly under the Features links. */
.footer-cols {
	display: grid;
	grid-template-columns: repeat(3, max-content);
	grid-template-areas:
		"feat prod comp"
		"btn  prod comp";
	column-gap: 64px;
	row-gap: 28px;
	align-items: start;
}
.footer-col--features { grid-area: feat; }
.footer-col--product  { grid-area: prod; }
.footer-col--company  { grid-area: comp; }
.footer-cols .footer-contact { grid-area: btn; margin-top: 0; }
.footer-col h4 {
	font-family: var(--sans);
	font-size: 21px;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--taupe);   /* category label: the lighter of the two */
	margin-bottom: 20px;
}
.footer-col h4 a {
	font: inherit;
	color: inherit;
	text-decoration: none;
	transition: color 0.15s ease;
}
.footer-col h4 a:hover {
	color: var(--olive);
}
.footer-col ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.footer-col li {
	margin: 0;
}
.footer-col a {
	font-family: var(--sans);
	font-size: 18px;
	font-weight: 500;   /* slightly bolder than the default 400 */
	color: var(--ink);   /* page links: the darker of the two (swapped with the h4) */
	transition: color 0.15s ease;
}
.footer-col a:hover {
	color: var(--olive);
}

/* Black Contact pill — lives inside the Features column and fills its width,
   sitting under that column's links with a small gap. */
.footer-contact {
	margin-top: 28px;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--ink);
	color: #fff;
	border-radius: 999px;
	padding: 18px 24px;
	font-family: var(--sans);
	font-size: 17px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.15s ease, transform 0.15s ease;
}
.footer-contact:hover {
	background: var(--olive-deep);
	color: #fff;
	transform: translateY(-1px);
}
/* Keep the label white at rest and on hover/focus, regardless of link rules. */
.footer-cols .footer-contact,
.footer-cols .footer-contact:hover,
.footer-cols .footer-contact:focus {
	color: #fff;
}

/* ---------- Bottom line ---------- */
.footer-bottom {
	margin-top: 0;
	padding-top: 30px;
	padding-bottom: 30px;
	border-top: 1px solid var(--line);
	display: flex;
	justify-content: flex-start;   /* left-justified: copyright then legal, both left */
	align-items: center;
	gap: 28px;
	flex-wrap: wrap;
}
.footer-copy {
	font-family: var(--sans);
	font-size: 13px;
	color: var(--ink-soft);
}
.footer-legal {
	display: flex;
	gap: 22px;
}
.footer-legal a {
	font-family: var(--sans);
	font-size: 13px;
	color: var(--ink-soft);
	text-decoration: none;
	transition: color 0.15s ease;
}
.footer-legal a:hover {
	color: var(--olive);
}

/* Higher specificity than .wrap so this padding can't be overridden —
   keeps equal space above and below the copyright row. */
.site-footer .footer-bottom {
	padding-top: 15px;
	padding-bottom: 15px;
}

/* ---------- Mobile ---------- */
/* Breakpoint is 1180px (not the usual ~860px "tablet" cutoff) on purpose: the
   side-by-side desktop footer's natural content width is ~1030px. Anything
   narrower needs the centered/stacked layout below, with real margin above
   that measured width so the switch always happens before the row would ever
   need to wrap on its own. See the flex-wrap: nowrap comment above. */
@media (max-width: 1180px) {
	.site-footer {
		padding: 56px 0 0;
	}
	.footer-top {
		flex-direction: column;
		align-items: center;
		gap: 44px;
	}
	.footer-logo img {
		height: 96px;
	}
	.footer-right {
		align-items: center;
		width: 100%;
	}
	/* 2×2: Features | Product on top, Contact | Company below. The button is
	   its own cell now, so Company can never get orphaned onto a lone row. */
	.footer-cols {
		grid-template-columns: repeat(2, max-content);
		grid-template-areas:
			"feat prod"
			"btn  comp";
		column-gap: 56px;
		row-gap: 36px;
		justify-content: center;
	}
	.footer-bottom {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
		text-align: left;
	}
}
@media (max-width: 480px) {
	/* Single column: Features, Product, Company, then the Contact button. */
	.footer-cols {
		grid-template-columns: minmax(0, 260px);
		grid-template-areas:
			"feat"
			"prod"
			"comp"
			"btn";
		row-gap: 30px;
		justify-content: center;   /* narrow column stays centered in the viewport… */
		justify-items: start;
		text-align: left;          /* …but its text reads left */
	}
}

/* =========================================================
   PRE-FOOTER — "ask an AI about Journey" icon row
   ---------------------------------------------------------
   Lives in this file for convenience (it's already enqueued),
   but it is NOT part of .site-footer. It sits on the page
   background; the footer's cream band below it supplies the
   visual break, and the hairline above separates it from the
   last page section. Markup: footer.php, above <footer>.
   ========================================================= */
.ai-links {
	background: transparent;
	padding: 52px 0;
}

/* Stacks the tagline above the icon row, both centered. No
   divider: the footer's cream band below and the page bg above
   already separate this row — a hairline just read as a stray line. */
.ai-links-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}
.ai-links-tagline {
	font-family: var(--serif);
	font-size: 1.25rem;
	line-height: 1.4;
	color: var(--ink);
	margin: 0 0 22px;
}
.ai-links-row {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

/* Rounded-square button cards. The card is what the user reads
   as clickable, so the whole 66px box is the tap target — no
   separate hit-area padding needed. */
.ai-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 66px;
	height: 66px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 18px;
	box-shadow: 0 2px 6px -3px rgba(0, 0, 0, 0.10);
	transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.ai-link svg {
	width: 32px;
	height: 32px;
	display: block;
}

/* Lift + gold border on hover. Focus-visible gets the same
   treatment so keyboard users see the identical affordance. */
.ai-link:hover,
.ai-link:focus-visible {
	border-color: var(--gold-cta);
	box-shadow: 0 12px 22px -12px rgba(0, 0, 0, 0.22);
	transform: translateY(-3px);
	outline: none;
}

/* Brand colors at rest — each SVG's fill/stroke is currentColor,
   so this one property drives the whole glyph. */
.ai-link--chatgpt    { color: #0F0F0F; }
.ai-link--claude     { color: #D97757; }
.ai-link--gemini     { color: #9B72CB; }
.ai-link--perplexity { color: #20808D; }
.ai-link--grok       { color: #0A0A0A; }

@media (max-width: 600px) {
	.ai-links {
		padding: 40px 0;
	}
	.ai-links-tagline {
		font-size: 1.1rem;
		margin-bottom: 18px;
	}
	.ai-links-row {
		gap: 12px;
	}
	.ai-link {
		width: 58px;
		height: 58px;
		border-radius: 16px;
	}
	.ai-link svg {
		width: 28px;
		height: 28px;
	}
}

/* =========================================================
   FORM-PAGE LEGAL LINE
   ---------------------------------------------------------
   On pages using the "Form Page (no footer)" template the AI
   row and site footer are skipped (see footer.php), and this
   one line takes their place so Privacy + Terms stay one tap
   away — those pages collect phone numbers for text messages.
   Deliberately not a band: transparent, centered, small.
   Uses --ink-mute rather than the footer's --ink-soft: the
   form pages paint the body white, and --ink-soft is too faint
   to read comfortably there.
   ========================================================= */
.form-legal {
	background: transparent;
	padding: 4px 24px 32px;
	text-align: center;
}
.form-legal-links {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 4px 10px;
}
.form-legal-links a {
	font-family: var(--sans);
	font-size: 13px;
	line-height: 1.5;
	color: var(--ink-mute);
	text-decoration: none;
	padding: 6px 2px;   /* roomier tap target on phones without spacing the words apart */
	transition: color 0.15s ease;
}
.form-legal-links a:hover,
.form-legal-links a:focus-visible {
	color: var(--olive);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.form-legal-sep {
	font-size: 13px;
	color: var(--ink-soft);
}
