/*
Theme Name: FlowPage
Theme URI: https://flowpageweb.com
Description: Tema hijo de Twenty Twenty-Five exclusivo para la landing de FlowPage. Identidad: azul #2563EB, marino #0F172A, acento #01C38E, tipografia Archivo.
Template: twentytwentyfive
Version: 1.1.0
Text Domain: flowpage
*/

:root {
	--fp-primary: #2563EB;
	--fp-primary-dark: #1D4ED8;
	--fp-ink: #0F172A;
	--fp-accent: #01C38E;
	--fp-white: #FFFFFF;
	--fp-bg: #F1F5F9;
	--fp-muted: #475569;
	--fp-pad: clamp(20px, 5vw, 72px);
	--fp-side: max(var(--fp-pad), calc((100% - 1200px) / 2));
	--fp-radius: 20px;
	--fp-pill: 999px;
	--fp-img: url("/wp-content/themes/flowpage/assets/img");
}

body {
	font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--fp-ink);
	background: var(--fp-white);
	-webkit-font-smoothing: antialiased;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.wp-site-blocks { padding: 0 !important; }
.wp-site-blocks > * { margin-block-start: 0 !important; }
.fp-section > *, .fp-header > *, .fp-footer > *, .fp-band > * { margin-block-start: 0; margin-block-end: 0; }
img { max-width: 100%; height: auto; }

.fp-section {
	padding: clamp(64px, 8vw, 120px) var(--fp-side);
}

/* Tipografia (manual de marca): Black titulares, Bold secundarios, Regular parrafos */
.fp-section h1, .fp-section h2 {
	font-family: "Archivo", sans-serif;
	font-weight: 900;
	line-height: 1.05;
	letter-spacing: -0.02em;
	margin: 0 0 20px;
}
.fp-section h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.fp-section h3 { font-weight: 700; line-height: 1.15; margin: 0 0 8px; }
.fp-section p { font-weight: 400; line-height: 1.6; font-size: 1.0625rem; max-width: 62ch; margin: 0 0 16px; }
.fp-title-img { margin: 0 0 20px; line-height: 0; }
.fp-title-img img { display: block; height: auto; }

/* Botones: un solo estilo, pastilla */
.fp-btn .wp-block-button__link {
	background: linear-gradient(90deg, var(--fp-primary), var(--fp-primary-dark));
	color: var(--fp-white);
	font-weight: 700;
	font-size: 1.0625rem;
	padding: 16px 36px;
	border-radius: var(--fp-pill);
	border: 0;
	box-shadow: 0 10px 28px -12px rgba(37, 99, 235, .65);
	transition: transform .15s ease, box-shadow .15s ease;
}
.fp-btn .wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(37, 99, 235, .8); }
.fp-btn .wp-block-button__link:active { transform: translateY(0); }
.fp-btn .wp-block-button__link:focus-visible, .fp-nav a:focus-visible, .fp-form button:focus-visible {
	outline: 3px solid var(--fp-accent);
	outline-offset: 3px;
}
.wp-block-buttons { margin: 8px 0 0 !important; }

/* Cabecera */
.fp-header {
	position: sticky; top: 0; z-index: 50;
	display: flex; align-items: center; justify-content: space-between; gap: 24px;
	padding: 14px var(--fp-side);
	background: rgba(15, 23, 42, .92);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.fp-header img { display: block; height: 34px; width: auto; }
.fp-nav { display: flex; align-items: center; gap: 28px; }
.fp-nav a { color: #E2E8F0; text-decoration: none; font-weight: 500; font-size: .9375rem; }
.fp-nav a:hover { color: var(--fp-accent); }
.fp-nav .fp-nav__cta {
	background: var(--fp-primary); color: var(--fp-white); font-weight: 700;
	padding: 10px 22px; border-radius: var(--fp-pill); white-space: nowrap;
}
.fp-nav .fp-nav__cta:hover { color: var(--fp-white); background: var(--fp-primary-dark); }

/* Hero: el render del robot es el fondo; el texto va sobre la zona oscura */
.fp-hero {
	position: relative; overflow: hidden; color: var(--fp-white); background: #030820;
	display: flex; align-items: center;
	min-height: min(90vh, 780px);
	padding-block: clamp(48px, 7vw, 96px);
	isolation: isolate;
}
.fp-hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 60%; transform-origin: 65% 85%; z-index: -1; }
.fp-hero__copy { max-width: min(560px, 46vw); }
.fp-hero .fp-title-img img { width: 100%; }
.fp-hero p { color: #E2E8F0; font-size: 1.125rem; }

/* Videos: de fondo (aparecen cuando empiezan a reproducirse) y en marco */
.fp-bgvideo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; opacity: 0; transition: opacity .9s ease; pointer-events: none; }
.fp-bgvideo.is-playing { opacity: 1; }
.fp-hero__video { object-position: 70% 60%; }
.fp-band, .fp-why, .fp-contact__intro { position: relative; overflow: hidden; isolation: isolate; }
.fp-band .fp-bgvideo { filter: brightness(.9); }
.fp-why .fp-bgvideo { filter: brightness(.7); }
.fp-contact__intro .fp-bgvideo { filter: brightness(.5); }
.fp-media { display: block; width: 100%; height: 100%; object-fit: cover; background: #07123a; }

/* Conocenos */
.fp-about { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(32px, 6vw, 96px); align-items: center; background: var(--fp-white); }
.fp-about__mark { background: radial-gradient(closest-side, #DBEAFE, var(--fp-bg)); border-radius: 32px; padding: clamp(16px, 3vw, 40px); display: grid; place-items: center; border-bottom: 6px solid var(--fp-accent); }
.fp-about__mark img { width: min(380px, 100%); height: auto; filter: drop-shadow(0 22px 24px rgba(15, 23, 42, .25)); }
.fp-about p.fp-lead { font-size: 1.375rem; font-weight: 500; line-height: 1.45; color: var(--fp-ink); }

/* Banda del titulo "Desarrollo y Mantenimiento" */
.fp-band {
	padding: clamp(40px, 6vw, 80px) var(--fp-side); display: flex; align-items: center;
	background: #07123a url("/wp-content/themes/flowpage/assets/img/fondo-2.jpg") center / cover no-repeat;
}
.fp-band .fp-title-img img { width: min(900px, 100%); }

/* Desarrollo y Mantenimiento */
.fp-dev { display: grid; grid-template-columns: .9fr 1.1fr; padding: 0; background: var(--fp-bg); }
.fp-dev__art {
	position: relative; min-height: 460px; display: grid; place-items: center; overflow: hidden;
	background: #07123a url("/wp-content/themes/flowpage/assets/img/fondo-3.jpg") center / cover no-repeat;
}
.fp-dev__art .fp-media { position: absolute; inset: 0; }
.fp-dev__copy { padding: clamp(48px, 6vw, 96px) var(--fp-pad); align-self: center; }
.fp-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0 28px; }
.fp-chip {
	display: flex; align-items: center; gap: 14px; padding: 18px;
	background: var(--fp-white); border-radius: 18px; border: 1px solid #DBE3EE;
	box-shadow: 0 12px 24px -18px rgba(15, 23, 42, .45);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.fp-chip:hover { transform: translateY(-3px); border-color: var(--fp-primary); box-shadow: 0 18px 30px -18px rgba(37, 99, 235, .55); }
.fp-chip__icon {
	flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
	background: linear-gradient(145deg, var(--fp-primary), var(--fp-primary-dark)); color: var(--fp-white);
}
.fp-chip__icon svg { width: 26px; height: 26px; }
.fp-chip:nth-child(even) .fp-chip__icon { background: linear-gradient(145deg, #34D8AE, var(--fp-accent)); color: var(--fp-ink); }
.fp-chip__text { display: grid; gap: 2px; text-align: left; }
.fp-chip__text strong { font-weight: 700; font-size: 1rem; line-height: 1.2; color: var(--fp-ink); }
.fp-chip__text span { font-size: .875rem; color: var(--fp-muted); line-height: 1.3; }

/* Servicios: cada fila lleva una tecla 3D de la marca */
.fp-services { background: var(--fp-white); }
.fp-services__head { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.fp-services__media { border-radius: 24px; overflow: hidden; aspect-ratio: 16 / 9; box-shadow: 0 30px 50px -30px rgba(15, 23, 42, .6); }
.fp-services__list { margin-top: 36px; border-top: 2px solid var(--fp-ink); }
.fp-service {
	display: grid; grid-template-columns: 96px .9fr 1.1fr; gap: 12px clamp(20px, 4vw, 56px);
	padding: 26px 0; border-bottom: 1px solid #CBD5E1; align-items: center;
}
.fp-service__key { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 14px 14px rgba(15, 23, 42, .25)); transition: transform .3s ease; }
.fp-service:hover .fp-service__key { transform: rotate(-8deg) scale(1.08); }
.fp-service h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 900; letter-spacing: -.01em; margin: 0; }
.fp-service p { margin: 0; color: var(--fp-muted); }

/* Integracion */
.fp-int {
	color: var(--fp-white); display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: center;
	background: #07123a url("/wp-content/themes/flowpage/assets/img/fondo-1.jpg") center / cover no-repeat;
}
.fp-int .fp-title-img img { width: min(560px, 100%); }
.fp-int p { color: #CBD5E1; }
.fp-int ul { list-style: none; padding: 0; margin: 12px 0 0; }
.fp-int li { display: flex; align-items: center; gap: 12px; padding: 7px 0; color: #E2E8F0; }
.fp-int li::before { content: ""; width: 26px; height: 18px; flex: none; background: url("/wp-content/themes/flowpage/assets/img/vineta.png") center / contain no-repeat; }
.fp-int h3 { font-size: 1.5rem; margin-top: 28px; }
.fp-int__art img { width: min(520px, 100%); height: auto; margin-inline: auto; display: block; filter: drop-shadow(0 24px 30px rgba(0, 10, 60, .55)); }

/* Por que elegirnos */
.fp-why {
	color: var(--fp-white); display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(24px, 5vw, 72px); align-items: center;
	background: #07123a url("/wp-content/themes/flowpage/assets/img/fondo-4.jpg") center / cover no-repeat;
}
.fp-why h2 { font-size: clamp(2.2rem, 5vw, 4rem); }
/* Carrusel (sin JS se ve como lista apilada) */
.fp-slider { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px 16px; }
.fp-slide { text-align: center; padding: 8px 0 18px; }
.fp-slide h3 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); font-weight: 700; color: var(--fp-white); margin: 0 0 8px; }
.fp-slide p { color: #E2E8F0; margin: 0 auto; max-width: 34ch; }
.fp-slider__arrow, .fp-slider__dots { display: none; }
.fp-slider.is-ready .fp-slider__arrow { display: grid; }
.fp-slider.is-ready .fp-slider__dots { display: flex; }
.fp-slider.is-ready .fp-slider__viewport { position: relative; min-height: 170px; }
.fp-slider.is-ready .fp-slide { position: absolute; inset: 0; display: grid; align-content: center; opacity: 0; transform: translateX(28px); transition: opacity .5s ease, transform .5s ease; pointer-events: none; }
.fp-slider.is-ready .fp-slide.is-active { opacity: 1; transform: none; pointer-events: auto; }
.fp-slider.is-ready .fp-slide.is-prev { transform: translateX(-28px); }
.fp-slider__arrow { width: 48px; height: 48px; border: 0; border-radius: 50%; place-items: center; cursor: pointer; background: rgba(255, 255, 255, .12); color: var(--fp-white); transition: background .2s ease, transform .2s ease; }
.fp-slider__arrow svg { width: 22px; height: 22px; }
.fp-slider__arrow:hover { background: var(--fp-accent); color: var(--fp-ink); transform: scale(1.08); }
.fp-slider__arrow:focus-visible, .fp-slider__dots button:focus-visible { outline: 3px solid var(--fp-accent); outline-offset: 3px; }
.fp-slider__dots { grid-column: 2; justify-content: center; gap: 10px; }
.fp-slider__dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 2px solid var(--fp-white); background: transparent; cursor: pointer; transition: background .2s ease, transform .2s ease; }
.fp-slider__dots button[aria-current="true"] { background: var(--fp-white); transform: scale(1.25); }

/* Contacto */
.fp-contact { padding: 0; display: grid; grid-template-columns: 1fr 1fr; background: var(--fp-bg); }
.fp-contact__intro {
	position: relative; color: var(--fp-white); display: flex; flex-direction: column; justify-content: center;
	padding: clamp(48px, 6vw, 96px) var(--fp-pad); min-height: 560px;
	background: #07123a url("/wp-content/themes/flowpage/assets/img/fondo-3.jpg") center / cover no-repeat;
}
.fp-contact__intro .fp-title-img--contact img { width: min(480px, 100%); }
.fp-contact__intro p { color: #CBD5E1; }
.fp-contact__robot { width: clamp(150px, 16vw, 220px); height: auto; margin: 0 0 8px -8px; filter: drop-shadow(0 16px 24px rgba(0, 10, 60, .6)); }
.fp-contact__mail { display: inline-block; align-self: flex-start; margin: 8px 0 28px; color: var(--fp-white); font-weight: 700; font-size: 1.125rem; text-decoration: none; border-bottom: 2px solid var(--fp-accent); padding-bottom: 2px; }
.fp-contact__mail:hover { color: var(--fp-accent); }
.fp-contact__mail:focus-visible { outline: 3px solid var(--fp-accent); outline-offset: 4px; }
.fp-contact__next { list-style: none; margin: 0; padding: 20px 0 0; border-top: 1px solid rgba(255, 255, 255, .18); display: grid; gap: 10px; }
.fp-contact__next li { display: flex; gap: 12px; align-items: baseline; color: #E2E8F0; line-height: 1.4; max-width: 46ch; }
.fp-contact__next li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--fp-accent); flex: none; transform: translateY(-1px); }
.fp-contact__form { padding: clamp(48px, 6vw, 96px) var(--fp-pad); display: flex; align-items: center; }
.fp-form { width: 100%; max-width: 520px; display: grid; gap: 20px; }
.fp-form label { display: block; font-size: .875rem; font-weight: 500; color: var(--fp-muted); margin-bottom: 4px; }
.fp-form input, .fp-form textarea {
	width: 100%; border: 0; border-bottom: 2px solid var(--fp-ink); background: transparent;
	font: inherit; color: var(--fp-ink); padding: 8px 0; border-radius: 0;
}
.fp-form input:focus, .fp-form textarea:focus { outline: none; border-bottom-color: var(--fp-primary); box-shadow: 0 2px 0 var(--fp-primary); }
.fp-form textarea { min-height: 96px; resize: vertical; }
.fp-form .fp-hp { position: absolute; left: -9999px; }
.fp-form button {
	justify-self: stretch; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 1.0625rem; color: var(--fp-white);
	padding: 16px 32px; border-radius: var(--fp-pill); background: linear-gradient(90deg, var(--fp-primary), var(--fp-primary-dark));
}
.fp-msg { padding: 14px 18px; border-radius: 14px; font-weight: 500; }
.fp-msg--ok { background: #D1FAE5; color: #064E3B; }
.fp-msg--err { background: #FEE2E2; color: #7F1D1D; }

/* Pie */
.fp-footer { background: var(--fp-ink); color: #94A3B8; padding: 36px var(--fp-side); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: .9375rem; }
.fp-footer img { height: 30px; width: auto; display: block; }
.fp-footer p { margin: 0; max-width: none; font-size: .9375rem; }

/* Responsive: cada rejilla de varias columnas colapsa a una */
@media (max-width: 900px) {
	.fp-about, .fp-dev, .fp-int, .fp-why, .fp-contact, .fp-services__head { grid-template-columns: 1fr; }
	.fp-service { grid-template-columns: 72px 1fr; }
	.fp-service p { grid-column: 1 / -1; }
	.fp-service__key { width: 72px; height: 72px; }
	.fp-nav a:not(.fp-nav__cta) { display: none; }
	/* Hero en celular: texto arriba, robot abajo */
	.fp-hero { align-items: flex-start; min-height: 0; padding-bottom: 420px; }
	.fp-hero__copy { max-width: 560px; }
	.fp-hero__bg { height: 62%; top: auto; bottom: 0; inset-inline: 0; object-position: 64% 40%; }
	.fp-hero::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 100%; z-index: -1; background: linear-gradient(180deg, #030820 0 46%, rgba(3, 8, 32, 0) 78%); }
	.fp-dev__art { min-height: 340px; }
	.fp-contact__intro { min-height: 0; }
	.fp-slider.is-ready .fp-slider__viewport { min-height: 210px; }
	.fp-slider__arrow { width: 40px; height: 40px; }
}
@media (max-width: 520px) {
	.fp-chips { grid-template-columns: 1fr; }
}

/* ===== Animaciones (solo transform y opacity; se apagan con prefers-reduced-motion) ===== */
@keyframes fp-up { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes fp-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes fp-pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }

.fp-hero__bg { animation: fp-pop 1.2s ease both; }
.fp-hero__copy > * { animation: fp-up .8s cubic-bezier(.2, .7, .2, 1) both; }
.fp-hero__copy > :nth-child(1) { animation-delay: .15s; }
.fp-hero__copy > :nth-child(2) { animation-delay: .35s; }
.fp-hero__copy > :nth-child(3) { animation-delay: .55s; }
.fp-header { animation: fp-up .6s ease both; }

.fp-dev__art img, .fp-contact__robot { animation: fp-bob 6s ease-in-out infinite; }
.fp-about__mark img { animation: fp-bob 7s ease-in-out infinite; }
.fp-int__art img { animation: fp-bob 6.5s ease-in-out infinite; }
.fp-service h3, .fp-int li { transition: transform .25s ease; }
.fp-service:hover h3 { transform: translateX(8px); }
.fp-int li:hover { transform: translateX(6px); }
.fp-btn .wp-block-button__link, .fp-nav .fp-nav__cta, .fp-form button { transition: transform .15s ease, box-shadow .15s ease, background .2s ease; }
.fp-nav .fp-nav__cta:hover, .fp-form button:hover { transform: translateY(-2px); }

/* Revelado al hacer scroll (las clases las agrega el script solo si hay movimiento) */
.fp-reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); }
.fp-reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
