/*
Theme Name:   AM:PM — Coming Soon
Theme URI:    https://mhdprotech.com
Description:  Child theme of Twenty Twenty-Five. Full-screen "Opening soon" home page for AM:PM, Place Eugène Flagey, Ixelles, built on the AM:PM brand guidelines (Sep. 2026).
Author:       MHD Protech
Template:     twentytwentyfive
Version:      1.2.0
Requires at least: 6.7
Requires PHP: 7.4
License:      GNU General Public License v2 or later
Text Domain:  ampm
*/

/* ==========================================================================
   Brand tokens (AM:PM Brand Guidelines 1.03 / 1.04)
   ========================================================================== */
:root {
	--ampm-dark-green: #014c2e;
	--ampm-mid-green: #00663e;
	--ampm-light-green: #00c87a;
	--ampm-white: #ffffff;
	--ampm-mid-brown: #8d4030;
	--ampm-dark-brown: #57291f;

	--ampm-font-display: "Unbounded", "Arial Rounded MT Bold", system-ui, sans-serif;
	--ampm-font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

	--ampm-gutter: clamp(16px, 4vw, 48px);
	--ampm-band-tilt: -4deg;
	--ampm-band-speed: 28s;
}

/* ==========================================================================
   Coming soon page
   ========================================================================== */
html,
body.ampm-coming-soon {
	background-color: var(--ampm-dark-green);
	overflow-x: clip;
}

body.ampm-coming-soon .wp-site-blocks {
	padding: 0;
}

.ampm-cs {
	position: relative;
	isolation: isolate;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
	margin: 0 !important;
	padding: 0 !important;
	overflow: clip;
	color: var(--ampm-white);
	background-color: var(--ampm-dark-green);
	background-image: url("assets/img/pattern.svg");
	background-size: clamp(240px, 24vw, 380px) auto;
	background-position: center;
	background-repeat: repeat;
}

.admin-bar .ampm-cs {
	min-height: calc(100svh - 32px);
}

@media (max-width: 782px) {
	.admin-bar .ampm-cs {
		min-height: calc(100svh - 46px);
	}
}

/* Soft vignette so the logo pops off the pattern */
.ampm-cs::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background: radial-gradient(
		ellipse 55% 50% at 50% 45%,
		var(--ampm-dark-green) 0%,
		rgba(1, 76, 46, 0.86) 45%,
		rgba(1, 76, 46, 0) 100%
	);
}

/* Paper grain (Brand textures 1.07) */
.ampm-cs::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 3;
	pointer-events: none;
	opacity: 0.07;
	mix-blend-mode: overlay;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.ampm-cs__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---- Stage: logo + band ---------------------------------------------- */
.ampm-cs__stage {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: clamp(40px, 8vh, 96px);
	margin: 0 !important;
	padding: clamp(48px, 10vh, 120px) 0 clamp(32px, 6vh, 72px);
}

.ampm-cs__logo {
	margin: 0 !important;
	width: clamp(200px, 30vw, 400px);
	line-height: 0;
	animation: ampm-rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.ampm-cs__logo img {
	display: block;
	width: 100%;
	height: auto;
}

/* ---- Marquee band ------------------------------------------------------ */
.ampm-band {
	position: relative;
	z-index: 2;
	width: calc(100% + 24vw);
	margin: 0 -12vw !important;
	padding: 0;
	overflow: hidden;
	background: var(--ampm-light-green);
	color: var(--ampm-dark-green);
	transform: rotate(var(--ampm-band-tilt));
	box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.45);
	animation: ampm-band-in 1s 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.ampm-band__track {
	display: flex;
	width: max-content;
	animation: ampm-marquee var(--ampm-band-speed) linear infinite;
}

.ampm-band__group {
	display: flex;
	flex-shrink: 0;
	align-items: center;
}

.ampm-band__item {
	display: inline-flex;
	align-items: center;
	gap: 0.9em;
	padding: 0.85em 0.9em;
	font-family: var(--ampm-font-display);
	font-weight: 600;
	font-size: clamp(0.95rem, 2.1vw, 1.6rem);
	line-height: 0.9;
	letter-spacing: 0;
	text-transform: uppercase;
	white-space: nowrap;
}

.ampm-band__item::after {
	content: "";
	display: inline-block;
	width: 1.5em;
	height: 0.8em;
	margin-left: 0.9em;
	border: 0.13em solid currentColor;
	border-radius: 50%;
}

.ampm-band:hover .ampm-band__track {
	animation-play-state: paused;
}

/* ---- Footer ------------------------------------------------------------ */
.ampm-cs__footer {
	position: relative;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
	margin: 0 var(--ampm-gutter) !important;
	padding: 18px 0 calc(22px + env(safe-area-inset-bottom)) !important;
	border-top: 1px solid rgba(0, 200, 122, 0.55);
	font-family: var(--ampm-font-mono);
	font-size: clamp(0.68rem, 0.9vw, 0.78rem);
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ampm-light-green);
	animation: ampm-fade 1s 0.7s ease both;
}

.ampm-cs__footer p {
	margin: 0 !important;
}

.ampm-cs__footer a {
	color: inherit;
	text-decoration: none;
	background-image: linear-gradient(currentColor, currentColor);
	background-size: 0 1px;
	background-position: 0 100%;
	background-repeat: no-repeat;
	transition: background-size 0.35s ease, color 0.35s ease;
}

.ampm-cs__footer a:hover,
.ampm-cs__footer a:focus-visible {
	color: var(--ampm-white);
	background-size: 100% 1px;
}

.ampm-cs__footer a:focus-visible {
	outline: 2px solid var(--ampm-light-green);
	outline-offset: 4px;
}

@media (max-width: 600px) {
	:root {
		--ampm-band-tilt: -6deg;
		--ampm-band-speed: 20s;
	}

	.ampm-cs__logo {
		width: min(62vw, 280px);
	}

	.ampm-cs__footer {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}
}

@media (max-height: 520px) and (orientation: landscape) {
	.ampm-cs__stage {
		gap: 28px;
		padding-top: 32px;
	}

	.ampm-cs__logo {
		width: clamp(150px, 22vw, 240px);
	}
}

/* ---- Motion ------------------------------------------------------------ */
@keyframes ampm-marquee {
	from { transform: translate3d(0, 0, 0); }
	to   { transform: translate3d(-50%, 0, 0); }
}

@keyframes ampm-rise {
	from { opacity: 0; transform: translateY(18px) scale(0.98); }
	to   { opacity: 1; transform: none; }
}

@keyframes ampm-band-in {
	from { opacity: 0; transform: rotate(var(--ampm-band-tilt)) translateY(24px); }
	to   { opacity: 1; transform: rotate(var(--ampm-band-tilt)); }
}

@keyframes ampm-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.ampm-cs__logo,
	.ampm-band,
	.ampm-cs__footer {
		animation: none;
	}

	.ampm-band__track {
		animation: none;
		transform: translateX(-12%);
	}
}

/* ==========================================================================
   Page template wrapper + block editor view
   ========================================================================== */
.ampm-cs-content,
.ampm-cs-content > .ampm-cs {
	margin-block: 0 !important;
	max-width: none !important;
}

body.ampm-coming-soon .wp-site-blocks > * {
	margin-block-start: 0;
}

/* In the editor the band is a simple paragraph: show it as a static band */
p.ampm-band {
	padding: 0.85em 14vw;
	font-family: var(--ampm-font-display);
	font-weight: 600;
	font-size: clamp(0.95rem, 2.1vw, 1.6rem);
	line-height: 0.9;
	text-align: center;
	text-transform: uppercase;
	animation: none;
}
