/*
Theme Name: FrameShift
Description: A custom block theme.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: framegrab
Tags: full-site-editing, block-patterns, block-styles, wide-blocks, accessibility-ready, style-variations
*/

/* WordPress inserts margin-block-start: var(--wp--style--block-gap) between the
   template's top-level sections (header part, main, footer part) — a gap that
   exists even when no markup asks for it. Zero it so sections butt edge-to-edge
   and own their vertical rhythm via padding; this does not affect block gaps
   inside nested layouts. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* === tokens === */
:root {
	--fg-void: var(--wp--preset--color--base);
	--fg-surface: var(--wp--preset--color--surface);
	--fg-surface-2: var(--wp--preset--color--surface-2);
	--fg-bone: var(--wp--preset--color--contrast);
	--fg-muted: var(--wp--preset--color--muted);
	--fg-volt: var(--wp--preset--color--accent-1);
	--fg-magenta: var(--wp--preset--color--accent-2);
	--fg-cyan: var(--wp--preset--color--accent-3);
	--fg-line: rgba(243, 243, 236, 0.14);
	--fg-grid-size: 44px;
}
/* === reset === */
body {
	background-color: var(--fg-void);
	background-image:
		linear-gradient(var(--fg-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--fg-line) 1px, transparent 1px);
	background-size: var(--fg-grid-size) var(--fg-grid-size);
	background-position: center top;
}

::selection {
	background: var(--fg-volt);
	color: var(--fg-void);
}

.fg-eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	text-transform: uppercase;
	letter-spacing: 0.2em;
	font-size: var(--wp--preset--font-size--small);
	color: var(--fg-volt);
}

.fg-eyebrow::before {
	content: "// ";
	color: var(--fg-magenta);
}
/* === header === */
.fg-header {
	border-bottom: 1px solid var(--fg-line);
	background: rgba(8, 8, 12, 0.72);
	backdrop-filter: blur(10px);
	position: sticky;
	top: 0;
	z-index: 40;
	padding: 0.85rem 0;
}

.fg-wordmark a {
	font-family: var(--wp--preset--font-family--display);
	text-transform: uppercase;
	font-size: 1.3rem;
	letter-spacing: 0.02em;
	color: var(--fg-bone);
	text-decoration: none;
}

.fg-nav a {
	font-family: var(--wp--preset--font-family--mono);
	text-transform: uppercase;
	font-size: 0.8rem;
	letter-spacing: 0.1em;
	color: var(--fg-bone);
	text-decoration: none;
	padding: 0.4rem 0.2rem;
}

.fg-nav a:hover {
	color: var(--fg-volt);
}
/* === hero === */
.fg-hero {
	padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
	position: relative;
	overflow: clip;
}

.fg-hero::before {
	content: "";
	position: absolute;
	inset: -20% -10% auto -10%;
	height: 60%;
	background: radial-gradient(closest-side, rgba(212, 255, 63, 0.18), transparent 70%);
	pointer-events: none;
	z-index: 0;
}

.fg-hero__row {
	position: relative;
	z-index: 1;
	gap: clamp(2rem, 5vw, 4rem);
	align-items: center;
}

.fg-hero__copy {
	flex: 1 1 420px;
	min-width: 300px;
}

.fg-hero__title {
	margin: 0.4em 0 0.6em;
	color: var(--fg-bone);
}

.fg-hero__sub {
	font-size: var(--wp--preset--font-size--large);
	color: var(--fg-muted);
	max-width: 42ch;
	margin-bottom: 1.8rem;
}

.fg-hero__frame {
	flex: 1 1 380px;
	min-width: 280px;
	display: flex;
	justify-content: center;
}

.fg-hero__viewport {
	position: relative;
	width: 100%;
	max-width: 340px;
	aspect-ratio: 9 / 16;
	border-radius: 20px;
	border: 2px solid var(--fg-line);
	background: var(--fg-surface);
	overflow: hidden;
	box-shadow: 0 0 0 1px rgba(212, 255, 63, 0.08), 0 30px 60px -20px rgba(0, 0, 0, 0.7);
}

.fg-hero__viewport .fg-device__slot {
	position: absolute;
	inset: 0;
}

.fg-hero__viewport iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.fg-hero__tag {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	margin: 0;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--fg-void);
	background: var(--fg-volt);
	padding: 0.3em 0.6em;
	border-radius: 4px;
}
/* === marquee === */
.fg-marquee {
	border-top: 1px solid var(--fg-line);
	border-bottom: 1px solid var(--fg-line);
	background: var(--fg-surface);
	padding: 0.9rem 0;
	overflow: hidden;
}

.fg-marquee__track {
	gap: 2.5rem;
	width: max-content;
	animation: fg-marquee-scroll 26s linear infinite;
}

.fg-marquee__track p {
	margin: 0;
	font-family: var(--wp--preset--font-family--mono);
	text-transform: uppercase;
	letter-spacing: 0.14em;
	font-size: 0.85rem;
	color: var(--fg-muted);
	white-space: nowrap;
}

.fg-marquee__track p:nth-child(4n+1) { color: var(--fg-volt); }
.fg-marquee__track p:nth-child(4n+2) { color: var(--fg-magenta); }
.fg-marquee__track p:nth-child(4n+3) { color: var(--fg-cyan); }

@keyframes fg-marquee-scroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
	.fg-marquee__track { animation: none; }
}
/* === philosophy === */
.fg-philosophy {
	padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

.fg-philosophy__row {
	gap: clamp(2.5rem, 6vw, 5rem);
	align-items: flex-start;
}

.fg-philosophy__lead {
	flex: 1 1 420px;
	min-width: 300px;
}

.fg-philosophy__lead h2 {
	margin: 0.4em 0 0.7em;
	color: var(--fg-bone);
	max-width: 14ch;
}

.fg-philosophy__body {
	font-size: var(--wp--preset--font-size--large);
	color: var(--fg-muted);
	max-width: 46ch;
}

.fg-philosophy__body em {
	color: var(--fg-volt);
	font-style: normal;
}

.fg-philosophy__stats {
	flex: 1 1 320px;
	min-width: 260px;
	display: grid;
	gap: 1px;
	background: var(--fg-line);
	border: 1px solid var(--fg-line);
	border-radius: 12px;
	overflow: hidden;
}

.fg-stat {
	background: var(--fg-surface);
	padding: 1.4rem 1.6rem;
}

.fg-stat__num {
	font-family: var(--wp--preset--font-family--display);
	text-transform: uppercase;
	font-size: 2rem;
	color: var(--fg-volt);
	margin: 0 0 0.15em;
}

.fg-stat:nth-child(2) .fg-stat__num { color: var(--fg-magenta); }
.fg-stat:nth-child(3) .fg-stat__num { color: var(--fg-cyan); }

.fg-stat__label {
	margin: 0;
	color: var(--fg-muted);
	font-size: 0.9rem;
}
/* === showcase === */
.fg-showcase {
	padding: clamp(3.5rem, 8vw, 6.5rem) 0;
	background: var(--fg-surface);
	border-top: 1px solid var(--fg-line);
	border-bottom: 1px solid var(--fg-line);
}

.fg-showcase h2 { margin: 0.4em 0 0.5em; color: var(--fg-bone); }

.fg-showcase__sub {
	color: var(--fg-muted);
	max-width: 56ch;
	font-size: var(--wp--preset--font-size--large);
	margin-bottom: 0;
}

.fg-tabs { margin-top: 2.5rem; }

.fg-tabs__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-bottom: 2rem;
}

.fg-tabs__btn .wp-element-button {
	background: transparent;
	border: 1px solid var(--fg-line);
	color: var(--fg-muted);
	font-family: var(--wp--preset--font-family--mono);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 0.82rem;
	padding: 0.7em 1.1em;
	border-radius: 999px;
	transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.fg-tabs__btn.is-active .wp-element-button,
.fg-tabs__btn .wp-element-button:hover {
	color: var(--fg-void);
	background: var(--fg-volt);
	border-color: var(--fg-volt);
}

.fg-tabs__panel {
	display: none;
}

.fg-tabs__panel.is-active {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(2rem, 5vw, 3.5rem);
	align-items: center;
}

.fg-device {
	flex: 0 0 auto;
	width: min(300px, 100%);
	aspect-ratio: 9 / 16;
	border-radius: 20px;
	border: 2px solid var(--fg-line);
	background: var(--fg-void);
	overflow: hidden;
	position: relative;
	box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.6);
}

.fg-device .fg-device__slot { position: absolute; inset: 0; }

.fg-device iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.fg-tabs__notes {
	flex: 1 1 280px;
	min-width: 240px;
}

.fg-tabs__notes-title {
	font-family: var(--wp--preset--font-family--display);
	text-transform: uppercase;
	font-size: 1.4rem;
	color: var(--fg-bone);
	margin: 0 0 0.5em;
	display: flex;
	align-items: center;
	gap: 0.6em;
}

.fg-tabs__meta {
	font-family: var(--wp--preset--font-family--mono);
	text-transform: uppercase;
	font-size: 0.7rem;
	letter-spacing: 0.1em;
	color: var(--fg-void);
	background: var(--fg-cyan);
	padding: 0.25em 0.55em;
	border-radius: 4px;
}

.fg-tabs__notes p:not(.fg-tabs__notes-title) {
	color: var(--fg-muted);
	max-width: 44ch;
}
/* === process === */
.fg-process {
	padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

.fg-process h2 { margin: 0.4em 0 0; color: var(--fg-bone); max-width: 20ch; }

.fg-process__grid {
	margin-top: 2.5rem;
	gap: 1px;
	background: var(--fg-line);
	border: 1px solid var(--fg-line);
	border-radius: 12px;
	overflow: hidden;
}

.fg-process__card {
	flex: 1 1 220px;
	min-width: 220px;
	background: var(--fg-surface);
	padding: 1.8rem 1.6rem;
}

.fg-process__index {
	font-family: var(--wp--preset--font-family--mono);
	color: var(--fg-magenta);
	font-size: 0.85rem;
	letter-spacing: 0.1em;
	margin: 0 0 0.8em;
}

.fg-process__card h3 {
	margin: 0 0 0.5em;
	color: var(--fg-bone);
}

.fg-process__card p:not(.fg-process__index) {
	color: var(--fg-muted);
	margin: 0;
}
/* === proof === */
.fg-proof {
	padding: clamp(3rem, 7vw, 5.5rem) 0;
	background: var(--wp--preset--gradient--void-fade);
	border-top: 1px solid var(--fg-line);
	border-bottom: 1px solid var(--fg-line);
}

.fg-proof__row {
	gap: clamp(2rem, 5vw, 4rem);
	align-items: center;
}

.fg-proof__quote {
	flex: 1 1 420px;
	min-width: 300px;
	margin: 0;
	color: var(--fg-bone);
	text-transform: none;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 500;
	line-height: 1.35;
}

.fg-proof__list {
	flex: 1 1 300px;
	min-width: 260px;
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
}

.fg-proof__item {
	margin: 0;
	padding-left: 1.4em;
	position: relative;
	color: var(--fg-muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.9rem;
}

.fg-proof__item::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.5em;
	width: 8px;
	height: 8px;
	background: var(--fg-volt);
}

.fg-proof__item:nth-child(2)::before { background: var(--fg-magenta); }
.fg-proof__item:nth-child(3)::before { background: var(--fg-cyan); }
/* === cta === */
.fg-cta {
	padding: clamp(4rem, 10vw, 7.5rem) 0;
	text-align: center;
	position: relative;
	overflow: clip;
}

.fg-cta::before {
	content: "";
	position: absolute;
	inset: auto -10% -30% -10%;
	height: 70%;
	background: radial-gradient(closest-side, rgba(255, 46, 121, 0.16), transparent 70%);
	pointer-events: none;
}

.fg-cta > .wp-block-group { position: relative; z-index: 1; }

.fg-cta__title {
	margin: 0.3em auto 0.4em;
	color: var(--fg-bone);
}

.fg-cta__sub {
	max-width: 48ch;
	margin: 0 auto 2rem;
	color: var(--fg-muted);
	font-size: var(--wp--preset--font-size--large);
}

.fg-cta .wp-block-buttons { justify-content: center; }
/* === footer === */
.fg-footer {
	border-top: 1px solid var(--fg-line);
	padding: 2.2rem 0;
}

.fg-footer__row { gap: 1.2rem; align-items: center; }

.fg-footer__brand a {
	font-family: var(--wp--preset--font-family--display);
	text-transform: uppercase;
	font-size: 1.1rem;
	color: var(--fg-bone);
	text-decoration: none;
}

.fg-footer__tag {
	margin: 0;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.8rem;
	color: var(--fg-volt);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.fg-footer__copy {
	margin: 0;
	color: var(--fg-muted);
	font-size: 0.85rem;
}
/* === buttons === */
.fg-btn-primary .wp-element-button {
	background: var(--fg-volt);
	color: var(--fg-void);
	font-family: var(--wp--preset--font-family--mono);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 0.9rem;
	border-radius: 999px;
	padding: 0.9em 1.7em;
	border: 2px solid var(--fg-volt);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.fg-btn-primary .wp-element-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px -8px rgba(212, 255, 63, 0.5);
}

.fg-btn-ghost .wp-element-button {
	background: transparent;
	color: var(--fg-bone);
	font-family: var(--wp--preset--font-family--mono);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 0.9rem;
	border-radius: 999px;
	padding: 0.9em 1.7em;
	border: 2px solid var(--fg-line);
	transition: border-color 0.18s ease, color 0.18s ease;
}

.fg-btn-ghost .wp-element-button:hover {
	border-color: var(--fg-cyan);
	color: var(--fg-cyan);
}
/* === reveal === */
.js-reveal.is-hidden {
	opacity: 0;
	transform: translateY(24px);
}

.js-reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: reduce) {
	.js-reveal.is-hidden { opacity: 1; transform: none; }
	.js-reveal.is-visible { transition: none; }
}
/* === responsive === */
@media (max-width: 782px) {
	.fg-hero__row,
	.fg-philosophy__row,
	.fg-proof__row { flex-direction: column; align-items: stretch; }

	.fg-hero__frame { justify-content: center; }

	.fg-tabs__panel.is-active { flex-direction: column; }

	.fg-process__card { flex: 1 1 100%; }
}
