/*
Theme Name: GLPS Memphis
Theme URI: https://glpsmemphis.com/
Description: GLPS Memphis brand theme. Child of Twenty Twenty-Five. Colors, fonts, header and footer are editable in Appearance > Editor (Styles, Patterns, Template Parts).
Author: GLPS Memphis
Template: twentytwentyfive
Version: 1.1.0
Requires at least: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: glps
*/

/* Most styling lives in theme.json so the client can change it in Appearance > Editor > Styles.
   This file only holds what theme.json cannot express. */

/* Header: thin bottom line, stays on top while scrolling */
.glps-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
}
.admin-bar .glps-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .glps-header { top: 46px; } }

/* Keep the site name on one line; compact header on phones */
.glps-header .wp-block-site-title,
.glps-header .wp-block-button__link { white-space: nowrap; }
@media (max-width: 600px) {
	.glps-header .wp-block-site-title { font-size: 1.25rem !important; }
	.glps-header .wp-block-site-logo img { width: 118px !important; height: auto; }
	.glps-header .wp-block-button__link { padding: 0.55rem 0.9rem; font-size: 0.9rem !important; }
}

/* Menu stays on one line on tablets */
.glps-header .wp-block-navigation__container { flex-wrap: nowrap; }
.glps-header .wp-block-navigation-item__content { white-space: nowrap; }

/* Submenu dropdown look */
.glps-header .wp-block-navigation__submenu-container {
	border: 1px solid var(--wp--preset--color--accent-6) !important;
	border-radius: 8px;
	padding: 6px 0;
	min-width: 220px !important;
	box-shadow: 0 8px 24px rgba(23, 33, 43, 0.08);
}

/* Footer links: light on graphite, mint on hover */
.glps-footer a { color: inherit; text-decoration: none; }
.glps-footer a:hover { color: var(--wp--preset--color--mint); text-decoration: underline; }

/* Notice box (amber left border, like the original site). Add class "glps-notice" to any Group block. */
.glps-notice {
	border-left: 4px solid var(--wp--preset--color--amber);
	background: #fff8ed;
	border-radius: 0 8px 8px 0;
}

/* ------------------------------------------------------------------
   SMS consent form (posts to g3.glpsmemphis.com). Styling ONLY.
   Selector targets the existing form by its action, so the form HTML,
   field names, wording and behaviour stay exactly as approved.
------------------------------------------------------------------- */
form[action*="g3.glpsmemphis.com"] {
	display: grid;
	gap: 12px;
	max-width: 560px;
}
form[action*="g3.glpsmemphis.com"] label { font-weight: 600; }
form[action*="g3.glpsmemphis.com"] input[type="tel"] {
	width: 100%;
	padding: 12px 14px;
	font: inherit;
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: 8px;
	background: #fff;
}
form[action*="g3.glpsmemphis.com"] input[type="tel"]:focus {
	outline: 2px solid var(--wp--preset--color--accent-1);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--accent-1);
}
form[action*="g3.glpsmemphis.com"] .checkbox-row {
	display: grid;
	grid-template-columns: 22px 1fr;
	gap: 10px;
	align-items: start;
}
form[action*="g3.glpsmemphis.com"] .checkbox-row input {
	width: 18px;
	height: 18px;
	margin-top: 3px;
	accent-color: var(--wp--preset--color--accent-1);
}
form[action*="g3.glpsmemphis.com"] .checkbox-row label { font-weight: 500; line-height: 1.55; }
form[action*="g3.glpsmemphis.com"] button {
	justify-self: start;
	padding: 12px 22px;
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--wp--preset--color--accent-1);
	border: 0;
	border-radius: 8px;
	cursor: pointer;
}
form[action*="g3.glpsmemphis.com"] button:hover { background: var(--wp--preset--color--emerald-dark); }

/* No white gap between the last page section and the footer */
.wp-site-blocks > footer.wp-block-template-part { margin-block-start: 0; }
/* Remove default top gap so page header bands sit right under the menu */
.wp-site-blocks > main { margin-block-start: 0; }

/* Cards: subtle lift on hover for clickable offering cards */
.glps-card { transition: box-shadow .2s ease, transform .2s ease; height: 100%; }
.glps-card:hover { box-shadow: 0 10px 30px rgba(23, 33, 43, 0.08); transform: translateY(-2px); }

/* Small label above headings ("Product", "Service") */
.glps-eyebrow { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }

/* Hero banner images: rounded, never wider than their column */
.glps-hero-img img { border-radius: 20px; width: 100%; height: auto; display: block; }
@media (max-width: 781px) { .glps-hero-img { margin-top: var(--wp--preset--spacing--40); } }

/* Hero: header + hero fit on one screen */
.glps-hero h1 { font-size: clamp(2rem, 1.1rem + 1.9vw, 2.9rem) !important; }
.glps-hero .glps-hero-img { margin: 0; text-align: right; }
.glps-hero .glps-hero-img img {
	width: auto;
	max-width: 100%;
	max-height: min(520px, calc(100vh - 300px));
	min-height: 260px;
	object-fit: contain;
	margin-left: auto;
}
@media (max-width: 781px) {
	.glps-hero .glps-hero-img img { max-height: none; min-height: 0; width: 100%; }
}

/* Use the hamburger menu on tablets too (below 900px), so the longer menu never overflows */
@media (min-width: 600px) and (max-width: 899px) {
	.glps-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.glps-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}

/* Opened mobile/tablet menu: large, left-aligned links; sub-items indented, no dropdown box */
.glps-header .wp-block-navigation__responsive-container.is-menu-open { padding: 28px 32px !important; }
.glps-header .is-menu-open .wp-block-navigation__responsive-container-content,
.glps-header .is-menu-open .wp-block-navigation__container,
.glps-header .is-menu-open .wp-block-navigation-item { align-items: flex-start !important; text-align: left; }
.glps-header .is-menu-open .wp-block-navigation__container { gap: 18px !important; padding-top: 24px; }
.glps-header .is-menu-open .wp-block-navigation-item__content { font-size: 1.35rem; font-weight: 600; }
.glps-header .is-menu-open .wp-block-navigation__submenu-container {
	border: 0 !important; box-shadow: none !important; padding: 10px 0 0 18px !important; min-width: 0 !important;
}
.glps-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content { font-size: 1.1rem; font-weight: 500; color: var(--wp--preset--color--accent-4); }

/* ------------------------------------------------------------------
   Homepage motion (3D network in the hero + scroll reveals).
   Scripts load on the front page only; content stays fully editable.
------------------------------------------------------------------- */
.glps-hero { position: relative; overflow: hidden; isolation: isolate; }
.glps-hero > .wp-block-columns { position: relative; z-index: 1; }
.glps-hero-canvas {
	position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none;
	opacity: 0; transition: opacity 1.4s ease;
	-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.55) 38%, #000 62%);
	        mask-image: linear-gradient(90deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.55) 38%, #000 62%);
}
.glps-hero-canvas.is-ready { opacity: 1; }
@media (max-width: 781px) {
	.glps-hero-canvas {
		-webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.25) 0%, #000 70%);
		        mask-image: linear-gradient(180deg, rgba(0,0,0,.25) 0%, #000 70%);
	}
}
.glps-hero .glps-hero-img { will-change: transform; }
.glps-card { background-image: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(4, 120, 87, var(--sheen, 0)), transparent 55%); }
/* Hide hero text/banner only until the intro animation starts (failsafe removes this after 2.5s) */
.glps-motion .glps-hero .wp-block-column:first-child > *,
.glps-motion .glps-hero .glps-hero-img { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
	.glps-hero-canvas { transition: none; }
}
