/*
Theme Name: DeployPete Blocks
Theme URI: https://deploypete.com
Description: Standalone Full-Site-Editing block theme for DeployPete / Pete Panel — the Gutenberg rebuild of the Divi-based site. theme.json design tokens, block templates and patterns; Inter + Space Grotesk bundled (SIL OFL); fully self-contained. Built with Pete Panel.
Author: Pedro Consuegra
Author URI: https://pedroconsuegra.com
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: deploypete-blocks
*/

/* ---------------------------------------------------------------------------
   Supplemental styles — tokens live in theme.json.
--------------------------------------------------------------------------- */

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }

/* Kill the default block-gap margins around <main>, so full-bleed heroes sit
   flush under the menu and full-bleed CTA bands sit flush above the footer. */
main.wp-block-group { margin-block-start: 0; }
footer.wp-block-template-part { margin-block-start: 0; }

/* Header */
.dp-header {
	position: sticky;
	top: 0;
	z-index: 60;
	background: rgba(255,255,255,0.94);
	backdrop-filter: saturate(1.3) blur(8px);
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.dp-header .wp-block-navigation a { transition: color .2s ease; }

/* Hero */
.dp-hero { position: relative; }
.dp-hero .dp-hero-title { text-shadow: 0 2px 24px rgba(0,0,0,0.35); }

/* Signature animated gradient subhead (Pete flame) */
@keyframes peteGradientTurbo {
	0%   { background-position: 0% 50%; }
	50%  { background-position: 200% 50%; }
	100% { background-position: 0% 50%; }
}
.dp-flame-text {
	background-image: linear-gradient(135deg, #ff6b00 0%, #ffa300 33%, #ffd661 66%, #ff6b00 100%);
	background-size: 300% 300%;
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
	animation: peteGradientTurbo 3.5s ease-in-out infinite;
	display: inline-block;
}

/* Feature cards */
.dp-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 14px;
	padding: 1.8rem 1.5rem;
	height: 100%;
	box-shadow: var(--wp--preset--shadow--card);
	transition: transform .25s ease, box-shadow .25s ease;
}
.dp-card:hover { transform: translateY(-5px); box-shadow: 0 16px 40px rgba(31,36,48,0.16); }
.dp-card h3 { margin-top: 0; font-size: 1.15rem; }

/* Brand logo row */
.dp-brands img {
	max-height: 44px;
	width: auto;
	object-fit: contain;
	opacity: 0.75;
	filter: grayscale(1);
	transition: opacity .2s ease, filter .2s ease;
}
.dp-brands img:hover { opacity: 1; filter: grayscale(0); }

/* Buttons: lift */
.wp-block-button__link { transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(37,99,235,0.30); }

/* Marquee ticker (marquee-image-crawler plugin) — let it span the full-width band.
   Gutenberg layout controls stop at the shortcode boundary; the plugin's own
   container needs the override. */
#marquee0 {
	width: 100% !important;
	max-width: none !important;
}

/* Click-to-play video facade — poster + play button, YouTube iframe loads on click */
.dp-video-facade {
	position: relative;
	cursor: pointer;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 10px;
	overflow: hidden;
	line-height: 0;
}
.dp-video-facade img { width: 100%; height: auto; display: block; }
.dp-video-facade::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(11,28,61,0.18);
	transition: background .2s ease;
}
.dp-video-facade:hover::after { background: rgba(11,28,61,0.30); }
.dp-video-play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	width: 76px;
	height: 76px;
	border-radius: 999px;
	background: var(--wp--preset--color--blue);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 10px 30px rgba(11,28,61,0.35);
	transition: transform .2s ease, background .2s ease;
}
.dp-video-facade:hover .dp-video-play { transform: translate(-50%, -50%) scale(1.08); background: var(--wp--preset--color--navy); }
.dp-video-frame { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; }
.dp-video-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Install Now select — white pill dropdown navigating to installer guides */
.dp-install-select {
	appearance: none;
	-webkit-appearance: none;
	background-color: #fff;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1.2rem center;
	color: var(--wp--preset--color--blue);
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	font-weight: 700;
	border: 0;
	border-radius: 8px;
	padding: 0.95rem 3rem 0.95rem 1.6rem;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0,0,0,0.14);
	transition: transform .2s ease, box-shadow .2s ease;
}
.dp-install-select:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,0.20); }
.dp-install-select:focus { outline: 3px solid rgba(255,255,255,0.6); outline-offset: 2px; }

/* Ghost on dark (hero secondary CTAs) */
.is-style-dp-ghost .wp-block-button__link {
	background: transparent !important;
	box-shadow: inset 0 0 0 2px rgba(255,255,255,0.8);
	color: #fff !important;
}
.is-style-dp-ghost .wp-block-button__link:hover { background: rgba(255,255,255,0.14) !important; }

/* Workflows explorer — sticky sidebar + tabbed panels (progressive enhancement) */
.dp-wf { display: flex; gap: 2.2rem; align-items: flex-start; }
.dp-wf-side { flex: 0 0 270px; position: sticky; top: 92px; display: flex; flex-direction: column; gap: 0.8rem; }
.dp-wf-item {
	display: block; width: 100%; text-align: left; cursor: pointer;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px; padding: 1rem 1.1rem;
	font-family: var(--wp--preset--font-family--body);
	transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.dp-wf-item:hover { border-color: var(--wp--preset--color--blue); transform: translateY(-2px); }
.dp-wf-item .dp-wf-cmd { display: block; font-family: monospace; font-size: 1.05rem; font-weight: 700; color: var(--wp--preset--color--blue); }
.dp-wf-item .dp-wf-sub { display: block; font-size: 0.8rem; color: var(--wp--preset--color--slate); margin-top: 0.25rem; line-height: 1.4; }
.dp-wf-item.is-active { background: var(--wp--preset--color--navy); border-color: var(--wp--preset--color--navy); box-shadow: var(--wp--preset--shadow--card); }
.dp-wf-item.is-active .dp-wf-cmd { color: var(--wp--preset--color--gold); }
.dp-wf-item.is-active .dp-wf-sub { color: #c3cbdc; }
.dp-wf-panels { flex: 1; min-width: 0; }
.dp-wf.dp-wf-js .dp-wf-panel { display: none; }
.dp-wf.dp-wf-js .dp-wf-panel.is-active { display: block; animation: dpWfIn .25s ease; }
@keyframes dpWfIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dp-wf-panel + .dp-wf-panel { margin-top: 3rem; }
.dp-wf-panel .dp-video-facade, .dp-wf-panel .dp-video-frame { margin: 0 0 1.6rem; }
.dp-wf-panel h3 { font-family: monospace; font-size: 1.6rem; color: var(--wp--preset--color--ink); margin: 0 0 0.3rem; }
.dp-wf-kicker { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; color: var(--wp--preset--color--blue); margin: 0 0 1rem; }
.dp-wf-invoke {
	font-family: monospace; font-size: 0.95rem; background: var(--wp--preset--color--navy);
	color: #7ee2a8; border-radius: 10px; padding: 0.9rem 1.1rem; margin: 1rem 0 1.4rem; overflow-x: auto;
}
.dp-wf-invoke .dp-wf-prompt { color: #79d2ff; }
.dp-wf-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1.2rem; }
.dp-wf-badge {
	font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
	border-radius: 999px; padding: 0.35rem 0.85rem;
	background: var(--wp--preset--color--cloud); border: 1px solid var(--wp--preset--color--line); color: var(--wp--preset--color--slate);
}
.dp-wf-badge.is-gate { background: #fff4e5; border-color: #ffd8a8; color: #9a5b00; }
.dp-wf-phases { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; font-size: 0.85rem; font-weight: 600; color: var(--wp--preset--color--ink); margin: 0 0 1.4rem; padding: 0; list-style: none; }
.dp-wf-phases li { background: var(--wp--preset--color--cloud); border: 1px solid var(--wp--preset--color--line); border-radius: 8px; padding: 0.4rem 0.7rem; }
.dp-wf-phases li::after { content: "→"; margin-left: 0.55rem; color: var(--wp--preset--color--sky); }
.dp-wf-phases li:last-child::after { content: ""; margin: 0; }
@media (max-width: 880px) {
	.dp-wf { flex-direction: column; }
	.dp-wf-side { position: static; flex-direction: row; flex-wrap: wrap; flex-basis: auto; width: 100%; }
	.dp-wf-item { width: auto; flex: 1 1 220px; }
}

/* FAQ accordions (core Details block, .dp-faq) */
details.dp-faq {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 12px;
	background: var(--wp--preset--color--white);
	padding: 1.05rem 1.3rem;
	margin-bottom: 0.9rem;
	transition: border-color .2s ease, box-shadow .2s ease;
}
details.dp-faq:hover { border-color: var(--wp--preset--color--blue); }
details.dp-faq[open] { box-shadow: var(--wp--preset--shadow--card); }
details.dp-faq summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 500;
	font-size: 1.05rem;
	color: var(--wp--preset--color--ink);
	list-style: none;
	position: relative;
	padding-right: 2.2rem;
}
details.dp-faq summary::-webkit-details-marker { display: none; }
details.dp-faq summary::after {
	content: "+";
	position: absolute;
	right: 0.2rem;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.5rem;
	font-weight: 400;
	color: var(--wp--preset--color--blue);
	transition: transform .2s ease;
}
details.dp-faq[open] summary::after { content: "−"; }
details.dp-faq[open] summary { margin-bottom: 0.65rem; }
details.dp-faq > *:not(summary) { margin: 0; }

/* Footer */
.dp-footer a { text-decoration: none; }
.dp-footer a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.dp-flame-text { animation: none; }
	.dp-card, .wp-block-button__link, .dp-brands img { transition: none; }
}
