/*
Theme Name:        Forge Ahead 2026
Theme URI:         http://forgeahead.co.uk/
Author:            Keltik
Author URI:        https://keltik.ie/
Description:       Block theme for Forge Ahead, the metal design studio of Jamie Hart. Dark, forge-lit portfolio layout for beds, tables and chairs, built for full site editing.
Version:           1.0.0
Requires at least: 6.6
Tested up to:      7.1
Requires PHP:      8.1
License:           GNU General Public License v2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       forge-ahead
Tags:              block-patterns, full-site-editing, portfolio, dark, grid-layout, custom-colors, editor-style
*/

/* Most styling lives in theme.json. This file holds the few effects theme.json can't express. */

/* Subtle forge grain over the page background */
body::before {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 0;
	opacity: .06;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.wp-site-blocks { position: relative; z-index: 1; }

/* Ember rule used under section headings */
.is-style-ember-rule::after {
	content: "";
	display: block;
	width: 3.5rem;
	height: 3px;
	margin-top: .6em;
	background: linear-gradient(90deg, var(--wp--preset--color--ember), var(--wp--preset--color--ember-soft));
}
.has-text-align-center.is-style-ember-rule::after { margin-inline: auto; }

/* Portfolio cards */
.fa-card { position: relative; overflow: hidden; }
.fa-card .wp-block-post-featured-image { margin: 0; overflow: hidden; background: var(--wp--preset--color--scale); }
.fa-card .wp-block-post-featured-image img {
	transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .6s ease;
	filter: saturate(.85) contrast(1.05);
}
.fa-card:hover .wp-block-post-featured-image img,
.fa-card:focus-within .wp-block-post-featured-image img {
	transform: scale(1.05);
	filter: saturate(1) contrast(1.1);
}
.fa-card .wp-block-post-title a { text-decoration: none; }
.fa-card .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.fa-card:hover .wp-block-post-title a { color: var(--wp--preset--color--ember-soft); }

/* Category filter pills */
.fa-filters ul.wp-block-categories-list {
	list-style: none; padding: 0; margin: 0;
	display: flex; flex-wrap: wrap; gap: .5rem;
}
.fa-filters ul.wp-block-categories-list a {
	display: inline-block;
	padding: .45em 1.1em;
	border: 1px solid var(--wp--preset--color--scale-light);
	border-radius: 999px;
	text-decoration: none;
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: .06em;
	text-transform: uppercase;
	transition: border-color .2s, color .2s, background .2s;
}
.fa-filters ul.wp-block-categories-list a:hover,
.fa-filters .current-cat a {
	border-color: var(--wp--preset--color--ember);
	color: var(--wp--preset--color--ember-soft);
}

/* Sticky, translucent header */
.fa-header {
	position: sticky; top: 0; z-index: 50;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	background: color-mix(in srgb, var(--wp--preset--color--iron) 82%, transparent);
	border-bottom: 1px solid var(--wp--preset--color--scale);
}
.admin-bar .fa-header { top: var(--wp-admin--admin-bar--height, 32px); }

/* Single post: original photos are 415–600px wide, so never upscale them past their size */
.single .wp-block-post-content img { max-width: 100%; height: auto; }
.single .wp-block-post-content .wp-block-image,
.single .wp-block-post-content p:has(> img),
.single .wp-block-post-content p:has(> a > img) { text-align: center; }

/* Hero */
.fa-hero h1 { text-wrap: balance; }
.fa-hero .fa-hero-figure img { box-shadow: 0 30px 80px -20px rgba(224, 102, 43, .35); }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
	.fa-card .wp-block-post-featured-image img { transition: none; }
}

/* Contact Form 7 inherits the theme */
.wpcf7 input:not([type=submit]),
.wpcf7 textarea {
	width: 100%;
	padding: .8em 1em;
	background: var(--wp--preset--color--soot);
	color: var(--wp--preset--color--ash);
	border: 1px solid var(--wp--preset--color--scale-light);
	border-radius: 4px;
	font: inherit;
}
.wpcf7 input:focus, .wpcf7 textarea:focus { outline: 2px solid var(--wp--preset--color--ember); outline-offset: 1px; }
.wpcf7 input[type=submit] {
	background: var(--wp--preset--color--ember);
	color: var(--wp--preset--color--iron);
	border: 0; border-radius: 4px;
	padding: .85em 1.8em;
	font: inherit; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
	cursor: pointer;
}
.wpcf7 input[type=submit]:hover { background: var(--wp--preset--color--ember-soft); }
